@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.
@@ -25,5 +25,6 @@ describe('Drawer', function () {
25
25
  wrapper.update();
26
26
  expect(wrapper.find('.SOME_INNER_CONTENTS')).toHaveLength(0);
27
27
  });
28
+ jest.useRealTimers();
28
29
  });
29
30
  });
@@ -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
- beforeEach(function () {
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' }];
@@ -30,5 +30,6 @@ describe('Drawer', function () {
30
30
  wrapper.update();
31
31
  expect(wrapper.find('.SOME_INNER_CONTENTS')).toHaveLength(0);
32
32
  });
33
+ jest.useRealTimers();
33
34
  });
34
35
  });
@@ -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
- beforeEach(function () {
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' }];
@@ -33,5 +33,6 @@ describe('useFakeCenterNode tests', function () {
33
33
  jest.advanceTimersByTime(1000);
34
34
  });
35
35
  expect(graph.hasNode(useFakeCenterNode_1.FAKE_CENTER_NODE_ID)).toBe(false);
36
+ jest.useRealTimers();
36
37
  });
37
38
  });
@@ -31,5 +31,6 @@ describe('useFakeCenterNode tests', function () {
31
31
  jest.advanceTimersByTime(1000);
32
32
  });
33
33
  expect(graph.hasNode(FAKE_CENTER_NODE_ID)).toBe(false);
34
+ jest.useRealTimers();
34
35
  });
35
36
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.2007",
3
+ "version": "1.4.2008",
4
4
  "license": "SEE LICENSE IN LICENSE FILE",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./index.js",