@reltio/components 1.4.2050 → 1.4.2052

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.
Files changed (187) hide show
  1. package/AttributeListItem/AttributeListItem.d.ts +1 -1
  2. package/ChartTooltip/ChartTooltip.js +3 -3
  3. package/ColumnsSettings/ColumnsSettings.d.ts +2 -1
  4. package/ColumnsSettings/ColumnsSettings.js +2 -2
  5. package/ColumnsSettings/ColumnsSettings.test.js +14 -0
  6. package/ColumnsSettings/components/ColumnListItem/ColumnListItem.d.ts +11 -26
  7. package/ColumnsSettings/components/ColumnListItem/ColumnListItem.js +0 -14
  8. package/ColumnsSettings/components/ColumnsSettingsPopup/ColumnsSettingsPopup.d.ts +2 -1
  9. package/ColumnsSettings/components/ColumnsSettingsPopup/ColumnsSettingsPopup.js +2 -2
  10. package/DropDownMenuButton/DropDownMenuButton.js +1 -1
  11. package/HOCs/withAsyncMount/withAsyncMount.test.js +52 -52
  12. package/IgnoreButton/IgnoreButton.spec.js +109 -20
  13. package/Image/Image.d.ts +1 -1
  14. package/Image/Image.js +8 -8
  15. package/Image/Image.test.js +46 -51
  16. package/ImageActionsOverlay/ImageActionsOverlay.js +2 -1
  17. package/ImageActionsOverlay/ImageActionsOverlay.test.js +207 -125
  18. package/ImageActionsOverlay/components/CheckedIcon/CheckedIcon.js +1 -1
  19. package/ImageAttributesGallery/ImageAttributesGallery.test.js +525 -281
  20. package/ImageAttributesLine/ImageAttributesLine.js +1 -1
  21. package/ImageAttributesLine/ImageAttributesLine.test.js +187 -193
  22. package/ImageAttributesLine/imageAttributeValues.test-data.d.ts +10 -0
  23. package/ImageAttributesLine/imageAttributeValues.test-data.js +22 -0
  24. package/ImageAttributesLineEditor/ImageAttributesLineEditor.test.js +315 -298
  25. package/ImageDetailsView/ImageDetailsView.test.js +529 -55
  26. package/ImageDetailsView/attributes.test-data.d.ts +4 -1
  27. package/ImageDetailsView/attributes.test-data.js +98 -1
  28. package/ImageDetailsView/components/ImageDetailsViewCarousel/ImageDetailsViewCarousel.js +2 -2
  29. package/ImageDetailsView/components/MetaInfoItem/MetaInfoItem.js +1 -1
  30. package/ImageDetailsView/components/MetaInfoList/MetaInfoList.js +1 -1
  31. package/ImageDetailsView/components/Thumbnails/Thumbnails.js +1 -1
  32. package/ImageDetailsView/helpers.test.js +4 -4
  33. package/ImageGalleryDialog/ImageGalleryDialog.test.js +89 -46
  34. package/ImportButton/ImportButton.test.js +94 -24
  35. package/InlineAttributesList/InlineAttributesList.test.js +22 -62
  36. package/InlineAttributesList/attributes.test-data.d.ts +4 -2
  37. package/InlineAttributesList/attributes.test-data.js +40 -1
  38. package/InlineAttributesPager/InlineAttributesPager.d.ts +1 -2
  39. package/InlineAttributesPager/InlineAttributesPager.js +1 -4
  40. package/InlineAttributesPager/InlineAttributesPager.test.js +393 -183
  41. package/InlineComplexAttribute/InlineComplexAttribute.js +1 -1
  42. package/InlineComplexAttribute/InlineComplexAttribute.test.js +396 -182
  43. package/InlineImageAttribute/InlineImageAttribute.test.js +103 -55
  44. package/InlineNestedAttribute/InlineNestedAttribute.test.js +105 -43
  45. package/InlineReferenceAttribute/InlineReferenceAttribute.test.js +165 -107
  46. package/InlineSimpleAttribute/InlineSimpleAttribute.spec.js +352 -346
  47. package/InlineSimpleAttributeEditor/InlineSimpleAttributeEditor.test.js +285 -194
  48. package/InternalLink/InternalLink.test.js +41 -11
  49. package/LookupEditor/LookupEditor.test.js +180 -44
  50. package/LookupEditor/components/GroupedDropDownEditor/helpers.test.js +1 -1
  51. package/MapChart/MapChart.js +3 -8
  52. package/MapChart/MapChart.test.js +152 -188
  53. package/MapChart/components/Legend/Legend.js +3 -3
  54. package/MaskingSwitcher/MaskingSwitcher.js +1 -1
  55. package/MatchRulesBadge/MatchRulesBadge.test.js +93 -24
  56. package/SelectEditor/SelectEditor.d.ts +4 -10
  57. package/SelectEditor/SelectEditor.js +0 -4
  58. package/SelectEditor/SelectEditor.test.js +79 -9
  59. package/SelectionPopup/SelectionPopup.d.ts +2 -1
  60. package/SelectionPopup/SelectionPopup.js +3 -3
  61. package/SelectionPopup/SelectionPopup.spec.js +90 -30
  62. package/cjs/AttributeListItem/AttributeListItem.d.ts +1 -1
  63. package/cjs/ChartTooltip/ChartTooltip.js +3 -3
  64. package/cjs/ColumnsSettings/ColumnsSettings.d.ts +2 -1
  65. package/cjs/ColumnsSettings/ColumnsSettings.js +2 -2
  66. package/cjs/ColumnsSettings/ColumnsSettings.test.js +14 -0
  67. package/cjs/ColumnsSettings/components/ColumnListItem/ColumnListItem.d.ts +11 -26
  68. package/cjs/ColumnsSettings/components/ColumnListItem/ColumnListItem.js +0 -14
  69. package/cjs/ColumnsSettings/components/ColumnsSettingsPopup/ColumnsSettingsPopup.d.ts +2 -1
  70. package/cjs/ColumnsSettings/components/ColumnsSettingsPopup/ColumnsSettingsPopup.js +2 -2
  71. package/cjs/DropDownMenuButton/DropDownMenuButton.js +1 -1
  72. package/cjs/HOCs/withAsyncMount/withAsyncMount.test.js +56 -56
  73. package/cjs/IgnoreButton/IgnoreButton.spec.js +109 -20
  74. package/cjs/Image/Image.d.ts +1 -1
  75. package/cjs/Image/Image.js +8 -8
  76. package/cjs/Image/Image.test.js +46 -51
  77. package/cjs/ImageActionsOverlay/ImageActionsOverlay.js +2 -1
  78. package/cjs/ImageActionsOverlay/ImageActionsOverlay.test.js +207 -125
  79. package/cjs/ImageActionsOverlay/components/CheckedIcon/CheckedIcon.js +1 -1
  80. package/cjs/ImageAttributesGallery/ImageAttributesGallery.test.js +525 -281
  81. package/cjs/ImageAttributesLine/ImageAttributesLine.js +1 -1
  82. package/cjs/ImageAttributesLine/ImageAttributesLine.test.js +195 -224
  83. package/cjs/ImageAttributesLine/imageAttributeValues.test-data.d.ts +10 -0
  84. package/cjs/ImageAttributesLine/imageAttributeValues.test-data.js +23 -1
  85. package/cjs/ImageAttributesLineEditor/ImageAttributesLineEditor.test.js +316 -299
  86. package/cjs/ImageDetailsView/ImageDetailsView.test.js +529 -55
  87. package/cjs/ImageDetailsView/attributes.test-data.d.ts +4 -1
  88. package/cjs/ImageDetailsView/attributes.test-data.js +99 -2
  89. package/cjs/ImageDetailsView/components/ImageDetailsViewCarousel/ImageDetailsViewCarousel.js +2 -2
  90. package/cjs/ImageDetailsView/components/MetaInfoItem/MetaInfoItem.js +1 -1
  91. package/cjs/ImageDetailsView/components/MetaInfoList/MetaInfoList.js +1 -1
  92. package/cjs/ImageDetailsView/components/Thumbnails/Thumbnails.js +1 -1
  93. package/cjs/ImageDetailsView/helpers.test.js +3 -3
  94. package/cjs/ImageGalleryDialog/ImageGalleryDialog.test.js +89 -46
  95. package/cjs/ImportButton/ImportButton.test.js +94 -24
  96. package/cjs/InlineAttributesList/InlineAttributesList.test.js +22 -62
  97. package/cjs/InlineAttributesList/attributes.test-data.d.ts +4 -2
  98. package/cjs/InlineAttributesList/attributes.test-data.js +41 -2
  99. package/cjs/InlineAttributesPager/InlineAttributesPager.d.ts +1 -2
  100. package/cjs/InlineAttributesPager/InlineAttributesPager.js +1 -4
  101. package/cjs/InlineAttributesPager/InlineAttributesPager.test.js +393 -183
  102. package/cjs/InlineComplexAttribute/InlineComplexAttribute.js +1 -1
  103. package/cjs/InlineComplexAttribute/InlineComplexAttribute.test.js +395 -204
  104. package/cjs/InlineImageAttribute/InlineImageAttribute.test.js +103 -55
  105. package/cjs/InlineNestedAttribute/InlineNestedAttribute.test.js +105 -43
  106. package/cjs/InlineReferenceAttribute/InlineReferenceAttribute.test.js +164 -106
  107. package/cjs/InlineSimpleAttribute/InlineSimpleAttribute.spec.js +351 -345
  108. package/cjs/InlineSimpleAttributeEditor/InlineSimpleAttributeEditor.test.js +307 -193
  109. package/cjs/InternalLink/InternalLink.test.js +40 -10
  110. package/cjs/LookupEditor/LookupEditor.test.js +178 -65
  111. package/cjs/LookupEditor/components/GroupedDropDownEditor/helpers.test.js +1 -1
  112. package/cjs/MapChart/MapChart.js +3 -8
  113. package/cjs/MapChart/MapChart.test.js +152 -188
  114. package/cjs/MapChart/components/Legend/Legend.js +3 -3
  115. package/cjs/MaskingSwitcher/MaskingSwitcher.js +1 -1
  116. package/cjs/MatchRulesBadge/MatchRulesBadge.test.js +93 -24
  117. package/cjs/SelectEditor/SelectEditor.d.ts +4 -10
  118. package/cjs/SelectEditor/SelectEditor.js +0 -4
  119. package/cjs/SelectEditor/SelectEditor.test.js +79 -9
  120. package/cjs/SelectionPopup/SelectionPopup.d.ts +2 -1
  121. package/cjs/SelectionPopup/SelectionPopup.js +3 -3
  122. package/cjs/SelectionPopup/SelectionPopup.spec.js +90 -30
  123. package/cjs/hooks/useAsyncMount/useAsyncMount.d.ts +1 -1
  124. package/cjs/hooks/useAsyncMount/useAsyncMount.js +1 -1
  125. package/hooks/useAsyncMount/useAsyncMount.d.ts +1 -1
  126. package/hooks/useAsyncMount/useAsyncMount.js +1 -1
  127. package/package.json +1 -1
  128. package/HOCs/withTableContext/withTableContext.test.d.ts +0 -1
  129. package/HOCs/withTableContext/withTableContext.test.js +0 -41
  130. package/ImageAttributesGallery/components/GalleryView/GalleryView.test.d.ts +0 -1
  131. package/ImageAttributesGallery/components/GalleryView/GalleryView.test.js +0 -98
  132. package/ImageDetailsView/components/ImageDetailsViewCarousel/ImageDetailsViewCarousel.test.d.ts +0 -1
  133. package/ImageDetailsView/components/ImageDetailsViewCarousel/ImageDetailsViewCarousel.test.js +0 -99
  134. package/ImageDetailsView/components/ImageDetailsViewSidebar/ImageDetailsViewSidebar.test.d.ts +0 -1
  135. package/ImageDetailsView/components/ImageDetailsViewSidebar/ImageDetailsViewSidebar.test.js +0 -65
  136. package/ImageDetailsView/components/MetaInfo/MetaInfo.test.d.ts +0 -1
  137. package/ImageDetailsView/components/MetaInfo/MetaInfo.test.js +0 -306
  138. package/ImageDetailsView/components/MetaInfoForm/MetaInfoForm.test.d.ts +0 -1
  139. package/ImageDetailsView/components/MetaInfoForm/MetaInfoForm.test.js +0 -134
  140. package/ImageDetailsView/components/MetaInfoHeader/MetaInfoHeader.test.d.ts +0 -1
  141. package/ImageDetailsView/components/MetaInfoHeader/MetaInfoHeader.test.js +0 -99
  142. package/ImageDetailsView/components/MetaInfoItem/MetaInfoItem.test.d.ts +0 -1
  143. package/ImageDetailsView/components/MetaInfoItem/MetaInfoItem.test.js +0 -36
  144. package/ImageDetailsView/components/MetaInfoList/MetaInfoList.test.d.ts +0 -1
  145. package/ImageDetailsView/components/MetaInfoList/MetaInfoList.test.js +0 -161
  146. package/ImageDetailsView/components/Thumbnails/Thumbnails.test.d.ts +0 -1
  147. package/ImageDetailsView/components/Thumbnails/Thumbnails.test.js +0 -76
  148. package/InlineAttributesPager/components/InlineImageAttributesBlock/InlineImageAttributesBlock.test.d.ts +0 -1
  149. package/InlineAttributesPager/components/InlineImageAttributesBlock/InlineImageAttributesBlock.test.js +0 -104
  150. package/InlineAttributesPager/components/InlineNestedAttributesBlock/InlineNestedAttributesBlock.test.d.ts +0 -1
  151. package/InlineAttributesPager/components/InlineNestedAttributesBlock/InlineNestedAttributesBlock.test.js +0 -114
  152. package/InlineAttributesPager/components/InlineReferenceAttributesBlock/InlineReferenceAttributesBlock.test.d.ts +0 -1
  153. package/InlineAttributesPager/components/InlineReferenceAttributesBlock/InlineReferenceAttributesBlock.test.js +0 -177
  154. package/InlineSimpleAttribute/components/CrosswalkMenuItem/CrosswalkMenuItem.spec.d.ts +0 -1
  155. package/InlineSimpleAttribute/components/CrosswalkMenuItem/CrosswalkMenuItem.spec.js +0 -52
  156. package/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.test.d.ts +0 -1
  157. package/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.test.js +0 -37
  158. package/cjs/HOCs/withTableContext/withTableContext.test.d.ts +0 -1
  159. package/cjs/HOCs/withTableContext/withTableContext.test.js +0 -46
  160. package/cjs/ImageAttributesGallery/components/GalleryView/GalleryView.test.d.ts +0 -1
  161. package/cjs/ImageAttributesGallery/components/GalleryView/GalleryView.test.js +0 -103
  162. package/cjs/ImageDetailsView/components/ImageDetailsViewCarousel/ImageDetailsViewCarousel.test.d.ts +0 -1
  163. package/cjs/ImageDetailsView/components/ImageDetailsViewCarousel/ImageDetailsViewCarousel.test.js +0 -104
  164. package/cjs/ImageDetailsView/components/ImageDetailsViewSidebar/ImageDetailsViewSidebar.test.d.ts +0 -1
  165. package/cjs/ImageDetailsView/components/ImageDetailsViewSidebar/ImageDetailsViewSidebar.test.js +0 -70
  166. package/cjs/ImageDetailsView/components/MetaInfo/MetaInfo.test.d.ts +0 -1
  167. package/cjs/ImageDetailsView/components/MetaInfo/MetaInfo.test.js +0 -311
  168. package/cjs/ImageDetailsView/components/MetaInfoForm/MetaInfoForm.test.d.ts +0 -1
  169. package/cjs/ImageDetailsView/components/MetaInfoForm/MetaInfoForm.test.js +0 -139
  170. package/cjs/ImageDetailsView/components/MetaInfoHeader/MetaInfoHeader.test.d.ts +0 -1
  171. package/cjs/ImageDetailsView/components/MetaInfoHeader/MetaInfoHeader.test.js +0 -104
  172. package/cjs/ImageDetailsView/components/MetaInfoItem/MetaInfoItem.test.d.ts +0 -1
  173. package/cjs/ImageDetailsView/components/MetaInfoItem/MetaInfoItem.test.js +0 -41
  174. package/cjs/ImageDetailsView/components/MetaInfoList/MetaInfoList.test.d.ts +0 -1
  175. package/cjs/ImageDetailsView/components/MetaInfoList/MetaInfoList.test.js +0 -166
  176. package/cjs/ImageDetailsView/components/Thumbnails/Thumbnails.test.d.ts +0 -1
  177. package/cjs/ImageDetailsView/components/Thumbnails/Thumbnails.test.js +0 -81
  178. package/cjs/InlineAttributesPager/components/InlineImageAttributesBlock/InlineImageAttributesBlock.test.d.ts +0 -1
  179. package/cjs/InlineAttributesPager/components/InlineImageAttributesBlock/InlineImageAttributesBlock.test.js +0 -109
  180. package/cjs/InlineAttributesPager/components/InlineNestedAttributesBlock/InlineNestedAttributesBlock.test.d.ts +0 -1
  181. package/cjs/InlineAttributesPager/components/InlineNestedAttributesBlock/InlineNestedAttributesBlock.test.js +0 -119
  182. package/cjs/InlineAttributesPager/components/InlineReferenceAttributesBlock/InlineReferenceAttributesBlock.test.d.ts +0 -1
  183. package/cjs/InlineAttributesPager/components/InlineReferenceAttributesBlock/InlineReferenceAttributesBlock.test.js +0 -182
  184. package/cjs/InlineSimpleAttribute/components/CrosswalkMenuItem/CrosswalkMenuItem.spec.d.ts +0 -1
  185. package/cjs/InlineSimpleAttribute/components/CrosswalkMenuItem/CrosswalkMenuItem.spec.js +0 -57
  186. package/cjs/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.test.d.ts +0 -1
  187. package/cjs/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.test.js +0 -42
