@reltio/components 1.4.2044 → 1.4.2046

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 (175) hide show
  1. package/AttributesFiltersBuilder/AttributesFiltersBuilder.test.js +72 -50
  2. package/BasicTable/BasicTable.test.js +232 -278
  3. package/BlobRenderer/BlobRenderer.js +1 -1
  4. package/ConnectionRelationTypeSelector/ConnectionRelationTypeSelector.test.js +125 -111
  5. package/DateIntervalSelector/DateIntervalSelector.test.js +87 -65
  6. package/DefaultCellValueRenderer/DefaultCellValueRenderer.js +1 -1
  7. package/DefaultCellValueRenderer/DefaultCellValueRenderer.test.js +16 -46
  8. package/DeleteButton/DeleteButton.spec.js +53 -15
  9. package/DependentLookupEditor/DependentLookupEditor.test.js +555 -807
  10. package/Drawer/Drawer.test.js +9 -20
  11. package/DropDownEditor/DropDownEditor.test.js +81 -29
  12. package/DropDownMenuButton/DropDownMenuButton.spec.js +101 -70
  13. package/DropDownSelector/DropDownSelector.test.js +159 -30
  14. package/EditModeAttributesFactory/EditModeAttributesFactory.test.js +143 -0
  15. package/EditModeAttributesList/EditModeAttributesList.test.js +277 -224
  16. package/EditModeAttributesList/attributes.test-data.d.ts +0 -11
  17. package/EditModeAttributesList/attributes.test-data.js +1 -1
  18. package/EditModeAttributesPager/EditModeAttributesPager.test.js +698 -234
  19. package/EditModeAttributesPager/helpers.test.js +2 -12
  20. package/EditModeAttributesView/EditModeAttributesView.test.js +263 -157
  21. package/EditModeComplexAttribute/EditModeComplexAttribute.js +1 -1
  22. package/EditModeComplexAttribute/EditModeComplexAttribute.test.js +313 -298
  23. package/EditModeComplexAttribute/nestedAttrType.test-data.d.ts +0 -5
  24. package/EditModeComplexAttribute/nestedAttrType.test-data.js +3 -44
  25. package/EmptyState/EmptyState.test.js +99 -38
  26. package/EntityCreator/EntityCreator.test.js +68 -35
  27. package/EntitySelector/EntitySelector.js +1 -1
  28. package/EntitySelector/EntitySelector.test.js +275 -422
  29. package/EntityTypeIcon/EntityTypeIcon.test.js +16 -16
  30. package/EntityTypesSelector/EntityTypesSelector.test.js +62 -21
  31. package/ErrorBoundary/ErrorBoundary.test.js +19 -17
  32. package/ErrorMessage/ErrorMessage.js +1 -1
  33. package/ErrorPopup/ErrorPopup.test.js +72 -25
  34. package/ErrorWrapper/ErrorWrapper.test.js +10 -9
  35. package/ExpandedValueTooltip/ExpandedValueTooltip.test.js +111 -37
  36. package/FileTypeEditor/FileTypeEditor.test.js +95 -64
  37. package/FilterValueEditor/FilterValueEditor.test.js +183 -157
  38. package/FilterValueEditor/components/RangeDataTypeValueEditor/RangeDataTypeValueEditor.js +2 -2
  39. package/HierarchicalAttributeTooltip/HierarchicalAttributeTooltip.test.js +114 -24
  40. package/HierarchyNodeTitle/HierarchyNodeTitle.test.js +61 -100
  41. package/OvIcon/OvIcon.js +2 -2
  42. package/ProfileCard/components/ProfileCardPlaceholder/ProfileCardPlaceholder.js +2 -2
  43. package/ShowLess/ShowLess.js +1 -1
  44. package/SimpleAttributeEditor/SimpleAttributeEditor.js +2 -2
  45. package/UploadFileButton/components/UploadMode/UploadMode.js +1 -1
  46. package/cjs/AttributesFiltersBuilder/AttributesFiltersBuilder.test.js +72 -50
  47. package/cjs/BasicTable/BasicTable.test.js +230 -299
  48. package/cjs/BlobRenderer/BlobRenderer.js +1 -1
  49. package/cjs/ConnectionRelationTypeSelector/ConnectionRelationTypeSelector.test.js +125 -111
  50. package/cjs/DateIntervalSelector/DateIntervalSelector.test.js +87 -65
  51. package/cjs/DefaultCellValueRenderer/DefaultCellValueRenderer.js +1 -1
  52. package/cjs/DefaultCellValueRenderer/DefaultCellValueRenderer.test.js +16 -46
  53. package/cjs/DeleteButton/DeleteButton.spec.js +53 -15
  54. package/cjs/DependentLookupEditor/DependentLookupEditor.test.js +569 -821
  55. package/cjs/Drawer/Drawer.test.js +10 -21
  56. package/cjs/DropDownEditor/DropDownEditor.test.js +81 -29
  57. package/cjs/DropDownMenuButton/DropDownMenuButton.spec.js +102 -71
  58. package/cjs/DropDownSelector/DropDownSelector.test.js +159 -30
  59. package/cjs/EditModeAttributesFactory/EditModeAttributesFactory.test.js +148 -0
  60. package/cjs/EditModeAttributesList/EditModeAttributesList.test.js +277 -224
  61. package/cjs/EditModeAttributesList/attributes.test-data.d.ts +0 -11
  62. package/cjs/EditModeAttributesList/attributes.test-data.js +1 -1
  63. package/cjs/EditModeAttributesPager/EditModeAttributesPager.test.js +696 -232
  64. package/cjs/EditModeAttributesPager/helpers.test.js +2 -12
  65. package/cjs/EditModeAttributesView/EditModeAttributesView.test.js +262 -156
  66. package/cjs/EditModeComplexAttribute/EditModeComplexAttribute.js +1 -1
  67. package/cjs/EditModeComplexAttribute/EditModeComplexAttribute.test.js +312 -297
  68. package/cjs/EditModeComplexAttribute/nestedAttrType.test-data.d.ts +0 -5
  69. package/cjs/EditModeComplexAttribute/nestedAttrType.test-data.js +3 -44
  70. package/cjs/EmptyState/EmptyState.test.js +98 -37
  71. package/cjs/EntityCreator/EntityCreator.test.js +69 -36
  72. package/cjs/EntitySelector/EntitySelector.js +1 -1
  73. package/cjs/EntitySelector/EntitySelector.test.js +274 -421
  74. package/cjs/EntityTypeIcon/EntityTypeIcon.test.js +17 -17
  75. package/cjs/EntityTypesSelector/EntityTypesSelector.test.js +62 -21
  76. package/cjs/ErrorBoundary/ErrorBoundary.test.js +19 -17
  77. package/cjs/ErrorMessage/ErrorMessage.js +1 -1
  78. package/cjs/ErrorPopup/ErrorPopup.test.js +71 -24
  79. package/cjs/ErrorWrapper/ErrorWrapper.test.js +10 -9
  80. package/cjs/ExpandedValueTooltip/ExpandedValueTooltip.test.js +111 -37
  81. package/cjs/FileTypeEditor/FileTypeEditor.test.js +95 -64
  82. package/cjs/FilterValueEditor/FilterValueEditor.test.js +182 -156
  83. package/cjs/FilterValueEditor/components/RangeDataTypeValueEditor/RangeDataTypeValueEditor.js +2 -2
  84. package/cjs/HierarchicalAttributeTooltip/HierarchicalAttributeTooltip.test.js +114 -24
  85. package/cjs/HierarchyNodeTitle/HierarchyNodeTitle.test.js +61 -100
  86. package/cjs/OvIcon/OvIcon.js +2 -2
  87. package/cjs/ProfileCard/components/ProfileCardPlaceholder/ProfileCardPlaceholder.js +2 -2
  88. package/cjs/ShowLess/ShowLess.js +1 -1
  89. package/cjs/SimpleAttributeEditor/SimpleAttributeEditor.js +2 -2
  90. package/cjs/UploadFileButton/components/UploadMode/UploadMode.js +1 -1
  91. package/cjs/contexts/ExpandedAttributesContext/useAttributeExpanded.test.js +25 -18
  92. package/cjs/contexts/MdmModuleContext/hooks.d.ts +2 -2
  93. package/cjs/contexts/ReloadDataContext/ReloadDataContext.spec.js +16 -53
  94. package/cjs/test-utils/TestStylesProvider.js +6 -5
  95. package/contexts/ExpandedAttributesContext/useAttributeExpanded.test.js +25 -18
  96. package/contexts/MdmModuleContext/hooks.d.ts +2 -2
  97. package/contexts/ReloadDataContext/ReloadDataContext.spec.js +16 -30
  98. package/package.json +2 -2
  99. package/test-utils/TestStylesProvider.js +3 -2
  100. package/AttributesFiltersBuilder/components/AttributeSelector/AttributeSelector.test.js +0 -101
  101. package/AttributesFiltersBuilder/components/RowActions/RowActions.test.js +0 -106
  102. package/BasicTable/IntegrationBasicTable.test.d.ts +0 -1
  103. package/BasicTable/IntegrationBasicTable.test.js +0 -203
  104. package/DependentLookupEditor/IntegrationDependentLookupEditor.test.d.ts +0 -1
  105. package/DependentLookupEditor/IntegrationDependentLookupEditor.test.js +0 -137
  106. package/DropDownMenuButton/components/DefaultMenuItemRenderer/DefaultMenuItemRenderer.spec.d.ts +0 -1
  107. package/DropDownMenuButton/components/DefaultMenuItemRenderer/DefaultMenuItemRenderer.spec.js +0 -32
  108. package/EditModeAttributesFactory/components/EditModeAttribute/EditModeAttribute.test.d.ts +0 -1
  109. package/EditModeAttributesFactory/components/EditModeAttribute/EditModeAttribute.test.js +0 -106
  110. package/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.test.d.ts +0 -1
  111. package/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.test.js +0 -338
  112. package/EditModeAttributesPager/components/AttributeRenderer/IntegrationAttributeRenderer.test.d.ts +0 -1
  113. package/EditModeAttributesPager/components/AttributeRenderer/IntegrationAttributeRenderer.test.js +0 -225
  114. package/EditModeAttributesPager/components/ImageLineRenderer/ImageLineRenderer.test.d.ts +0 -1
  115. package/EditModeAttributesPager/components/ImageLineRenderer/ImageLineRenderer.test.js +0 -47
  116. package/EditModeAttributesPager/components/SpecialRenderer/SpecialRenderer.test.d.ts +0 -1
  117. package/EditModeAttributesPager/components/SpecialRenderer/SpecialRenderer.test.js +0 -204
  118. package/EditModeAttributesView/IntegrationEditModeAttributesView.test.d.ts +0 -1
  119. package/EditModeAttributesView/IntegrationEditModeAttributesView.test.js +0 -246
  120. package/EditModeAttributesView/metadata.test-data.d.ts +0 -4
  121. package/EditModeAttributesView/metadata.test-data.js +0 -119
  122. package/EntityCreator/entityType.test-data.d.ts +0 -52
  123. package/EntityCreator/entityType.test-data.js +0 -188
  124. package/EntitySelector/components/ClearIndicator/ClearIndicator.test.d.ts +0 -1
  125. package/EntitySelector/components/ClearIndicator/ClearIndicator.test.js +0 -27
  126. package/EntitySelector/components/EntityOption/EntityOption.test.d.ts +0 -1
  127. package/EntitySelector/components/EntityOption/EntityOption.test.js +0 -79
  128. package/EntitySelector/components/Group/Group.test.d.ts +0 -1
  129. package/EntitySelector/components/Group/Group.test.js +0 -65
  130. package/EntitySelector/components/SingleValue/SingleValue.test.d.ts +0 -1
  131. package/EntitySelector/components/SingleValue/SingleValue.test.js +0 -78
  132. package/FilterValueEditor/components/RangeDataTypeValueEditor/RangeDataTypeValueEditor.test.d.ts +0 -1
  133. package/FilterValueEditor/components/RangeDataTypeValueEditor/RangeDataTypeValueEditor.test.js +0 -76
  134. package/cjs/AttributesFiltersBuilder/components/AttributeSelector/AttributeSelector.test.d.ts +0 -1
  135. package/cjs/AttributesFiltersBuilder/components/AttributeSelector/AttributeSelector.test.js +0 -106
  136. package/cjs/AttributesFiltersBuilder/components/RowActions/RowActions.test.d.ts +0 -1
  137. package/cjs/AttributesFiltersBuilder/components/RowActions/RowActions.test.js +0 -111
  138. package/cjs/BasicTable/IntegrationBasicTable.test.d.ts +0 -1
  139. package/cjs/BasicTable/IntegrationBasicTable.test.js +0 -208
  140. package/cjs/DependentLookupEditor/IntegrationDependentLookupEditor.test.d.ts +0 -1
  141. package/cjs/DependentLookupEditor/IntegrationDependentLookupEditor.test.js +0 -142
  142. package/cjs/DropDownMenuButton/components/DefaultMenuItemRenderer/DefaultMenuItemRenderer.spec.d.ts +0 -1
  143. package/cjs/DropDownMenuButton/components/DefaultMenuItemRenderer/DefaultMenuItemRenderer.spec.js +0 -37
  144. package/cjs/EditModeAttributesFactory/components/EditModeAttribute/EditModeAttribute.test.d.ts +0 -1
  145. package/cjs/EditModeAttributesFactory/components/EditModeAttribute/EditModeAttribute.test.js +0 -111
  146. package/cjs/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.test.d.ts +0 -1
  147. package/cjs/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.test.js +0 -343
  148. package/cjs/EditModeAttributesPager/components/AttributeRenderer/IntegrationAttributeRenderer.test.d.ts +0 -1
  149. package/cjs/EditModeAttributesPager/components/AttributeRenderer/IntegrationAttributeRenderer.test.js +0 -230
  150. package/cjs/EditModeAttributesPager/components/ImageLineRenderer/ImageLineRenderer.test.d.ts +0 -1
  151. package/cjs/EditModeAttributesPager/components/ImageLineRenderer/ImageLineRenderer.test.js +0 -52
  152. package/cjs/EditModeAttributesPager/components/SpecialRenderer/SpecialRenderer.test.d.ts +0 -1
  153. package/cjs/EditModeAttributesPager/components/SpecialRenderer/SpecialRenderer.test.js +0 -209
  154. package/cjs/EditModeAttributesView/IntegrationEditModeAttributesView.test.d.ts +0 -1
  155. package/cjs/EditModeAttributesView/IntegrationEditModeAttributesView.test.js +0 -251
  156. package/cjs/EditModeAttributesView/metadata.test-data.d.ts +0 -4
  157. package/cjs/EditModeAttributesView/metadata.test-data.js +0 -123
  158. package/cjs/EntityCreator/entityType.test-data.d.ts +0 -52
  159. package/cjs/EntityCreator/entityType.test-data.js +0 -191
  160. package/cjs/EntitySelector/components/ClearIndicator/ClearIndicator.test.d.ts +0 -1
  161. package/cjs/EntitySelector/components/ClearIndicator/ClearIndicator.test.js +0 -32
  162. package/cjs/EntitySelector/components/EntityOption/EntityOption.test.d.ts +0 -1
  163. package/cjs/EntitySelector/components/EntityOption/EntityOption.test.js +0 -84
  164. package/cjs/EntitySelector/components/Group/Group.test.d.ts +0 -1
  165. package/cjs/EntitySelector/components/Group/Group.test.js +0 -70
  166. package/cjs/EntitySelector/components/SingleValue/SingleValue.test.d.ts +0 -1
  167. package/cjs/EntitySelector/components/SingleValue/SingleValue.test.js +0 -83
  168. package/cjs/FilterValueEditor/components/RangeDataTypeValueEditor/RangeDataTypeValueEditor.test.d.ts +0 -1
  169. package/cjs/FilterValueEditor/components/RangeDataTypeValueEditor/RangeDataTypeValueEditor.test.js +0 -81
  170. package/cjs/contexts/CollaborationContext/CollaborationContextProvider.test.d.ts +0 -1
  171. package/cjs/contexts/CollaborationContext/CollaborationContextProvider.test.js +0 -104
  172. package/contexts/CollaborationContext/CollaborationContextProvider.test.d.ts +0 -1
  173. package/contexts/CollaborationContext/CollaborationContextProvider.test.js +0 -99
  174. /package/{AttributesFiltersBuilder/components/AttributeSelector/AttributeSelector.test.d.ts → EditModeAttributesFactory/EditModeAttributesFactory.test.d.ts} +0 -0
  175. /package/{AttributesFiltersBuilder/components/RowActions/RowActions.test.d.ts → cjs/EditModeAttributesFactory/EditModeAttributesFactory.test.d.ts} +0 -0
