@reltio/components 1.4.2071 → 1.4.2073
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AttributesView/AttributesView.js +1 -1
- package/ColumnsSettings/components/ColumnsSettingsPopup/ColumnsSettingsPopup.d.ts +2 -3
- package/ColumnsSettings/helpers.d.ts +3 -1
- package/ColumnsSettings/types.d.ts +8 -0
- package/CommentsContainer/CommentsContainer.js +1 -1
- package/ConfigureColumnsPopup/ConfigureColumnsPopup.d.ts +23 -40
- package/ConfigureColumnsPopup/ConfigureColumnsPopup.js +6 -26
- package/EditModeAttributesList/EditModeAttributesList.js +1 -1
- package/EditModeAttributesPager/EditModeAttributesPager.test.js +1 -1
- package/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.js +1 -1
- package/MetadataTypesSelector/MetadataTypesSelector.d.ts +2 -1
- package/MetadataTypesSelector/components/SelectMetadataTypesList/SelectMetadataTypesList.d.ts +5 -6
- package/MoreAttributesButton/useMoreAttributesItems.d.ts +1 -1
- package/ReadOnlyAttributesList/ReadOnlyAttributesList.js +1 -1
- package/ReadOnlyAttributesPager/ReadOnlyAttributesPager.js +1 -1
- package/ReadOnlyAttributesView/ReadOnlyAttributesView.js +1 -1
- package/ScrollableTabs/ScrollableTabs.test.js +69 -19
- package/SearchHighlighter/SearchHighlighter.test.js +18 -7
- package/SelectAttributesList/SelectAttributesList.d.ts +11 -6
- package/SelectAttributesList/SelectAttributesList.js +5 -2
- package/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.test.js +109 -60
- package/SidePanelContentHeader/SidePanelContentHeader.js +2 -2
- package/SidePanelContentHeader/SidePanelContentHeader.test.js +104 -0
- package/SidePanelEmptyState/SidePanelEmptyState.js +1 -1
- package/SidePanelEmptyState/SidePanelEmptyState.test.js +24 -0
- package/SimpleAttribute/SimpleAttribute.js +1 -1
- package/SimpleAttribute/SimpleAttribute.test.js +155 -80
- package/SimpleAttributeEditor/SimpleAttributeEditor.test.js +339 -330
- package/SimpleAttributeEditor/useAttributeValuePermissions.js +1 -1
- package/SimpleDropDownSelector/SimpleDropDownSelector.test.js +86 -10
- package/SimpleDropDownSelector/components/DropDownPlaceholder/DropDownPlaceholder.js +1 -1
- package/SimpleDropDownSelector/components/DropDownValue/DropDownValue.js +1 -1
- package/SimpleMatchRulesBlock/SimpleMatchRulesBlock.test.js +128 -32
- package/SmallIconButton/SmallIconButton.test.js +98 -25
- package/TableWithBars/TableWithBars.test.js +98 -60
- package/TableWithBars/components/AttributeCellRenderer/AttributeCellRenderer.js +1 -1
- package/TableWithBars/components/HeadCellRenderer/HeadCellRenderer.js +1 -1
- package/Tags/Tags.d.ts +0 -1
- package/Tags/Tags.test.js +8 -7
- package/TransitiveMatchBlock/TransitiveMatchBlock.test.js +78 -22
- package/TransitiveMatchRule/TransitiveMatchRule.test.js +78 -37
- package/TransitiveMatchRulesTooltip/TransitiveMatchRulesTooltip.js +1 -1
- package/TransitiveMatchRulesTooltip/TransitiveMatchRulesTooltip.test.js +12 -18
- package/UploadFileButton/UploadFileButton.d.ts +2 -2
- package/UploadFileButton/UploadFileButton.test.js +199 -0
- package/UploadImageDialog/UploadImageDialog.test.js +1 -0
- package/UploadImageDialog/components/DividerWithText/DividerWithText.js +1 -1
- package/UploadImageDialog/components/ErrorSnackbar/ErrorSnackbar.test.js +80 -22
- package/UploadImageDialog/components/ImageByUrlField/ImageByUrlField.js +1 -1
- package/UploadImageDialog/components/ImageByUrlField/ImageByUrlField.test.js +162 -49
- package/ValueChip/ValueChip.test.js +7 -23
- package/VirtualGroupedList/VirtualGroupedList.d.ts +19 -31
- package/VirtualGroupedList/VirtualGroupedList.js +11 -36
- package/VirtualGroupedList/VirtualGroupedList.test.js +224 -0
- package/VirtualGroupedList/helpers.d.ts +7 -2
- package/VirtualGroupedList/helpers.js +3 -1
- package/VirtualGroupedList/index.d.ts +1 -1
- package/VirtualGroupedList/types.d.ts +10 -6
- package/VirtualGroupedList/useScrollToFocusItem.d.ts +8 -5
- package/WhiteSearchInput/{WhiteSearchInput.spec.js → WhiteSearchInput.test.js} +3 -8
- package/cjs/AttributesView/AttributesView.js +2 -2
- package/cjs/ColumnsSettings/components/ColumnsSettingsPopup/ColumnsSettingsPopup.d.ts +2 -3
- package/cjs/ColumnsSettings/helpers.d.ts +3 -1
- package/cjs/ColumnsSettings/types.d.ts +8 -0
- package/cjs/ColumnsSettings/types.js +2 -0
- package/cjs/CommentsContainer/CommentsContainer.js +1 -1
- package/cjs/ConfigureColumnsPopup/ConfigureColumnsPopup.d.ts +23 -40
- package/cjs/ConfigureColumnsPopup/ConfigureColumnsPopup.js +6 -26
- package/cjs/EditModeAttributesList/EditModeAttributesList.js +2 -2
- package/cjs/EditModeAttributesPager/EditModeAttributesPager.test.js +2 -2
- package/cjs/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.js +2 -2
- package/cjs/MetadataTypesSelector/MetadataTypesSelector.d.ts +2 -1
- package/cjs/MetadataTypesSelector/components/SelectMetadataTypesList/SelectMetadataTypesList.d.ts +5 -6
- package/cjs/MoreAttributesButton/useMoreAttributesItems.d.ts +1 -1
- package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.js +2 -2
- package/cjs/ReadOnlyAttributesPager/ReadOnlyAttributesPager.js +2 -2
- package/cjs/ReadOnlyAttributesView/ReadOnlyAttributesView.js +2 -2
- package/cjs/ScrollableTabs/ScrollableTabs.test.js +69 -19
- package/cjs/SearchHighlighter/SearchHighlighter.test.js +18 -7
- package/cjs/SelectAttributesList/SelectAttributesList.d.ts +11 -6
- package/cjs/SelectAttributesList/SelectAttributesList.js +5 -2
- package/cjs/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.test.js +109 -60
- package/cjs/SidePanelContentHeader/SidePanelContentHeader.js +2 -2
- package/cjs/SidePanelContentHeader/SidePanelContentHeader.test.js +109 -0
- package/cjs/SidePanelEmptyState/SidePanelEmptyState.js +1 -1
- package/cjs/SidePanelEmptyState/SidePanelEmptyState.test.js +29 -0
- package/cjs/SimpleAttribute/SimpleAttribute.js +1 -1
- package/cjs/SimpleAttribute/SimpleAttribute.test.js +155 -80
- package/cjs/SimpleAttributeEditor/SimpleAttributeEditor.test.js +338 -352
- package/cjs/SimpleAttributeEditor/useAttributeValuePermissions.js +2 -2
- package/cjs/SimpleDropDownSelector/SimpleDropDownSelector.test.js +86 -10
- package/cjs/SimpleDropDownSelector/components/DropDownPlaceholder/DropDownPlaceholder.js +1 -1
- package/cjs/SimpleDropDownSelector/components/DropDownValue/DropDownValue.js +1 -1
- package/cjs/SimpleMatchRulesBlock/SimpleMatchRulesBlock.test.js +127 -31
- package/cjs/SmallIconButton/SmallIconButton.test.js +98 -25
- package/cjs/TableWithBars/TableWithBars.test.js +98 -60
- package/cjs/TableWithBars/components/AttributeCellRenderer/AttributeCellRenderer.js +1 -1
- package/cjs/TableWithBars/components/HeadCellRenderer/HeadCellRenderer.js +1 -1
- package/cjs/Tags/Tags.d.ts +0 -1
- package/cjs/Tags/Tags.test.js +8 -7
- package/cjs/TransitiveMatchBlock/TransitiveMatchBlock.test.js +77 -21
- package/cjs/TransitiveMatchRule/TransitiveMatchRule.test.js +78 -37
- package/cjs/TransitiveMatchRulesTooltip/TransitiveMatchRulesTooltip.js +1 -1
- package/cjs/TransitiveMatchRulesTooltip/TransitiveMatchRulesTooltip.test.js +12 -18
- package/cjs/UploadFileButton/UploadFileButton.d.ts +2 -2
- package/cjs/UploadFileButton/UploadFileButton.test.js +204 -0
- package/cjs/UploadImageDialog/UploadImageDialog.test.js +1 -0
- package/cjs/UploadImageDialog/components/DividerWithText/DividerWithText.js +1 -1
- package/cjs/UploadImageDialog/components/ErrorSnackbar/ErrorSnackbar.test.js +80 -22
- package/cjs/UploadImageDialog/components/ImageByUrlField/ImageByUrlField.js +1 -1
- package/cjs/UploadImageDialog/components/ImageByUrlField/ImageByUrlField.test.js +162 -49
- package/cjs/ValueChip/ValueChip.test.js +7 -23
- package/cjs/VirtualGroupedList/VirtualGroupedList.d.ts +19 -31
- package/cjs/VirtualGroupedList/VirtualGroupedList.js +11 -36
- package/cjs/VirtualGroupedList/VirtualGroupedList.test.js +252 -0
- package/cjs/VirtualGroupedList/helpers.d.ts +7 -2
- package/cjs/VirtualGroupedList/helpers.js +3 -1
- package/cjs/VirtualGroupedList/index.d.ts +1 -1
- package/cjs/VirtualGroupedList/types.d.ts +10 -6
- package/cjs/VirtualGroupedList/useScrollToFocusItem.d.ts +8 -5
- package/cjs/WhiteSearchInput/{WhiteSearchInput.spec.js → WhiteSearchInput.test.js} +3 -8
- package/cjs/features/activity-log/ActivitiesFactory/ActivitiesFactory.js +1 -0
- package/cjs/features/activity-log/ActivitiesFactory/ActivitiesFactory.test.js +5 -0
- package/cjs/features/activity-log/ActivityFilterEditor/helpers.js +2 -1
- package/cjs/features/activity-log/ActivityFilterEditor/helpers.test.js +3 -1
- package/cjs/features/activity-log/ActivityLogFilter/ActivityLogFilter.test.js +16 -15
- package/cjs/features/activity-log/types.d.ts +1 -0
- package/cjs/features/activity-log/types.js +1 -0
- package/cjs/features/activity-log/utils/activities.js +1 -0
- package/cjs/features/activity-log/utils/filters.js +5 -1
- package/cjs/features/activity-log/utils/filters.test.js +4 -2
- package/cjs/features/crosswalks/hooks/useAttributeActions.test.js +24 -25
- package/cjs/features/crosswalks/hooks/useCrosswalkActions.test.js +10 -11
- package/cjs/features/history/types.d.ts +1 -0
- package/cjs/features/workflow/hooks/useChangeRequest.test.js +5 -6
- package/cjs/hooks/useCommentsEntitiesMap/useCommentsEntitiesMap.test.js +8 -9
- package/cjs/hooks/useKeyboardNavigation/useKeyboardNavigation.d.ts +9 -13
- package/features/activity-log/ActivitiesFactory/ActivitiesFactory.js +1 -0
- package/features/activity-log/ActivitiesFactory/ActivitiesFactory.test.js +5 -0
- package/features/activity-log/ActivityFilterEditor/helpers.js +2 -1
- package/features/activity-log/ActivityFilterEditor/helpers.test.js +3 -1
- package/features/activity-log/ActivityLogFilter/ActivityLogFilter.test.js +16 -15
- package/features/activity-log/types.d.ts +1 -0
- package/features/activity-log/types.js +1 -0
- package/features/activity-log/utils/activities.js +1 -0
- package/features/activity-log/utils/filters.js +5 -1
- package/features/activity-log/utils/filters.test.js +4 -2
- package/features/crosswalks/hooks/useAttributeActions.test.js +1 -2
- package/features/crosswalks/hooks/useCrosswalkActions.test.js +1 -2
- package/features/history/types.d.ts +1 -0
- package/features/workflow/hooks/useChangeRequest.test.js +1 -2
- package/hooks/useCommentsEntitiesMap/useCommentsEntitiesMap.test.js +1 -2
- package/hooks/useKeyboardNavigation/useKeyboardNavigation.d.ts +9 -13
- package/package.json +1 -1
- package/SidePanelContentHeader/SidePanelContentHeader.spec.js +0 -49
- package/SidePanelEmptyState/SidePanelEmptyState.spec.js +0 -24
- package/SimpleAttributeEditor/SimpleAttributeEditorWithoutPermissions.test.js +0 -103
- package/SimpleDropDownSelector/components/DropDownPlaceholder/DropDownPlaceholder.test.js +0 -13
- package/TableWithBars/components/AttributeCellRenderer/AttributeCellRenderer.test.js +0 -21
- package/TableWithBars/components/HeadCellRenderer/HeadCellRenderer.test.js +0 -20
- package/UploadFileButton/UploadFileButton.spec.js +0 -219
- package/UploadImageDialog/components/DividerWithText/DividerWithText.test.js +0 -9
- package/VirtualGroupedList/VirtualGroupedList.spec.js +0 -282
- package/cjs/SidePanelContentHeader/SidePanelContentHeader.spec.js +0 -54
- package/cjs/SidePanelEmptyState/SidePanelEmptyState.spec.d.ts +0 -1
- package/cjs/SidePanelEmptyState/SidePanelEmptyState.spec.js +0 -29
- package/cjs/SimpleAttributeEditor/SimpleAttributeEditorWithoutPermissions.test.d.ts +0 -1
- package/cjs/SimpleAttributeEditor/SimpleAttributeEditorWithoutPermissions.test.js +0 -108
- package/cjs/SimpleDropDownSelector/components/DropDownPlaceholder/DropDownPlaceholder.test.d.ts +0 -1
- package/cjs/SimpleDropDownSelector/components/DropDownPlaceholder/DropDownPlaceholder.test.js +0 -18
- package/cjs/TableWithBars/components/AttributeCellRenderer/AttributeCellRenderer.test.d.ts +0 -1
- package/cjs/TableWithBars/components/AttributeCellRenderer/AttributeCellRenderer.test.js +0 -26
- package/cjs/TableWithBars/components/HeadCellRenderer/HeadCellRenderer.test.d.ts +0 -1
- package/cjs/TableWithBars/components/HeadCellRenderer/HeadCellRenderer.test.js +0 -25
- package/cjs/UploadFileButton/UploadFileButton.spec.d.ts +0 -1
- package/cjs/UploadFileButton/UploadFileButton.spec.js +0 -224
- package/cjs/UploadImageDialog/components/DividerWithText/DividerWithText.test.d.ts +0 -1
- package/cjs/UploadImageDialog/components/DividerWithText/DividerWithText.test.js +0 -14
- package/cjs/VirtualGroupedList/VirtualGroupedList.spec.d.ts +0 -1
- package/cjs/VirtualGroupedList/VirtualGroupedList.spec.js +0 -287
- package/cjs/WhiteSearchInput/WhiteSearchInput.spec.d.ts +0 -1
- /package/{SidePanelContentHeader/SidePanelContentHeader.spec.d.ts → ColumnsSettings/types.js} +0 -0
- /package/{SidePanelEmptyState/SidePanelEmptyState.spec.d.ts → SidePanelContentHeader/SidePanelContentHeader.test.d.ts} +0 -0
- /package/{SimpleAttributeEditor/SimpleAttributeEditorWithoutPermissions.test.d.ts → SidePanelEmptyState/SidePanelEmptyState.test.d.ts} +0 -0
- /package/{SimpleDropDownSelector/components/DropDownPlaceholder/DropDownPlaceholder.test.d.ts → UploadFileButton/UploadFileButton.test.d.ts} +0 -0
- /package/{TableWithBars/components/AttributeCellRenderer/AttributeCellRenderer.test.d.ts → VirtualGroupedList/VirtualGroupedList.test.d.ts} +0 -0
- /package/{TableWithBars/components/HeadCellRenderer/HeadCellRenderer.test.d.ts → WhiteSearchInput/WhiteSearchInput.test.d.ts} +0 -0
- /package/{UploadFileButton/UploadFileButton.spec.d.ts → cjs/SidePanelContentHeader/SidePanelContentHeader.test.d.ts} +0 -0
- /package/{UploadImageDialog/components/DividerWithText/DividerWithText.test.d.ts → cjs/SidePanelEmptyState/SidePanelEmptyState.test.d.ts} +0 -0
- /package/{VirtualGroupedList/VirtualGroupedList.spec.d.ts → cjs/UploadFileButton/UploadFileButton.test.d.ts} +0 -0
- /package/{WhiteSearchInput/WhiteSearchInput.spec.d.ts → cjs/VirtualGroupedList/VirtualGroupedList.test.d.ts} +0 -0
- /package/cjs/{SidePanelContentHeader/SidePanelContentHeader.spec.d.ts → WhiteSearchInput/WhiteSearchInput.test.d.ts} +0 -0
- /package/cjs/contexts/{AllwaysVisibleAttributesContext → AlwaysVisibleAttributesContext}/index.d.ts +0 -0
- /package/cjs/contexts/{AllwaysVisibleAttributesContext → AlwaysVisibleAttributesContext}/index.js +0 -0
- /package/contexts/{AllwaysVisibleAttributesContext → AlwaysVisibleAttributesContext}/index.d.ts +0 -0
- /package/contexts/{AllwaysVisibleAttributesContext → AlwaysVisibleAttributesContext}/index.js +0 -0
|
@@ -48,7 +48,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
};
|
|
49
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
50
|
var useAttributeActions_1 = require("./useAttributeActions");
|
|
51
|
-
var test_utils_1 = require("react-dom/test-utils");
|
|
52
51
|
var react_hooks_1 = require("@testing-library/react-hooks");
|
|
53
52
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
54
53
|
jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { entityCumulativeDelete: jest.fn(), entityCumulativeUpdate: jest.fn(), ignoreAttribute: jest.fn(), pinAttribute: jest.fn(), removeRelation: jest.fn(), updateAttribute: jest.fn(), createAttribute: jest.fn() })); });
|
|
@@ -158,7 +157,7 @@ describe('useAttributeActions', function () {
|
|
|
158
157
|
deleteAttribute(deleteEvent);
|
|
159
158
|
expect(mdm_sdk_1.entityCumulativeDelete).toHaveBeenCalledWith(requestParams);
|
|
160
159
|
expect(initialProps.onLoad).toHaveBeenCalled();
|
|
161
|
-
return [4 /*yield*/, (0,
|
|
160
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
162
161
|
return __generator(this, function (_a) {
|
|
163
162
|
resolveSuccess();
|
|
164
163
|
return [2 /*return*/];
|
|
@@ -169,7 +168,7 @@ describe('useAttributeActions', function () {
|
|
|
169
168
|
expect(initialProps.onSuccess).toHaveBeenCalled();
|
|
170
169
|
deleteAttribute(deleteEvent);
|
|
171
170
|
expect(mdm_sdk_1.entityCumulativeDelete).toHaveBeenCalledWith(requestParams);
|
|
172
|
-
return [4 /*yield*/, (0,
|
|
171
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
173
172
|
return __generator(this, function (_a) {
|
|
174
173
|
resolveError();
|
|
175
174
|
return [2 /*return*/];
|
|
@@ -257,7 +256,7 @@ describe('useAttributeActions', function () {
|
|
|
257
256
|
deleteAttribute(deleteEvent);
|
|
258
257
|
expect(mdm_sdk_1.entityCumulativeDelete).toHaveBeenCalledWith(requestParams);
|
|
259
258
|
expect(initialProps.onLoad).toHaveBeenCalled();
|
|
260
|
-
return [4 /*yield*/, (0,
|
|
259
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
261
260
|
return __generator(this, function (_a) {
|
|
262
261
|
resolveSuccess();
|
|
263
262
|
return [2 /*return*/];
|
|
@@ -268,7 +267,7 @@ describe('useAttributeActions', function () {
|
|
|
268
267
|
expect(initialProps.onSuccess).toHaveBeenCalled();
|
|
269
268
|
deleteAttribute(deleteEvent);
|
|
270
269
|
expect(mdm_sdk_1.entityCumulativeDelete).toHaveBeenCalledWith(requestParams);
|
|
271
|
-
return [4 /*yield*/, (0,
|
|
270
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
272
271
|
return __generator(this, function (_a) {
|
|
273
272
|
resolveError();
|
|
274
273
|
return [2 /*return*/];
|
|
@@ -373,7 +372,7 @@ describe('useAttributeActions', function () {
|
|
|
373
372
|
deleteAttribute(deleteEvent);
|
|
374
373
|
expect(mdm_sdk_1.removeRelation).toHaveBeenCalledWith('relations/1');
|
|
375
374
|
expect(initialProps.onLoad).toHaveBeenCalled();
|
|
376
|
-
return [4 /*yield*/, (0,
|
|
375
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
377
376
|
return __generator(this, function (_a) {
|
|
378
377
|
resolveSuccess();
|
|
379
378
|
return [2 /*return*/];
|
|
@@ -384,7 +383,7 @@ describe('useAttributeActions', function () {
|
|
|
384
383
|
expect(initialProps.onSuccess).toHaveBeenCalled();
|
|
385
384
|
deleteAttribute(deleteEvent);
|
|
386
385
|
expect(mdm_sdk_1.removeRelation).toHaveBeenCalledWith('relations/1');
|
|
387
|
-
return [4 /*yield*/, (0,
|
|
386
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
388
387
|
return __generator(this, function (_a) {
|
|
389
388
|
resolveError();
|
|
390
389
|
return [2 /*return*/];
|
|
@@ -447,7 +446,7 @@ describe('useAttributeActions', function () {
|
|
|
447
446
|
expect(mdm_sdk_1.entityCumulativeUpdate).toHaveBeenCalledWith(requestParams);
|
|
448
447
|
expect(initialProps.onLoad).toHaveBeenCalled();
|
|
449
448
|
expect(initialProps.onSuccess).not.toHaveBeenCalled();
|
|
450
|
-
return [4 /*yield*/, (0,
|
|
449
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
451
450
|
return __generator(this, function (_a) {
|
|
452
451
|
resolveSuccess();
|
|
453
452
|
return [2 /*return*/];
|
|
@@ -459,7 +458,7 @@ describe('useAttributeActions', function () {
|
|
|
459
458
|
deleteAttribute(deleteEvent);
|
|
460
459
|
expect(mdm_sdk_1.entityCumulativeUpdate).toHaveBeenCalledWith(requestParams);
|
|
461
460
|
expect(initialProps.onError).not.toHaveBeenCalled();
|
|
462
|
-
return [4 /*yield*/, (0,
|
|
461
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
463
462
|
return __generator(this, function (_a) {
|
|
464
463
|
resolveError();
|
|
465
464
|
return [2 /*return*/];
|
|
@@ -491,7 +490,7 @@ describe('useAttributeActions', function () {
|
|
|
491
490
|
value: true
|
|
492
491
|
});
|
|
493
492
|
expect(initialProps.onLoad).toHaveBeenCalled();
|
|
494
|
-
return [4 /*yield*/, (0,
|
|
493
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
495
494
|
return __generator(this, function (_a) {
|
|
496
495
|
resolveSuccess(__assign(__assign({}, attributeValue), { pin: true }));
|
|
497
496
|
return [2 /*return*/];
|
|
@@ -507,7 +506,7 @@ describe('useAttributeActions', function () {
|
|
|
507
506
|
attributeUri: 'entities/1/attributes/CountryCode/1',
|
|
508
507
|
value: false
|
|
509
508
|
});
|
|
510
|
-
return [4 /*yield*/, (0,
|
|
509
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
511
510
|
return __generator(this, function (_a) {
|
|
512
511
|
resolveError();
|
|
513
512
|
return [2 /*return*/];
|
|
@@ -539,7 +538,7 @@ describe('useAttributeActions', function () {
|
|
|
539
538
|
value: true
|
|
540
539
|
});
|
|
541
540
|
expect(initialProps.onLoad).toHaveBeenCalled();
|
|
542
|
-
return [4 /*yield*/, (0,
|
|
541
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
543
542
|
return __generator(this, function (_a) {
|
|
544
543
|
resolveSuccess(__assign(__assign({}, attributeValue), { ignored: true }));
|
|
545
544
|
return [2 /*return*/];
|
|
@@ -555,7 +554,7 @@ describe('useAttributeActions', function () {
|
|
|
555
554
|
attributeUri: 'entities/1/attributes/CountryCode/1',
|
|
556
555
|
value: false
|
|
557
556
|
});
|
|
558
|
-
return [4 /*yield*/, (0,
|
|
557
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
559
558
|
return __generator(this, function (_a) {
|
|
560
559
|
resolveError();
|
|
561
560
|
return [2 /*return*/];
|
|
@@ -606,7 +605,7 @@ describe('useAttributeActions', function () {
|
|
|
606
605
|
value: 'Pushkina 1'
|
|
607
606
|
});
|
|
608
607
|
expect(initialProps.onLoad).toHaveBeenCalled();
|
|
609
|
-
return [4 /*yield*/, (0,
|
|
608
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
610
609
|
return __generator(this, function (_a) {
|
|
611
610
|
resolveSuccess(__assign({}, editEvent.attributeValue));
|
|
612
611
|
return [2 /*return*/];
|
|
@@ -624,7 +623,7 @@ describe('useAttributeActions', function () {
|
|
|
624
623
|
crosswalkValue: 'nQpZyQt',
|
|
625
624
|
value: 'Pushkina 1'
|
|
626
625
|
});
|
|
627
|
-
return [4 /*yield*/, (0,
|
|
626
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
628
627
|
return __generator(this, function (_a) {
|
|
629
628
|
resolveError();
|
|
630
629
|
return [2 /*return*/];
|
|
@@ -677,7 +676,7 @@ describe('useAttributeActions', function () {
|
|
|
677
676
|
});
|
|
678
677
|
expect(mdm_sdk_1.pinAttribute).not.toHaveBeenCalled();
|
|
679
678
|
expect(initialProps.onLoad).toHaveBeenCalled();
|
|
680
|
-
return [4 /*yield*/, (0,
|
|
679
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
681
680
|
return __generator(this, function (_a) {
|
|
682
681
|
resolveSuccess(__assign({}, editEvent.attributeValue));
|
|
683
682
|
return [2 /*return*/];
|
|
@@ -689,7 +688,7 @@ describe('useAttributeActions', function () {
|
|
|
689
688
|
attributeUri: 'entities/1/attributes/AddressLine/1',
|
|
690
689
|
value: true
|
|
691
690
|
});
|
|
692
|
-
return [4 /*yield*/, (0,
|
|
691
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
693
692
|
return __generator(this, function (_a) {
|
|
694
693
|
resolveSuccess(__assign({}, editEvent.attributeValue));
|
|
695
694
|
return [2 /*return*/];
|
|
@@ -742,7 +741,7 @@ describe('useAttributeActions', function () {
|
|
|
742
741
|
value: 'IT'
|
|
743
742
|
});
|
|
744
743
|
expect(initialProps.onLoad).toHaveBeenCalled();
|
|
745
|
-
return [4 /*yield*/, (0,
|
|
744
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
746
745
|
return __generator(this, function (_a) {
|
|
747
746
|
resolveSuccess(__assign({}, editEvent.attributeValue));
|
|
748
747
|
return [2 /*return*/];
|
|
@@ -758,7 +757,7 @@ describe('useAttributeActions', function () {
|
|
|
758
757
|
crosswalkValue: 'nQpZyQt',
|
|
759
758
|
value: 'IT'
|
|
760
759
|
});
|
|
761
|
-
return [4 /*yield*/, (0,
|
|
760
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
762
761
|
return __generator(this, function (_a) {
|
|
763
762
|
resolveError();
|
|
764
763
|
return [2 /*return*/];
|
|
@@ -804,7 +803,7 @@ describe('useAttributeActions', function () {
|
|
|
804
803
|
value: 'Italy'
|
|
805
804
|
});
|
|
806
805
|
expect(initialProps.onLoad).toHaveBeenCalled();
|
|
807
|
-
return [4 /*yield*/, (0,
|
|
806
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
808
807
|
return __generator(this, function (_a) {
|
|
809
808
|
resolveSuccess([{ index: 0, successful: true, object: {} }]);
|
|
810
809
|
return [2 /*return*/];
|
|
@@ -814,7 +813,7 @@ describe('useAttributeActions', function () {
|
|
|
814
813
|
_a.sent();
|
|
815
814
|
expect(initialProps.onSuccess).toHaveBeenCalled();
|
|
816
815
|
createAttributeAction({ attributeValue: attributeValue, crosswalk: crosswalk });
|
|
817
|
-
return [4 /*yield*/, (0,
|
|
816
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
818
817
|
return __generator(this, function (_a) {
|
|
819
818
|
resolveError();
|
|
820
819
|
return [2 /*return*/];
|
|
@@ -861,7 +860,7 @@ describe('useAttributeActions', function () {
|
|
|
861
860
|
value: 'IT'
|
|
862
861
|
});
|
|
863
862
|
expect(initialProps.onLoad).toHaveBeenCalled();
|
|
864
|
-
return [4 /*yield*/, (0,
|
|
863
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
865
864
|
return __generator(this, function (_a) {
|
|
866
865
|
resolveSuccess([{ index: 0, successful: true, object: {} }]);
|
|
867
866
|
return [2 /*return*/];
|
|
@@ -871,7 +870,7 @@ describe('useAttributeActions', function () {
|
|
|
871
870
|
_a.sent();
|
|
872
871
|
expect(initialProps.onSuccess).toHaveBeenCalled();
|
|
873
872
|
createAttributeAction({ attributeValue: attributeValue, crosswalk: crosswalk });
|
|
874
|
-
return [4 /*yield*/, (0,
|
|
873
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
875
874
|
return __generator(this, function (_a) {
|
|
876
875
|
resolveError();
|
|
877
876
|
return [2 /*return*/];
|
|
@@ -940,7 +939,7 @@ describe('useAttributeActions', function () {
|
|
|
940
939
|
}
|
|
941
940
|
});
|
|
942
941
|
expect(initialProps.onLoad).toHaveBeenCalled();
|
|
943
|
-
return [4 /*yield*/, (0,
|
|
942
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
944
943
|
return __generator(this, function (_a) {
|
|
945
944
|
resolveSuccess([{ index: 0, successful: true, object: {} }]);
|
|
946
945
|
return [2 /*return*/];
|
|
@@ -950,7 +949,7 @@ describe('useAttributeActions', function () {
|
|
|
950
949
|
_a.sent();
|
|
951
950
|
expect(initialProps.onSuccess).toHaveBeenCalled();
|
|
952
951
|
createAttributeAction({ attributeValue: attributeValue, crosswalk: crosswalk });
|
|
953
|
-
return [4 /*yield*/, (0,
|
|
952
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
954
953
|
return __generator(this, function (_a) {
|
|
955
954
|
resolveError();
|
|
956
955
|
return [2 /*return*/];
|
|
@@ -48,7 +48,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
};
|
|
49
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
50
|
var useCrosswalkActions_1 = require("./useCrosswalkActions");
|
|
51
|
-
var test_utils_1 = require("react-dom/test-utils");
|
|
52
51
|
var react_hooks_1 = require("@testing-library/react-hooks");
|
|
53
52
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
54
53
|
jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { addCrosswalk: jest.fn(), addCrosswalkInContributor: jest.fn(), editCrosswalkAttribute: jest.fn(), deleteCrosswalkAttribute: jest.fn(), deleteCrosswalk: jest.fn() })); });
|
|
@@ -123,7 +122,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
123
122
|
entityUri: entity.uri,
|
|
124
123
|
crosswalk: addEvent.crosswalk
|
|
125
124
|
});
|
|
126
|
-
return [4 /*yield*/, (0,
|
|
125
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
127
126
|
return __generator(this, function (_a) {
|
|
128
127
|
resolveSuccess();
|
|
129
128
|
return [2 /*return*/];
|
|
@@ -137,7 +136,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
137
136
|
entityUri: entity.uri,
|
|
138
137
|
crosswalk: addEvent.crosswalk
|
|
139
138
|
});
|
|
140
|
-
return [4 /*yield*/, (0,
|
|
139
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
141
140
|
return __generator(this, function (_a) {
|
|
142
141
|
resolveError();
|
|
143
142
|
return [2 /*return*/];
|
|
@@ -182,7 +181,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
182
181
|
crosswalkSourceTable: addInContributorEvent.crosswalk.sourceTable,
|
|
183
182
|
crosswalkDeleteDate: addInContributorEvent.crosswalk.deleteDate
|
|
184
183
|
});
|
|
185
|
-
return [4 /*yield*/, (0,
|
|
184
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
186
185
|
return __generator(this, function (_a) {
|
|
187
186
|
resolveSuccess();
|
|
188
187
|
return [2 /*return*/];
|
|
@@ -202,7 +201,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
202
201
|
crosswalkSourceTable: addInContributorEvent.crosswalk.sourceTable,
|
|
203
202
|
crosswalkDeleteDate: addInContributorEvent.crosswalk.deleteDate
|
|
204
203
|
});
|
|
205
|
-
return [4 /*yield*/, (0,
|
|
204
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
206
205
|
return __generator(this, function (_a) {
|
|
207
206
|
resolveError();
|
|
208
207
|
return [2 /*return*/];
|
|
@@ -229,7 +228,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
229
228
|
};
|
|
230
229
|
editCrosswalk(editEvent);
|
|
231
230
|
expect(mdm_sdk_1.editCrosswalkAttribute).toHaveBeenCalledWith(editEvent);
|
|
232
|
-
return [4 /*yield*/, (0,
|
|
231
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
233
232
|
return __generator(this, function (_a) {
|
|
234
233
|
resolveSuccess();
|
|
235
234
|
return [2 /*return*/];
|
|
@@ -240,7 +239,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
240
239
|
expect(initialProps.onSuccess).toHaveBeenCalled();
|
|
241
240
|
editCrosswalk(editEvent);
|
|
242
241
|
expect(mdm_sdk_1.editCrosswalkAttribute).toHaveBeenCalledWith(editEvent);
|
|
243
|
-
return [4 /*yield*/, (0,
|
|
242
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
244
243
|
return __generator(this, function (_a) {
|
|
245
244
|
resolveError();
|
|
246
245
|
return [2 /*return*/];
|
|
@@ -266,7 +265,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
266
265
|
};
|
|
267
266
|
editCrosswalk(deleteAttributeEvent);
|
|
268
267
|
expect(mdm_sdk_1.deleteCrosswalkAttribute).toHaveBeenCalledWith(deleteAttributeEvent);
|
|
269
|
-
return [4 /*yield*/, (0,
|
|
268
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
270
269
|
return __generator(this, function (_a) {
|
|
271
270
|
resolveSuccess();
|
|
272
271
|
return [2 /*return*/];
|
|
@@ -277,7 +276,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
277
276
|
expect(initialProps.onSuccess).toHaveBeenCalled();
|
|
278
277
|
editCrosswalk(deleteAttributeEvent);
|
|
279
278
|
expect(mdm_sdk_1.deleteCrosswalkAttribute).toHaveBeenCalledWith(deleteAttributeEvent);
|
|
280
|
-
return [4 /*yield*/, (0,
|
|
279
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
281
280
|
return __generator(this, function (_a) {
|
|
282
281
|
resolveError();
|
|
283
282
|
return [2 /*return*/];
|
|
@@ -302,7 +301,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
302
301
|
};
|
|
303
302
|
deleteCrosswalkAction(deleteEvent);
|
|
304
303
|
expect(mdm_sdk_1.deleteCrosswalk).toHaveBeenCalledWith(deleteEvent);
|
|
305
|
-
return [4 /*yield*/, (0,
|
|
304
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
306
305
|
return __generator(this, function (_a) {
|
|
307
306
|
resolveSuccess();
|
|
308
307
|
return [2 /*return*/];
|
|
@@ -313,7 +312,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
313
312
|
expect(initialProps.onSuccess).toHaveBeenCalled();
|
|
314
313
|
deleteCrosswalkAction(deleteEvent);
|
|
315
314
|
expect(mdm_sdk_1.deleteCrosswalk).toHaveBeenCalledWith(deleteEvent);
|
|
316
|
-
return [4 /*yield*/, (0,
|
|
315
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
317
316
|
return __generator(this, function (_a) {
|
|
318
317
|
resolveError();
|
|
319
318
|
return [2 /*return*/];
|
|
@@ -37,6 +37,7 @@ export declare const HistoryChangeTypes: {
|
|
|
37
37
|
COMMENT_UPDATED: ActivityTypes.COMMENT_UPDATED;
|
|
38
38
|
COMMENT_DELETED: ActivityTypes.COMMENT_DELETED;
|
|
39
39
|
ANALYTICS_ATTRIBUTES_CHANGED: ActivityTypes.ANALYTICS_ATTRIBUTES_CHANGED;
|
|
40
|
+
ATTRIBUTE_UNMASKED: ActivityTypes.ATTRIBUTE_UNMASKED;
|
|
40
41
|
SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE: ActivityTypes.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE;
|
|
41
42
|
GROUP_CREATED: ActivityTypes.GROUP_CREATED;
|
|
42
43
|
GROUP_REMOVED: ActivityTypes.GROUP_REMOVED;
|
|
@@ -49,7 +49,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
50
|
var react_hooks_1 = require("@testing-library/react-hooks");
|
|
51
51
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
52
|
-
var test_utils_1 = require("react-dom/test-utils");
|
|
53
52
|
var ErrorPopup_1 = require("../../../ErrorPopup");
|
|
54
53
|
var useChangeRequest_1 = require("./useChangeRequest");
|
|
55
54
|
jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { getDataChangeRequest: jest.fn(), getEntitiesByUris: jest.fn() })); });
|
|
@@ -148,7 +147,7 @@ describe('useChangeRequest tests', function () {
|
|
|
148
147
|
switch (_a.label) {
|
|
149
148
|
case 0:
|
|
150
149
|
result = setUp('').result;
|
|
151
|
-
return [4 /*yield*/, (0,
|
|
150
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
152
151
|
return __generator(this, function (_a) {
|
|
153
152
|
resolveChangeRequest(true);
|
|
154
153
|
return [2 /*return*/];
|
|
@@ -174,7 +173,7 @@ describe('useChangeRequest tests', function () {
|
|
|
174
173
|
switch (_a.label) {
|
|
175
174
|
case 0:
|
|
176
175
|
result = setUp('testUri').result;
|
|
177
|
-
return [4 /*yield*/, (0,
|
|
176
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
178
177
|
return __generator(this, function (_a) {
|
|
179
178
|
resolveChangeRequest();
|
|
180
179
|
return [2 /*return*/];
|
|
@@ -182,7 +181,7 @@ describe('useChangeRequest tests', function () {
|
|
|
182
181
|
}); })];
|
|
183
182
|
case 1:
|
|
184
183
|
_a.sent();
|
|
185
|
-
return [4 /*yield*/, (0,
|
|
184
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
186
185
|
return __generator(this, function (_a) {
|
|
187
186
|
resolveGetEntitiesByUris(true);
|
|
188
187
|
return [2 /*return*/];
|
|
@@ -213,7 +212,7 @@ describe('useChangeRequest tests', function () {
|
|
|
213
212
|
switch (_a.label) {
|
|
214
213
|
case 0:
|
|
215
214
|
result = setUp('testUri').result;
|
|
216
|
-
return [4 /*yield*/, (0,
|
|
215
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
217
216
|
return __generator(this, function (_a) {
|
|
218
217
|
resolveChangeRequest();
|
|
219
218
|
return [2 /*return*/];
|
|
@@ -221,7 +220,7 @@ describe('useChangeRequest tests', function () {
|
|
|
221
220
|
}); })];
|
|
222
221
|
case 1:
|
|
223
222
|
_a.sent();
|
|
224
|
-
return [4 /*yield*/, (0,
|
|
223
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
225
224
|
return __generator(this, function (_a) {
|
|
226
225
|
resolveGetEntitiesByUris();
|
|
227
226
|
return [2 /*return*/];
|
|
@@ -61,7 +61,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
61
61
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
62
|
var react_1 = __importDefault(require("react"));
|
|
63
63
|
var react_hooks_1 = require("@testing-library/react-hooks");
|
|
64
|
-
var test_utils_1 = require("react-dom/test-utils");
|
|
65
64
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
66
65
|
var MdmModuleContext_1 = require("../../contexts/MdmModuleContext");
|
|
67
66
|
var useCommentsEntitiesMap_1 = require("./useCommentsEntitiesMap");
|
|
@@ -122,7 +121,7 @@ describe('useCollaboration behaviour', function () {
|
|
|
122
121
|
],
|
|
123
122
|
options: { activeness: 'all', max: 2, select: 'uri,label,type' }
|
|
124
123
|
});
|
|
125
|
-
return [4 /*yield*/, (0,
|
|
124
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
126
125
|
return __generator(this, function (_a) {
|
|
127
126
|
switch (_a.label) {
|
|
128
127
|
case 0: return [4 /*yield*/, Promise.resolve()];
|
|
@@ -186,7 +185,7 @@ describe('useCollaboration behaviour', function () {
|
|
|
186
185
|
],
|
|
187
186
|
options: { activeness: 'all', max: 2, select: 'uri,label,type' }
|
|
188
187
|
});
|
|
189
|
-
return [4 /*yield*/, (0,
|
|
188
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
190
189
|
return __generator(this, function (_a) {
|
|
191
190
|
switch (_a.label) {
|
|
192
191
|
case 0: return [4 /*yield*/, Promise.resolve()];
|
|
@@ -236,7 +235,7 @@ describe('useCollaboration behaviour', function () {
|
|
|
236
235
|
],
|
|
237
236
|
options: { activeness: 'all', max: 1, select: 'uri,label,type' }
|
|
238
237
|
});
|
|
239
|
-
return [4 /*yield*/, (0,
|
|
238
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
240
239
|
return __generator(this, function (_a) {
|
|
241
240
|
switch (_a.label) {
|
|
242
241
|
case 0: return [4 /*yield*/, Promise.resolve()];
|
|
@@ -258,7 +257,7 @@ describe('useCollaboration behaviour', function () {
|
|
|
258
257
|
mdm_sdk_1.getFilteredEntities.mockReturnValue(Promise.resolve([
|
|
259
258
|
{ uri: 'entities/17utFhVb', type: 'configuration/entityTypes/HCP', label: 'BulkUpdate_regression_12' }
|
|
260
259
|
]));
|
|
261
|
-
(0,
|
|
260
|
+
(0, react_hooks_1.act)(function () {
|
|
262
261
|
rerender(__spreadArray(__spreadArray([], comments, true), [
|
|
263
262
|
{
|
|
264
263
|
objectId: 'relations/136SQO3C',
|
|
@@ -277,7 +276,7 @@ describe('useCollaboration behaviour', function () {
|
|
|
277
276
|
],
|
|
278
277
|
options: { activeness: 'all', max: 1, select: 'uri,label,type' }
|
|
279
278
|
});
|
|
280
|
-
return [4 /*yield*/, (0,
|
|
279
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
281
280
|
return __generator(this, function (_a) {
|
|
282
281
|
switch (_a.label) {
|
|
283
282
|
case 0: return [4 /*yield*/, Promise.resolve()];
|
|
@@ -338,7 +337,7 @@ describe('useCollaboration behaviour', function () {
|
|
|
338
337
|
],
|
|
339
338
|
options: { activeness: 'all', max: 1, select: 'uri,label,type' }
|
|
340
339
|
});
|
|
341
|
-
return [4 /*yield*/, (0,
|
|
340
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
342
341
|
return __generator(this, function (_a) {
|
|
343
342
|
switch (_a.label) {
|
|
344
343
|
case 0: return [4 /*yield*/, Promise.resolve()];
|
|
@@ -358,7 +357,7 @@ describe('useCollaboration behaviour', function () {
|
|
|
358
357
|
}
|
|
359
358
|
});
|
|
360
359
|
mdm_sdk_1.getFilteredEntities.mockReturnValue(Promise.reject());
|
|
361
|
-
(0,
|
|
360
|
+
(0, react_hooks_1.act)(function () {
|
|
362
361
|
rerender(__spreadArray(__spreadArray([], comments, true), [
|
|
363
362
|
{
|
|
364
363
|
objectId: 'relations/136SQO3C',
|
|
@@ -377,7 +376,7 @@ describe('useCollaboration behaviour', function () {
|
|
|
377
376
|
],
|
|
378
377
|
options: { activeness: 'all', max: 1, select: 'uri,label,type' }
|
|
379
378
|
});
|
|
380
|
-
return [4 /*yield*/, (0,
|
|
379
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
381
380
|
return __generator(this, function (_a) {
|
|
382
381
|
switch (_a.label) {
|
|
383
382
|
case 0: return [4 /*yield*/, Promise.resolve()];
|
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
item: {
|
|
6
|
-
item: Record<string, unknown>;
|
|
7
|
-
moveTo?: number;
|
|
8
|
-
};
|
|
2
|
+
import { VirtualGroupedListItem, VirtualGroupedListMainItem } from '../../VirtualGroupedList/types';
|
|
3
|
+
type Item<T> = T & {
|
|
4
|
+
notSelectable?: boolean;
|
|
9
5
|
};
|
|
10
|
-
type Props = {
|
|
11
|
-
items: Item[];
|
|
6
|
+
type Props<T, S> = {
|
|
7
|
+
items: VirtualGroupedListMainItem<Item<T>>[];
|
|
12
8
|
open: boolean;
|
|
13
9
|
onSelectFocusedItem: (item: {
|
|
14
|
-
item: Item
|
|
15
|
-
groupData: Item
|
|
10
|
+
item: Item<T>;
|
|
11
|
+
groupData: VirtualGroupedListItem<Item<T>>;
|
|
16
12
|
}) => void;
|
|
17
|
-
selectedItems:
|
|
13
|
+
selectedItems: S[];
|
|
18
14
|
onClose?: (event: React.KeyboardEvent) => void;
|
|
19
15
|
};
|
|
20
|
-
export declare const useKeyboardNavigation: ({ items, open, onSelectFocusedItem, selectedItems, onClose }: Props) => {
|
|
16
|
+
export declare const useKeyboardNavigation: <T, S>({ items, open, onSelectFocusedItem, selectedItems, onClose }: Props<T, S>) => {
|
|
21
17
|
focusIndex: number;
|
|
22
18
|
handleKeyDown: (event: React.KeyboardEvent) => boolean;
|
|
23
19
|
};
|
|
@@ -63,6 +63,7 @@ var ActivitiesFactory = /** @class */ (function () {
|
|
|
63
63
|
case ActivityTypes.MODEL_UPDATED:
|
|
64
64
|
case ActivityTypes.PERIODIC_TASK_SCHEDULED:
|
|
65
65
|
case ActivityTypes.USER_PROFILE_VIEW:
|
|
66
|
+
case ActivityTypes.ATTRIBUTE_UNMASKED:
|
|
66
67
|
return React.createElement(SimpleActivity, { data: data, type: type });
|
|
67
68
|
case ActivityTypes.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE:
|
|
68
69
|
return React.createElement(SynchronizationIssuesActivity, { data: data, type: type });
|
|
@@ -226,6 +226,11 @@ describe('Activities factory tests', function () {
|
|
|
226
226
|
setUp({ props: props });
|
|
227
227
|
screen.getByTestId('simple-activity');
|
|
228
228
|
});
|
|
229
|
+
it('should render simple activity for ATTRIBUTE_UNMASKED activity type', function () {
|
|
230
|
+
var props = { data: defaultData, type: ActivityTypes.ATTRIBUTE_UNMASKED };
|
|
231
|
+
setUp({ props: props });
|
|
232
|
+
screen.getByTestId('simple-activity');
|
|
233
|
+
});
|
|
229
234
|
});
|
|
230
235
|
describe('synchronization issues activity', function () {
|
|
231
236
|
it('should render synchronization issues activity for SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE activity type', function () {
|
|
@@ -14,7 +14,8 @@ var profileRelatedActivityTypes = [
|
|
|
14
14
|
ActivityTypes.NOT_MATCHES_SET,
|
|
15
15
|
ActivityTypes.NOT_MATCHES_RESET,
|
|
16
16
|
ActivityTypes.ENTITIES_MERGED_MANUALLY,
|
|
17
|
-
ActivityTypes.ENTITIES_MERGED_ON_THE_FLY
|
|
17
|
+
ActivityTypes.ENTITIES_MERGED_ON_THE_FLY,
|
|
18
|
+
ActivityTypes.ATTRIBUTE_UNMASKED
|
|
18
19
|
];
|
|
19
20
|
var groupRelatedActivityTypes = [
|
|
20
21
|
ActivityTypes.GROUP_CREATED,
|
|
@@ -35,6 +35,7 @@ var otherTypes = [
|
|
|
35
35
|
'COMMENT_UPDATED',
|
|
36
36
|
'COMMENT_DELETED',
|
|
37
37
|
'ANALYTICS_ATTRIBUTES_CHANGED',
|
|
38
|
+
'ATTRIBUTE_UNMASKED',
|
|
38
39
|
'SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE'
|
|
39
40
|
];
|
|
40
41
|
var profileTypes = [
|
|
@@ -51,7 +52,8 @@ var profileTypes = [
|
|
|
51
52
|
'NOT_MATCHES_SET',
|
|
52
53
|
'NOT_MATCHES_RESET',
|
|
53
54
|
'ENTITIES_MERGED_MANUALLY',
|
|
54
|
-
'ENTITIES_MERGED_ON_THE_FLY'
|
|
55
|
+
'ENTITIES_MERGED_ON_THE_FLY',
|
|
56
|
+
'ATTRIBUTE_UNMASKED'
|
|
55
57
|
];
|
|
56
58
|
describe('helpers tests', function () {
|
|
57
59
|
describe('getSelectorActivityTypes tests', function () {
|
|
@@ -359,21 +359,22 @@ describe('Activity log filter tests', function () {
|
|
|
359
359
|
case 2:
|
|
360
360
|
_a.sent();
|
|
361
361
|
options = screen.getAllByRole('option');
|
|
362
|
-
expect(options).toHaveLength(
|
|
363
|
-
expect(options[0]).toHaveTextContent('
|
|
364
|
-
expect(options[1]).toHaveTextContent('Not matches
|
|
365
|
-
expect(options[2]).toHaveTextContent('
|
|
366
|
-
expect(options[3]).toHaveTextContent('Potential matches
|
|
367
|
-
expect(options[4]).toHaveTextContent('
|
|
368
|
-
expect(options[5]).toHaveTextContent('Profile
|
|
369
|
-
expect(options[6]).toHaveTextContent('Profile
|
|
370
|
-
expect(options[7]).toHaveTextContent('Profile merged
|
|
371
|
-
expect(options[8]).toHaveTextContent('Profile merged
|
|
372
|
-
expect(options[9]).toHaveTextContent('Profile
|
|
373
|
-
expect(options[10]).toHaveTextContent('Profile
|
|
374
|
-
expect(options[11]).toHaveTextContent('
|
|
375
|
-
expect(options[12]).toHaveTextContent('Relationship
|
|
376
|
-
expect(options[13]).toHaveTextContent('Relationship
|
|
362
|
+
expect(options).toHaveLength(15);
|
|
363
|
+
expect(options[0]).toHaveTextContent('Attribute unmasked');
|
|
364
|
+
expect(options[1]).toHaveTextContent('Not matches reset');
|
|
365
|
+
expect(options[2]).toHaveTextContent('Not matches set');
|
|
366
|
+
expect(options[3]).toHaveTextContent('Potential matches found');
|
|
367
|
+
expect(options[4]).toHaveTextContent('Potential matches removed');
|
|
368
|
+
expect(options[5]).toHaveTextContent('Profile created');
|
|
369
|
+
expect(options[6]).toHaveTextContent('Profile lost merge');
|
|
370
|
+
expect(options[7]).toHaveTextContent('Profile merged');
|
|
371
|
+
expect(options[8]).toHaveTextContent('Profile merged manually');
|
|
372
|
+
expect(options[9]).toHaveTextContent('Profile merged on the fly');
|
|
373
|
+
expect(options[10]).toHaveTextContent('Profile un-merged');
|
|
374
|
+
expect(options[11]).toHaveTextContent('Profile updated');
|
|
375
|
+
expect(options[12]).toHaveTextContent('Relationship created');
|
|
376
|
+
expect(options[13]).toHaveTextContent('Relationship removed');
|
|
377
|
+
expect(options[14]).toHaveTextContent('Relationship updated');
|
|
377
378
|
return [4 /*yield*/, user.click(screen.getByText('Potential matches found'))];
|
|
378
379
|
case 3:
|
|
379
380
|
_a.sent();
|
|
@@ -26,6 +26,7 @@ export declare enum ActivityTypes {
|
|
|
26
26
|
COMMENT_UPDATED = "COMMENT_UPDATED",
|
|
27
27
|
COMMENT_DELETED = "COMMENT_DELETED",
|
|
28
28
|
ANALYTICS_ATTRIBUTES_CHANGED = "ANALYTICS_ATTRIBUTES_CHANGED",
|
|
29
|
+
ATTRIBUTE_UNMASKED = "ATTRIBUTE_UNMASKED",
|
|
29
30
|
SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE = "SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE",
|
|
30
31
|
GROUP_CREATED = "GROUP_CREATED",
|
|
31
32
|
GROUP_REMOVED = "GROUP_REMOVED",
|
|
@@ -25,6 +25,7 @@ export var ActivityTypes;
|
|
|
25
25
|
ActivityTypes["COMMENT_UPDATED"] = "COMMENT_UPDATED";
|
|
26
26
|
ActivityTypes["COMMENT_DELETED"] = "COMMENT_DELETED";
|
|
27
27
|
ActivityTypes["ANALYTICS_ATTRIBUTES_CHANGED"] = "ANALYTICS_ATTRIBUTES_CHANGED";
|
|
28
|
+
ActivityTypes["ATTRIBUTE_UNMASKED"] = "ATTRIBUTE_UNMASKED";
|
|
28
29
|
ActivityTypes["SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE"] = "SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE";
|
|
29
30
|
ActivityTypes["GROUP_CREATED"] = "GROUP_CREATED";
|
|
30
31
|
ActivityTypes["GROUP_REMOVED"] = "GROUP_REMOVED";
|
|
@@ -83,6 +83,7 @@ export var getActivityLabel = function (type) {
|
|
|
83
83
|
_a[ActivityTypes.USER_LOGIN] = i18n.text('Logged in'),
|
|
84
84
|
_a[ActivityTypes.USER_LOGOUT] = i18n.text('Logged out'),
|
|
85
85
|
_a[ActivityTypes.USER_PROFILE_VIEW] = i18n.text('Profile viewed'),
|
|
86
|
+
_a[ActivityTypes.ATTRIBUTE_UNMASKED] = i18n.text('Attribute unmasked'),
|
|
86
87
|
_a[ActivityTypes.USER_SEARCH] = i18n.text('Searched'),
|
|
87
88
|
_a[ActivityTypes.ANALYTICS_ATTRIBUTES_CHANGED] = i18n.text('Analytics attribute changed'),
|
|
88
89
|
_a[ActivityTypes.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE] = i18n.text('SFDC connector synchronization issue'),
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { append, cond, defaultTo, equals, identity, join, map, pipe, reject, toPairs } from 'ramda';
|
|
2
|
+
import { ActivityTypes } from '../types';
|
|
2
3
|
import { isEmptyValue, wrapInBrackets, multiValueFilter, buildUserFilterClause, buildSourceFilterClause, buildEntityTypeFilterClause, buildDateRangeFilterClause, buildEntityUriFilterClause } from '@reltio/mdm-sdk';
|
|
3
4
|
var buildActivityFilterClause = function (activityType) {
|
|
4
|
-
if (activityType.startsWith('USER_') ||
|
|
5
|
+
if (activityType.startsWith('USER_') ||
|
|
6
|
+
activityType.startsWith('COMMENT_') ||
|
|
7
|
+
activityType.startsWith('SFDC_') ||
|
|
8
|
+
activityType === ActivityTypes.ATTRIBUTE_UNMASKED) {
|
|
5
9
|
return "startsWith(label, '".concat(activityType, "')");
|
|
6
10
|
}
|
|
7
11
|
else {
|