@reltio/components 1.4.2070 → 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 +1 -1
- 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
|
@@ -10,232 +10,247 @@ 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
|
};
|
|
52
|
+
var _a;
|
|
16
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
54
|
var react_1 = __importDefault(require("react"));
|
|
18
|
-
var
|
|
19
|
-
var
|
|
55
|
+
var react_2 = require("@testing-library/react");
|
|
56
|
+
var user_event_1 = __importDefault(require("@testing-library/user-event"));
|
|
20
57
|
var MdmModuleContext_1 = require("../contexts/MdmModuleContext");
|
|
21
|
-
var EntityUriLink_1 = require("../EntityUriLink");
|
|
22
|
-
var EntityAvatar_1 = require("../EntityAvatar");
|
|
23
|
-
var ProfilesList_1 = require("./ProfilesList");
|
|
24
58
|
var types_1 = require("../types");
|
|
25
|
-
var
|
|
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
|
-
relationshipLabel: 'Relationship Label'
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
},
|
|
60
|
-
label: 'Second entity',
|
|
61
|
-
secondaryLabel: '',
|
|
62
|
-
type: 'configuration/entityTypes/HCP',
|
|
63
|
-
uri: 'entities/45TTRAfg'
|
|
59
|
+
var ProfilesList_1 = require("./ProfilesList");
|
|
60
|
+
var entities = [
|
|
61
|
+
{
|
|
62
|
+
attributes: {},
|
|
63
|
+
label: 'First entity',
|
|
64
|
+
secondaryLabel: 'secondary label',
|
|
65
|
+
type: 'configuration/entityTypes/HCP',
|
|
66
|
+
uri: 'entities/18TTRAuB',
|
|
67
|
+
defaultProfilePic: 'https://engineering.unl.edu/images/staff/Kayla_Person-small.jpg',
|
|
68
|
+
endDate: Date.now() - 10
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
attributes: {
|
|
72
|
+
BCard1: [
|
|
73
|
+
{
|
|
74
|
+
type: 'configuration/entityTypes/HCP/attributes/BCard1',
|
|
75
|
+
ov: true,
|
|
76
|
+
value: 'Business card 1 test',
|
|
77
|
+
uri: 'entities/45TTRAfg/attributes/BCard1/1hPAy491H'
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
BCard2: [
|
|
81
|
+
{
|
|
82
|
+
type: 'configuration/entityTypes/HCP/attributes/BCard2',
|
|
83
|
+
ov: true,
|
|
84
|
+
value: 'Business card 2 test',
|
|
85
|
+
uri: 'entities/45TTRAfg/attributes/BCard2/1hPAy491H',
|
|
86
|
+
label: 'Main Label - Business card second',
|
|
87
|
+
relationshipLabel: 'Relationship Label'
|
|
88
|
+
}
|
|
89
|
+
]
|
|
64
90
|
},
|
|
91
|
+
label: 'Second entity',
|
|
92
|
+
secondaryLabel: '',
|
|
93
|
+
type: 'configuration/entityTypes/HCP',
|
|
94
|
+
uri: 'entities/45TTRAfg'
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
attributes: {},
|
|
98
|
+
label: 'Third entity',
|
|
99
|
+
secondaryLabel: '',
|
|
100
|
+
type: 'configuration/entityTypes/HCP',
|
|
101
|
+
uri: 'DTSS/entities/14Pp52PY'
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
attributes: {},
|
|
105
|
+
label: 'Fourth entity',
|
|
106
|
+
secondaryLabel: 'secondary label',
|
|
107
|
+
type: 'configuration/entityTypes/HCP',
|
|
108
|
+
uri: 'entities/19TTRAuB',
|
|
109
|
+
dataTenant: 'dt1'
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
uri: 'entities/84Ks3mN',
|
|
113
|
+
attributes: {},
|
|
114
|
+
type: 'NO_LABEL'
|
|
115
|
+
}
|
|
116
|
+
];
|
|
117
|
+
var metadata = {
|
|
118
|
+
entityTypes: [
|
|
65
119
|
{
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
120
|
+
uri: 'configuration/entityTypes/HCP',
|
|
121
|
+
typeColor: '#676767',
|
|
122
|
+
attributes: [
|
|
123
|
+
{
|
|
124
|
+
type: 'String',
|
|
125
|
+
name: 'BCard1',
|
|
126
|
+
label: 'BCard1',
|
|
127
|
+
uri: 'configuration/entityTypes/HCP/attributes/BCard1'
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
type: 'String',
|
|
131
|
+
name: 'BCard2',
|
|
132
|
+
label: 'BCard2',
|
|
133
|
+
uri: 'configuration/entityTypes/HCP/attributes/BCard2'
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
type: 'String',
|
|
137
|
+
name: 'BCard3',
|
|
138
|
+
label: 'BCard3',
|
|
139
|
+
uri: 'configuration/entityTypes/HCP/attributes/BCard3'
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
businessCardAttributeURIs: [
|
|
143
|
+
'configuration/entityTypes/HCP/attributes/BCard1',
|
|
144
|
+
'configuration/entityTypes/HCP/attributes/BCard2',
|
|
145
|
+
'configuration/entityTypes/HCP/attributes/BCard3',
|
|
146
|
+
'configuration/entityTypes/HCP/attributes/NotExistingBCard'
|
|
147
|
+
],
|
|
148
|
+
label: 'HCP',
|
|
149
|
+
typeImage: 'images/defaultImage/neutral.png'
|
|
71
150
|
},
|
|
72
151
|
{
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
secondaryLabel: 'secondary label',
|
|
76
|
-
type: 'configuration/entityTypes/HCP',
|
|
77
|
-
uri: 'entities/19TTRAuB',
|
|
78
|
-
dataTenant: 'dt1'
|
|
152
|
+
uri: 'NO_LABEL',
|
|
153
|
+
attributes: []
|
|
79
154
|
}
|
|
80
|
-
]
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
uri: 'configuration/entityTypes/HCP/attributes/BCard2'
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
name: 'BCard3',
|
|
104
|
-
label: 'BCard3',
|
|
105
|
-
uri: 'configuration/entityTypes/HCP/attributes/BCard3'
|
|
106
|
-
}
|
|
107
|
-
],
|
|
108
|
-
businessCardAttributeURIs: [
|
|
109
|
-
'configuration/entityTypes/HCP/attributes/BCard1',
|
|
110
|
-
'configuration/entityTypes/HCP/attributes/BCard2',
|
|
111
|
-
'configuration/entityTypes/HCP/attributes/BCard3',
|
|
112
|
-
'configuration/entityTypes/HCP/attributes/NotExistingBCard'
|
|
113
|
-
],
|
|
114
|
-
label: 'entityType HCP Label',
|
|
115
|
-
typeImage: 'images/defaultImage/neutral.png'
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
uri: 'NO_LABEL',
|
|
119
|
-
attributes: []
|
|
120
|
-
}
|
|
121
|
-
]
|
|
122
|
-
};
|
|
123
|
-
var mdmValues = { uiPath: 'https://reltio.com/ui', metadata: metadata };
|
|
124
|
-
var defaultProps = {
|
|
125
|
-
metadata: metadata,
|
|
126
|
-
entities: entities,
|
|
127
|
-
entitiesImportStatus: {},
|
|
128
|
-
onEntityImportStatusChange: jest.fn(),
|
|
129
|
-
entityButtonsRenderer: function (entity) {
|
|
130
|
-
return react_1.default.createElement(EmptyStub_1.EmptyStub, { entity: entity });
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
var setUp = function (props) {
|
|
134
|
-
if (props === void 0) { props = defaultProps; }
|
|
135
|
-
var Component = function (props) { return (react_1.default.createElement(MdmModuleContext_1.MdmModuleProvider, { values: mdmValues },
|
|
136
|
-
react_1.default.createElement(ProfilesList_1.ProfilesList, __assign({}, props)))); };
|
|
137
|
-
return (0, enzyme_1.mount)(react_1.default.createElement(Component, __assign({}, props)));
|
|
155
|
+
]
|
|
156
|
+
};
|
|
157
|
+
var mdmValues = { uiPath: 'https://reltio.com/ui', metadata: metadata };
|
|
158
|
+
var defaultProps = {
|
|
159
|
+
metadata: metadata,
|
|
160
|
+
entities: entities,
|
|
161
|
+
entitiesImportStatus: (_a = {},
|
|
162
|
+
_a[entities[1].uri] = types_1.ImportModes.Success,
|
|
163
|
+
_a),
|
|
164
|
+
selectedEntityUri: entities[2].uri,
|
|
165
|
+
entityToHighlight: entities[3].uri,
|
|
166
|
+
onEntityImportStatusChange: jest.fn(),
|
|
167
|
+
entityButtonsRenderer: jest.fn(function () { return null; })
|
|
168
|
+
};
|
|
169
|
+
var setUp = function (props) {
|
|
170
|
+
if (props === void 0) { props = defaultProps; }
|
|
171
|
+
var user = user_event_1.default.setup();
|
|
172
|
+
var Providers = function (_a) {
|
|
173
|
+
var children = _a.children;
|
|
174
|
+
return (react_1.default.createElement(MdmModuleContext_1.MdmModuleProvider, { values: mdmValues }, children));
|
|
138
175
|
};
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
var
|
|
145
|
-
expect(
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
expect(
|
|
158
|
-
expect(
|
|
159
|
-
expect(
|
|
160
|
-
expect(
|
|
161
|
-
expect(
|
|
162
|
-
expect(
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
expect(
|
|
167
|
-
expect(
|
|
168
|
-
expect(
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
expect(
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
expect(
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
it('should render inactive items', function () {
|
|
193
|
-
var inactiveEntities = entities.map(function (entity) { return (__assign(__assign({}, entity), { endDate: Date.now() - 10 })); });
|
|
194
|
-
var props = __assign(__assign({}, defaultProps), { entities: inactiveEntities });
|
|
195
|
-
var component = setUp(props);
|
|
196
|
-
expect(findInactiveItem(component).length).toBe(entities.length);
|
|
197
|
-
});
|
|
198
|
-
it('should show highlight for entity if it has import status SUCCESS', function () {
|
|
199
|
-
var _a;
|
|
200
|
-
var entity = entities[3];
|
|
201
|
-
var entitiesImportStatus = (_a = {},
|
|
202
|
-
_a[entity.uri] = types_1.ImportModes.Success,
|
|
203
|
-
_a);
|
|
204
|
-
var props = __assign(__assign({}, defaultProps), { entities: [entity] });
|
|
205
|
-
var component = setUp(props);
|
|
206
|
-
expect(findItem(component).hasClass('justImported')).toBe(false);
|
|
207
|
-
component.setProps({ entitiesImportStatus: entitiesImportStatus });
|
|
208
|
-
expect(findItem(component).hasClass('justImported')).toBe(true);
|
|
176
|
+
return __assign(__assign({}, (0, react_2.render)(react_1.default.createElement(ProfilesList_1.ProfilesList, __assign({}, props)), { wrapper: Providers })), { user: user });
|
|
177
|
+
};
|
|
178
|
+
describe('Profiles list tests', function () {
|
|
179
|
+
it('should render correctly', function () {
|
|
180
|
+
setUp();
|
|
181
|
+
var items = react_2.screen.getAllByTestId('profiles-list-item');
|
|
182
|
+
expect(items).toHaveLength(5);
|
|
183
|
+
expect(items[0]).not.toHaveClass('clickable');
|
|
184
|
+
expect(items[0]).not.toHaveClass('highlighted');
|
|
185
|
+
expect(items[0]).not.toHaveClass('selected');
|
|
186
|
+
expect(items[0]).toHaveClass('inactive');
|
|
187
|
+
expect(items[0]).not.toHaveClass('justImported');
|
|
188
|
+
expect((0, react_2.within)(items[0]).getByRole('img')).toHaveAttribute('src', '/images/defaultImage/neutral.png');
|
|
189
|
+
expect((0, react_2.within)(items[0]).getByText('First entity')).toHaveAttribute('href', 'https://reltio.com/ui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~entities/18TTRAuB');
|
|
190
|
+
(0, react_2.within)(items[0]).getByText('secondary label');
|
|
191
|
+
(0, react_2.within)(items[0]).getByText('HCP');
|
|
192
|
+
(0, react_2.within)(items[0]).getByText('18TTRAuB');
|
|
193
|
+
expect(items[1]).not.toHaveClass('clickable');
|
|
194
|
+
expect(items[1]).not.toHaveClass('highlighted');
|
|
195
|
+
expect(items[1]).not.toHaveClass('selected');
|
|
196
|
+
expect(items[1]).toHaveClass('justImported');
|
|
197
|
+
expect(items[1]).not.toHaveClass('inactive');
|
|
198
|
+
expect((0, react_2.within)(items[1]).getByRole('img')).toHaveAttribute('src', '/images/defaultImage/neutral.png');
|
|
199
|
+
expect((0, react_2.within)(items[1]).getByText('Second entity')).toHaveAttribute('href', 'https://reltio.com/ui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~entities/45TTRAfg');
|
|
200
|
+
(0, react_2.within)(items[1]).getByText('Business card 1 test, Relationship Label, Main Label - Business card second');
|
|
201
|
+
(0, react_2.within)(items[1]).getByText('HCP');
|
|
202
|
+
(0, react_2.within)(items[1]).getByText('45TTRAfg');
|
|
203
|
+
expect(items[2]).not.toHaveClass('clickable');
|
|
204
|
+
expect(items[2]).not.toHaveClass('highlighted');
|
|
205
|
+
expect(items[2]).toHaveClass('selected');
|
|
206
|
+
expect(items[2]).not.toHaveClass('justImported');
|
|
207
|
+
expect(items[2]).not.toHaveClass('inactive');
|
|
208
|
+
expect((0, react_2.within)(items[2]).getByRole('img')).toHaveAttribute('src', '/images/defaultImage/neutral.png');
|
|
209
|
+
expect((0, react_2.within)(items[2]).getByText('Third entity')).toHaveAttribute('href', 'https://reltio.com/ui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~DTSS/entities/14Pp52PY');
|
|
210
|
+
(0, react_2.within)(items[2]).getByText('HCP');
|
|
211
|
+
(0, react_2.within)(items[2]).getByText('DTSS/entities/14Pp52PY');
|
|
212
|
+
expect(items[3]).not.toHaveClass('clickable');
|
|
213
|
+
expect(items[3]).toHaveClass('highlighted');
|
|
214
|
+
expect(items[3]).not.toHaveClass('selected');
|
|
215
|
+
expect(items[3]).not.toHaveClass('justImported');
|
|
216
|
+
expect(items[3]).not.toHaveClass('inactive');
|
|
217
|
+
expect((0, react_2.within)(items[3]).getByRole('img')).toHaveAttribute('src', '/images/defaultImage/neutral.png');
|
|
218
|
+
expect((0, react_2.within)(items[3]).getByText('Fourth entity')).toHaveAttribute('href', 'https://reltio.com/ui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~DTSS/dt1/entities/19TTRAuB');
|
|
219
|
+
(0, react_2.within)(items[3]).getByText('secondary label');
|
|
220
|
+
(0, react_2.within)(items[3]).getByText('HCP');
|
|
221
|
+
(0, react_2.within)(items[3]).getByText('DTSS/dt1/entities/19TTRAuB');
|
|
222
|
+
expect(items[4]).not.toHaveClass('clickable');
|
|
223
|
+
expect(items[4]).not.toHaveClass('highlighted');
|
|
224
|
+
expect(items[4]).not.toHaveClass('selected');
|
|
225
|
+
expect(items[4]).not.toHaveClass('justImported');
|
|
226
|
+
expect(items[4]).not.toHaveClass('inactive');
|
|
227
|
+
expect((0, react_2.within)(items[4]).getByText('<No label>')).toHaveAttribute('href', 'https://reltio.com/ui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~entities/84Ks3mN');
|
|
228
|
+
(0, react_2.within)(items[4]).getByText('84Ks3mN');
|
|
209
229
|
});
|
|
210
230
|
it('should render items as clickable if onEntityClick prop is defined', function () {
|
|
211
231
|
var props = __assign(__assign({}, defaultProps), { onEntityClick: function () { } });
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
var props = __assign(__assign({}, defaultProps), { onEntityClick: function () { }, selectedEntityUri: entities[1].uri });
|
|
217
|
-
var component = setUp(props);
|
|
218
|
-
expect(findClickableItem(component).length).toBe(entities.length);
|
|
219
|
-
expect(findSelectedItem(component).length).toBe(1);
|
|
220
|
-
});
|
|
221
|
-
it('should render entity link uri component', function () {
|
|
222
|
-
var component = setUp();
|
|
223
|
-
var firstLink = findItemLink(findItem(component).at(0));
|
|
224
|
-
expect(firstLink.prop('value')).toBe('entities/18TTRAuB');
|
|
225
|
-
expect(firstLink.text()).toBe(entities[0].label);
|
|
226
|
-
});
|
|
227
|
-
it('should call "onEntityHover" prop with entity uri on item mouse enter', function () {
|
|
228
|
-
var onEntityHover = jest.fn();
|
|
229
|
-
var props = __assign(__assign({}, defaultProps), { onEntityHover: onEntityHover, entities: [entities[0]], selectedEntityUri: entities[1].uri });
|
|
230
|
-
var component = setUp(props);
|
|
231
|
-
findItem(component).prop('onMouseEnter')();
|
|
232
|
-
expect(onEntityHover).toHaveBeenCalledWith(entities[0].uri);
|
|
233
|
-
});
|
|
234
|
-
it('should call "onEntityHover" prop with null on item mouse leave', function () {
|
|
235
|
-
var onEntityHover = jest.fn();
|
|
236
|
-
var props = __assign(__assign({}, defaultProps), { onEntityHover: onEntityHover, entities: [entities[0]], selectedEntityUri: entities[1].uri });
|
|
237
|
-
var component = setUp(props);
|
|
238
|
-
findItem(component).prop('onMouseLeave')();
|
|
239
|
-
expect(onEntityHover).toHaveBeenCalledWith(null);
|
|
232
|
+
setUp(props);
|
|
233
|
+
var items = react_2.screen.getAllByTestId('profiles-list-item');
|
|
234
|
+
expect(items).toHaveLength(5);
|
|
235
|
+
items.forEach(function (item) { return expect(item).toHaveClass('clickable'); });
|
|
240
236
|
});
|
|
237
|
+
it('should call "onEntityHover" prop on item mouse enter and mouse leave correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
238
|
+
var props, user;
|
|
239
|
+
return __generator(this, function (_a) {
|
|
240
|
+
switch (_a.label) {
|
|
241
|
+
case 0:
|
|
242
|
+
props = __assign(__assign({}, defaultProps), { onEntityHover: jest.fn() });
|
|
243
|
+
user = setUp(props).user;
|
|
244
|
+
return [4 /*yield*/, user.hover(react_2.screen.getByText('First entity'))];
|
|
245
|
+
case 1:
|
|
246
|
+
_a.sent();
|
|
247
|
+
expect(props.onEntityHover).toHaveBeenCalledWith('entities/18TTRAuB');
|
|
248
|
+
return [4 /*yield*/, user.unhover(react_2.screen.getByText('First entity'))];
|
|
249
|
+
case 2:
|
|
250
|
+
_a.sent();
|
|
251
|
+
expect(props.onEntityHover).toHaveBeenCalledWith(null);
|
|
252
|
+
return [2 /*return*/];
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
}); });
|
|
241
256
|
});
|