@reltio/components 1.4.2051 → 1.4.2053
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AttributeListItem/AttributeListItem.d.ts +1 -1
- package/ChartTooltip/ChartTooltip.js +3 -3
- package/ColumnsSettings/components/ColumnListItem/ColumnListItem.d.ts +11 -26
- package/ColumnsSettings/components/ColumnListItem/ColumnListItem.js +0 -14
- package/DropDownMenuButton/DropDownMenuButton.js +1 -1
- package/HOCs/withAsyncMount/withAsyncMount.test.js +52 -52
- package/IgnoreButton/IgnoreButton.spec.js +109 -20
- package/Image/Image.d.ts +1 -1
- package/Image/Image.js +8 -8
- package/Image/Image.test.js +46 -51
- package/ImageActionsOverlay/ImageActionsOverlay.js +2 -1
- package/ImageActionsOverlay/ImageActionsOverlay.test.js +207 -125
- package/ImageActionsOverlay/components/CheckedIcon/CheckedIcon.js +1 -1
- package/ImageAttributesGallery/ImageAttributesGallery.test.js +525 -281
- package/ImageAttributesLine/ImageAttributesLine.js +1 -1
- package/ImageAttributesLine/ImageAttributesLine.test.js +187 -193
- package/ImageAttributesLine/imageAttributeValues.test-data.d.ts +10 -0
- package/ImageAttributesLine/imageAttributeValues.test-data.js +22 -0
- package/ImageAttributesLineEditor/ImageAttributesLineEditor.test.js +315 -298
- package/ImageDetailsView/ImageDetailsView.test.js +529 -55
- package/ImageDetailsView/attributes.test-data.d.ts +4 -1
- package/ImageDetailsView/attributes.test-data.js +98 -1
- package/ImageDetailsView/components/ImageDetailsViewCarousel/ImageDetailsViewCarousel.js +2 -2
- package/ImageDetailsView/components/MetaInfoItem/MetaInfoItem.js +1 -1
- package/ImageDetailsView/components/MetaInfoList/MetaInfoList.js +1 -1
- package/ImageDetailsView/components/Thumbnails/Thumbnails.js +1 -1
- package/ImageDetailsView/helpers.test.js +4 -4
- package/ImageGalleryDialog/ImageGalleryDialog.test.js +89 -46
- package/ImportButton/ImportButton.test.js +94 -24
- package/InlineAttributesList/InlineAttributesList.test.js +22 -62
- package/InlineAttributesList/attributes.test-data.d.ts +4 -2
- package/InlineAttributesList/attributes.test-data.js +40 -1
- package/InlineAttributesPager/InlineAttributesPager.d.ts +1 -2
- package/InlineAttributesPager/InlineAttributesPager.js +1 -4
- package/InlineAttributesPager/InlineAttributesPager.test.js +393 -183
- package/InlineComplexAttribute/InlineComplexAttribute.js +1 -1
- package/InlineComplexAttribute/InlineComplexAttribute.test.js +396 -182
- package/InlineImageAttribute/InlineImageAttribute.test.js +103 -55
- package/InlineNestedAttribute/InlineNestedAttribute.test.js +105 -43
- package/InlineReferenceAttribute/InlineReferenceAttribute.test.js +165 -107
- package/InlineSimpleAttribute/InlineSimpleAttribute.spec.js +352 -346
- package/InlineSimpleAttributeEditor/InlineSimpleAttributeEditor.test.js +285 -194
- package/InternalLink/InternalLink.test.js +41 -11
- package/LookupEditor/LookupEditor.test.js +180 -44
- package/LookupEditor/components/GroupedDropDownEditor/helpers.test.js +1 -1
- package/MapChart/MapChart.js +3 -8
- package/MapChart/MapChart.test.js +152 -188
- package/MapChart/components/Legend/Legend.js +3 -3
- package/MaskingSwitcher/MaskingSwitcher.js +1 -1
- package/MatchRulesBadge/MatchRulesBadge.test.js +93 -24
- package/SelectEditor/SelectEditor.d.ts +4 -10
- package/SelectEditor/SelectEditor.js +0 -4
- package/SelectEditor/SelectEditor.test.js +79 -9
- package/cjs/AttributeListItem/AttributeListItem.d.ts +1 -1
- package/cjs/ChartTooltip/ChartTooltip.js +3 -3
- package/cjs/ColumnsSettings/components/ColumnListItem/ColumnListItem.d.ts +11 -26
- package/cjs/ColumnsSettings/components/ColumnListItem/ColumnListItem.js +0 -14
- package/cjs/DropDownMenuButton/DropDownMenuButton.js +1 -1
- package/cjs/HOCs/withAsyncMount/withAsyncMount.test.js +56 -56
- package/cjs/IgnoreButton/IgnoreButton.spec.js +109 -20
- package/cjs/Image/Image.d.ts +1 -1
- package/cjs/Image/Image.js +8 -8
- package/cjs/Image/Image.test.js +46 -51
- package/cjs/ImageActionsOverlay/ImageActionsOverlay.js +2 -1
- package/cjs/ImageActionsOverlay/ImageActionsOverlay.test.js +207 -125
- package/cjs/ImageActionsOverlay/components/CheckedIcon/CheckedIcon.js +1 -1
- package/cjs/ImageAttributesGallery/ImageAttributesGallery.test.js +525 -281
- package/cjs/ImageAttributesLine/ImageAttributesLine.js +1 -1
- package/cjs/ImageAttributesLine/ImageAttributesLine.test.js +195 -224
- package/cjs/ImageAttributesLine/imageAttributeValues.test-data.d.ts +10 -0
- package/cjs/ImageAttributesLine/imageAttributeValues.test-data.js +23 -1
- package/cjs/ImageAttributesLineEditor/ImageAttributesLineEditor.test.js +316 -299
- package/cjs/ImageDetailsView/ImageDetailsView.test.js +529 -55
- package/cjs/ImageDetailsView/attributes.test-data.d.ts +4 -1
- package/cjs/ImageDetailsView/attributes.test-data.js +99 -2
- package/cjs/ImageDetailsView/components/ImageDetailsViewCarousel/ImageDetailsViewCarousel.js +2 -2
- package/cjs/ImageDetailsView/components/MetaInfoItem/MetaInfoItem.js +1 -1
- package/cjs/ImageDetailsView/components/MetaInfoList/MetaInfoList.js +1 -1
- package/cjs/ImageDetailsView/components/Thumbnails/Thumbnails.js +1 -1
- package/cjs/ImageDetailsView/helpers.test.js +3 -3
- package/cjs/ImageGalleryDialog/ImageGalleryDialog.test.js +89 -46
- package/cjs/ImportButton/ImportButton.test.js +94 -24
- package/cjs/InlineAttributesList/InlineAttributesList.test.js +22 -62
- package/cjs/InlineAttributesList/attributes.test-data.d.ts +4 -2
- package/cjs/InlineAttributesList/attributes.test-data.js +41 -2
- package/cjs/InlineAttributesPager/InlineAttributesPager.d.ts +1 -2
- package/cjs/InlineAttributesPager/InlineAttributesPager.js +1 -4
- package/cjs/InlineAttributesPager/InlineAttributesPager.test.js +393 -183
- package/cjs/InlineComplexAttribute/InlineComplexAttribute.js +1 -1
- package/cjs/InlineComplexAttribute/InlineComplexAttribute.test.js +395 -204
- package/cjs/InlineImageAttribute/InlineImageAttribute.test.js +103 -55
- package/cjs/InlineNestedAttribute/InlineNestedAttribute.test.js +105 -43
- package/cjs/InlineReferenceAttribute/InlineReferenceAttribute.test.js +164 -106
- package/cjs/InlineSimpleAttribute/InlineSimpleAttribute.spec.js +351 -345
- package/cjs/InlineSimpleAttributeEditor/InlineSimpleAttributeEditor.test.js +307 -193
- package/cjs/InternalLink/InternalLink.test.js +40 -10
- package/cjs/LookupEditor/LookupEditor.test.js +178 -65
- package/cjs/LookupEditor/components/GroupedDropDownEditor/helpers.test.js +1 -1
- package/cjs/MapChart/MapChart.js +3 -8
- package/cjs/MapChart/MapChart.test.js +152 -188
- package/cjs/MapChart/components/Legend/Legend.js +3 -3
- package/cjs/MaskingSwitcher/MaskingSwitcher.js +1 -1
- package/cjs/MatchRulesBadge/MatchRulesBadge.test.js +93 -24
- package/cjs/SelectEditor/SelectEditor.d.ts +4 -10
- package/cjs/SelectEditor/SelectEditor.js +0 -4
- package/cjs/SelectEditor/SelectEditor.test.js +79 -9
- package/cjs/hooks/useAsyncMount/useAsyncMount.d.ts +1 -1
- package/cjs/hooks/useAsyncMount/useAsyncMount.js +1 -1
- package/hooks/useAsyncMount/useAsyncMount.d.ts +1 -1
- package/hooks/useAsyncMount/useAsyncMount.js +1 -1
- package/package.json +2 -2
- package/HOCs/withTableContext/withTableContext.test.d.ts +0 -1
- package/HOCs/withTableContext/withTableContext.test.js +0 -41
- package/ImageAttributesGallery/components/GalleryView/GalleryView.test.d.ts +0 -1
- package/ImageAttributesGallery/components/GalleryView/GalleryView.test.js +0 -98
- package/ImageDetailsView/components/ImageDetailsViewCarousel/ImageDetailsViewCarousel.test.d.ts +0 -1
- package/ImageDetailsView/components/ImageDetailsViewCarousel/ImageDetailsViewCarousel.test.js +0 -99
- package/ImageDetailsView/components/ImageDetailsViewSidebar/ImageDetailsViewSidebar.test.d.ts +0 -1
- package/ImageDetailsView/components/ImageDetailsViewSidebar/ImageDetailsViewSidebar.test.js +0 -65
- package/ImageDetailsView/components/MetaInfo/MetaInfo.test.d.ts +0 -1
- package/ImageDetailsView/components/MetaInfo/MetaInfo.test.js +0 -306
- package/ImageDetailsView/components/MetaInfoForm/MetaInfoForm.test.d.ts +0 -1
- package/ImageDetailsView/components/MetaInfoForm/MetaInfoForm.test.js +0 -134
- package/ImageDetailsView/components/MetaInfoHeader/MetaInfoHeader.test.d.ts +0 -1
- package/ImageDetailsView/components/MetaInfoHeader/MetaInfoHeader.test.js +0 -99
- package/ImageDetailsView/components/MetaInfoItem/MetaInfoItem.test.d.ts +0 -1
- package/ImageDetailsView/components/MetaInfoItem/MetaInfoItem.test.js +0 -36
- package/ImageDetailsView/components/MetaInfoList/MetaInfoList.test.d.ts +0 -1
- package/ImageDetailsView/components/MetaInfoList/MetaInfoList.test.js +0 -161
- package/ImageDetailsView/components/Thumbnails/Thumbnails.test.d.ts +0 -1
- package/ImageDetailsView/components/Thumbnails/Thumbnails.test.js +0 -76
- package/InlineAttributesPager/components/InlineImageAttributesBlock/InlineImageAttributesBlock.test.d.ts +0 -1
- package/InlineAttributesPager/components/InlineImageAttributesBlock/InlineImageAttributesBlock.test.js +0 -104
- package/InlineAttributesPager/components/InlineNestedAttributesBlock/InlineNestedAttributesBlock.test.d.ts +0 -1
- package/InlineAttributesPager/components/InlineNestedAttributesBlock/InlineNestedAttributesBlock.test.js +0 -114
- package/InlineAttributesPager/components/InlineReferenceAttributesBlock/InlineReferenceAttributesBlock.test.d.ts +0 -1
- package/InlineAttributesPager/components/InlineReferenceAttributesBlock/InlineReferenceAttributesBlock.test.js +0 -177
- package/InlineSimpleAttribute/components/CrosswalkMenuItem/CrosswalkMenuItem.spec.d.ts +0 -1
- package/InlineSimpleAttribute/components/CrosswalkMenuItem/CrosswalkMenuItem.spec.js +0 -52
- package/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.test.d.ts +0 -1
- package/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.test.js +0 -37
- package/cjs/HOCs/withTableContext/withTableContext.test.d.ts +0 -1
- package/cjs/HOCs/withTableContext/withTableContext.test.js +0 -46
- package/cjs/ImageAttributesGallery/components/GalleryView/GalleryView.test.d.ts +0 -1
- package/cjs/ImageAttributesGallery/components/GalleryView/GalleryView.test.js +0 -103
- package/cjs/ImageDetailsView/components/ImageDetailsViewCarousel/ImageDetailsViewCarousel.test.d.ts +0 -1
- package/cjs/ImageDetailsView/components/ImageDetailsViewCarousel/ImageDetailsViewCarousel.test.js +0 -104
- package/cjs/ImageDetailsView/components/ImageDetailsViewSidebar/ImageDetailsViewSidebar.test.d.ts +0 -1
- package/cjs/ImageDetailsView/components/ImageDetailsViewSidebar/ImageDetailsViewSidebar.test.js +0 -70
- package/cjs/ImageDetailsView/components/MetaInfo/MetaInfo.test.d.ts +0 -1
- package/cjs/ImageDetailsView/components/MetaInfo/MetaInfo.test.js +0 -311
- package/cjs/ImageDetailsView/components/MetaInfoForm/MetaInfoForm.test.d.ts +0 -1
- package/cjs/ImageDetailsView/components/MetaInfoForm/MetaInfoForm.test.js +0 -139
- package/cjs/ImageDetailsView/components/MetaInfoHeader/MetaInfoHeader.test.d.ts +0 -1
- package/cjs/ImageDetailsView/components/MetaInfoHeader/MetaInfoHeader.test.js +0 -104
- package/cjs/ImageDetailsView/components/MetaInfoItem/MetaInfoItem.test.d.ts +0 -1
- package/cjs/ImageDetailsView/components/MetaInfoItem/MetaInfoItem.test.js +0 -41
- package/cjs/ImageDetailsView/components/MetaInfoList/MetaInfoList.test.d.ts +0 -1
- package/cjs/ImageDetailsView/components/MetaInfoList/MetaInfoList.test.js +0 -166
- package/cjs/ImageDetailsView/components/Thumbnails/Thumbnails.test.d.ts +0 -1
- package/cjs/ImageDetailsView/components/Thumbnails/Thumbnails.test.js +0 -81
- package/cjs/InlineAttributesPager/components/InlineImageAttributesBlock/InlineImageAttributesBlock.test.d.ts +0 -1
- package/cjs/InlineAttributesPager/components/InlineImageAttributesBlock/InlineImageAttributesBlock.test.js +0 -109
- package/cjs/InlineAttributesPager/components/InlineNestedAttributesBlock/InlineNestedAttributesBlock.test.d.ts +0 -1
- package/cjs/InlineAttributesPager/components/InlineNestedAttributesBlock/InlineNestedAttributesBlock.test.js +0 -119
- package/cjs/InlineAttributesPager/components/InlineReferenceAttributesBlock/InlineReferenceAttributesBlock.test.d.ts +0 -1
- package/cjs/InlineAttributesPager/components/InlineReferenceAttributesBlock/InlineReferenceAttributesBlock.test.js +0 -182
- package/cjs/InlineSimpleAttribute/components/CrosswalkMenuItem/CrosswalkMenuItem.spec.d.ts +0 -1
- package/cjs/InlineSimpleAttribute/components/CrosswalkMenuItem/CrosswalkMenuItem.spec.js +0 -57
- package/cjs/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.test.d.ts +0 -1
- package/cjs/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.test.js +0 -42
|
@@ -9,65 +9,113 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
+
}
|
|
22
47
|
};
|
|
23
48
|
import React from 'react';
|
|
24
|
-
import {
|
|
49
|
+
import { render, screen } from '@testing-library/react';
|
|
50
|
+
import userEvent from '@testing-library/user-event';
|
|
51
|
+
import { DndContext } from '@dnd-kit/core';
|
|
25
52
|
import { InlineImageAttribute } from './InlineImageAttribute';
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
53
|
+
var attributeType = {
|
|
54
|
+
attributes: [
|
|
55
|
+
{
|
|
56
|
+
name: 'UrlThumbnail',
|
|
57
|
+
type: 'String',
|
|
58
|
+
uri: 'configuration/entityTypes/Employee/attributes/ImageGallery/attributes/UrlThumbnail'
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
name: 'ImageGallery',
|
|
62
|
+
type: 'Image',
|
|
63
|
+
uri: 'configuration/entityTypes/Employee/attributes/ImageGallery'
|
|
64
|
+
};
|
|
65
|
+
var attributeValue = {
|
|
66
|
+
type: attributeType.uri,
|
|
67
|
+
uri: 'entities/1Rd2I9Mt/attributes/ImageGallery/39V5GWJZv',
|
|
68
|
+
value: {
|
|
69
|
+
UrlThumbnail: [
|
|
30
70
|
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
71
|
+
type: 'configuration/entityTypes/Employee/attributes/ImageGallery/attributes/UrlThumbnail',
|
|
72
|
+
ov: true,
|
|
73
|
+
value: '/test.jpg',
|
|
74
|
+
uri: 'entities/1Rd2I9Mt/attributes/ImageGallery/39V5GWJZv/UrlThumbnail/39V5GWWMh'
|
|
34
75
|
}
|
|
35
|
-
]
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
attributeType: attributeType,
|
|
57
|
-
attributeValue: attributeValue,
|
|
58
|
-
crosswalksMap: {},
|
|
59
|
-
onPin: jest.fn(),
|
|
60
|
-
onIgnore: jest.fn(),
|
|
61
|
-
onEdit: jest.fn(),
|
|
62
|
-
onDelete: jest.fn(),
|
|
63
|
-
onAdd: jest.fn(),
|
|
64
|
-
emptyTempAttributeUris: []
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
ov: true
|
|
79
|
+
};
|
|
80
|
+
var defaultProps = {
|
|
81
|
+
attributeType: attributeType,
|
|
82
|
+
attributeValue: attributeValue,
|
|
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 = userEvent.setup();
|
|
94
|
+
var Providers = function (_a) {
|
|
95
|
+
var children = _a.children;
|
|
96
|
+
return React.createElement(DndContext, null, children);
|
|
65
97
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
var
|
|
71
|
-
|
|
72
|
-
|
|
98
|
+
return __assign({ user: user }, render(React.createElement(InlineImageAttribute, __assign({}, defaultProps, props)), { wrapper: Providers }));
|
|
99
|
+
};
|
|
100
|
+
describe('InlineImageAttribute tests', function () {
|
|
101
|
+
it('should render correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
102
|
+
var user, expandButton;
|
|
103
|
+
return __generator(this, function (_a) {
|
|
104
|
+
switch (_a.label) {
|
|
105
|
+
case 0:
|
|
106
|
+
user = setUp().user;
|
|
107
|
+
expect(screen.getByRole('img')).toHaveAttribute('src', '/test.jpg');
|
|
108
|
+
expect(screen.queryByTestId('simple-attributes-wrapper')).not.toBeInTheDocument();
|
|
109
|
+
expandButton = screen.getByTestId('arrow-expand-button');
|
|
110
|
+
expect(expandButton).toBeInTheDocument();
|
|
111
|
+
expect(expandButton.querySelector('svg')).not.toHaveClass('expanded');
|
|
112
|
+
return [4 /*yield*/, user.click(expandButton)];
|
|
113
|
+
case 1:
|
|
114
|
+
_a.sent();
|
|
115
|
+
expect(screen.getByTestId('simple-attributes-wrapper')).toBeInTheDocument();
|
|
116
|
+
expect(expandButton.querySelector('svg')).toHaveClass('expanded');
|
|
117
|
+
return [2 /*return*/];
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}); });
|
|
73
121
|
});
|
|
@@ -9,52 +9,114 @@ 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
|
import React from 'react';
|
|
13
|
-
import {
|
|
49
|
+
import { render, screen } from '@testing-library/react';
|
|
50
|
+
import userEvent from '@testing-library/user-event';
|
|
51
|
+
import { DndContext } from '@dnd-kit/core';
|
|
14
52
|
import { InlineNestedAttribute } from './InlineNestedAttribute';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
53
|
+
var attributeType = {
|
|
54
|
+
uri: 'configuration/entityTypes/HCP/attributes/Nested',
|
|
55
|
+
type: 'Nested',
|
|
56
|
+
name: 'Nested',
|
|
57
|
+
label: 'Nested label',
|
|
58
|
+
attributes: [
|
|
59
|
+
{
|
|
60
|
+
uri: 'configuration/entityTypes/HCP/attributes/Nested/attributes/SubNested',
|
|
61
|
+
type: 'String',
|
|
62
|
+
name: 'SubNested',
|
|
63
|
+
label: 'SubNested label'
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
access: ['READ', 'UPDATE', 'DELETE']
|
|
67
|
+
};
|
|
68
|
+
var attributeValue = {
|
|
69
|
+
label: 'Attribute Label',
|
|
70
|
+
uri: 'entities/1/attributes/Nested/1',
|
|
71
|
+
value: {
|
|
72
|
+
SubNested: [
|
|
23
73
|
{
|
|
24
|
-
uri: '
|
|
25
|
-
|
|
26
|
-
name: 'SubNested',
|
|
27
|
-
label: 'SubNested label'
|
|
74
|
+
uri: 'entities/1/attributes/Nested/1/SubNested/1',
|
|
75
|
+
value: '1'
|
|
28
76
|
}
|
|
29
|
-
]
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
onIgnore: jest.fn(),
|
|
51
|
-
onEdit: jest.fn(),
|
|
52
|
-
onDelete: jest.fn(),
|
|
53
|
-
onAdd: jest.fn(),
|
|
54
|
-
emptyTempAttributeUris: []
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
ov: true
|
|
80
|
+
};
|
|
81
|
+
var defaultProps = {
|
|
82
|
+
attributeType: attributeType,
|
|
83
|
+
attributeValue: attributeValue,
|
|
84
|
+
crosswalksMap: {},
|
|
85
|
+
onPin: jest.fn(),
|
|
86
|
+
onIgnore: jest.fn(),
|
|
87
|
+
onEdit: jest.fn(),
|
|
88
|
+
onDelete: jest.fn(),
|
|
89
|
+
onAdd: jest.fn(),
|
|
90
|
+
emptyTempAttributeUris: []
|
|
91
|
+
};
|
|
92
|
+
var setUp = function (props) {
|
|
93
|
+
if (props === void 0) { props = {}; }
|
|
94
|
+
var user = userEvent.setup();
|
|
95
|
+
var Providers = function (_a) {
|
|
96
|
+
var children = _a.children;
|
|
97
|
+
return React.createElement(DndContext, null, children);
|
|
55
98
|
};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
99
|
+
return __assign({ user: user }, render(React.createElement(InlineNestedAttribute, __assign({}, defaultProps, props)), { wrapper: Providers }));
|
|
100
|
+
};
|
|
101
|
+
describe('InlineNestedAttribute tests', function () {
|
|
102
|
+
it('should render correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
103
|
+
var user, expandButton;
|
|
104
|
+
return __generator(this, function (_a) {
|
|
105
|
+
switch (_a.label) {
|
|
106
|
+
case 0:
|
|
107
|
+
user = setUp().user;
|
|
108
|
+
expect(screen.getByText('Attribute Label')).toBeInTheDocument();
|
|
109
|
+
expect(screen.queryByText('SubNested label')).not.toBeInTheDocument();
|
|
110
|
+
expandButton = screen.getByTestId('arrow-expand-button');
|
|
111
|
+
expect(expandButton).toBeInTheDocument();
|
|
112
|
+
expect(expandButton.querySelector('svg')).not.toHaveClass('expanded');
|
|
113
|
+
return [4 /*yield*/, user.click(expandButton)];
|
|
114
|
+
case 1:
|
|
115
|
+
_a.sent();
|
|
116
|
+
expect(screen.getByText('SubNested label')).toBeInTheDocument();
|
|
117
|
+
expect(expandButton.querySelector('svg')).toHaveClass('expanded');
|
|
118
|
+
return [2 /*return*/];
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}); });
|
|
60
122
|
});
|
|
@@ -9,123 +9,181 @@ 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
|
import React from 'react';
|
|
13
|
-
import {
|
|
49
|
+
import { render, screen } from '@testing-library/react';
|
|
50
|
+
import userEvent from '@testing-library/user-event';
|
|
51
|
+
import { DndContext } from '@dnd-kit/core';
|
|
14
52
|
import { InlineReferenceAttribute } from './InlineReferenceAttribute';
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
53
|
+
import { MdmModuleProvider } from '../contexts/MdmModuleContext';
|
|
54
|
+
var attributeType = {
|
|
55
|
+
label: 'Address',
|
|
56
|
+
name: 'Address',
|
|
57
|
+
type: 'Reference',
|
|
58
|
+
uri: 'configuration/entityTypes/HCP/attributes/Address',
|
|
59
|
+
referencedAttributeURIs: [
|
|
60
|
+
'configuration/entityTypes/Location/attributes/AddressLine1',
|
|
61
|
+
'configuration/relationTypes/HasAddress/attributes/Status'
|
|
62
|
+
],
|
|
63
|
+
relationshipTypeURI: 'configuration/relationTypes/HasAddress'
|
|
64
|
+
};
|
|
65
|
+
var attributes = [
|
|
66
|
+
{
|
|
67
|
+
uri: 'configuration/relationTypes/HasAddress/attributes/Status',
|
|
68
|
+
type: 'String',
|
|
69
|
+
name: 'Status',
|
|
70
|
+
label: 'Customer Address Status'
|
|
71
|
+
}
|
|
72
|
+
];
|
|
73
|
+
var metadata = {
|
|
74
|
+
entityTypes: [
|
|
32
75
|
{
|
|
33
|
-
uri: 'configuration/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
label: 'Customer Address Status'
|
|
76
|
+
uri: 'configuration/entityTypes/HCP',
|
|
77
|
+
label: 'HCP',
|
|
78
|
+
attributes: [attributeType]
|
|
37
79
|
}
|
|
38
|
-
]
|
|
39
|
-
|
|
40
|
-
|
|
80
|
+
],
|
|
81
|
+
relationTypes: [
|
|
82
|
+
{
|
|
83
|
+
uri: 'configuration/relationTypes/HasAddress',
|
|
84
|
+
label: 'has address',
|
|
85
|
+
attributes: attributes
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
};
|
|
89
|
+
var attributeValue = {
|
|
90
|
+
label: 'Granada Aveue Santa Clara 1',
|
|
91
|
+
relationshipLabel: 'Office',
|
|
92
|
+
value: {
|
|
93
|
+
Status: [
|
|
41
94
|
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
95
|
+
type: 'configuration/relationTypes/HasAddress/attributes/Status',
|
|
96
|
+
ov: true,
|
|
97
|
+
value: 'Some status',
|
|
98
|
+
uri: 'entities/1/attributes/Address/1/Status/1'
|
|
45
99
|
}
|
|
46
|
-
]
|
|
47
|
-
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
ov: true,
|
|
103
|
+
uri: 'entities/1/attributes/Address/1',
|
|
104
|
+
refEntity: {
|
|
105
|
+
type: 'configuration/entityTypes/Location',
|
|
106
|
+
crosswalks: [
|
|
48
107
|
{
|
|
49
|
-
uri: '
|
|
50
|
-
|
|
51
|
-
|
|
108
|
+
uri: 'entities/1/crosswalks/1YWdmjzf.3VKnDCovj',
|
|
109
|
+
type: 'configuration/sources/HMS',
|
|
110
|
+
value: 'cww1',
|
|
111
|
+
createDate: '2020-09-02T16:19:12.943Z',
|
|
112
|
+
updateDate: '2020-09-02T16:19:12.943Z',
|
|
113
|
+
attributeURIs: ['entities/1/attributes/Address/1/AddressLine1/1', 'entities/1/attributes/Address/1']
|
|
52
114
|
}
|
|
53
|
-
]
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
Status: [
|
|
60
|
-
{
|
|
61
|
-
type: 'configuration/relationTypes/HasAddress/attributes/Status',
|
|
62
|
-
ov: true,
|
|
63
|
-
value: 'Some status',
|
|
64
|
-
uri: 'entities/1/attributes/Address/1/Status/1'
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
},
|
|
68
|
-
ov: true,
|
|
69
|
-
uri: 'entities/1/attributes/Address/1',
|
|
70
|
-
refEntity: {
|
|
71
|
-
type: 'configuration/entityTypes/Location',
|
|
72
|
-
crosswalks: [
|
|
73
|
-
{
|
|
74
|
-
uri: 'entities/1/crosswalks/1YWdmjzf.3VKnDCovj',
|
|
75
|
-
type: 'configuration/sources/HMS',
|
|
76
|
-
value: 'cww1',
|
|
77
|
-
createDate: '2020-09-02T16:19:12.943Z',
|
|
78
|
-
updateDate: '2020-09-02T16:19:12.943Z',
|
|
79
|
-
attributeURIs: ['entities/1/attributes/Address/1/AddressLine1/1', 'entities/1/attributes/Address/1']
|
|
80
|
-
}
|
|
81
|
-
],
|
|
82
|
-
objectURI: 'entities/1'
|
|
83
|
-
},
|
|
84
|
-
refRelation: {
|
|
85
|
-
type: 'configuration/relationTypes/HasAddress',
|
|
86
|
-
crosswalks: [
|
|
87
|
-
{
|
|
88
|
-
uri: 'entities/1/crosswalks/uAGtqeB.3VKnDCtBz',
|
|
89
|
-
type: 'configuration/sources/HMS',
|
|
90
|
-
value: 'cww2',
|
|
91
|
-
createDate: '2020-09-02T16:19:12.943Z',
|
|
92
|
-
updateDate: '2020-09-02T16:19:12.943Z',
|
|
93
|
-
attributeURIs: ['entities/1/attributes/Address/1/Status/1', 'entities/1/attributes/Address/1']
|
|
94
|
-
}
|
|
95
|
-
],
|
|
96
|
-
startRefPinned: false,
|
|
97
|
-
endRefPinned: false,
|
|
98
|
-
startRefIgnored: false,
|
|
99
|
-
endRefIgnored: false,
|
|
100
|
-
objectURI: 'relations/1'
|
|
101
|
-
},
|
|
102
|
-
startObjectCrosswalks: [
|
|
115
|
+
],
|
|
116
|
+
objectURI: 'entities/1'
|
|
117
|
+
},
|
|
118
|
+
refRelation: {
|
|
119
|
+
type: 'configuration/relationTypes/HasAddress',
|
|
120
|
+
crosswalks: [
|
|
103
121
|
{
|
|
122
|
+
uri: 'entities/1/crosswalks/uAGtqeB.3VKnDCtBz',
|
|
104
123
|
type: 'configuration/sources/HMS',
|
|
105
|
-
value: '
|
|
124
|
+
value: 'cww2',
|
|
125
|
+
createDate: '2020-09-02T16:19:12.943Z',
|
|
126
|
+
updateDate: '2020-09-02T16:19:12.943Z',
|
|
127
|
+
attributeURIs: ['entities/1/attributes/Address/1/Status/1', 'entities/1/attributes/Address/1']
|
|
106
128
|
}
|
|
107
|
-
]
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
129
|
+
],
|
|
130
|
+
startRefPinned: false,
|
|
131
|
+
endRefPinned: false,
|
|
132
|
+
startRefIgnored: false,
|
|
133
|
+
endRefIgnored: false,
|
|
134
|
+
objectURI: 'relations/1'
|
|
135
|
+
},
|
|
136
|
+
startObjectCrosswalks: [
|
|
137
|
+
{
|
|
138
|
+
type: 'configuration/sources/HMS',
|
|
139
|
+
value: 'cww1'
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
};
|
|
143
|
+
var defaultProps = {
|
|
144
|
+
attributeType: attributeType,
|
|
145
|
+
attributeValue: attributeValue,
|
|
146
|
+
crosswalksMap: {},
|
|
147
|
+
emptyTempAttributeUris: [],
|
|
148
|
+
onPin: jest.fn(),
|
|
149
|
+
onIgnore: jest.fn(),
|
|
150
|
+
onEdit: jest.fn(),
|
|
151
|
+
onDelete: jest.fn(),
|
|
152
|
+
onAdd: jest.fn()
|
|
153
|
+
};
|
|
154
|
+
var setUp = function (props) {
|
|
155
|
+
if (props === void 0) { props = {}; }
|
|
156
|
+
var user = userEvent.setup();
|
|
157
|
+
var Providers = function (_a) {
|
|
158
|
+
var children = _a.children;
|
|
159
|
+
return (React.createElement(MdmModuleProvider, { values: { metadata: metadata, uiPath: 'https://tst-01.reltio.com/ui/tenant/' } },
|
|
160
|
+
React.createElement(DndContext, null, children)));
|
|
119
161
|
};
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
162
|
+
return __assign({ user: user }, render(React.createElement(InlineReferenceAttribute, __assign({}, defaultProps, props)), { wrapper: Providers }));
|
|
163
|
+
};
|
|
164
|
+
describe('InlineReferenceAttribute tests', function () {
|
|
165
|
+
it('should render correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
166
|
+
var user, link, expandButton;
|
|
167
|
+
return __generator(this, function (_a) {
|
|
168
|
+
switch (_a.label) {
|
|
169
|
+
case 0:
|
|
170
|
+
user = setUp().user;
|
|
171
|
+
link = screen.getByRole('link');
|
|
172
|
+
expect(link).toHaveAttribute('href', 'https://tst-01.reltio.com/ui/tenant/#p~com.reltio.plugins.entity.default.DefaultPerspective_e~entities/1');
|
|
173
|
+
expect(link).toHaveTextContent('Granada Aveue Santa Clara 1');
|
|
174
|
+
expect(screen.queryByText('Customer Address Status')).not.toBeInTheDocument();
|
|
175
|
+
expect(screen.queryByTestId('simple-attributes-wrapper')).not.toBeInTheDocument();
|
|
176
|
+
expandButton = screen.getByTestId('arrow-expand-button');
|
|
177
|
+
expect(expandButton).toBeInTheDocument();
|
|
178
|
+
expect(expandButton.querySelector('svg')).not.toHaveClass('expanded');
|
|
179
|
+
return [4 /*yield*/, user.click(expandButton)];
|
|
180
|
+
case 1:
|
|
181
|
+
_a.sent();
|
|
182
|
+
expect(screen.getByText('Customer Address Status')).toBeInTheDocument();
|
|
183
|
+
expect(screen.getByTestId('simple-attributes-wrapper')).toBeInTheDocument();
|
|
184
|
+
expect(expandButton.querySelector('svg')).toHaveClass('expanded');
|
|
185
|
+
return [2 /*return*/];
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}); });
|
|
131
189
|
});
|