@@ -10,50 +10,120 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
+ return new (P || (P = Promise))(function (resolve, reject) {
16
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
20
+ });
21
+ };
22
+ var __generator = (this && this.__generator) || function (thisArg, body) {
23
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
24
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
+ function verb(n) { return function (v) { return step([n, v]); }; }
26
+ function step(op) {
27
+ if (f) throw new TypeError("Generator is already executing.");
28
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
29
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
+ if (y = 0, t) op = [op[0] & 2, t.value];
31
+ switch (op[0]) {
32
+ case 0: case 1: t = op; break;
33
+ case 4: _.label++; return { value: op[1], done: false };
34
+ case 5: _.label++; y = op[1]; op = [0]; continue;
35
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
36
+ default:
37
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
38
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
39
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
40
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41
+ if (t[2]) _.ops.pop();
42
+ _.trys.pop(); continue;
43
+ }
44
+ op = body.call(thisArg, _);
45
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
+ }
48
+ };
13
49
  var __importDefault = (this && this.__importDefault) || function (mod) {
14
50
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
51
  };
16
52
  Object.defineProperty(exports, "__esModule", { value: true });
17
53
  var react_1 = __importDefault(require("react"));
18
- var test_utils_1 = require("react-dom/test-utils");
19
- var enzyme_1 = require("enzyme");
54
+ var react_2 = require("@testing-library/react");
55
+ var user_event_1 = __importDefault(require("@testing-library/user-event"));
56
+ var core_1 = require("@dnd-kit/core");
20
57
  var InlineAttributesPager_1 = require("./InlineAttributesPager");
