@reltio/components 1.4.2069 → 1.4.2071
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/FacetViewHeader/FacetViewHeader.js +1 -1
- package/ImageAttributesLine/imageAttributeValues.test-data.js +8 -0
- package/ImageAttributesLine/index.d.ts +1 -1
- package/ImageAttributesLine/index.js +1 -1
- package/ImageDetailsView/components/ImageDetailsViewCarousel/ImageDetailsViewCarousel.js +1 -1
- package/MergeButton/MergeButton.spec.js +55 -124
- package/MetadataTypesSelector/MetadataTypesSelector.js +1 -1
- package/MetadataTypesSelector/MetadataTypesSelector.test.js +193 -190
- package/MoreAttributesButton/MoreAttributesButton.test.js +173 -166
- package/MultiValueSelector/MultiValueSelector.test.js +78 -38
- package/MultipliableSelect/MultipliableSelect.test.js +111 -47
- package/NestedAttribute/NestedAttribute.test.js +121 -42
- package/NestedAttributeEditor/NestedAttributeEditor.test.js +95 -41
- package/NotMatchButton/NotMatchButton.spec.js +51 -100
- package/PieChart/PieChart.test.js +130 -114
- package/PinButton/PinButton.spec.js +89 -22
- package/PivotingTooltip/PivotingTooltip.test.js +338 -174
- package/PotentialMatchReviewCard/PotentialMatchReviewCard.spec.js +94 -29
- package/ProfileBand/ProfileBand.spec.js +60 -53
- package/ProfileCard/ProfileCard.test.js +109 -27
- package/ProfilesList/ProfilesList.d.ts +1 -3
- package/ProfilesList/ProfilesList.js +1 -1
- package/ProfilesList/ProfilesList.spec.js +226 -211
- package/QueryBuilderRow/QueryBuilderRow.spec.js +83 -90
- package/QueryBuilderRowsGroup/QueryBuilderRowsGroup.spec.js +195 -86
- package/ReactSelectLoadMoreButton/ReactSelectLoadMoreButton.test.js +73 -15
- package/ReactSelectMenuWithPopper/ReactSelectMenuWithPopper.test.js +71 -117
- package/ReadOnlyAttributeValuesBlock/ReadOnlyAttributeValuesBlock.test.js +128 -61
- package/ReadOnlyAttributesFactory/components/ReadOnlyAttribute/ReadOnlyAttribute.test.js +179 -44
- package/ReadOnlyAttributesList/ReadOnlyAttributesList.test.js +254 -211
- package/ReadOnlyAttributesList/attributes.test-data.js +4 -4
- package/ReadOnlyAttributesPager/ReadOnlyAttributesPager.test.js +75 -18
- package/ReadOnlyAttributesView/ReadOnlyAttributesView.test.js +187 -312
- package/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.test.js +210 -219
- package/ReadOnlyImageAttributesLine/ReadOnlyImageAttributesLine.test.js +89 -89
- package/ReferenceAttributeEditor/ReferenceAttributeEditor.test.js +556 -602
- package/ReferenceAttributeEditor/metadata.test-data.d.ts +13 -13
- package/ReferenceAttributeEditor/metadata.test-data.js +2 -2
- package/ReferenceAttributeEditor/styles.d.ts +1 -1
- package/RelationEditor/RelationEditor.test.js +1448 -1392
- package/RelationTypeSelector/RelationTypeSelector.test.js +99 -17
- package/RelationTypesSelector/RelationTypesSelector.test.js +73 -22
- package/ReltioMap/ReltioMap.spec.js +51 -25
- package/Roles/Roles.test.js +54 -10
- package/ScreenProfileBand/ScreenProfileBand.test.js +142 -72
- package/cjs/FacetViewHeader/FacetViewHeader.js +1 -1
- package/cjs/ImageAttributesLine/imageAttributeValues.test-data.js +8 -0
- package/cjs/ImageAttributesLine/index.d.ts +1 -1
- package/cjs/ImageAttributesLine/index.js +2 -1
- package/cjs/ImageDetailsView/components/ImageDetailsViewCarousel/ImageDetailsViewCarousel.js +1 -1
- package/cjs/MergeButton/MergeButton.spec.js +55 -124
- package/cjs/MetadataTypesSelector/MetadataTypesSelector.js +1 -1
- package/cjs/MetadataTypesSelector/MetadataTypesSelector.test.js +193 -190
- package/cjs/MoreAttributesButton/MoreAttributesButton.test.js +172 -165
- package/cjs/MultiValueSelector/MultiValueSelector.test.js +78 -38
- package/cjs/MultipliableSelect/MultipliableSelect.test.js +111 -47
- package/cjs/NestedAttribute/NestedAttribute.test.js +121 -42
- package/cjs/NestedAttributeEditor/NestedAttributeEditor.test.js +94 -40
- package/cjs/NotMatchButton/NotMatchButton.spec.js +51 -100
- package/cjs/PieChart/PieChart.test.js +130 -114
- package/cjs/PinButton/PinButton.spec.js +89 -22
- package/cjs/PivotingTooltip/PivotingTooltip.test.js +338 -174
- package/cjs/PotentialMatchReviewCard/PotentialMatchReviewCard.spec.js +94 -29
- package/cjs/ProfileBand/ProfileBand.spec.js +60 -53
- package/cjs/ProfileCard/ProfileCard.test.js +109 -27
- package/cjs/ProfilesList/ProfilesList.d.ts +1 -3
- package/cjs/ProfilesList/ProfilesList.js +1 -1
- package/cjs/ProfilesList/ProfilesList.spec.js +226 -211
- package/cjs/QueryBuilderRow/QueryBuilderRow.spec.js +83 -90
- package/cjs/QueryBuilderRowsGroup/QueryBuilderRowsGroup.spec.js +195 -86
- package/cjs/ReactSelectLoadMoreButton/ReactSelectLoadMoreButton.test.js +73 -15
- package/cjs/ReactSelectMenuWithPopper/ReactSelectMenuWithPopper.test.js +71 -117
- package/cjs/ReadOnlyAttributeValuesBlock/ReadOnlyAttributeValuesBlock.test.js +128 -61
- package/cjs/ReadOnlyAttributesFactory/components/ReadOnlyAttribute/ReadOnlyAttribute.test.js +179 -44
- package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.test.js +254 -211
- package/cjs/ReadOnlyAttributesList/attributes.test-data.js +4 -4
- package/cjs/ReadOnlyAttributesPager/ReadOnlyAttributesPager.test.js +75 -18
- package/cjs/ReadOnlyAttributesView/ReadOnlyAttributesView.test.js +185 -310
- package/cjs/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.test.js +209 -218
- package/cjs/ReadOnlyImageAttributesLine/ReadOnlyImageAttributesLine.test.js +89 -89
- package/cjs/ReferenceAttributeEditor/ReferenceAttributeEditor.test.js +555 -601
- package/cjs/ReferenceAttributeEditor/metadata.test-data.d.ts +13 -13
- package/cjs/ReferenceAttributeEditor/metadata.test-data.js +2 -2
- package/cjs/ReferenceAttributeEditor/styles.d.ts +1 -1
- package/cjs/RelationEditor/RelationEditor.test.js +1446 -1390
- package/cjs/RelationTypeSelector/RelationTypeSelector.test.js +99 -17
- package/cjs/RelationTypesSelector/RelationTypesSelector.test.js +73 -22
- package/cjs/ReltioMap/ReltioMap.spec.js +51 -25
- package/cjs/Roles/Roles.test.js +54 -10
- package/cjs/ScreenProfileBand/ScreenProfileBand.test.js +141 -71
- package/package.json +2 -2
- package/MetadataTypesSelector/components/ListLabel/ListLabel.test.d.ts +0 -1
- package/MetadataTypesSelector/components/ListLabel/ListLabel.test.js +0 -24
- package/PivotingTooltip/IntegrationPivotingTooltip.test.d.ts +0 -1
- package/PivotingTooltip/IntegrationPivotingTooltip.test.js +0 -356
- package/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.d.ts +0 -1
- package/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.js +0 -201
- package/ProfileCard/components/ProfileCardContent/ProfileCardContent.test.d.ts +0 -1
- package/ProfileCard/components/ProfileCardContent/ProfileCardContent.test.js +0 -43
- package/QueryBuilderRow/components/ReadOnlyFilter/ReadOnlyFilter.spec.d.ts +0 -1
- package/QueryBuilderRow/components/ReadOnlyFilter/ReadOnlyFilter.spec.js +0 -31
- package/QueryBuilderRow/components/ReadOnlyLogicOperator/ReadOnlyLogicOperator.spec.d.ts +0 -1
- package/QueryBuilderRow/components/ReadOnlyLogicOperator/ReadOnlyLogicOperator.spec.js +0 -31
- package/ReadOnlyAttributesPager/components/ImageLineRenderer/ImageLineRenderer.test.d.ts +0 -1
- package/ReadOnlyAttributesPager/components/ImageLineRenderer/ImageLineRenderer.test.js +0 -45
- package/ReadOnlyAttributesPager/components/MultiLineRenderer/MultiLineRenderer.test.d.ts +0 -1
- package/ReadOnlyAttributesPager/components/MultiLineRenderer/MultiLineRenderer.test.js +0 -114
- package/ReadOnlyAttributesPager/components/OneLineRenderer/OneLineRenderer.test.d.ts +0 -1
- package/ReadOnlyAttributesPager/components/OneLineRenderer/OneLineRenderer.test.js +0 -107
- package/ReadOnlyAttributesPager/components/SpecialRenderer/SpecialRenderer.test.d.ts +0 -1
- package/ReadOnlyAttributesPager/components/SpecialRenderer/SpecialRenderer.test.js +0 -72
- package/RelationEditor/IntegrationRelationEditor.test.d.ts +0 -1
- package/RelationEditor/IntegrationRelationEditor.test.js +0 -337
- package/ReltioMap/components/MapControlContainer/MapControlContainer.d.ts +0 -10
- package/ReltioMap/components/MapControlContainer/MapControlContainer.js +0 -24
- package/ReltioMap/components/MapControlContainer/MapControlContainer.spec.d.ts +0 -1
- package/ReltioMap/components/MapControlContainer/MapControlContainer.spec.js +0 -33
- package/ReltioMap/components/MapControlContainer/index.d.ts +0 -1
- package/ReltioMap/components/MapControlContainer/index.js +0 -1
- package/ReltioMap/components/TopCenterMapControls/TopCenterMapControls.spec.d.ts +0 -1
- package/ReltioMap/components/TopCenterMapControls/TopCenterMapControls.spec.js +0 -36
- package/ReltioMap/components/TopRightMapControls/TopRightMapControls.spec.d.ts +0 -1
- package/ReltioMap/components/TopRightMapControls/TopRightMapControls.spec.js +0 -60
- package/Roles/components/Role/Role.test.d.ts +0 -1
- package/Roles/components/Role/Role.test.js +0 -55
- package/cjs/MetadataTypesSelector/components/ListLabel/ListLabel.test.d.ts +0 -1
- package/cjs/MetadataTypesSelector/components/ListLabel/ListLabel.test.js +0 -52
- package/cjs/PivotingTooltip/IntegrationPivotingTooltip.test.d.ts +0 -1
- package/cjs/PivotingTooltip/IntegrationPivotingTooltip.test.js +0 -361
- package/cjs/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.d.ts +0 -1
- package/cjs/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.js +0 -206
- package/cjs/ProfileCard/components/ProfileCardContent/ProfileCardContent.test.d.ts +0 -1
- package/cjs/ProfileCard/components/ProfileCardContent/ProfileCardContent.test.js +0 -48
- package/cjs/QueryBuilderRow/components/ReadOnlyFilter/ReadOnlyFilter.spec.d.ts +0 -1
- package/cjs/QueryBuilderRow/components/ReadOnlyFilter/ReadOnlyFilter.spec.js +0 -36
- package/cjs/QueryBuilderRow/components/ReadOnlyLogicOperator/ReadOnlyLogicOperator.spec.d.ts +0 -1
- package/cjs/QueryBuilderRow/components/ReadOnlyLogicOperator/ReadOnlyLogicOperator.spec.js +0 -36
- package/cjs/ReadOnlyAttributesPager/components/ImageLineRenderer/ImageLineRenderer.test.d.ts +0 -1
- package/cjs/ReadOnlyAttributesPager/components/ImageLineRenderer/ImageLineRenderer.test.js +0 -50
- package/cjs/ReadOnlyAttributesPager/components/MultiLineRenderer/MultiLineRenderer.test.d.ts +0 -1
- package/cjs/ReadOnlyAttributesPager/components/MultiLineRenderer/MultiLineRenderer.test.js +0 -119
- package/cjs/ReadOnlyAttributesPager/components/OneLineRenderer/OneLineRenderer.test.d.ts +0 -1
- package/cjs/ReadOnlyAttributesPager/components/OneLineRenderer/OneLineRenderer.test.js +0 -112
- package/cjs/ReadOnlyAttributesPager/components/SpecialRenderer/SpecialRenderer.test.d.ts +0 -1
- package/cjs/ReadOnlyAttributesPager/components/SpecialRenderer/SpecialRenderer.test.js +0 -77
- package/cjs/RelationEditor/IntegrationRelationEditor.test.d.ts +0 -1
- package/cjs/RelationEditor/IntegrationRelationEditor.test.js +0 -342
- package/cjs/ReltioMap/components/MapControlContainer/MapControlContainer.d.ts +0 -10
- package/cjs/ReltioMap/components/MapControlContainer/MapControlContainer.js +0 -28
- package/cjs/ReltioMap/components/MapControlContainer/MapControlContainer.spec.d.ts +0 -1
- package/cjs/ReltioMap/components/MapControlContainer/MapControlContainer.spec.js +0 -38
- package/cjs/ReltioMap/components/MapControlContainer/index.d.ts +0 -1
- package/cjs/ReltioMap/components/MapControlContainer/index.js +0 -5
- package/cjs/ReltioMap/components/TopCenterMapControls/TopCenterMapControls.spec.d.ts +0 -1
- package/cjs/ReltioMap/components/TopCenterMapControls/TopCenterMapControls.spec.js +0 -41
- package/cjs/ReltioMap/components/TopRightMapControls/TopRightMapControls.spec.d.ts +0 -1
- package/cjs/ReltioMap/components/TopRightMapControls/TopRightMapControls.spec.js +0 -65
- package/cjs/Roles/components/Role/Role.test.d.ts +0 -1
- package/cjs/Roles/components/Role/Role.test.js +0 -60
|
@@ -1,128 +1,82 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
5
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
17
|
var react_1 = __importDefault(require("react"));
|
|
7
|
-
var
|
|
8
|
-
var Popper_1 = __importDefault(require("@mui/material/Popper"));
|
|
9
|
-
var Paper_1 = __importDefault(require("@mui/material/Paper"));
|
|
18
|
+
var react_2 = require("@testing-library/react");
|
|
10
19
|
var PopupBoundariesContext_1 = require("../contexts/PopupBoundariesContext");
|
|
11
20
|
var ReactSelectMenuWithPopper_1 = require("./ReactSelectMenuWithPopper");
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
]);
|
|
21
|
+
var setUp = function (_a) {
|
|
22
|
+
var props = _a.props, _b = _a.popupBoundariesContextValue, popupBoundariesContextValue = _b === void 0 ? null : _b;
|
|
23
|
+
var Providers = function (_a) {
|
|
24
|
+
var children = _a.children;
|
|
25
|
+
return (react_1.default.createElement(PopupBoundariesContext_1.PopupBoundariesContext.Provider, { value: popupBoundariesContextValue }, children));
|
|
26
|
+
};
|
|
27
|
+
return (0, react_2.render)(react_1.default.createElement(ReactSelectMenuWithPopper_1.ReactSelectMenuWithPopper, __assign({}, props)), { wrapper: Providers });
|
|
28
|
+
};
|
|
29
|
+
describe('React select menu with popper tests', function () {
|
|
30
|
+
var originalWindowInnerWidth;
|
|
31
|
+
beforeAll(function () {
|
|
32
|
+
originalWindowInnerWidth = window.innerWidth;
|
|
33
|
+
});
|
|
34
|
+
afterEach(function () {
|
|
35
|
+
window.innerWidth = originalWindowInnerWidth;
|
|
36
|
+
});
|
|
37
|
+
it('should set paper minWidth as input width and maxWidth as boundaries element width', function () {
|
|
38
|
+
var inputEl = document.createElement('input');
|
|
39
|
+
var boundariesEl = document.createElement('div');
|
|
40
|
+
Object.defineProperty(inputEl, 'clientWidth', { value: 200 });
|
|
41
|
+
Object.defineProperty(boundariesEl, 'clientWidth', { value: 400 });
|
|
42
|
+
Object.defineProperty(window, 'innerWidth', { value: 500 });
|
|
43
|
+
var props = {
|
|
44
|
+
innerRef: react_1.default.createRef(),
|
|
45
|
+
selectProps: { inputRef: { current: inputEl }, inputValue: '', menuIsOpen: true },
|
|
46
|
+
innerProps: {},
|
|
47
|
+
children: ['Children']
|
|
48
|
+
};
|
|
49
|
+
var popupBoundariesContextValue = { element: boundariesEl };
|
|
50
|
+
setUp({ props: props, popupBoundariesContextValue: popupBoundariesContextValue });
|
|
51
|
+
expect(react_2.screen.getByText('Children')).toHaveStyle({ minWidth: '200px', maxWidth: '400px' });
|
|
52
|
+
});
|
|
53
|
+
it('should set paper minWidth as window.innerWidth if there is no boundaries element', function () {
|
|
54
|
+
var inputEl = document.createElement('input');
|
|
55
|
+
Object.defineProperty(inputEl, 'clientWidth', { value: 200 });
|
|
56
|
+
Object.defineProperty(window, 'innerWidth', { value: 500 });
|
|
57
|
+
var props = {
|
|
58
|
+
innerRef: react_1.default.createRef(),
|
|
59
|
+
selectProps: { inputRef: { current: inputEl }, inputValue: '', menuIsOpen: true },
|
|
60
|
+
innerProps: {},
|
|
61
|
+
children: ['Children']
|
|
62
|
+
};
|
|
63
|
+
setUp({ props: props });
|
|
64
|
+
expect(react_2.screen.getByText('Children')).toHaveStyle({ minWidth: '200px', maxWidth: '500px' });
|
|
57
65
|
});
|
|
58
|
-
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
clientWidth: boundariesElementWidth
|
|
74
|
-
};
|
|
75
|
-
var component = (0, enzyme_1.mount)(react_1.default.createElement(PopupBoundariesContext_1.PopupBoundariesContext.Provider, { value: { element: boundariesElement } },
|
|
76
|
-
react_1.default.createElement(ReactSelectMenuWithPopper_1.ReactSelectMenuWithPopper, { selectProps: {
|
|
77
|
-
inputRef: testInputRef,
|
|
78
|
-
inputValue: '',
|
|
79
|
-
menuIsOpen: true
|
|
80
|
-
}, innerRef: { current: {} }, innerProps: {} },
|
|
81
|
-
react_1.default.createElement("div", null))));
|
|
82
|
-
var paper = getPopper(component).find(Paper_1.default);
|
|
83
|
-
expect(paper.prop('style')).toEqual({
|
|
84
|
-
minWidth: inputWidth,
|
|
85
|
-
maxWidth: boundariesElementWidth
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
it('should set Paper props style.maxWidth as window.innerWidth if there is no boundaries element', function () {
|
|
89
|
-
var inputWidth = 200;
|
|
90
|
-
var windowInnerWidth = 500;
|
|
91
|
-
window.innerWidth = windowInnerWidth;
|
|
92
|
-
var testInputRef = { current: { clientWidth: inputWidth } };
|
|
93
|
-
var component = (0, enzyme_1.mount)(react_1.default.createElement(ReactSelectMenuWithPopper_1.ReactSelectMenuWithPopper, { selectProps: {
|
|
94
|
-
inputRef: testInputRef,
|
|
95
|
-
inputValue: '',
|
|
96
|
-
menuIsOpen: true
|
|
97
|
-
}, innerRef: { current: {} }, innerProps: {} },
|
|
98
|
-
react_1.default.createElement("div", null)));
|
|
99
|
-
var paper = getPopper(component).find(Paper_1.default);
|
|
100
|
-
expect(paper.prop('style')).toEqual({
|
|
101
|
-
minWidth: inputWidth,
|
|
102
|
-
maxWidth: windowInnerWidth
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
it('should set Paper props style.minWidth as boundaries element width if it is smaller than input width', function () {
|
|
106
|
-
var inputWidth = 450;
|
|
107
|
-
var boundariesElementWidth = 400;
|
|
108
|
-
var windowInnerWidth = 500;
|
|
109
|
-
window.innerWidth = windowInnerWidth;
|
|
110
|
-
var testInputRef = { current: { clientWidth: inputWidth } };
|
|
111
|
-
var boundariesElement = {
|
|
112
|
-
clientWidth: boundariesElementWidth
|
|
113
|
-
};
|
|
114
|
-
var component = (0, enzyme_1.mount)(react_1.default.createElement(PopupBoundariesContext_1.PopupBoundariesContext.Provider, { value: { element: boundariesElement } },
|
|
115
|
-
react_1.default.createElement(ReactSelectMenuWithPopper_1.ReactSelectMenuWithPopper, { selectProps: {
|
|
116
|
-
inputRef: testInputRef,
|
|
117
|
-
inputValue: '',
|
|
118
|
-
menuIsOpen: true
|
|
119
|
-
}, innerRef: { current: {} }, innerProps: {} },
|
|
120
|
-
react_1.default.createElement("div", null))));
|
|
121
|
-
var paper = getPopper(component).find(Paper_1.default);
|
|
122
|
-
expect(paper.prop('style')).toEqual({
|
|
123
|
-
minWidth: boundariesElementWidth,
|
|
124
|
-
maxWidth: boundariesElementWidth
|
|
125
|
-
});
|
|
126
|
-
});
|
|
66
|
+
it('should set paper minWidth as boundaries element width if it is smaller than input width', function () {
|
|
67
|
+
var inputEl = document.createElement('input');
|
|
68
|
+
var boundariesEl = document.createElement('div');
|
|
69
|
+
Object.defineProperty(inputEl, 'clientWidth', { value: 450 });
|
|
70
|
+
Object.defineProperty(boundariesEl, 'clientWidth', { value: 400 });
|
|
71
|
+
Object.defineProperty(window, 'innerWidth', { value: 500 });
|
|
72
|
+
var props = {
|
|
73
|
+
innerRef: react_1.default.createRef(),
|
|
74
|
+
selectProps: { inputRef: { current: inputEl }, inputValue: '', menuIsOpen: true },
|
|
75
|
+
innerProps: {},
|
|
76
|
+
children: ['Children']
|
|
77
|
+
};
|
|
78
|
+
var popupBoundariesContextValue = { element: boundariesEl };
|
|
79
|
+
setUp({ props: props, popupBoundariesContextValue: popupBoundariesContextValue });
|
|
80
|
+
expect(react_2.screen.getByText('Children')).toHaveStyle({ minWidth: '400px', maxWidth: '400px' });
|
|
127
81
|
});
|
|
128
82
|
});
|
|
@@ -1,76 +1,143 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
16
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
6
|
var react_1 = __importDefault(require("react"));
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var ReadOnlyImageAttributesLine_1 = require("../ReadOnlyImageAttributesLine");
|
|
7
|
+
var jsdom_testing_mocks_1 = require("jsdom-testing-mocks");
|
|
8
|
+
var react_2 = require("@testing-library/react");
|
|
21
9
|
var ReadOnlyAttributeValuesBlock_1 = __importDefault(require("./ReadOnlyAttributeValuesBlock"));
|
|
22
|
-
describe('
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
type: 'configuration/entityTypes/HCP/attributes/CountryCode',
|
|
27
|
-
value: 'Italy',
|
|
28
|
-
lookupCode: 'IT',
|
|
29
|
-
ov: true
|
|
30
|
-
}
|
|
31
|
-
];
|
|
32
|
-
var attributeType = {
|
|
33
|
-
uri: 'configuration/entityTypes/HCP',
|
|
34
|
-
label: 'HCP',
|
|
35
|
-
name: 'HCP',
|
|
36
|
-
type: 'String',
|
|
37
|
-
attributes: [
|
|
10
|
+
describe('Read only attribute values block tests', function () {
|
|
11
|
+
var resizeObserver = (0, jsdom_testing_mocks_1.mockResizeObserver)();
|
|
12
|
+
it('should render read only attribute correctly', function () {
|
|
13
|
+
var values = [
|
|
38
14
|
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
15
|
+
uri: 'entities/1/attributes/CountryCode/1',
|
|
16
|
+
type: 'configuration/entityTypes/HCP/attributes/CountryCode',
|
|
17
|
+
value: 'Italy',
|
|
18
|
+
lookupCode: 'IT',
|
|
19
|
+
ov: true
|
|
43
20
|
}
|
|
44
|
-
]
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
21
|
+
];
|
|
22
|
+
var attributeType = {
|
|
23
|
+
uri: 'configuration/entityTypes/HCP',
|
|
24
|
+
label: 'HCP',
|
|
25
|
+
name: 'HCP',
|
|
26
|
+
type: 'String',
|
|
27
|
+
attributes: [
|
|
28
|
+
{
|
|
29
|
+
label: 'Country Code',
|
|
30
|
+
name: 'CountryCode',
|
|
31
|
+
type: 'String',
|
|
32
|
+
uri: 'configuration/entityTypes/HCP/attributes/CountryCode'
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
};
|
|
36
|
+
(0, react_2.render)(react_1.default.createElement(ReadOnlyAttributeValuesBlock_1.default, { attributeType: attributeType, values: values }));
|
|
37
|
+
react_2.screen.getByText('Italy (IT)');
|
|
51
38
|
});
|
|
52
|
-
it('should render
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
39
|
+
it('should render read only image attributes line', function () {
|
|
40
|
+
var attributeType = {
|
|
41
|
+
name: 'ImageGallery',
|
|
42
|
+
type: 'Image',
|
|
43
|
+
uri: 'configuration/entityTypes/Series/attributes/ImageGallery',
|
|
44
|
+
attributes: [
|
|
45
|
+
{
|
|
46
|
+
name: 'Url',
|
|
47
|
+
type: 'String',
|
|
48
|
+
uri: 'configuration/entityTypes/Series/attributes/ImageGallery/attributes/Url'
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'UrlThumbnail',
|
|
52
|
+
type: 'String',
|
|
53
|
+
uri: 'configuration/entityTypes/Series/attributes/ImageGallery/attributes/UrlThumbnail'
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
56
|
};
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
var values = [
|
|
58
|
+
{
|
|
59
|
+
value: {
|
|
60
|
+
Url: [
|
|
61
|
+
{
|
|
62
|
+
type: 'configuration/entityTypes/Series/attributes/ImageGallery/attributes/Url',
|
|
63
|
+
ov: true,
|
|
64
|
+
value: '/test.jpg',
|
|
65
|
+
uri: 'entities/1Rd2I9Mt/attributes/ImageGallery/39V5GWJZv/Url/39V5GWWMh'
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
UrlThumbnail: [
|
|
69
|
+
{
|
|
70
|
+
type: 'configuration/entityTypes/Series/attributes/ImageGallery/attributes/UrlThumbnail',
|
|
71
|
+
ov: true,
|
|
72
|
+
value: '/test.jpg',
|
|
73
|
+
uri: 'entities/1Rd2I9Mt/attributes/ImageGallery/39V5GWJZv/UrlThumbnail/39V5GWWMh'
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
ov: true,
|
|
78
|
+
uri: 'entities/1Rd2I9Mt/attributes/ImageGallery/39V5GWJZv'
|
|
79
|
+
}
|
|
80
|
+
];
|
|
81
|
+
var container = (0, react_2.render)(react_1.default.createElement(ReadOnlyAttributeValuesBlock_1.default, { attributeType: attributeType, values: values })).container;
|
|
82
|
+
resizeObserver.mockElementSize(container.children[0], { contentBoxSize: { inlineSize: 600 } });
|
|
83
|
+
(0, react_2.act)(function () {
|
|
84
|
+
resizeObserver.resize();
|
|
85
|
+
});
|
|
86
|
+
expect(react_2.screen.getByRole('img')).toHaveAttribute('src', '/test.jpg');
|
|
60
87
|
});
|
|
61
|
-
it('should
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
88
|
+
it('should render nested read only attribute correctly', function () {
|
|
89
|
+
var attributeType = {
|
|
90
|
+
type: 'Nested',
|
|
91
|
+
uri: 'configuration/entityTypes/HCP/attributes/NestedTest',
|
|
92
|
+
name: 'NestedTest',
|
|
93
|
+
label: 'Nested Test',
|
|
94
|
+
attributes: [
|
|
95
|
+
{
|
|
96
|
+
uri: 'configuration/entityTypes/HCP/attributes/NestedTest/attributes/FirstName',
|
|
97
|
+
name: 'FirstName',
|
|
98
|
+
label: 'First Name',
|
|
99
|
+
type: 'String'
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
uri: 'configuration/entityTypes/HCP/attributes/NestedTest/attributes/LastName',
|
|
103
|
+
name: 'LastName',
|
|
104
|
+
label: 'Last Name',
|
|
105
|
+
type: 'String'
|
|
106
|
+
}
|
|
107
|
+
]
|
|
68
108
|
};
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
109
|
+
var values = [
|
|
110
|
+
{
|
|
111
|
+
label: 'Nested test label 1',
|
|
112
|
+
value: {
|
|
113
|
+
FirstName: [
|
|
114
|
+
{
|
|
115
|
+
value: 'Viktor',
|
|
116
|
+
uri: 'entities/eNt1/attributes/NestedTest/gd42423/FirstName/8fBsP38A'
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
uri: 'entities/eNt1/attributes/NestedTest/gd42423'
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
label: 'Nested test label 2',
|
|
124
|
+
value: {
|
|
125
|
+
LastName: [
|
|
126
|
+
{
|
|
127
|
+
value: 'Ivanov',
|
|
128
|
+
uri: 'entities/eNt1/attributes/NestedTest/ksApL29/LastName/o7BnD6mJ'
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
uri: 'entities/eNt1/attributes/NestedTest/ksApL29'
|
|
133
|
+
}
|
|
134
|
+
];
|
|
135
|
+
(0, react_2.render)(react_1.default.createElement(ReadOnlyAttributeValuesBlock_1.default, { expanded: true, attributeType: attributeType, values: values }));
|
|
136
|
+
react_2.screen.getByText('Nested test label 1');
|
|
137
|
+
react_2.screen.getByText('First Name');
|
|
138
|
+
react_2.screen.getByText('Viktor');
|
|
139
|
+
react_2.screen.getByText('Nested test label 2');
|
|
140
|
+
react_2.screen.getByText('Last Name');
|
|
141
|
+
react_2.screen.getByText('Ivanov');
|
|
75
142
|
});
|
|
76
143
|
});
|
package/cjs/ReadOnlyAttributesFactory/components/ReadOnlyAttribute/ReadOnlyAttribute.test.js
CHANGED
|
@@ -10,60 +10,195 @@ 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
|
|
19
|
-
var
|
|
20
|
-
var NestedAttribute_1 = require("../../../NestedAttribute");
|
|
21
|
-
var ReferenceAttribute_1 = require("../../../ReferenceAttribute");
|
|
54
|
+
var react_2 = require("@testing-library/react");
|
|
55
|
+
var MdmModuleContext_1 = require("../../../contexts/MdmModuleContext");
|
|
22
56
|
var ReadOnlyAttribute_1 = require("./ReadOnlyAttribute");
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
57
|
+
var setUp = function (_a) {
|
|
58
|
+
var props = _a.props, _b = _a.mdmValues, mdmValues = _b === void 0 ? {} : _b;
|
|
59
|
+
var Providers = function (_a) {
|
|
60
|
+
var children = _a.children;
|
|
61
|
+
return react_1.default.createElement(MdmModuleContext_1.MdmModuleProvider, { values: mdmValues }, children);
|
|
62
|
+
};
|
|
63
|
+
return (0, react_2.render)(react_1.default.createElement(ReadOnlyAttribute_1.ReadOnlyAttribute, __assign({}, props)), { wrapper: Providers });
|
|
64
|
+
};
|
|
65
|
+
describe('Read only attribute tests', function () {
|
|
66
|
+
it('should render simple attribute correctly', function () {
|
|
67
|
+
var attributeType = {
|
|
68
|
+
type: 'String',
|
|
69
|
+
uri: 'configuration/entityTypes/HCP/attributes/FirstName',
|
|
70
|
+
name: 'FirstName',
|
|
71
|
+
label: 'First Name'
|
|
32
72
|
};
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
expect(component.find(NestedAttribute_1.NestedAttribute).length).toBe(0);
|
|
37
|
-
expect(component.find(ReferenceAttribute_1.ReferenceAttribute).length).toBe(0);
|
|
38
|
-
});
|
|
39
|
-
it('should render Nested attribute', function () {
|
|
40
|
-
var props = {
|
|
41
|
-
attributeType: {
|
|
42
|
-
type: 'Nested'
|
|
43
|
-
},
|
|
44
|
-
attributeValue: {
|
|
45
|
-
uri: '123'
|
|
46
|
-
}
|
|
73
|
+
var attributeValue = {
|
|
74
|
+
value: 'some string',
|
|
75
|
+
uri: 'entities/eNt1/attributes/FirstName/gd42423'
|
|
47
76
|
};
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
expect(component.find(NestedAttribute_1.NestedAttribute).length).toBe(1);
|
|
52
|
-
expect(component.find(NestedAttribute_1.NestedAttribute).props()).toEqual(props);
|
|
77
|
+
var props = { attributeValue: attributeValue, attributeType: attributeType };
|
|
78
|
+
setUp({ props: props });
|
|
79
|
+
react_2.screen.getByText('some string');
|
|
53
80
|
});
|
|
54
|
-
it('should render
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
|
|
81
|
+
it('should render nested attribute correctly', function () {
|
|
82
|
+
var attributeType = {
|
|
83
|
+
type: 'Nested',
|
|
84
|
+
uri: 'configuration/entityTypes/HCP/attributes/NestedTest',
|
|
85
|
+
name: 'NestedTest',
|
|
86
|
+
label: 'Nested Test',
|
|
87
|
+
attributes: [
|
|
88
|
+
{
|
|
89
|
+
uri: 'configuration/entityTypes/HCP/attributes/NestedTest/attributes/FirstName',
|
|
90
|
+
name: 'FirstName',
|
|
91
|
+
label: 'First Name',
|
|
92
|
+
type: 'String'
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
};
|
|
96
|
+
var attributeValue = {
|
|
97
|
+
label: 'Nested test label',
|
|
98
|
+
value: {
|
|
99
|
+
FirstName: [
|
|
100
|
+
{
|
|
101
|
+
value: 'some string',
|
|
102
|
+
uri: 'entities/eNt1/attributes/NestedTest/gd42423/FirstName/8fBsP38A'
|
|
103
|
+
}
|
|
104
|
+
]
|
|
58
105
|
},
|
|
59
|
-
|
|
60
|
-
uri: '123'
|
|
61
|
-
}
|
|
106
|
+
uri: 'entities/eNt1/attributes/NestedTest/gd42423'
|
|
62
107
|
};
|
|
63
|
-
var
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
108
|
+
var props = { attributeValue: attributeValue, attributeType: attributeType, expanded: true };
|
|
109
|
+
setUp({ props: props });
|
|
110
|
+
react_2.screen.getByText('Nested test label');
|
|
111
|
+
react_2.screen.getByText('First Name');
|
|
112
|
+
react_2.screen.getByText('some string');
|
|
68
113
|
});
|
|
114
|
+
it('should render reference attribute correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
115
|
+
var attributeType, attributeValue, metadata, props, mdmValues;
|
|
116
|
+
return __generator(this, function (_a) {
|
|
117
|
+
attributeType = {
|
|
118
|
+
label: 'Address',
|
|
119
|
+
name: 'Address',
|
|
120
|
+
type: 'Reference',
|
|
121
|
+
referencedAttributeURIs: [
|
|
122
|
+
'configuration/relationTypes/HasAddress/attributes/AddressType',
|
|
123
|
+
'configuration/entityTypes/Location/attributes/AddressLine1'
|
|
124
|
+
],
|
|
125
|
+
uri: 'configuration/entityTypes/HCO/attributes/Address'
|
|
126
|
+
};
|
|
127
|
+
attributeValue = {
|
|
128
|
+
label: 'Reference Address',
|
|
129
|
+
relationshipLabel: 'Relationship label',
|
|
130
|
+
refEntity: {
|
|
131
|
+
objectURI: 'entities/2EpaVt0k',
|
|
132
|
+
type: 'configuration/entityTypes/Location',
|
|
133
|
+
crosswalks: []
|
|
134
|
+
},
|
|
135
|
+
refRelation: {
|
|
136
|
+
objectURI: 'relations/1GrMXM4O',
|
|
137
|
+
type: 'configuration/relationTypes/HasAddress',
|
|
138
|
+
crosswalks: []
|
|
139
|
+
},
|
|
140
|
+
uri: 'entities/2Vek4DnE/attributes/Address/1GrMXM4O',
|
|
141
|
+
value: {
|
|
142
|
+
AddressLine1: [
|
|
143
|
+
{
|
|
144
|
+
ov: true,
|
|
145
|
+
type: 'configuration/entityTypes/Location/attributes/AddressLine1',
|
|
146
|
+
uri: 'entities/2Vek4DnE/attributes/Address/1GrMXM4O/AddressLine1/2GcBL4K00',
|
|
147
|
+
value: 'Lenina street'
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
AddressType: [
|
|
151
|
+
{
|
|
152
|
+
type: 'configuration/relationTypes/HasAddress/attributes/AddressType',
|
|
153
|
+
uri: 'entities/2Vek4DnE/attributes/Address/1GrMXM4O/AddressType/15sHPBU8',
|
|
154
|
+
value: 'Office',
|
|
155
|
+
ov: 'true'
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
metadata = {
|
|
161
|
+
entityTypes: [
|
|
162
|
+
{
|
|
163
|
+
uri: 'configuration/entityTypes/HCO',
|
|
164
|
+
attributes: [attributeType]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
uri: 'configuration/entityTypes/Location',
|
|
168
|
+
attributes: [
|
|
169
|
+
{
|
|
170
|
+
label: 'Address Line 1',
|
|
171
|
+
name: 'AddressLine1',
|
|
172
|
+
type: 'String',
|
|
173
|
+
uri: 'configuration/entityTypes/Location/attributes/AddressLine1'
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
relationTypes: [
|
|
179
|
+
{
|
|
180
|
+
uri: 'configuration/relationTypes/HasAddress',
|
|
181
|
+
attributes: [
|
|
182
|
+
{
|
|
183
|
+
label: 'Address Type',
|
|
184
|
+
name: 'AddressType',
|
|
185
|
+
type: 'String',
|
|
186
|
+
uri: 'configuration/relationTypes/HasAddress/attributes/AddressType'
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
};
|
|
192
|
+
props = { attributeValue: attributeValue, attributeType: attributeType, expanded: true };
|
|
193
|
+
mdmValues = { metadata: metadata };
|
|
194
|
+
setUp({ props: props, mdmValues: mdmValues });
|
|
195
|
+
react_2.screen.getByText('Reference Address');
|
|
196
|
+
react_2.screen.getByText('Relationship label');
|
|
197
|
+
react_2.screen.getByText('Address Type');
|
|
198
|
+
react_2.screen.getByText('Office');
|
|
199
|
+
react_2.screen.getByText('Address Line 1');
|
|
200
|
+
react_2.screen.getByText('Lenina street');
|
|
201
|
+
return [2 /*return*/];
|
|
202
|
+
});
|
|
203
|
+
}); });
|
|
69
204
|
});
|