@reltio/components 1.4.2007 → 1.4.2008
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/Drawer/Drawer.test.js +1 -0
- package/EditModeAttributesView/IntegrationEditModeAttributesView.test.js +1 -2
- package/HierarchyNodeTitle/useEntityDetails.test.js +3 -2
- package/LineChart/LineChart.test.js +1 -0
- package/ReactSortableTree/ReactSortableTree.test.js +3 -1
- package/cjs/Drawer/Drawer.test.js +1 -0
- package/cjs/EditModeAttributesView/IntegrationEditModeAttributesView.test.js +1 -2
- package/cjs/HierarchyNodeTitle/useEntityDetails.test.js +3 -2
- package/cjs/LineChart/LineChart.test.js +1 -0
- package/cjs/ReactSortableTree/ReactSortableTree.test.js +3 -1
- package/cjs/features/graph/DataModelGraph/hooks/useFakeCenterNode.test.js +1 -0
- package/features/graph/DataModelGraph/hooks/useFakeCenterNode.test.js +1 -0
- package/package.json +1 -1
package/Drawer/Drawer.test.js
CHANGED
|
@@ -112,12 +112,11 @@ describe('EditModeAttributesView tests', function () {
|
|
|
112
112
|
};
|
|
113
113
|
return __assign({ user: user }, render(React.createElement(EditModeAttributesView, __assign({}, props)), { wrapper: Providers }));
|
|
114
114
|
};
|
|
115
|
-
|
|
115
|
+
beforeAll(function () {
|
|
116
116
|
jest.useFakeTimers();
|
|
117
117
|
});
|
|
118
118
|
afterEach(function () {
|
|
119
119
|
jest.runOnlyPendingTimers();
|
|
120
|
-
jest.useRealTimers();
|
|
121
120
|
});
|
|
122
121
|
it('should highlight last added attribute', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
123
122
|
var _a, user, container, moreAttributesButton, attributeMenuItem, popover;
|
|
@@ -52,14 +52,15 @@ jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.re
|
|
|
52
52
|
describe('useEntityDetails', function () {
|
|
53
53
|
var entity = { uri: 'entities/123', type: 'configuration/entityTypes/HCP' };
|
|
54
54
|
beforeEach(function () {
|
|
55
|
-
jest.useFakeTimers();
|
|
56
55
|
getEntity.mockResolvedValue(entity);
|
|
57
56
|
debounce.mockImplementation(function (fn) { return jest.requireActual('@reltio/mdm-sdk').debounce(fn, 10); });
|
|
58
57
|
});
|
|
59
58
|
afterEach(function () {
|
|
60
|
-
jest.useRealTimers();
|
|
61
59
|
jest.clearAllMocks();
|
|
62
60
|
});
|
|
61
|
+
beforeAll(function () {
|
|
62
|
+
jest.useFakeTimers();
|
|
63
|
+
});
|
|
63
64
|
it('should load and set entityDetails after call of showEntityDetails', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
64
65
|
var result;
|
|
65
66
|
return __generator(this, function (_a) {
|
|
@@ -83,6 +83,7 @@ describe('LinesChart', function () {
|
|
|
83
83
|
jest.runAllTimers();
|
|
84
84
|
fireEvent.click(container.querySelector('.recharts-active-dot > .recharts-dot'));
|
|
85
85
|
expect(onItemClickSpy).toHaveBeenCalledWith('group1');
|
|
86
|
+
jest.useRealTimers();
|
|
86
87
|
return [2 /*return*/];
|
|
87
88
|
});
|
|
88
89
|
}); });
|
|
@@ -62,9 +62,11 @@ SortableTreeWithDndTestBackend.propTypes = {
|
|
|
62
62
|
current: PropTypes.object
|
|
63
63
|
})
|
|
64
64
|
};
|
|
65
|
-
jest.useFakeTimers();
|
|
66
65
|
jest.mock('frontend-collective-react-dnd-scrollzone', function () { return (__assign(__assign({}, jest.requireActual('frontend-collective-react-dnd-scrollzone')), { createScrollingComponent: function (component) { return component; } })); });
|
|
67
66
|
describe('<SortableTree />', function () {
|
|
67
|
+
beforeAll(function () {
|
|
68
|
+
jest.useFakeTimers();
|
|
69
|
+
});
|
|
68
70
|
it('loads using SortableTree second case', function () {
|
|
69
71
|
var onDragStateChanged = jest.fn();
|
|
70
72
|
var treeData = [{ title: 'a' }, { title: 'b' }];
|
|
@@ -117,12 +117,11 @@ describe('EditModeAttributesView tests', function () {
|
|
|
117
117
|
};
|
|
118
118
|
return __assign({ user: user }, (0, react_2.render)(react_1.default.createElement(EditModeAttributesView_1.EditModeAttributesView, __assign({}, props)), { wrapper: Providers }));
|
|
119
119
|
};
|
|
120
|
-
|
|
120
|
+
beforeAll(function () {
|
|
121
121
|
jest.useFakeTimers();
|
|
122
122
|
});
|
|
123
123
|
afterEach(function () {
|
|
124
124
|
jest.runOnlyPendingTimers();
|
|
125
|
-
jest.useRealTimers();
|
|
126
125
|
});
|
|
127
126
|
it('should highlight last added attribute', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
128
127
|
var _a, user, container, moreAttributesButton, attributeMenuItem, popover;
|
|
@@ -54,14 +54,15 @@ jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.re
|
|
|
54
54
|
describe('useEntityDetails', function () {
|
|
55
55
|
var entity = { uri: 'entities/123', type: 'configuration/entityTypes/HCP' };
|
|
56
56
|
beforeEach(function () {
|
|
57
|
-
jest.useFakeTimers();
|
|
58
57
|
mdm_sdk_1.getEntity.mockResolvedValue(entity);
|
|
59
58
|
mdm_sdk_1.debounce.mockImplementation(function (fn) { return jest.requireActual('@reltio/mdm-sdk').debounce(fn, 10); });
|
|
60
59
|
});
|
|
61
60
|
afterEach(function () {
|
|
62
|
-
jest.useRealTimers();
|
|
63
61
|
jest.clearAllMocks();
|
|
64
62
|
});
|
|
63
|
+
beforeAll(function () {
|
|
64
|
+
jest.useFakeTimers();
|
|
65
|
+
});
|
|
65
66
|
it('should load and set entityDetails after call of showEntityDetails', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
67
|
var result;
|
|
67
68
|
return __generator(this, function (_a) {
|
|
@@ -111,6 +111,7 @@ describe('LinesChart', function () {
|
|
|
111
111
|
jest.runAllTimers();
|
|
112
112
|
react_2.fireEvent.click(container.querySelector('.recharts-active-dot > .recharts-dot'));
|
|
113
113
|
expect(onItemClickSpy).toHaveBeenCalledWith('group1');
|
|
114
|
+
jest.useRealTimers();
|
|
114
115
|
return [2 /*return*/];
|
|
115
116
|
});
|
|
116
117
|
}); });
|
|
@@ -90,9 +90,11 @@ SortableTreeWithDndTestBackend.propTypes = {
|
|
|
90
90
|
current: prop_types_1.default.object
|
|
91
91
|
})
|
|
92
92
|
};
|
|
93
|
-
jest.useFakeTimers();
|
|
94
93
|
jest.mock('frontend-collective-react-dnd-scrollzone', function () { return (__assign(__assign({}, jest.requireActual('frontend-collective-react-dnd-scrollzone')), { createScrollingComponent: function (component) { return component; } })); });
|
|
95
94
|
describe('<SortableTree />', function () {
|
|
95
|
+
beforeAll(function () {
|
|
96
|
+
jest.useFakeTimers();
|
|
97
|
+
});
|
|
96
98
|
it('loads using SortableTree second case', function () {
|
|
97
99
|
var onDragStateChanged = jest.fn();
|
|
98
100
|
var treeData = [{ title: 'a' }, { title: 'b' }];
|