21
- describe('InlineAttributesPager tests', function () {
22
- var props = {
23
- parentUri: 'entities/1',
24
- crosswalksMap: {},
25
- onPin: jest.fn(),
26
- onIgnore: jest.fn(),
27
- onEdit: jest.fn(),
28
- onDelete: jest.fn(),
29
- onAdd: jest.fn(),
30
- emptyTempAttributeUris: []
58
+ jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { debounce: function (x) { return x; } })); });
59
+ var simpleAttributeType = {
60
+ uri: 'configuration/entityTypes/HCP/attributes/Simple',
61
+ type: 'String',
62
+ name: 'Simple',
63
+ label: 'Simple label'
64
+ };
65
+ var crosswalks = [
66
+ {
67
+ uri: 'entities/sIeHttl/crosswalks/12jf9nL05',
68
+ type: 'configuration/sources/Reltio',
69
+ value: 'nQpZyQt',
70
+ reltioLoadDate: '2021-06-11T08:24:31.726Z',
71
+ createDate: '2018-11-19T12:14:00.735Z',
72
+ updateDate: '2018-11-19T12:14:00.735Z',
73
+ attributes: ['entities/sIeHttl/attributes/Simple/u123', 'entities/sIeHttl/attributes/Simple/u789'],
74
+ singleAttributeUpdateDates: {
75
+ 'entities/sIeHttl/attributes/Date/1': '2018-11-29T05:39:56.445Z'
76
+ }
77
+ }
78
+ ];
79
+ var defaultProps = {
80
+ attributeType: simpleAttributeType,
81
+ attributeValues: [],
82
+ parentUri: 'entities/sIeHttl',
83
+ crosswalksMap: {},
84
+ onPin: jest.fn(),
85
+ onIgnore: jest.fn(),
86
+ onEdit: jest.fn(),
87
+ onDelete: jest.fn(),
88
+ onAdd: jest.fn(),
89
+ emptyTempAttributeUris: []
90
+ };
91
+ var setUp = function (props) {
92
+ if (props === void 0) { props = {}; }
93
+ var user = user_event_1.default.setup();
94
+ var Providers = function (_a) {
95
+ var children = _a.children;
96
+ return react_1.default.createElement(core_1.DndContext, null, children);
31
97
  };
32
- it('should render simple attributes correctly', function () {
33
- var attributeType = {
34
- uri: 'configuration/entityTypes/HCP/attributes/Simple',
35
- type: 'String',
36
- name: 'Simple',
37
- label: 'Simple label'
98
+ return __assign({ user: user }, (0, react_2.render)(react_1.default.createElement(InlineAttributesPager_1.InlineAttributesPager, __assign({}, defaultProps, props)), { wrapper: Providers }));
99
+ };
100
+ describe('InlineAttributesPager tests', function () {
101
+ describe('simple', function () {
102
+ var crosswalksMap = {
103
+ 'entities/sIeHttl/attributes/Simple/u123': [crosswalks[0]],
104
+ 'entities/sIeHttl/attributes/Simple/u789': [crosswalks[0]]
38
105
  };
39
106
  var attributeValues = [
40
107
  {
41
- type: attributeType.uri,
108
+ type: simpleAttributeType.uri,
42
109
  uri: 'entities/sIeHttl/attributes/Simple/u123',
43
110
  value: '123',
44
111
  ov: true
45
112
  },
46
113
  {
47
- type: attributeType.uri,
114
+ type: simpleAttributeType.uri,
48
115
  uri: 'entities/sIeHttl/attributes/Simple/u789',
49
116
  value: '789',
50
117
  ov: false
51
118
  }
52
119
  ];
53
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(InlineAttributesPager_1.InlineAttributesPager, __assign({ attributeType: attributeType, attributeValues: attributeValues }, props)));
54
- expect(wrapper.find('InlineSimpleAttributesBlock').props()).toEqual(__assign(__assign({}, props), { attributeType: attributeType, attributeValues: attributeValues }));
120
+ it('should render simple attributes correctly', function () {
121
+ setUp({ attributeType: simpleAttributeType, attributeValues: attributeValues, crosswalksMap: crosswalksMap });
122
+ expect(react_2.screen.getByText('123')).toBeInTheDocument();
123
+ expect(react_2.screen.getByText('789')).toBeInTheDocument();
124
+ });
55
125
  });
56
- it('should render nested attributes correctly', function () {
126
+ describe('nested', function () {
57
127
  var attributeType = {
58
128
  uri: 'configuration/entityTypes/HCP/attributes/Nested',
59
129
  type: 'Nested',
@@ -71,6 +141,7 @@ describe('InlineAttributesPager tests', function () {
71
141
  var attributeValues = [
72
142
  {
73
143
  type: attributeType.uri,
144
+ label: 'Attribute Label',
74
145
  uri: 'entities/sIeHttl/attributes/Nested/u123',
75
146
  value: {
76
147
  SubNested: [
@@ -84,6 +155,7 @@ describe('InlineAttributesPager tests', function () {
84
155
  },
85
156
  {
86
157
  type: attributeType.uri,
158
+ label: 'Attribute Label 2',
87
159
  uri: 'entities/sIeHttl/attributes/Nested/u789',
88
160
  value: {
89
161
  SubNested: [
@@ -96,144 +168,202 @@ describe('InlineAttributesPager tests', function () {
96
168
  ov: false
97
169
  }
98
170
  ];
99
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(InlineAttributesPager_1.InlineAttributesPager, __assign({ attributeType: attributeType, attributeValues: attributeValues }, props)));
100
- expect(wrapper.find('InlineNestedAttributesBlock').props()).toEqual(__assign(__assign({}, props), { attributeType: attributeType, attributeValues: attributeValues, className: 'complexAttributesWrapper' }));
171
+ it('should render nested attributes correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
172
+ var user, expandButtons;
173
+ return __generator(this, function (_a) {
174
+ switch (_a.label) {
175
+ case 0:
176
+ user = setUp({ attributeType: attributeType, attributeValues: attributeValues }).user;
177
+ expect(react_2.screen.getByText('Attribute Label')).toBeInTheDocument();
178
+ expect(react_2.screen.getByText('Attribute Label 2')).toBeInTheDocument();
179
+ expect(react_2.screen.queryByText('SubNested label')).not.toBeInTheDocument();
180
+ expandButtons = react_2.screen.getAllByTestId('arrow-expand-button');
181
+ return [4 /*yield*/, user.click(expandButtons[0])];
182
+ case 1:
183
+ _a.sent();
184
+ expect(react_2.screen.getByText('SubNested label')).toBeInTheDocument();
185
+ return [2 /*return*/];
186
+ }
187
+ });
188
+ }); });
189
+ it('should render create button if values are empty', function () {
190
+ setUp({ attributeType: attributeType, attributeValues: [] });
191
+ expect(react_2.screen.getByText('Create attribute')).toBeInTheDocument();
192
+ });
193
+ it('should not render create button if values are empty but not editable', function () {
194
+ setUp({ attributeType: attributeType, attributeValues: [], disableEdit: true });
195
+ expect(react_2.screen.queryByText('Create attribute')).not.toBeInTheDocument();
196
+ });
197
+ it('should call onAdd on create button click', function () { return __awaiter(void 0, void 0, void 0, function () {
198
+ var user;
199
+ return __generator(this, function (_a) {
200
+ switch (_a.label) {
201
+ case 0:
202
+ user = setUp({ attributeType: attributeType, attributeValues: [] }).user;
203
+ return [4 /*yield*/, user.click(react_2.screen.getByText('Create attribute'))];
204
+ case 1:
205
+ _a.sent();
206
+ expect(defaultProps.onAdd).toHaveBeenCalledWith({
207
+ parentUri: defaultProps.parentUri,
208
+ attributeType: attributeType,
209
+ index: 0
210
+ });
211
+ return [2 /*return*/];
212
+ }
213
+ });
214
+ }); });
101
215
  });
102
- it('should render reference attributes correctly', function () {
103
- var attributeType = {
104
- label: 'Address',
105
- name: 'Address',
106
- type: 'Reference',
107
- uri: 'configuration/entityTypes/HCP/attributes/Address',
108
- referencedAttributeURIs: ['configuration/entityTypes/Location/attributes/AddressLine1'],
109
- relationshipTypeURI: 'configuration/relationTypes/HasAddress'
110
- };
111
- var attributeValues = [
112
- {
113
- label: 'Granada Aveue Santa Clara 1',
114
- relationshipLabel: 'Office',
115
- value: {
116
- AddressLine1: [
117
- {
118
- type: 'configuration/entityTypes/Location/attributes/AddressLine1',
119
- ov: true,
120
- value: '3588 Granada Aveue',
121
- uri: 'entities/1/attributes/Address/1/AddressLine1/1'
122
- }
123
- ]
124
- },
125
- ov: true,
126
- uri: 'entities/1/attributes/Address/1',
127
- refEntity: {
128
- type: 'configuration/entityTypes/Location',
129
- crosswalks: [
130
- {
131
- uri: 'entities/1/crosswalks/1YWdmjzf.3VKnDCovj',
132
- type: 'configuration/sources/HMS',
133
- value: 'cww1',
134
- createDate: '2020-09-02T16:19:12.943Z',
135
- updateDate: '2020-09-02T16:19:12.943Z',
136
- attributeURIs: [
137
- 'entities/1/attributes/Address/1/AddressLine1/1',
138
- 'entities/1/attributes/Address/1'
139
- ]
140
- }
141
- ],
142
- objectURI: 'entities/1'
143
- },
144
- refRelation: {
145
- type: 'configuration/relationTypes/HasAddress',
146
- crosswalks: [
216
+ describe('reference', function () {
217
+ it('should render reference attributes correctly', function () {
218
+ var attributeType = {
219
+ label: 'Address',
220
+ name: 'Address',
221
+ type: 'Reference',
222
+ uri: 'configuration/entityTypes/HCP/attributes/Address',
223
+ referencedAttributeURIs: ['configuration/entityTypes/Location/attributes/AddressLine1'],
224
+ relationshipTypeURI: 'configuration/relationTypes/HasAddress'
225
+ };
226
+ var attributeValues = [
227
+ {
228
+ label: 'Granada Aveue Santa Clara 1',
229
+ relationshipLabel: 'Office',
230
+ value: {
231
+ AddressLine1: [
232
+ {
233
+ type: 'configuration/entityTypes/Location/attributes/AddressLine1',
234
+ ov: true,
235
+ value: '3588 Granada Aveue',
236
+ uri: 'entities/1/attributes/Address/1/AddressLine1/1'
237
+ }
238
+ ]
239
+ },
240
+ ov: true,
241
+ uri: 'entities/1/attributes/Address/1',
242
+ refEntity: {
243
+ type: 'configuration/entityTypes/Location',
244
+ crosswalks: [
245
+ {
246
+ uri: 'entities/1/crosswalks/1YWdmjzf.3VKnDCovj',
247
+ type: 'configuration/sources/HMS',
248
+ value: 'cww1',
249
+ createDate: '2020-09-02T16:19:12.943Z',
250
+ updateDate: '2020-09-02T16:19:12.943Z',
251
+ attributeURIs: [
252
+ 'entities/1/attributes/Address/1/AddressLine1/1',
253
+ 'entities/1/attributes/Address/1'
254
+ ]
255
+ }
256
+ ],
257
+ objectURI: 'entities/1'
258
+ },
259
+ refRelation: {
260
+ type: 'configuration/relationTypes/HasAddress',
261
+ crosswalks: [
262
+ {
263
+ uri: 'entities/1/crosswalks/uAGtqeB.3VKnDCtBz',
264
+ type: 'configuration/sources/HMS',
265
+ value: 'cww2',
266
+ createDate: '2020-09-02T16:19:12.943Z',
267
+ updateDate: '2020-09-02T16:19:12.943Z',
268
+ attributeURIs: [
269
+ 'entities/1/attributes/Address/1/AddressLine/1',
270
+ 'entities/1/attributes/Address/1'
271
+ ]
272
+ }
273
+ ],
274
+ startRefPinned: false,
275
+ endRefPinned: false,
276
+ startRefIgnored: false,
277
+ endRefIgnored: false,
278
+ objectURI: 'relations/1'
279
+ },
280
+ startObjectCrosswalks: [
147
281
  {
148
- uri: 'entities/1/crosswalks/uAGtqeB.3VKnDCtBz',
149
282
  type: 'configuration/sources/HMS',
150
- value: 'cww2',
151
- createDate: '2020-09-02T16:19:12.943Z',
152
- updateDate: '2020-09-02T16:19:12.943Z',
153
- attributeURIs: [
154
- 'entities/1/attributes/Address/1/AddressLine/1',
155
- 'entities/1/attributes/Address/1'
156
- ]
157
- }
158
- ],
159
- startRefPinned: false,
160
- endRefPinned: false,
161
- startRefIgnored: false,
162
- endRefIgnored: false,
163
- objectURI: 'relations/1'
164
- }
165
- },
166
- {
167
- label: 'Granada Aveue Santa Clara 2',
168
- relationshipLabel: 'Office',
169
- value: {
170
- AddressLine1: [
171
- {
172
- type: 'configuration/entityTypes/Location/attributes/AddressLine1',
173
- ov: true,
174
- value: '3587 Granada Aveue',
175
- uri: 'entities/1/attributes/Address/2/AddressLine1/1'
283
+ value: 'cww1'
176
284
  }
177
285
  ]
178
286
  },
179
- ov: true,
180
- uri: 'entities/1/attributes/Address/2',
181
- refEntity: {
182
- type: 'configuration/entityTypes/Location',
183
- crosswalks: [
184
- {
185
- uri: 'entities/1/crosswalks/1YWdmsWB.3VKnDDe4p',
186
- type: 'configuration/sources/HMS',
187
- value: 'cwf1',
188
- createDate: '2020-09-02T16:19:12.943Z',
189
- updateDate: '2020-09-02T16:19:12.943Z',
190
- attributeURIs: [
191
- 'entities/1/attributes/Address/2/AddressLine1/1',
192
- 'entities/1/attributes/Address/2'
193
- ]
194
- }
195
- ],
196
- objectURI: 'entities/1'
197
- },
198
- refRelation: {
199
- type: 'configuration/relationTypes/HasAddress',
200
- crosswalks: [
287
+ {
288
+ label: 'Granada Aveue Santa Clara 2',
289
+ relationshipLabel: 'Office',
290
+ value: {
291
+ AddressLine1: [
292
+ {
293
+ type: 'configuration/entityTypes/Location/attributes/AddressLine1',
294
+ ov: true,
295
+ value: '3587 Granada Aveue',
296
+ uri: 'entities/1/attributes/Address/2/AddressLine1/1'
297
+ }
298
+ ]
299
+ },
300
+ ov: true,
301
+ uri: 'entities/1/attributes/Address/2',
302
+ refEntity: {
303
+ type: 'configuration/entityTypes/Location',
304
+ crosswalks: [
305
+ {
306
+ uri: 'entities/1/crosswalks/1YWdmsWB.3VKnDDe4p',
307
+ type: 'configuration/sources/HMS',
308
+ value: 'cwf1',
309
+ createDate: '2020-09-02T16:19:12.943Z',
310
+ updateDate: '2020-09-02T16:19:12.943Z',
311
+ attributeURIs: [
312
+ 'entities/1/attributes/Address/2/AddressLine1/1',
313
+ 'entities/1/attributes/Address/2'
314
+ ]
315
+ }
316
+ ],
317
+ objectURI: 'entities/1'
318
+ },
319
+ refRelation: {
320
+ type: 'configuration/relationTypes/HasAddress',
321
+ crosswalks: [
322
+ {
323
+ uri: 'entities/1/crosswalks/uAGtuuR.3VKnDDiL5',
324
+ type: 'configuration/sources/HMS',
325
+ value: 'cwf2',
326
+ createDate: '2020-09-02T16:19:12.943Z',
327
+ updateDate: '2020-09-02T16:19:12.943Z',
328
+ attributeURIs: [
329
+ 'entities/1/attributes/Address/2/AddressLine1/1',
330
+ 'entities/1/attributes/Address/2'
331
+ ]
332
+ }
333
+ ],
334
+ startRefPinned: false,
335
+ endRefPinned: false,
336
+ startRefIgnored: false,
337
+ endRefIgnored: false,
338
+ objectURI: 'relations/2'
339
+ },
340
+ startObjectCrosswalks: [
201
341
  {
202
- uri: 'entities/1/crosswalks/uAGtuuR.3VKnDDiL5',
203
342
  type: 'configuration/sources/HMS',
204
- value: 'cwf2',
205
- createDate: '2020-09-02T16:19:12.943Z',
206
- updateDate: '2020-09-02T16:19:12.943Z',
207
- attributeURIs: [
208
- 'entities/1/attributes/Address/2/AddressLine1/1',
209
- 'entities/1/attributes/Address/2'
210
- ]
343
+ value: 'cfw1'
211
344
  }
212
- ],
213
- startRefPinned: false,
214
- endRefPinned: false,
215
- startRefIgnored: false,
216
- endRefIgnored: false,
217
- objectURI: 'relations/2'
345
+ ]
218
346
  }
347
+ ];
348
+ setUp({ attributeType: attributeType, attributeValues: attributeValues });
349
+ expect(react_2.screen.getAllByTestId('inline-complex-attribute')).toHaveLength(2);
350
+ expect(react_2.screen.getByText('Granada Aveue Santa Clara 1')).toBeInTheDocument();
351
+ expect(react_2.screen.getByText('Granada Aveue Santa Clara 2')).toBeInTheDocument();
352
+ expect(react_2.screen.getAllByText('Office')).toHaveLength(2);
353
+ });
354
+ });
355
+ describe('image', function () {
356
+ var crosswalks = [
357
+ {
358
+ uri: 'entities/j8K1vc9/crosswalks/12jf9nL05',
359
+ type: 'configuration/sources/Reltio',
360
+ value: 'nQpZyQt',
361
+ reltioLoadDate: '2021-06-11T08:24:31.726Z',
362
+ createDate: '2018-11-19T12:14:00.735Z',
363
+ updateDate: '2018-11-19T12:14:00.735Z',
364
+ attributes: ['configuration/entityTypes/Employee/attributes/ImageGallery/attributes/UrlThumbnail']
219
365
  }
220
366
  ];
221
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(InlineAttributesPager_1.InlineAttributesPager, __assign({ attributeType: attributeType, attributeValues: attributeValues }, props)));
222
- expect(wrapper.find('InlineReferenceAttributesBlock').props()).toEqual(__assign(__assign({}, props), { attributeType: attributeType, attributeValues: attributeValues, className: 'complexAttributesWrapper' }));
223
- });
224
- it('should render image attributes correctly', function () {
225
- var attributeType = {
226
- attributes: [
227
- {
228
- name: 'UrlThumbnail',
229
- type: 'String',
230
- uri: 'configuration/entityTypes/Series/attributes/ImageGallery/attributes/UrlThumbnail'
231
- }
232
- ],
233
- name: 'ImageGallery',
234
- type: 'Image',
235
- uri: 'configuration/entityTypes/Employee/attributes/ImageGallery'
236
- };
237
367
  var attributeValues = [
238
368
  {
239
369
  type: 'configuration/entityTypes/Employee/attributes/ImageGallery',
@@ -266,8 +396,45 @@ describe('InlineAttributesPager tests', function () {
266
396
  ov: true
267
397
  }
268
398
  ];
269
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(InlineAttributesPager_1.InlineAttributesPager, __assign({ attributeType: attributeType, attributeValues: attributeValues }, props)));
270
- expect(wrapper.find('InlineImageAttributesBlock').props()).toEqual(__assign(__assign({}, props), { attributeType: attributeType, attributeValues: attributeValues, className: 'complexAttributesWrapper' }));
399
+ var attributeType = {
400
+ attributes: [
401
+ {
402
+ name: 'UrlThumbnail',
403
+ type: 'String',
404
+ label: 'Thumbnail',
405
+ uri: 'configuration/entityTypes/Series/attributes/ImageGallery/attributes/UrlThumbnail'
406
+ }
407
+ ],
408
+ name: 'ImageGallery',
409
+ type: 'Image',
410
+ uri: 'configuration/entityTypes/Employee/attributes/ImageGallery'
411
+ };
412
+ var crosswalksMap = {
413
+ 'entities/1Rd2I9Mt/attributes/ImageGallery/123123': [crosswalks[0]],
414
+ 'entities/1Rd2I9Mt/attributes/ImageGallery/39V5GWJZv': [crosswalks[0]]
415
+ };
416
+ it('should render image attributes correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
417
+ var user, images;
418
+ return __generator(this, function (_a) {
419
+ switch (_a.label) {
420
+ case 0:
421
+ user = setUp({ attributeType: attributeType, attributeValues: attributeValues, crosswalksMap: crosswalksMap }).user;
422
+ images = react_2.screen.getAllByRole('img');
423
+ expect(images).toHaveLength(2);
424
+ expect(images[0]).toHaveAttribute('src', '/test123.jpg');
425
+ expect(images[1]).toHaveAttribute('src', '/test.jpg');
426
+ expect(react_2.screen.getAllByTestId('inline-complex-attribute')).toHaveLength(2);
427
+ expect(react_2.screen.getAllByTestId('arrow-expand-button')).toHaveLength(2);
428
+ return [4 /*yield*/, user.hover(images[0])];
429
+ case 1:
430
+ _a.sent();
431
+ expect(react_2.screen.getByLabelText('Pin')).toBeInTheDocument();
432
+ expect(react_2.screen.getByLabelText('Delete')).toBeInTheDocument();
433
+ expect(react_2.screen.getByLabelText('Ignore')).toBeInTheDocument();
434
+ return [2 /*return*/];
435
+ }
436
+ });
437
+ }); });
271
438
  });
272
439
  describe('paging', function () {
273
440
  var attributeType = {
@@ -276,38 +443,81 @@ describe('InlineAttributesPager tests', function () {
276
443
  name: 'Simple',
277
444
  label: 'Simple label'
278
445
  };
279
- var attributeValues = [
280
- {
281
- type: attributeType.uri,
282
- uri: 'entities/sIeHttl/attributes/Simple/u123',
283
- value: '123',
284
- ov: true
285
- },
286
- {
287
- type: attributeType.uri,
288
- uri: 'entities/sIeHttl/attributes/Simple/u789',
289
- value: '789',
290
- ov: false
291
- }
292
- ];
293
- it('should show Show more button if has more attributes to show', function () {
294
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(InlineAttributesPager_1.InlineAttributesPager, __assign({ attributeType: attributeType, attributeValues: attributeValues, paging: {
295
- totalValues: 5
296
- }, max: 2 }, props)));
297
- var showMoreButton = wrapper.find('ShowMore');
298
- expect(showMoreButton.prop('moreNumber')).toBe(2);
299
- expect(showMoreButton.prop('valueNumber')).toBe(3);
300
- });
301
- it('should show Show less button if has no more attributes to show', function () {
302
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(InlineAttributesPager_1.InlineAttributesPager, __assign({ attributeType: attributeType, attributeValues: attributeValues, paging: {
303
- totalValues: 2
304
- }, max: 1 }, props)));
305
- expect(wrapper.find('ShowLess')).toHaveLength(0);
306
- (0, test_utils_1.act)(function () {
307
- wrapper.find('ShowMore').simulate('click');
446
+ var attributeValues = Array.from({ length: 5 }, function (_, i) { return ({
447
+ type: attributeType.uri,
448
+ uri: "entities/sIeHttl/attributes/Simple/u".concat(i + 1),
449
+ value: "u".concat(i + 1),
450
+ ov: i === 0
451
+ }); });
452
+ var crosswalksMap = attributeValues.reduce(function (acc, value) {
453
+ acc[value.uri] = [crosswalks[0]];
454
+ return acc;
455
+ }, {});
456
+ it('should show Show more button if has more attributes to show', function () { return __awaiter(void 0, void 0, void 0, function () {
457
+ var user;
458
+ return __generator(this, function (_a) {
459
+ switch (_a.label) {
460
+ case 0:
461
+ user = setUp({
462
+ crosswalksMap: crosswalksMap,
463
+ attributeType: attributeType,
464
+ attributeValues: attributeValues,
465
+ paging: { totalValues: 5 },
466
+ max: 2
467
+ }).user;
468
+ expect(react_2.screen.getByText('u1')).toBeInTheDocument();
469
+ expect(react_2.screen.getByText('u2')).toBeInTheDocument();
470
+ expect(react_2.screen.queryByText('u3')).not.toBeInTheDocument();
471
+ expect(react_2.screen.queryByText('u4')).not.toBeInTheDocument();
472
+ expect(react_2.screen.queryByText('u5')).not.toBeInTheDocument();
473
+ expect(react_2.screen.queryByText('Show less')).not.toBeInTheDocument();
474
+ return [4 /*yield*/, user.click(react_2.screen.getByText('Show 2 more of remaining 3 value'))];
475
+ case 1:
476
+ _a.sent();
477
+ expect(react_2.screen.queryByText('Show less')).not.toBeInTheDocument();
478
+ expect(react_2.screen.getByText('u3')).toBeInTheDocument();
479
+ expect(react_2.screen.getByText('u4')).toBeInTheDocument();
480
+ expect(react_2.screen.queryByText('u5')).not.toBeInTheDocument();
481
+ return [4 /*yield*/, user.click(react_2.screen.getByText('Show 1 more of remaining 1 value'))];
482
+ case 2:
483
+ _a.sent();
484
+ expect(react_2.screen.getByText('Show less')).toBeInTheDocument();
485
+ expect(react_2.screen.getByText('u5')).toBeInTheDocument();
486
+ return [2 /*return*/];
487
+ }
308
488
  });
309
- expect(wrapper.find('ShowMore')).toHaveLength(0);
310
- expect(wrapper.find('ShowLess')).toHaveLength(1);
311
- });
489
+ }); });
490
+ it('should show Show less button if has no more attributes to show', function () { return __awaiter(void 0, void 0, void 0, function () {
491
+ var user;
492
+ return __generator(this, function (_a) {
493
+ switch (_a.label) {
494
+ case 0:
495
+ user = setUp({
496
+ crosswalksMap: crosswalksMap,
497
+ attributeType: attributeType,
498
+ attributeValues: attributeValues,
499
+ paging: { totalValues: 5 },
500
+ max: 2
501
+ }).user;
502
+ return [4 /*yield*/, user.click(react_2.screen.getByText('Show 2 more of remaining 3 value'))];
503
+ case 1:
504
+ _a.sent();
505
+ return [4 /*yield*/, user.click(react_2.screen.getByText('Show 1 more of remaining 1 value'))];
506
+ case 2:
507
+ _a.sent();
508
+ return [4 /*yield*/, user.click(react_2.screen.getByText('Show less'))];
509
+ case 3:
510
+ _a.sent();
511
+ expect(react_2.screen.getByText('u1')).toBeInTheDocument();
512
+ expect(react_2.screen.getByText('u2')).toBeInTheDocument();
513
+ expect(react_2.screen.queryByText('u3')).not.toBeInTheDocument();
514
+ expect(react_2.screen.queryByText('u4')).not.toBeInTheDocument();
515
+ expect(react_2.screen.queryByText('u5')).not.toBeInTheDocument();
516
+ expect(react_2.screen.queryByText('Show less')).not.toBeInTheDocument();
517
+ expect(react_2.screen.getByText('Show 2 more of remaining 3 value')).toBeInTheDocument();
518
+ return [2 /*return*/];
519
+ }
520
+ });
521
+ }); });
312
522
  });
313
523
  });