@@ -9,6 +9,42 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ 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);
23
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
+ 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;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
12
48
  var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
13
49
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
14
50
  if (ar || !(i in from)) {
@@ -19,132 +55,153 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
19
55
  return to.concat(ar || Array.prototype.slice.call(from));
20
56
  };
21
57
  import React from 'react';
22
- import { mount } from 'enzyme';
23
- import { act } from 'react-dom/test-utils';
24
- import EditModeAttributesList from './EditModeAttributesList';
25
- import { MoreAttributesButton } from '../MoreAttributesButton';
26
- import { EditModeAttributesPager } from '../EditModeAttributesPager';
27
- import { ActivenessAttrTypes, getAttributesListForEditMode, Mode } from '@reltio/mdm-sdk';
28
- import { attributesList } from './attributes.test-data';
29
- import { BranchDecorator } from '../BranchDecorator';
30
58
  import { adjust, assoc } from 'ramda';
31
- import { HasDeletionsContext } from '../contexts/HasDeletionsContext';
32
- import { rerenderWrapper } from '../test-utils';
59
+ import { render, screen, within } from '@testing-library/react';
60
+ import userEvent from '@testing-library/user-event';
61
+ import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
62
+ import { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';
63
+ import { ActivenessAttrTypes, Mode } from '@reltio/mdm-sdk';
33
64
  import { PinnedAttributesContext } from '../contexts/PinnedAttributesContext';
34
- jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { getAttributesListForEditMode: jest
35
- .fn()
36
- .mockImplementation(jest.requireActual('@reltio/mdm-sdk').getAttributesListForEditMode) })); });
37
- jest.mock('../MoreAttributesButton', function () { return ({
38
- MoreAttributesButton: jest.fn().mockImplementation(function () { return React.createElement("div", null); })
39
- }); });
40
- jest.mock('../EditModeAttributesPager', function () { return ({
41
- EditModeAttributesPager: jest.fn().mockImplementation(function () { return React.createElement("div", null); })
42
- }); });
43
- jest.mock('../contexts/HasDeletionsContext', function () { return ({
44
- HasDeletionsContext: {
45
- Provider: jest.fn().mockImplementation(function (_a) {
46
- var children = _a.children;
47
- return React.createElement(React.Fragment, null, children);
48
- })
65
+ import { attributesList } from './attributes.test-data';
66
+ import EditModeAttributesList from './EditModeAttributesList';
67
+ import { MdmModuleProvider } from '../contexts/MdmModuleContext';
68
+ var defaultAttributes = {
69
+ Role: [
70
+ {
71
+ ov: true,
72
+ type: 'configuration/relationTypes/knowledge/attributes/Role',
73
+ uri: 'relations/8908/Role',
74
+ value: ''
75
+ },
76
+ {
77
+ ov: true,
78
+ type: 'configuration/relationTypes/knowledge/attributes/Role',
79
+ uri: 'relations/8909/Role',
80
+ value: 'Some role'
81
+ }
82
+ ],
83
+ Name: [
84
+ {
85
+ ov: true,
86
+ type: 'configuration/relationTypes/knowledge/attributes/Name',
87
+ uri: 'relations/8808/Name',
88
+ value: ''
89
+ }
90
+ ],
91
+ LastName: [
92
+ {
93
+ ov: true,
94
+ type: 'configuration/relationTypes/knowledge/attributes/LastName',
95
+ uri: 'relations/7808/LastName',
96
+ value: ''
97
+ }
98
+ ],
99
+ paging: {
100
+ 'configuration/relationTypes/knowledge/attributes/Role': {
101
+ totalOvValues: 4,
102
+ totalValues: 4
103
+ }
49
104
  }
50
- }); });
51
- describe('EditModeAttributesList tests', function () {
105
+ };
106
+ var defaultEntity = { uri: 'entities/xT3HJZ7', type: 'configuration/entityTypes/HCP', attributes: defaultAttributes };
107
+ var defaultProps = {
108
+ parentUri: 'entities/xT3HJZ7',
109
+ entity: defaultEntity,
110
+ attrTypes: attributesList,
111
+ mode: Mode.Editing,
112
+ showEmptyEditors: false,
113
+ onAddAttributes: jest.fn(),
114
+ onDeleteAttribute: jest.fn(),
115
+ onChangeAttribute: jest.fn()
116
+ };
117
+ var dependentLookups = { editors: {}, structure: {}, initedTypeUris: [] };
118
+ var defaultMdmValues = { dependentLookups: dependentLookups };
119
+ var setUp = function (_a) {
120
+ var _b = _a === void 0 ? {} : _a, _c = _b.props, props = _c === void 0 ? defaultProps : _c, _d = _b.mdmValues, mdmValues = _d === void 0 ? defaultMdmValues : _d, _e = _b.pinnedAttributesContextValue, pinnedAttributesContextValue = _e === void 0 ? [] : _e;
121
+ var user = userEvent.setup();
122
+ var Providers = function (_a) {
123
+ var children = _a.children;
124
+ return (React.createElement(MdmModuleProvider, { values: mdmValues },
125
+ React.createElement(PinnedAttributesContext.Provider, { value: pinnedAttributesContextValue },
126
+ React.createElement(LocalizationProvider, { dateAdapter: AdapterMoment }, children))));
127
+ };
128
+ var result = render(React.createElement(EditModeAttributesList, __assign({}, props)), { wrapper: Providers });
129
+ var rerender = function (newProps) {
130
+ return result.rerender(React.createElement(EditModeAttributesList, __assign({}, props, newProps)));
131
+ };
132
+ return __assign(__assign({}, result), { rerender: rerender, user: user });
133
+ };
134
+ describe('Edit mode attributes list tests', function () {
52
135
  afterEach(function () {
53
136
  jest.clearAllMocks();
54
137
  });
55
- var attributes = {
56
- Role: [
57
- {
58
- ov: true,
59
- type: 'configuration/relationTypes/knowledge/attributes/Role',
60
- uri: 'relations/8908/Role',
61
- value: ''
62
- },
63
- {
64
- ov: true,
65
- type: 'configuration/relationTypes/knowledge/attributes/Role',
66
- uri: 'relations/8909/Role',
67
- value: 'Some role'
68
- }
69
- ],
70
- Name: [
71
- {
72
- ov: true,
73
- type: 'configuration/relationTypes/knowledge/attributes/Name',
74
- uri: 'relations/8808/Name',
75
- value: ''
76
- }
77
- ],
78
- LastName: [
79
- {
80
- ov: true,
81
- type: 'configuration/relationTypes/knowledge/attributes/LastName',
82
- uri: 'relations/7808/LastName',
83
- value: ''
84
- }
85
- ],
86
- paging: {
87
- 'configuration/relationTypes/knowledge/attributes/Role': {
88
- totalOvValues: 4,
89
- totalValues: 4
90
- }
91
- }
92
- };
93
- var entity = {
94
- attributes: attributes
95
- };
96
- var parentUri = 'entities/xT3HJZ7';
97
138
  it('should render button with label and not hidden/required pagers', function () {
98
- var label = 'More attributes';
99
- var component = mount(React.createElement(EditModeAttributesList, { attrTypes: attributesList, entity: entity, parentUri: parentUri }));
100
- var button = component.find(MoreAttributesButton);
101
- expect(button.length).toBe(1);
102
- expect(button.prop('label')).toBe(label);
103
- var pagers = component.find(EditModeAttributesPager);
104
- expect(pagers.length).toBe(3);
105
- pagers.forEach(function (pager) {
106
- expect(pager.prop('attributeType').hidden).toBeFalsy();
107
- var shouldHasPaging = pager.prop('attributeType').uri === 'configuration/relationTypes/knowledge/attributes/Role';
108
- expect(pager.prop('paging')).toBe(shouldHasPaging ? attributes.paging['configuration/relationTypes/knowledge/attributes/Role'] : undefined);
109
- });
110
- });
111
- it('should not add to more attr types single value types with non-empty attr value', function () {
112
- var attrTypes = adjust(1, assoc('singleValue', true), attributesList);
113
- var component = mount(React.createElement(EditModeAttributesList, { attrTypes: attrTypes, entity: entity, parentUri: parentUri }));
114
- var button = component.find(MoreAttributesButton);
115
- expect(button.prop('data').includes(attributesList[1])).toBe(false);
139
+ setUp();
140
+ screen.getByText('More attributes');
141
+ var attributeLabels = screen.getAllByTestId('reltio-attribute-label');
142
+ expect(attributeLabels).toHaveLength(3);
143
+ expect(attributeLabels[0]).toHaveTextContent('Role');
144
+ expect(attributeLabels[1]).toHaveTextContent('Name*');
145
+ expect(attributeLabels[2]).toHaveTextContent('Required*');
146
+ var attributes = screen.getAllByTestId('reltio-edit-attribute');
147
+ expect(attributes).toHaveLength(4);
148
+ expect(within(attributes[0]).getByRole('textbox')).toHaveValue('');
149
+ expect(within(attributes[1]).getByRole('textbox')).toHaveValue('Some role');
150
+ expect(within(attributes[2]).getByRole('textbox')).toHaveValue('');
151
+ expect(within(attributes[3]).getByRole('textbox')).toHaveValue('');
116
152
  });
153
+ it('should not add to more attr types single value types with non-empty attr value', function () { return __awaiter(void 0, void 0, void 0, function () {
154
+ var attrTypes, props, user;
155
+ return __generator(this, function (_a) {
156
+ switch (_a.label) {
157
+ case 0:
158
+ attrTypes = adjust(1, assoc('singleValue', true), attributesList);
159
+ props = __assign(__assign({}, defaultProps), { attrTypes: attrTypes });
160
+ user = setUp({ props: props }).user;
161
+ return [4 /*yield*/, user.click(screen.getByText('More attributes'))];
162
+ case 1:
163
+ _a.sent();
164
+ expect(within(screen.getByRole('presentation')).queryByText('Name')).not.toBeInTheDocument();
165
+ return [2 /*return*/];
166
+ }
167
+ });
168
+ }); });
117
169
  it('should not add to more attr types single value types in showEmptyEditors mode if they did not have deletions', function () {
118
170
  var attrTypes = Object.values(ActivenessAttrTypes);
119
- var component = mount(React.createElement(EditModeAttributesList, { attrTypes: attrTypes, entity: entity, parentUri: parentUri, showEmptyEditors: true }));
120
- expect(component.find(MoreAttributesButton).length).toBe(0);
171
+ var props = __assign(__assign({}, defaultProps), { attrTypes: attrTypes, showEmptyEditors: true });
172
+ setUp({ props: props });
173
+ expect(screen.queryByText('More attributes')).not.toBeInTheDocument();
121
174
  });
122
- it('should add to more attr types single value types in showEmptyEditors mode if they had deletions', function () {
123
- var _a;
124
- var attrTypes = Object.values(ActivenessAttrTypes);
125
- var component = mount(React.createElement(EditModeAttributesList, { attrTypes: attrTypes, entity: entity, parentUri: parentUri, showEmptyEditors: true }));
126
- var _b = component.find(HasDeletionsContext.Provider).prop('value'), hasDeletionsMap = _b.hasDeletionsMap, setHasDeletions = _b.setHasDeletions;
127
- expect(hasDeletionsMap).toEqual({});
128
- act(function () {
129
- setHasDeletions(attrTypes[0].uri, true);
175
+ it('should add to more attr types single value types in showEmptyEditors mode if they had deletions', function () { return __awaiter(void 0, void 0, void 0, function () {
176
+ var attrTypes, props, user, menuItems;
177
+ return __generator(this, function (_a) {
178
+ switch (_a.label) {
179
+ case 0:
180
+ attrTypes = Object.values(ActivenessAttrTypes);
181
+ props = __assign(__assign({}, defaultProps), { attrTypes: attrTypes, showEmptyEditors: true });
182
+ user = setUp({ props: props }).user;
183
+ return [4 /*yield*/, user.click(screen.getAllByTestId('reltio-delete-simple-attribute-button')[0])];
184
+ case 1:
185
+ _a.sent();
186
+ return [4 /*yield*/, user.click(screen.getByText('More attributes'))];
187
+ case 2:
188
+ _a.sent();
189
+ menuItems = screen.getAllByRole('menuitem');
190
+ expect(menuItems).toHaveLength(1);
191
+ expect(menuItems[0]).toHaveTextContent('Start date');
192
+ return [2 /*return*/];
193
+ }
130
194
  });
131
- rerenderWrapper(component);
132
- expect(component.find(MoreAttributesButton).length).toBe(1);
133
- expect(component.find(MoreAttributesButton).prop('data')).toEqual([attrTypes[0]]);
134
- expect(component.find(HasDeletionsContext.Provider).prop('value').hasDeletionsMap).toEqual((_a = {},
135
- _a[attrTypes[0].uri] = true,
136
- _a));
137
- });
195
+ }); });
138
196
  it('should not render pagers for attribute type without CREATE permission', function () {
139
197
  var attrTypes = __spreadArray([], attributesList, true);
140
198
  attrTypes[0] = __assign({}, attrTypes[0]);
141
199
  attrTypes[3] = __assign({}, attrTypes[3]);
142
200
  attrTypes[0].access = ['DELETE', 'UPDATE'];
143
201
  attrTypes[3].access = ['INITIATE_CHANGE_REQUEST'];
144
- var component = mount(React.createElement(EditModeAttributesList, { attrTypes: attrTypes, entity: entity, parentUri: parentUri }));
145
- var pager = component.find(EditModeAttributesPager);
146
- expect(pager.length).toBe(1);
147
- expect(pager.prop('attributeType').hidden).toBeFalsy();
202
+ var props = __assign(__assign({}, defaultProps), { attrTypes: attrTypes });
203
+ setUp({ props: props });
204
+ expect(screen.getAllByTestId('reltio-edit-attribute')).toHaveLength(1);
148
205
  });
149
206
  it('should not render pager for not required attribute type with only ov=false values', function () {
150
207
  var attrTypes = [
@@ -157,7 +214,7 @@ describe('EditModeAttributesList tests', function () {
157
214
  uri: 'configuration/entityTypes/HCP/attributes/Name'
158
215
  }
159
216
  ];
160
- var testEntity = __assign(__assign({}, entity), { attributes: {
217
+ var entity = __assign(__assign({}, defaultEntity), { attributes: {
161
218
  Name: [
162
219
  {
163
220
  ov: false,
@@ -173,9 +230,9 @@ describe('EditModeAttributesList tests', function () {
173
230
  }
174
231
  ]
175
232
  } });
176
- var component = mount(React.createElement(EditModeAttributesList, { attrTypes: attrTypes, entity: testEntity, parentUri: parentUri }));
177
- var pager = component.find(EditModeAttributesPager);
178
- expect(pager.length).toBe(0);
233
+ var props = __assign(__assign({}, defaultProps), { entity: entity, attrTypes: attrTypes });
234
+ setUp({ props: props });
235
+ expect(screen.queryByTestId('reltio-edit-attribute')).not.toBeInTheDocument();
179
236
  });
180
237
  it('should render pager for not required attribute type with ov=false values if showNonOv is true', function () {
181
238
  var attrTypes = [
@@ -188,7 +245,7 @@ describe('EditModeAttributesList tests', function () {
188
245
  uri: 'configuration/entityTypes/HCP/attributes/Name'
189
246
  }
190
247
  ];
191
- var testEntity = __assign(__assign({}, entity), { attributes: {
248
+ var entity = __assign(__assign({}, defaultEntity), { attributes: {
192
249
  Name: [
193
250
  {
194
251
  ov: false,
@@ -198,10 +255,9 @@ describe('EditModeAttributesList tests', function () {
198
255
  }
199
256
  ]
200
257
  } });
201
- var component = mount(React.createElement(EditModeAttributesList, { attrTypes: attrTypes, entity: testEntity, parentUri: parentUri, showNonOv: true }));
202
- var pager = component.find(EditModeAttributesPager);
203
- expect(pager.length).toBe(1);
204
- expect(pager.prop('showNonOv')).toBe(true);
258
+ var props = __assign(__assign({}, defaultProps), { entity: entity, attrTypes: attrTypes, showNonOv: true });
259
+ setUp({ props: props });
260
+ expect(screen.getAllByTestId('reltio-edit-attribute')).toHaveLength(1);
205
261
  });
206
262
  it('should render pager for required attribute type with only ov=false values', function () {
207
263
  var attrTypes = [
@@ -214,7 +270,7 @@ describe('EditModeAttributesList tests', function () {
214
270
  uri: 'configuration/entityTypes/HCP/attributes/Name'
215
271
  }
216
272
  ];
217
- var testEntity = __assign(__assign({}, entity), { attributes: {
273
+ var entity = __assign(__assign({}, defaultEntity), { attributes: {
218
274
  Name: [
219
275
  {
220
276
  ov: false,
@@ -230,9 +286,9 @@ describe('EditModeAttributesList tests', function () {
230
286
  }
231
287
  ]
232
288
  } });
233
- var component = mount(React.createElement(EditModeAttributesList, { attrTypes: attrTypes, entity: testEntity, parentUri: parentUri }));
234
- var pager = component.find(EditModeAttributesPager);
235
- expect(pager.length).toBe(1);
289
+ var props = __assign(__assign({}, defaultProps), { entity: entity, attrTypes: attrTypes });
290
+ setUp({ props: props });
291
+ expect(screen.getAllByTestId('reltio-edit-attribute')).toHaveLength(1);
236
292
  });
237
293
  it('should not render pager for not required attribute type without values', function () {
238
294
  var attrTypes = [
@@ -245,115 +301,112 @@ describe('EditModeAttributesList tests', function () {
245
301
  uri: 'configuration/entityTypes/HCP/attributes/Name'
246
302
  }
247
303
  ];
248
- var testEntity = __assign(__assign({}, entity), { attributes: {
249
- Name: []
250
- } });
251
- var component = mount(React.createElement(EditModeAttributesList, { attrTypes: attrTypes, entity: testEntity, parentUri: parentUri }));
252
- expect(component.find(EditModeAttributesPager).length).toBe(0);
253
- component.setProps({
254
- entity: __assign(__assign({}, entity), { attributes: {} })
255
- });
256
- expect(component.find(EditModeAttributesPager).length).toBe(0);
304
+ var entity = __assign(__assign({}, defaultEntity), { attributes: { Name: [] } });
305
+ var props = __assign(__assign({}, defaultProps), { entity: entity, attrTypes: attrTypes });
306
+ var rerender = setUp({ props: props }).rerender;
307
+ expect(screen.queryByTestId('reltio-edit-attribute')).not.toBeInTheDocument();
308
+ rerender({ entity: __assign(__assign({}, defaultEntity), { attributes: {} }) });
309
+ expect(screen.queryByTestId('reltio-edit-attribute')).not.toBeInTheDocument();
257
310
  });
258
- it('should render MoreAttributesButton with parent if parentAttributeType is passed and creatable', function () {
259
- var parentAttributeType = {
260
- label: 'Taxonomy',
261
- name: 'Taxonomy',
262
- type: 'Nested',
263
- hidden: false,
264
- uri: 'configuration/entityTypes/People/attributes/Taxonomy',
265
- access: ['CREATE', 'READ', 'INITIATE_CHANGE_REQUEST', 'UPDATE']
266
- };
267
- var attrTypes = [
268
- {
269
- label: 'Name',
270
- name: 'Name',
271
- type: 'String',
272
- hidden: false,
273
- required: true,
274
- uri: 'configuration/entityTypes/People/attributes/Taxonomy/attributes/Name',
275
- access: ['CREATE', 'READ', 'INITIATE_CHANGE_REQUEST', 'UPDATE']
311
+ it('should render "More attributes" button with parent if parentAttributeType is passed and creatable', function () { return __awaiter(void 0, void 0, void 0, function () {
312
+ var parentAttributeType, attrTypes, entity, props, user, menuItems;
313
+ return __generator(this, function (_a) {
314
+ switch (_a.label) {
315
+ case 0:
316
+ parentAttributeType = {
317
+ label: 'Taxonomy',
318
+ name: 'Taxonomy',
319
+ type: 'Nested',
320
+ hidden: false,
321
+ uri: 'configuration/entityTypes/People/attributes/Taxonomy',
322
+ access: ['CREATE', 'READ', 'INITIATE_CHANGE_REQUEST', 'UPDATE']
323
+ };
324
+ attrTypes = [
325
+ {
326
+ label: 'Name',
327
+ name: 'Name',
328
+ type: 'String',
329
+ hidden: false,
330
+ required: true,
331
+ uri: 'configuration/entityTypes/People/attributes/Taxonomy/attributes/Name',
332
+ access: ['CREATE', 'READ', 'INITIATE_CHANGE_REQUEST', 'UPDATE']
333
+ }
334
+ ];
335
+ entity = __assign(__assign({}, defaultEntity), { attributes: { Name: [] } });
336
+ props = __assign(__assign({}, defaultProps), { entity: entity, attrTypes: attrTypes, parentAttributeType: parentAttributeType });
337
+ user = setUp({ props: props }).user;
338
+ return [4 /*yield*/, user.click(screen.getByText('More attributes'))];
339
+ case 1:
340
+ _a.sent();
341
+ menuItems = screen.getAllByRole('menuitem');
342
+ expect(menuItems).toHaveLength(2);
343
+ expect(menuItems[0]).toHaveTextContent('Taxonomy');
344
+ expect(menuItems[1]).toHaveTextContent('Name*');
345
+ return [2 /*return*/];
276
346
  }
277
- ];
278
- var testEntity = __assign(__assign({}, entity), { attributes: {
279
- Name: []
280
- } });
281
- var component = mount(React.createElement(EditModeAttributesList, { parentAttributeType: parentAttributeType, attrTypes: attrTypes, entity: testEntity, parentUri: parentUri }));
282
- expect(component.find(MoreAttributesButton).length).toBe(1);
283
- expect(component.find(MoreAttributesButton).prop('parent')).toEqual(parentAttributeType);
284
- expect(component.find(MoreAttributesButton).prop('data')).toEqual(attrTypes);
285
- });
286
- it('should render MoreAttributesButton without parent if parentAttributeType is passed but not creatable', function () {
287
- var parentAttributeType = {
288
- label: 'Taxonomy',
289
- name: 'Taxonomy',
290
- type: 'Nested',
291
- hidden: false,
292
- uri: 'configuration/entityTypes/People/attributes/Taxonomy',
293
- access: ['READ', 'INITIATE_CHANGE_REQUEST', 'UPDATE']
294
- };
295
- var attrTypes = [
296
- {
297
- label: 'Name',
298
- name: 'Name',
299
- type: 'String',
300
- hidden: false,
301
- required: true,
302
- uri: 'configuration/entityTypes/People/attributes/Taxonomy/attributes/Name',
303
- access: ['CREATE', 'READ', 'INITIATE_CHANGE_REQUEST', 'UPDATE']
347
+ });
348
+ }); });
349
+ it('should render "More attributes" button without parent if parentAttributeType is passed but not creatable', function () { return __awaiter(void 0, void 0, void 0, function () {
350
+ var parentAttributeType, attrTypes, entity, props, user, menuItems;
351
+ return __generator(this, function (_a) {
352
+ switch (_a.label) {
353
+ case 0:
354
+ parentAttributeType = {
355
+ label: 'Taxonomy',
356
+ name: 'Taxonomy',
357
+ type: 'Nested',
358
+ hidden: false,
359
+ uri: 'configuration/entityTypes/People/attributes/Taxonomy',
360
+ access: ['READ', 'INITIATE_CHANGE_REQUEST', 'UPDATE']
361
+ };
362
+ attrTypes = [
363
+ {
364
+ label: 'Name',
365
+ name: 'Name',
366
+ type: 'String',
367
+ hidden: false,
368
+ required: true,
369
+ uri: 'configuration/entityTypes/People/attributes/Taxonomy/attributes/Name',
370
+ access: ['CREATE', 'READ', 'INITIATE_CHANGE_REQUEST', 'UPDATE']
371
+ }
372
+ ];
373
+ entity = __assign(__assign({}, defaultEntity), { attributes: { Name: [] } });
374
+ props = __assign(__assign({}, defaultProps), { entity: entity, attrTypes: attrTypes, parentAttributeType: parentAttributeType });
375
+ user = setUp({ props: props }).user;
376
+ return [4 /*yield*/, user.click(screen.getByText('More attributes'))];
377
+ case 1:
378
+ _a.sent();
379
+ menuItems = screen.getAllByRole('menuitem');
380
+ expect(menuItems).toHaveLength(1);
381
+ expect(menuItems[0]).toHaveTextContent('Name*');
382
+ return [2 /*return*/];
304
383
  }
305
- ];
306
- var testEntity = __assign(__assign({}, entity), { attributes: {
307
- Name: []
308
- } });
309
- var component = mount(React.createElement(EditModeAttributesList, { parentAttributeType: parentAttributeType, attrTypes: attrTypes, entity: testEntity, parentUri: parentUri }));
310
- expect(component.find(MoreAttributesButton).length).toBe(1);
311
- expect(component.find(MoreAttributesButton).prop('parent')).toBeFalsy();
312
- expect(component.find(MoreAttributesButton).prop('data')).toEqual(attrTypes);
313
- });
314
- it('should render BranchDecorator for MoreAttributesButton with enabled=true when drawLines prop is true', function () {
315
- var component = mount(React.createElement(EditModeAttributesList, { attrTypes: attributesList, entity: entity, parentUri: parentUri, drawLines: true }));
316
- var decorator = component.find(BranchDecorator);
317
- expect(decorator.length).toBe(1);
318
- expect(decorator.prop('enabled')).toBe(true);
319
- expect(decorator.prop('plain')).toBe(true);
320
- expect(decorator.find(MoreAttributesButton).length).toBe(1);
384
+ });
385
+ }); });
386
+ it('should render branch decorator for "More attributes" button when drawLines prop is true', function () {
387
+ var props = __assign(__assign({}, defaultProps), { drawLines: true });
388
+ setUp({ props: props });
389
+ var decorator = screen.getAllByTestId('branch-decorator')[0];
390
+ within(decorator).getByText('More attributes');
321
391
  });
322
- it('should render BranchDecorator for MoreAttributesButton with enabled=false when drawLines prop is false', function () {
323
- var component = mount(React.createElement(EditModeAttributesList, { attrTypes: attributesList, entity: entity, parentUri: parentUri, drawLines: false }));
324
- var decorator = component.find(BranchDecorator);
325
- expect(decorator.length).toBe(1);
326
- expect(decorator.prop('enabled')).toBe(false);
327
- expect(decorator.prop('plain')).toBe(true);
328
- expect(decorator.find(MoreAttributesButton).length).toBe(1);
392
+ it('should not render branch decorator for "More attributes" button when drawLines prop is false', function () {
393
+ var props = __assign(__assign({}, defaultProps), { drawLines: false });
394
+ setUp({ props: props });
395
+ expect(screen.queryByTestId('branch-decorator')).not.toBeInTheDocument();
329
396
  });
330
- it('should render BranchDecorator for children', function () {
397
+ it('should render branch decorator for children', function () {
331
398
  var Child = function () { return React.createElement("span", null, "children"); };
332
- var component = mount(React.createElement(EditModeAttributesList, { attrTypes: attributesList, entity: entity, parentUri: parentUri, drawLines: true },
333
- React.createElement(Child, null)));
334
- var decorators = component.find(BranchDecorator);
335
- expect(decorators.length).toBe(2);
336
- expect(decorators.at(0).prop('enabled')).toBe(true);
337
- expect(decorators.at(0).prop('plain')).toBeFalsy();
338
- expect(decorators.at(0).find(Child).length).toBe(1);
339
- expect(decorators.at(1).prop('enabled')).toBe(true);
340
- expect(decorators.at(1).prop('plain')).toBe(true);
341
- expect(decorators.at(1).find(MoreAttributesButton).length).toBe(1);
399
+ var props = __assign(__assign({}, defaultProps), { drawLines: true, children: React.createElement(Child, null) });
400
+ setUp({ props: props });
401
+ var decorators = screen.getAllByTestId('branch-decorator');
402
+ within(decorators[0]).getByText('children');
403
+ within(decorators[1]).getByText('More attributes');
342
404
  });
343
- it('should call getAttributesListForEditMode with pinnedAttributes', function () {
344
- var pinnedAttributes = ['pinned'];
345
- var Child = function () { return React.createElement("span", null, "children"); };
346
- mount(React.createElement(PinnedAttributesContext.Provider, { value: pinnedAttributes },
347
- React.createElement(EditModeAttributesList, { mode: Mode.Editing, attrTypes: attributesList, entity: entity, parentUri: parentUri },
348
- React.createElement(Child, null))));
349
- expect(getAttributesListForEditMode).toHaveBeenCalledWith({
350
- attrTypes: attributesList,
351
- mode: Mode.Editing,
352
- entity: entity,
353
- pinnedAttributes: pinnedAttributes,
354
- configCanCreate: true,
355
- alwaysVisible: [],
356
- isTemporary: false
357
- });
405
+ it('should pin attributes correctly', function () {
406
+ var pinnedAttributes = ['configuration/relationTypes/knowledge/attributes/Required'];
407
+ var attrTypes = adjust(3, assoc('required', false), attributesList);
408
+ var props = __assign(__assign({}, defaultProps), { attrTypes: attrTypes });
409
+ setUp({ props: props, pinnedAttributesContextValue: pinnedAttributes });
410
+ screen.getByText('Required');
358
411
  });
359
412
  });
@@ -5,24 +5,13 @@ export declare const attributesList: ({
5
5
  hidden: boolean;
6
6
  required: boolean;
7
7
  uri: string;
8
- lookupCode: string;
9
8
  access: string[];
10
9
  } | {
11
10
  label: string;
12
- name: string;
13
- type: string;
14
- hidden: boolean;
15
- required: boolean;
16
- uri: string;
17
- access: string[];
18
- lookupCode?: undefined;
19
- } | {
20
11
  name: string;
21
12
  type: string;
22
13
  required: boolean;
23
14
  uri: string;
24
15
  access: string[];
25
- label?: undefined;
26
16
  hidden?: undefined;
27
- lookupCode?: undefined;
28
17
  })[];
@@ -6,7 +6,6 @@ export var attributesList = [
6
6
  hidden: false,
7
7
  required: false,
8
8
  uri: 'configuration/relationTypes/knowledge/attributes/Role',
9
- lookupCode: 'rdm/lookupTypes/Role_knowledge',
10
9
  access: ['CREATE', 'READ', 'INITIATE_CHANGE_REQUEST', 'UPDATE']
11
10
  },
12
11
  {
@@ -28,6 +27,7 @@ export var attributesList = [
28
27
  access: ['CREATE', 'READ', 'INITIATE_CHANGE_REQUEST', 'UPDATE']
29
28
  },
30
29
  {
30
+ label: 'Required',
31
31
  name: 'Required',
32
32
  type: 'String',
33
33
  required: true,