@reltio/components 1.4.1997 → 1.4.1998
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/cjs/features/activity-log/ActivitiesFactory/ActivitiesFactory.d.ts +1 -1
- package/cjs/features/activity-log/ActivitiesFactory/ActivitiesFactory.js +1 -1
- package/cjs/features/activity-log/ActivitiesFactory/ActivitiesFactory.test.js +267 -0
- package/cjs/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.d.ts +1 -2
- package/cjs/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.js +1 -1
- package/cjs/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.test.js +5 -23
- package/cjs/features/activity-log/ActivitiesFactory/components/GroupActivity/GroupActivity.js +2 -2
- package/cjs/features/activity-log/ActivitiesFactory/components/GroupActivity/GroupActivity.test.js +3 -23
- package/cjs/features/activity-log/ActivitiesFactory/components/MergeActivity/MergeActivity.js +2 -2
- package/cjs/features/activity-log/ActivitiesFactory/components/MergeActivity/MergeActivity.test.js +81 -102
- package/cjs/features/activity-log/ActivitiesFactory/components/ObjectLabel/ObjectLabel.d.ts +2 -2
- package/cjs/features/activity-log/ActivitiesFactory/components/ObjectLabel/ObjectLabel.js +24 -2
- package/cjs/features/activity-log/ActivitiesFactory/components/PotentialMatchActivity/PotentialMatchActivity.js +1 -1
- package/cjs/features/activity-log/ActivitiesFactory/components/PotentialMatchActivity/PotentialMatchActivity.test.js +69 -48
- package/cjs/features/activity-log/ActivitiesFactory/components/ProfileActivity/ProfileActivity.js +2 -2
- package/cjs/features/activity-log/ActivitiesFactory/components/ProfileActivity/ProfileActivity.test.js +123 -107
- package/cjs/features/activity-log/ActivitiesFactory/components/RelationActivity/RelationActivity.js +2 -2
- package/cjs/features/activity-log/ActivitiesFactory/components/RelationActivity/RelationActivity.test.js +128 -115
- package/cjs/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.js +1 -1
- package/cjs/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.test.js +160 -183
- package/cjs/features/activity-log/ActivitiesFactory/components/SimpleActivity/SimpleActivity.js +2 -2
- package/cjs/features/activity-log/ActivitiesFactory/components/SimpleActivity/SimpleActivity.test.js +44 -28
- package/cjs/features/activity-log/ActivitiesFactory/components/SynchronizationIssuesActivity/SynchronizationIssuesActivity.js +4 -5
- package/cjs/features/activity-log/ActivitiesFactory/components/SynchronizationIssuesActivity/SynchronizationIssuesActivity.test.js +54 -47
- package/cjs/features/activity-log/ActivityLog/ActivityLog.test.js +83 -22
- package/cjs/features/activity-log/ActivityLog/components/GroupItem/GroupItem.js +1 -1
- package/cjs/features/activity-log/ActivityLogFilter/ActivityLogFilter.test.js +784 -0
- package/cjs/features/activity-log/ActivityTitle/ActivityTitle.d.ts +2 -3
- package/cjs/features/activity-log/ActivityTitle/ActivityTitle.js +24 -2
- package/cjs/features/activity-log/CollapsibleActivityRecords/CollapsibleActivityRecords.test.js +102 -79
- package/cjs/features/activity-log/EntityObject/EntityObject.test.js +35 -26
- package/cjs/features/activity-log/Field/Field.d.ts +2 -3
- package/cjs/features/activity-log/Field/Field.js +24 -2
- package/cjs/features/activity-log/PotentialMatchRecord/PotentialMatchRecord.test.js +160 -34
- package/cjs/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/PotentialMatchField.js +1 -1
- package/cjs/features/activity-log/RecordUpdates/RecordUpdates.test.js +207 -0
- package/cjs/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.js +1 -1
- package/cjs/features/activity-log/RelationObject/RelationObject.test.js +46 -29
- package/cjs/features/activity-log/RelationRecord/RelationRecord.test.js +88 -68
- package/esm/features/activity-log/ActivitiesFactory/ActivitiesFactory.d.ts +1 -1
- package/esm/features/activity-log/ActivitiesFactory/ActivitiesFactory.js +1 -1
- package/esm/features/activity-log/ActivitiesFactory/ActivitiesFactory.test.js +262 -0
- package/esm/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.d.ts +1 -2
- package/esm/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.js +1 -1
- package/esm/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.test.js +5 -23
- package/esm/features/activity-log/ActivitiesFactory/components/GroupActivity/GroupActivity.js +2 -2
- package/esm/features/activity-log/ActivitiesFactory/components/GroupActivity/GroupActivity.test.js +3 -23
- package/esm/features/activity-log/ActivitiesFactory/components/MergeActivity/MergeActivity.js +2 -2
- package/esm/features/activity-log/ActivitiesFactory/components/MergeActivity/MergeActivity.test.js +81 -102
- package/esm/features/activity-log/ActivitiesFactory/components/ObjectLabel/ObjectLabel.d.ts +2 -2
- package/esm/features/activity-log/ActivitiesFactory/components/ObjectLabel/ObjectLabel.js +24 -2
- package/esm/features/activity-log/ActivitiesFactory/components/PotentialMatchActivity/PotentialMatchActivity.js +1 -1
- package/esm/features/activity-log/ActivitiesFactory/components/PotentialMatchActivity/PotentialMatchActivity.test.js +69 -48
- package/esm/features/activity-log/ActivitiesFactory/components/ProfileActivity/ProfileActivity.js +2 -2
- package/esm/features/activity-log/ActivitiesFactory/components/ProfileActivity/ProfileActivity.test.js +123 -107
- package/esm/features/activity-log/ActivitiesFactory/components/RelationActivity/RelationActivity.js +2 -2
- package/esm/features/activity-log/ActivitiesFactory/components/RelationActivity/RelationActivity.test.js +128 -115
- package/esm/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.js +1 -1
- package/esm/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.test.js +160 -183
- package/esm/features/activity-log/ActivitiesFactory/components/SimpleActivity/SimpleActivity.js +2 -2
- package/esm/features/activity-log/ActivitiesFactory/components/SimpleActivity/SimpleActivity.test.js +44 -28
- package/esm/features/activity-log/ActivitiesFactory/components/SynchronizationIssuesActivity/SynchronizationIssuesActivity.js +4 -5
- package/esm/features/activity-log/ActivitiesFactory/components/SynchronizationIssuesActivity/SynchronizationIssuesActivity.test.js +54 -47
- package/esm/features/activity-log/ActivityLog/ActivityLog.test.js +83 -22
- package/esm/features/activity-log/ActivityLog/components/GroupItem/GroupItem.js +1 -1
- package/esm/features/activity-log/ActivityLogFilter/ActivityLogFilter.test.js +779 -0
- package/esm/features/activity-log/ActivityTitle/ActivityTitle.d.ts +2 -3
- package/esm/features/activity-log/ActivityTitle/ActivityTitle.js +24 -2
- package/esm/features/activity-log/CollapsibleActivityRecords/CollapsibleActivityRecords.test.js +104 -58
- package/esm/features/activity-log/EntityObject/EntityObject.test.js +35 -26
- package/esm/features/activity-log/Field/Field.d.ts +2 -3
- package/esm/features/activity-log/Field/Field.js +24 -2
- package/esm/features/activity-log/PotentialMatchRecord/PotentialMatchRecord.test.js +160 -34
- package/esm/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/PotentialMatchField.js +1 -1
- package/esm/features/activity-log/RecordUpdates/RecordUpdates.test.js +202 -0
- package/esm/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.js +1 -1
- package/esm/features/activity-log/RelationObject/RelationObject.test.js +46 -29
- package/esm/features/activity-log/RelationRecord/RelationRecord.test.js +88 -68
- package/package.json +1 -1
- package/cjs/features/activity-log/ActivityExportButton/ActivityExportButton.specs.js +0 -142
- package/cjs/features/activity-log/ActivityFilterButton/ActivityFilterButton.specs.js +0 -131
- package/cjs/features/activity-log/ActivityFilterEditor/ActivityFilterEditor.specs.js +0 -252
- package/cjs/features/activity-log/ActivityFilterEditor/components/ActivitySelector/ActivitySelector.specs.js +0 -158
- package/cjs/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.js +0 -135
- package/cjs/features/activity-log/ActivityFilterEditor/components/EntityTypesSelector/EntityTypesSelector.specs.js +0 -65
- package/cjs/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.specs.d.ts +0 -1
- package/cjs/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.specs.js +0 -119
- package/cjs/features/activity-log/ActivityFilterEditor/editor.test-data.d.ts +0 -25
- package/cjs/features/activity-log/ActivityFilterEditor/editor.test-data.js +0 -75
- package/cjs/features/activity-log/ActivityLog/components/ActivityItem/ActivityItem.test.d.ts +0 -1
- package/cjs/features/activity-log/ActivityLog/components/ActivityItem/ActivityItem.test.js +0 -140
- package/cjs/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.d.ts +0 -1
- package/cjs/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.js +0 -41
- package/cjs/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.d.ts +0 -1
- package/cjs/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.js +0 -87
- package/cjs/features/activity-log/ActivityTitle/ActivityTitle.test.d.ts +0 -1
- package/cjs/features/activity-log/ActivityTitle/ActivityTitle.test.js +0 -19
- package/cjs/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/PotentialMatchField.test.d.ts +0 -1
- package/cjs/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/PotentialMatchField.test.js +0 -179
- package/cjs/features/activity-log/RecordUpdates/RecordUpdates.specs.d.ts +0 -1
- package/cjs/features/activity-log/RecordUpdates/RecordUpdates.specs.js +0 -150
- package/cjs/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.test.d.ts +0 -1
- package/cjs/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.test.js +0 -124
- package/esm/features/activity-log/ActivityExportButton/ActivityExportButton.specs.d.ts +0 -1
- package/esm/features/activity-log/ActivityExportButton/ActivityExportButton.specs.js +0 -137
- package/esm/features/activity-log/ActivityFilterButton/ActivityFilterButton.specs.d.ts +0 -1
- package/esm/features/activity-log/ActivityFilterButton/ActivityFilterButton.specs.js +0 -126
- package/esm/features/activity-log/ActivityFilterEditor/ActivityFilterEditor.specs.d.ts +0 -1
- package/esm/features/activity-log/ActivityFilterEditor/ActivityFilterEditor.specs.js +0 -247
- package/esm/features/activity-log/ActivityFilterEditor/components/ActivitySelector/ActivitySelector.specs.d.ts +0 -1
- package/esm/features/activity-log/ActivityFilterEditor/components/ActivitySelector/ActivitySelector.specs.js +0 -153
- package/esm/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.d.ts +0 -1
- package/esm/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.js +0 -130
- package/esm/features/activity-log/ActivityFilterEditor/components/EntityTypesSelector/EntityTypesSelector.specs.d.ts +0 -1
- package/esm/features/activity-log/ActivityFilterEditor/components/EntityTypesSelector/EntityTypesSelector.specs.js +0 -60
- package/esm/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.specs.d.ts +0 -1
- package/esm/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.specs.js +0 -114
- package/esm/features/activity-log/ActivityFilterEditor/editor.test-data.d.ts +0 -25
- package/esm/features/activity-log/ActivityFilterEditor/editor.test-data.js +0 -72
- package/esm/features/activity-log/ActivityLog/components/ActivityItem/ActivityItem.test.d.ts +0 -1
- package/esm/features/activity-log/ActivityLog/components/ActivityItem/ActivityItem.test.js +0 -135
- package/esm/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.d.ts +0 -1
- package/esm/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.js +0 -36
- package/esm/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.d.ts +0 -1
- package/esm/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.js +0 -82
- package/esm/features/activity-log/ActivityTitle/ActivityTitle.test.d.ts +0 -1
- package/esm/features/activity-log/ActivityTitle/ActivityTitle.test.js +0 -14
- package/esm/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/PotentialMatchField.test.d.ts +0 -1
- package/esm/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/PotentialMatchField.test.js +0 -151
- package/esm/features/activity-log/RecordUpdates/RecordUpdates.specs.d.ts +0 -1
- package/esm/features/activity-log/RecordUpdates/RecordUpdates.specs.js +0 -122
- package/esm/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.test.d.ts +0 -1
- package/esm/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.test.js +0 -119
- /package/cjs/features/activity-log/{ActivityExportButton/ActivityExportButton.specs.d.ts → ActivitiesFactory/ActivitiesFactory.test.d.ts} +0 -0
- /package/cjs/features/activity-log/{ActivityFilterButton/ActivityFilterButton.specs.d.ts → ActivityLogFilter/ActivityLogFilter.test.d.ts} +0 -0
- /package/cjs/features/activity-log/{ActivityFilterEditor/ActivityFilterEditor.specs.d.ts → RecordUpdates/RecordUpdates.test.d.ts} +0 -0
- /package/{cjs/features/activity-log/ActivityFilterEditor/components/ActivitySelector/ActivitySelector.specs.d.ts → esm/features/activity-log/ActivitiesFactory/ActivitiesFactory.test.d.ts} +0 -0
- /package/{cjs/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.d.ts → esm/features/activity-log/ActivityLogFilter/ActivityLogFilter.test.d.ts} +0 -0
- /package/{cjs/features/activity-log/ActivityFilterEditor/components/EntityTypesSelector/EntityTypesSelector.specs.d.ts → esm/features/activity-log/RecordUpdates/RecordUpdates.test.d.ts} +0 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
import { MdmModuleProvider } from '../../../contexts/MdmModuleContext';
|
|
4
|
+
import { CollapsibleItemsProvider } from '../contexts/CollapsibleItemsContext';
|
|
5
|
+
import { ActivityTypes } from '../types';
|
|
6
|
+
import { ActivitiesFactory } from './ActivitiesFactory';
|
|
7
|
+
var defaultMdmValues = {
|
|
8
|
+
metadata: {
|
|
9
|
+
entityTypes: [],
|
|
10
|
+
groupTypes: []
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
var setUp = function (_a) {
|
|
14
|
+
var props = _a.props, _b = _a.mdmValues, mdmValues = _b === void 0 ? defaultMdmValues : _b;
|
|
15
|
+
var Providers = function (_a) {
|
|
16
|
+
var children = _a.children;
|
|
17
|
+
return (React.createElement(MdmModuleProvider, { values: mdmValues },
|
|
18
|
+
React.createElement(CollapsibleItemsProvider, null, children)));
|
|
19
|
+
};
|
|
20
|
+
return render(ActivitiesFactory.getComponent(props), { wrapper: Providers });
|
|
21
|
+
};
|
|
22
|
+
describe('Activities factory tests', function () {
|
|
23
|
+
describe('comment activity', function () {
|
|
24
|
+
it('should render comment activity for COMMENT_ADDED activity type', function () {
|
|
25
|
+
var props = { type: ActivityTypes.COMMENT_ADDED };
|
|
26
|
+
setUp({ props: props });
|
|
27
|
+
screen.getByTestId('comment-activity');
|
|
28
|
+
});
|
|
29
|
+
it('should render comment activity for COMMENT_DELETED activity type', function () {
|
|
30
|
+
var props = { type: ActivityTypes.COMMENT_DELETED };
|
|
31
|
+
setUp({ props: props });
|
|
32
|
+
screen.getByTestId('comment-activity');
|
|
33
|
+
});
|
|
34
|
+
it('should render comment activity for COMMENT_UPDATED activity type', function () {
|
|
35
|
+
var props = { type: ActivityTypes.COMMENT_UPDATED };
|
|
36
|
+
setUp({ props: props });
|
|
37
|
+
screen.getByTestId('comment-activity');
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
describe('merge activity', function () {
|
|
41
|
+
var defaultData = {
|
|
42
|
+
uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
|
|
43
|
+
user: 'marat.ahmetzyanov',
|
|
44
|
+
timestamp: 1620711408828,
|
|
45
|
+
items: [],
|
|
46
|
+
itemsTotal: 0
|
|
47
|
+
};
|
|
48
|
+
it('should render merge activity for ENTITIES_MERGED_MANUALLY activity type', function () {
|
|
49
|
+
var props = { data: defaultData, type: ActivityTypes.ENTITIES_MERGED_MANUALLY };
|
|
50
|
+
setUp({ props: props });
|
|
51
|
+
screen.getByTestId('merge-activity');
|
|
52
|
+
});
|
|
53
|
+
it('should render merge activity for ENTITIES_MERGED activity type', function () {
|
|
54
|
+
var props = { data: defaultData, type: ActivityTypes.ENTITIES_MERGED };
|
|
55
|
+
setUp({ props: props });
|
|
56
|
+
screen.getByTestId('merge-activity');
|
|
57
|
+
});
|
|
58
|
+
it('should render merge activity for ENTITIES_MERGED_ON_THE_FLY activity type', function () {
|
|
59
|
+
var props = { data: defaultData, type: ActivityTypes.ENTITIES_MERGED_ON_THE_FLY };
|
|
60
|
+
setUp({ props: props });
|
|
61
|
+
screen.getByTestId('merge-activity');
|
|
62
|
+
});
|
|
63
|
+
it('should render merge activity for ENTITIES_SPLITTED activity type', function () {
|
|
64
|
+
var props = { data: defaultData, type: ActivityTypes.ENTITIES_SPLITTED };
|
|
65
|
+
setUp({ props: props });
|
|
66
|
+
screen.getByTestId('merge-activity');
|
|
67
|
+
});
|
|
68
|
+
it('should render merge activity for ENTITY_LOST_MERGE activity type', function () {
|
|
69
|
+
var props = { data: defaultData, type: ActivityTypes.ENTITY_LOST_MERGE };
|
|
70
|
+
setUp({ props: props });
|
|
71
|
+
screen.getByTestId('merge-activity');
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
describe('potential match activity', function () {
|
|
75
|
+
var defaultData = {
|
|
76
|
+
uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
|
|
77
|
+
user: 'marat.ahmetzyanov',
|
|
78
|
+
timestamp: 1620711408828,
|
|
79
|
+
items: [],
|
|
80
|
+
itemsTotal: 0
|
|
81
|
+
};
|
|
82
|
+
it('should render potential match activity for POTENTIAL_MATCHES_FOUND activity type', function () {
|
|
83
|
+
var props = { data: defaultData, type: ActivityTypes.POTENTIAL_MATCHES_FOUND };
|
|
84
|
+
setUp({ props: props });
|
|
85
|
+
screen.getByTestId('potential-match-activity');
|
|
86
|
+
});
|
|
87
|
+
it('should render potential match activity for POTENTIAL_MATCHES_REMOVED activity type', function () {
|
|
88
|
+
var props = { data: defaultData, type: ActivityTypes.POTENTIAL_MATCHES_REMOVED };
|
|
89
|
+
setUp({ props: props });
|
|
90
|
+
screen.getByTestId('potential-match-activity');
|
|
91
|
+
});
|
|
92
|
+
it('should render potential match activity for NOT_MATCHES_SET activity type', function () {
|
|
93
|
+
var props = { data: defaultData, type: ActivityTypes.NOT_MATCHES_SET };
|
|
94
|
+
setUp({ props: props });
|
|
95
|
+
screen.getByTestId('potential-match-activity');
|
|
96
|
+
});
|
|
97
|
+
it('should render potential match activity for NOT_MATCHES_RESET activity type', function () {
|
|
98
|
+
var props = { data: defaultData, type: ActivityTypes.NOT_MATCHES_RESET };
|
|
99
|
+
setUp({ props: props });
|
|
100
|
+
screen.getByTestId('potential-match-activity');
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
describe('profile activity', function () {
|
|
104
|
+
var defaultData = {
|
|
105
|
+
uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
|
|
106
|
+
user: 'marat.ahmetzyanov',
|
|
107
|
+
timestamp: 1620711408828,
|
|
108
|
+
items: [],
|
|
109
|
+
itemsTotal: 0
|
|
110
|
+
};
|
|
111
|
+
it('should render profile activity for ENTITY_CHANGED activity type', function () {
|
|
112
|
+
var props = { data: defaultData, type: ActivityTypes.ENTITY_CHANGED };
|
|
113
|
+
setUp({ props: props });
|
|
114
|
+
screen.getByTestId('profile-activity');
|
|
115
|
+
});
|
|
116
|
+
it('should render profile activity for ENTITY_CREATED activity type', function () {
|
|
117
|
+
var props = { data: defaultData, type: ActivityTypes.ENTITY_CREATED };
|
|
118
|
+
setUp({ props: props });
|
|
119
|
+
screen.getByTestId('profile-activity');
|
|
120
|
+
});
|
|
121
|
+
it('should render profile activity for ENTITY_REMOVED activity type', function () {
|
|
122
|
+
var props = { data: defaultData, type: ActivityTypes.ENTITY_REMOVED };
|
|
123
|
+
setUp({ props: props });
|
|
124
|
+
screen.getByTestId('profile-activity');
|
|
125
|
+
});
|
|
126
|
+
it('should render profile activity for ANALYTICS_ATTRIBUTES_CHANGED activity type', function () {
|
|
127
|
+
var props = { data: defaultData, type: ActivityTypes.ANALYTICS_ATTRIBUTES_CHANGED };
|
|
128
|
+
setUp({ props: props });
|
|
129
|
+
screen.getByTestId('profile-activity');
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
describe('relation activity', function () {
|
|
133
|
+
var defaultData = {
|
|
134
|
+
uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
|
|
135
|
+
user: 'marat.ahmetzyanov',
|
|
136
|
+
timestamp: 1620711408828,
|
|
137
|
+
items: [],
|
|
138
|
+
itemsTotal: 0
|
|
139
|
+
};
|
|
140
|
+
it('should render relation activity for RELATIONSHIP_CHANGED activity type', function () {
|
|
141
|
+
var props = { data: defaultData, type: ActivityTypes.RELATIONSHIP_CHANGED };
|
|
142
|
+
setUp({ props: props });
|
|
143
|
+
screen.getByTestId('relation-activity');
|
|
144
|
+
});
|
|
145
|
+
it('should render relation activity for RELATIONSHIP_CREATED activity type', function () {
|
|
146
|
+
var props = { data: defaultData, type: ActivityTypes.RELATIONSHIP_CREATED };
|
|
147
|
+
setUp({ props: props });
|
|
148
|
+
screen.getByTestId('relation-activity');
|
|
149
|
+
});
|
|
150
|
+
it('should render relation activity for RELATIONSHIP_REMOVED activity type', function () {
|
|
151
|
+
var props = { data: defaultData, type: ActivityTypes.RELATIONSHIP_REMOVED };
|
|
152
|
+
setUp({ props: props });
|
|
153
|
+
screen.getByTestId('relation-activity');
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
describe('search activity', function () {
|
|
157
|
+
it('should render search activity for USER_SEARCH activity type', function () {
|
|
158
|
+
var props = {
|
|
159
|
+
data: {
|
|
160
|
+
uri: 'activities/504c-9876-79bc2a96',
|
|
161
|
+
user: 'polina.arsenteva',
|
|
162
|
+
label: 'USER_SEARCH',
|
|
163
|
+
description: '{"activity":{"query":null,"uiState":{"view":{"searchResultsMode":"table","entityTypeTab":null,"previewPanelMode":null},"facets":{},"advanced":[],"searchOptions":{"searchByOv":true,"ovOnly":true},"keyword":null,"map":null,"version":"2.0"}},"version":"2.0"}',
|
|
164
|
+
timestamp: 1626952820539
|
|
165
|
+
},
|
|
166
|
+
type: ActivityTypes.USER_SEARCH
|
|
167
|
+
};
|
|
168
|
+
setUp({ props: props });
|
|
169
|
+
screen.getByTestId('search-activity');
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
describe('group activity', function () {
|
|
173
|
+
var defaultData = {
|
|
174
|
+
uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
|
|
175
|
+
user: 'marat.ahmetzyanov',
|
|
176
|
+
timestamp: 1620711408828,
|
|
177
|
+
items: [],
|
|
178
|
+
itemsTotal: 0
|
|
179
|
+
};
|
|
180
|
+
it('should render group activity for GROUP_CHANGED activity type', function () {
|
|
181
|
+
var props = { data: defaultData, type: ActivityTypes.GROUP_CHANGED };
|
|
182
|
+
setUp({ props: props });
|
|
183
|
+
screen.getByTestId('group-activity');
|
|
184
|
+
});
|
|
185
|
+
it('should render group activity for GROUP_CREATED activity type', function () {
|
|
186
|
+
var props = { data: defaultData, type: ActivityTypes.GROUP_CREATED };
|
|
187
|
+
setUp({ props: props });
|
|
188
|
+
screen.getByTestId('group-activity');
|
|
189
|
+
});
|
|
190
|
+
it('should render group activity for GROUP_REMOVED activity type', function () {
|
|
191
|
+
var props = { data: defaultData, type: ActivityTypes.GROUP_REMOVED };
|
|
192
|
+
setUp({ props: props });
|
|
193
|
+
screen.getByTestId('group-activity');
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
describe('simple activity', function () {
|
|
197
|
+
var defaultData = {
|
|
198
|
+
uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
|
|
199
|
+
user: 'marat.ahmetzyanov',
|
|
200
|
+
timestamp: 1620711408828,
|
|
201
|
+
description: '{}',
|
|
202
|
+
itemsTotal: 0
|
|
203
|
+
};
|
|
204
|
+
it('should render simple activity for USER_LOGIN activity type', function () {
|
|
205
|
+
var props = { data: defaultData, type: ActivityTypes.USER_LOGIN };
|
|
206
|
+
setUp({ props: props });
|
|
207
|
+
screen.getByTestId('simple-activity');
|
|
208
|
+
});
|
|
209
|
+
it('should render simple activity for USER_LOGOUT activity type', function () {
|
|
210
|
+
var props = { data: defaultData, type: ActivityTypes.USER_LOGOUT };
|
|
211
|
+
setUp({ props: props });
|
|
212
|
+
screen.getByTestId('simple-activity');
|
|
213
|
+
});
|
|
214
|
+
it('should render simple activity for MODEL_UPDATED activity type', function () {
|
|
215
|
+
var props = { data: defaultData, type: ActivityTypes.MODEL_UPDATED };
|
|
216
|
+
setUp({ props: props });
|
|
217
|
+
screen.getByTestId('simple-activity');
|
|
218
|
+
});
|
|
219
|
+
it('should render simple activity for PERIODIC_TASK_SCHEDULED activity type', function () {
|
|
220
|
+
var props = { data: defaultData, type: ActivityTypes.PERIODIC_TASK_SCHEDULED };
|
|
221
|
+
setUp({ props: props });
|
|
222
|
+
screen.getByTestId('simple-activity');
|
|
223
|
+
});
|
|
224
|
+
it('should render simple activity for USER_PROFILE_VIEW activity type', function () {
|
|
225
|
+
var props = { data: defaultData, type: ActivityTypes.USER_PROFILE_VIEW };
|
|
226
|
+
setUp({ props: props });
|
|
227
|
+
screen.getByTestId('simple-activity');
|
|
228
|
+
});
|
|
229
|
+
});
|
|
230
|
+
describe('synchronization issues activity', function () {
|
|
231
|
+
it('should render synchronization issues activity for SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE activity type', function () {
|
|
232
|
+
var props = {
|
|
233
|
+
data: {
|
|
234
|
+
uri: 'activities/0dcf97d0-5006-46d6-b82f-07579922e2f6',
|
|
235
|
+
user: 'sfdc.connector.admin',
|
|
236
|
+
label: 'label',
|
|
237
|
+
timestamp: 1652374313724,
|
|
238
|
+
items: [
|
|
239
|
+
{
|
|
240
|
+
id: '42uxv5X2',
|
|
241
|
+
timestamp: 1652374313724,
|
|
242
|
+
objectUri: 'entities/15T9kNFk',
|
|
243
|
+
objectType: 'configuration/entityTypes/HCP',
|
|
244
|
+
objectLabel: 'Andy Andy'
|
|
245
|
+
}
|
|
246
|
+
],
|
|
247
|
+
itemsTotal: 1
|
|
248
|
+
},
|
|
249
|
+
type: ActivityTypes.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE
|
|
250
|
+
};
|
|
251
|
+
setUp({ props: props });
|
|
252
|
+
screen.getByTestId('synchronization-issues-activity');
|
|
253
|
+
});
|
|
254
|
+
});
|
|
255
|
+
describe('not implemented', function () {
|
|
256
|
+
it('should render not implemented text for unexpected types', function () {
|
|
257
|
+
var props = { type: 'UNEXPECTED_ACTIVITY' };
|
|
258
|
+
setUp({ props: props });
|
|
259
|
+
screen.getByText('UNEXPECTED_ACTIVITY NOT IMPLEMENTED');
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
});
|
package/esm/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ActivityTypes } from '../../../types';
|
|
3
3
|
type Props = {
|
|
4
4
|
type: ActivityTypes;
|
|
5
|
-
data: ActivityData;
|
|
6
5
|
};
|
|
7
6
|
export declare const CommentActivity: ({ type }: Props) => React.JSX.Element;
|
|
8
7
|
export {};
|
package/esm/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.js
CHANGED
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { ActivityTitle } from '../../../ActivityTitle';
|
|
3
3
|
export var CommentActivity = function (_a) {
|
|
4
4
|
var type = _a.type;
|
|
5
|
-
return React.createElement(ActivityTitle, { type: type });
|
|
5
|
+
return React.createElement(ActivityTitle, { type: type, "data-reltio-id": "comment-activity" });
|
|
6
6
|
};
|
|
@@ -1,28 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { CommentActivity } from './CommentActivity';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
4
3
|
import { ActivityTypes } from '../../../types';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
uri: 'activities/6aa6a54a-a41b-49fd-8070-b4900d3e5468',
|
|
8
|
-
user: 'denis.tkachev',
|
|
9
|
-
label: 'COMMENT_ADDED',
|
|
10
|
-
description: '{"commentId":"00005LQ","createdBy":"denis.tkachev","createdTime":1623229206252,"modifiedTime":1623229206252,"deleted":false,"visibility":"public","status":"open","objectId":"entities/1BKYwm2t","objectType":"entity","permanentLink":"https://tst-01.reltio.com/ui/uitest3/#p~com.reltio.plugins.entity.HCPPerspective_e~entities%2F1BKYwm2t_ps~profile_cmt~00005LQ","relatedObjectUris":["entities/1BKYwm2t"]}',
|
|
11
|
-
timestamp: 1623229209927,
|
|
12
|
-
items: [
|
|
13
|
-
{
|
|
14
|
-
id: '5pUxeNLr',
|
|
15
|
-
user: 'denis.tkachev',
|
|
16
|
-
method: 'POST',
|
|
17
|
-
url: '/reltio/api/uitest3/activities',
|
|
18
|
-
clientType: 'UNKNOWN',
|
|
19
|
-
timestamp: 1623229209927
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
itemsTotal: 1
|
|
23
|
-
};
|
|
4
|
+
import { CommentActivity } from './CommentActivity';
|
|
5
|
+
describe('Comment activity tests', function () {
|
|
24
6
|
it('should render correctly', function () {
|
|
25
|
-
|
|
26
|
-
|
|
7
|
+
render(React.createElement(CommentActivity, { type: ActivityTypes.COMMENT_ADDED }));
|
|
8
|
+
screen.getByText('Comment added');
|
|
27
9
|
});
|
|
28
10
|
});
|
package/esm/features/activity-log/ActivitiesFactory/components/GroupActivity/GroupActivity.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ActivityTitle } from '../../../ActivityTitle';
|
|
3
2
|
import { getGroupLabelByTypeUri, getLabel } from '@reltio/mdm-sdk';
|
|
4
3
|
import { useMdmMetadata } from '../../../../../contexts/MdmModuleContext';
|
|
4
|
+
import { ActivityTitle } from '../../../ActivityTitle';
|
|
5
5
|
import { ObjectLabel } from '../ObjectLabel';
|
|
6
6
|
export var GroupActivity = function (_a) {
|
|
7
7
|
var _b, _c;
|
|
8
8
|
var data = _a.data, type = _a.type;
|
|
9
9
|
var metadata = useMdmMetadata();
|
|
10
10
|
var label = getGroupLabelByTypeUri(metadata, (_c = (_b = data.items) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.objectType);
|
|
11
|
-
return (React.createElement(ActivityTitle, { type: type },
|
|
11
|
+
return (React.createElement(ActivityTitle, { type: type, "data-reltio-id": "group-activity" },
|
|
12
12
|
React.createElement(ObjectLabel, { label: getLabel(label) })));
|
|
13
13
|
};
|
package/esm/features/activity-log/ActivitiesFactory/components/GroupActivity/GroupActivity.test.js
CHANGED
|
@@ -15,12 +15,7 @@ import { MdmModuleProvider } from '../../../../../contexts/MdmModuleContext';
|
|
|
15
15
|
import { ActivityTypes } from '../../../types';
|
|
16
16
|
import { GroupActivity } from './GroupActivity';
|
|
17
17
|
var metadata = {
|
|
18
|
-
groupTypes: [
|
|
19
|
-
{
|
|
20
|
-
uri: 'configuration/groupTypes/Test',
|
|
21
|
-
label: 'Test group'
|
|
22
|
-
}
|
|
23
|
-
]
|
|
18
|
+
groupTypes: [{ uri: 'configuration/groupTypes/Test', label: 'Test group' }]
|
|
24
19
|
};
|
|
25
20
|
var setUp = function (props) {
|
|
26
21
|
var Providers = function (_a) {
|
|
@@ -29,28 +24,13 @@ var setUp = function (props) {
|
|
|
29
24
|
};
|
|
30
25
|
return render(React.createElement(GroupActivity, __assign({}, props)), { wrapper: Providers });
|
|
31
26
|
};
|
|
32
|
-
describe('
|
|
27
|
+
describe('Group activity tests', function () {
|
|
33
28
|
it('should render correctly', function () {
|
|
34
29
|
var data = {
|
|
35
30
|
uri: 'activities/d6e61e96-6310-434a-99f9-e694e5f35475',
|
|
36
31
|
user: 'alexander.kirsanov',
|
|
37
32
|
timestamp: 1621874356842,
|
|
38
|
-
items: [
|
|
39
|
-
{
|
|
40
|
-
id: '7a5l7pc1',
|
|
41
|
-
user: 'alexander.kirsanov',
|
|
42
|
-
method: 'POST',
|
|
43
|
-
url: '/reltio/api/alenat/groups/7a5l7h5V/members',
|
|
44
|
-
clientType: 'Reltio UI',
|
|
45
|
-
timestamp: 1621874356842,
|
|
46
|
-
objectUri: 'groups/7a5l7h5V',
|
|
47
|
-
objectType: 'configuration/groupTypes/Test',
|
|
48
|
-
data: {
|
|
49
|
-
type: 'GROUP_CHANGED'
|
|
50
|
-
},
|
|
51
|
-
eventId: '1621874356842_1AeizH7'
|
|
52
|
-
}
|
|
53
|
-
],
|
|
33
|
+
items: [{ id: 'sh2Ks8AN', timestamp: 1621874356842, objectType: 'configuration/groupTypes/Test' }],
|
|
54
34
|
itemsTotal: 1
|
|
55
35
|
};
|
|
56
36
|
var props = { type: ActivityTypes.GROUP_CHANGED, data: data };
|
package/esm/features/activity-log/ActivitiesFactory/components/MergeActivity/MergeActivity.js
CHANGED
|
@@ -7,7 +7,7 @@ export var MergeActivity = function (_a) {
|
|
|
7
7
|
var type = _a.type, data = _a.data;
|
|
8
8
|
var itemsTotal = data.itemsTotal, items = data.items, uri = data.uri;
|
|
9
9
|
var isMinimized = itemsTotal === 1 && !(items[0].data.potentialMatches || items[0].data.newUri);
|
|
10
|
-
return (React.createElement("div",
|
|
11
|
-
React.createElement(ActivityTitle, { type: type }, isMinimized && React.createElement(EntityObject, { item: items[0] })),
|
|
10
|
+
return (React.createElement("div", { "data-reltio-id": "merge-activity" },
|
|
11
|
+
React.createElement(ActivityTitle, { type: type, "data-reltio-id": "merge-activity-title" }, isMinimized && React.createElement(EntityObject, { item: items[0] })),
|
|
12
12
|
!isMinimized && (React.createElement(CollapsibleActivityRecords, { activityUri: uri, items: items, RecordComponent: PotentialMatchRecord }))));
|
|
13
13
|
};
|
package/esm/features/activity-log/ActivitiesFactory/components/MergeActivity/MergeActivity.test.js
CHANGED
|
@@ -1,108 +1,87 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
13
|
+
import { render, screen, within } from '@testing-library/react';
|
|
14
|
+
import { MdmModuleProvider } from '../../../../../contexts/MdmModuleContext';
|
|
4
15
|
import { ActivityTypes } from '../../../types';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
uri: 'activities/8dcbdbce-80ac-4a2c-95f3-e75383fbd10e',
|
|
35
|
-
user: 'denis.tkachev',
|
|
36
|
-
label: '',
|
|
37
|
-
description: '',
|
|
38
|
-
timestamp: 1623153008977,
|
|
39
|
-
items: [
|
|
40
|
-
{
|
|
41
|
-
id: '3Ldt0URn',
|
|
42
|
-
user: 'denis.tkachev',
|
|
43
|
-
method: 'POST',
|
|
44
|
-
url: '/reltio/api/uitest3/entities/_same',
|
|
45
|
-
clientType: 'Reltio UI',
|
|
46
|
-
timestamp: 1623153008977,
|
|
47
|
-
objectUri: 'entities/1BTrULsq',
|
|
48
|
-
objectType: 'configuration/entityTypes/HCP',
|
|
49
|
-
objectLabel: 'Long,',
|
|
50
|
-
data: {
|
|
51
|
-
mergeReason: 'Merge by hand',
|
|
52
|
-
mergeType: 'MANUAL',
|
|
53
|
-
potentialMatches: 'entities/17U7U95d',
|
|
54
|
-
'entities/17U7U95d': 'Potential match test,',
|
|
55
|
-
type: 'ENTITIES_MERGED_MANUALLY'
|
|
56
|
-
},
|
|
57
|
-
eventId: '1623153008977_03D3dbM'
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
itemsTotal: 1
|
|
61
|
-
};
|
|
62
|
-
var dataNewUri = {
|
|
63
|
-
uri: 'activities/9449a5d7-1c72-4256-b26a-8b0e95c14899',
|
|
64
|
-
user: 'marat.ahmetzyanov',
|
|
65
|
-
label: '',
|
|
66
|
-
description: '',
|
|
67
|
-
timestamp: 1623154966758,
|
|
68
|
-
items: [
|
|
69
|
-
{
|
|
70
|
-
id: '30tEIJXx',
|
|
71
|
-
user: 'marat.ahmetzyanov',
|
|
72
|
-
method: 'POST',
|
|
73
|
-
url: '/reltio/api/uitest3/entities/1futW9kc/_unmerge',
|
|
74
|
-
clientType: 'Reltio UI',
|
|
75
|
-
timestamp: 1623154966758,
|
|
76
|
-
objectUri: 'entities/1futW9kc',
|
|
77
|
-
objectType: 'configuration/entityTypes/HCP',
|
|
78
|
-
objectLabel: 'HCP DT 1,',
|
|
79
|
-
data: {
|
|
80
|
-
'entities/2eIQy30G': 'HCP DT 2,',
|
|
81
|
-
newUri: 'entities/2eIQy30G',
|
|
82
|
-
type: 'ENTITIES_SPLITTED'
|
|
83
|
-
},
|
|
84
|
-
eventId: '1623154966758_02lA3ja'
|
|
85
|
-
}
|
|
86
|
-
],
|
|
87
|
-
itemsTotal: 1
|
|
16
|
+
import { CollapsibleItemsProvider } from '../../../contexts/CollapsibleItemsContext';
|
|
17
|
+
import { MergeActivity } from './MergeActivity';
|
|
18
|
+
var defaultItem = {
|
|
19
|
+
id: '5C94p4Yp',
|
|
20
|
+
objectUri: 'entities/1PN94HrW',
|
|
21
|
+
objectLabel: 'object label',
|
|
22
|
+
timestamp: 1620711408828,
|
|
23
|
+
data: { type: ActivityTypes.ENTITIES_MERGED_ON_THE_FLY }
|
|
24
|
+
};
|
|
25
|
+
var defaultData = {
|
|
26
|
+
uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
|
|
27
|
+
user: 'marat.ahmetzyanov',
|
|
28
|
+
timestamp: 1620711408828,
|
|
29
|
+
items: [defaultItem],
|
|
30
|
+
itemsTotal: 1
|
|
31
|
+
};
|
|
32
|
+
var defaultProps = {
|
|
33
|
+
data: defaultData,
|
|
34
|
+
type: ActivityTypes.ENTITIES_MERGED_ON_THE_FLY
|
|
35
|
+
};
|
|
36
|
+
var defaultMdmValues = {
|
|
37
|
+
uiPath: 'https://reltio.com/nui'
|
|
38
|
+
};
|
|
39
|
+
var setUp = function (_a) {
|
|
40
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.props, props = _c === void 0 ? defaultProps : _c, _d = _b.mdmValues, mdmValues = _d === void 0 ? defaultMdmValues : _d;
|
|
41
|
+
var Providers = function (_a) {
|
|
42
|
+
var children = _a.children;
|
|
43
|
+
return (React.createElement(MdmModuleProvider, { values: mdmValues },
|
|
44
|
+
React.createElement(CollapsibleItemsProvider, null, children)));
|
|
88
45
|
};
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
46
|
+
return render(React.createElement(MergeActivity, __assign({}, props)), { wrapper: Providers });
|
|
47
|
+
};
|
|
48
|
+
describe('Merge activity tests', function () {
|
|
49
|
+
it('should render minimized if itemsTotal is 1 and there are not potentialMatches or newUri fields', function () {
|
|
50
|
+
setUp();
|
|
51
|
+
var title = screen.getByTestId('merge-activity-title');
|
|
52
|
+
within(title).getByText('object label');
|
|
53
|
+
within(title).getByText('Profile merged on the fly');
|
|
54
|
+
});
|
|
55
|
+
it('should render maximized if itemsTotal is 1 but there is potentialMatches field', function () {
|
|
56
|
+
var props = __assign(__assign({}, defaultProps), { data: __assign(__assign({}, defaultData), { items: [
|
|
57
|
+
__assign(__assign({}, defaultItem), { data: {
|
|
58
|
+
type: ActivityTypes.POTENTIAL_MATCHES_FOUND,
|
|
59
|
+
potentialMatches: 'entities/sOoSQYm',
|
|
60
|
+
'entities/sOoSQYm': 'entity label 1'
|
|
61
|
+
} })
|
|
62
|
+
] }) });
|
|
63
|
+
setUp({ props: props });
|
|
64
|
+
var title = screen.getByTestId('merge-activity-title');
|
|
65
|
+
within(title).getByText('Profile merged on the fly');
|
|
66
|
+
expect(within(title).queryByText('object label')).not.toBeInTheDocument();
|
|
67
|
+
var record = screen.getByTestId('reltio-activity-log-record');
|
|
68
|
+
within(record).getByText('object label');
|
|
69
|
+
expect(screen.getByTestId('potential-matches-field')).toHaveTextContent('Matches found:entity label 1');
|
|
93
70
|
});
|
|
94
|
-
it('should render
|
|
95
|
-
var
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
expect(
|
|
106
|
-
|
|
71
|
+
it('should render maximized if itemsTotal is 1 but there is newUri field', function () {
|
|
72
|
+
var props = __assign(__assign({}, defaultProps), { data: __assign(__assign({}, defaultData), { items: [
|
|
73
|
+
__assign(__assign({}, defaultItem), { data: {
|
|
74
|
+
type: ActivityTypes.ENTITIES_SPLITTED,
|
|
75
|
+
newUri: 'entities/sOoSQYm',
|
|
76
|
+
'entities/sOoSQYm': 'entity label 1'
|
|
77
|
+
} })
|
|
78
|
+
] }) });
|
|
79
|
+
setUp({ props: props });
|
|
80
|
+
var title = screen.getByTestId('merge-activity-title');
|
|
81
|
+
within(title).getByText('Profile merged on the fly');
|
|
82
|
+
expect(within(title).queryByText('object label')).not.toBeInTheDocument();
|
|
83
|
+
var record = screen.getByTestId('reltio-activity-log-record');
|
|
84
|
+
within(record).getByText('object label');
|
|
85
|
+
expect(screen.getByTestId('potential-matches-field')).toHaveTextContent('Un-merged with:entity label 1');
|
|
107
86
|
});
|
|
108
87
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
type Props = {
|
|
2
|
+
type Props = Omit<React.ComponentPropsWithoutRef<'span'>, 'className'> & {
|
|
3
3
|
label: string;
|
|
4
4
|
};
|
|
5
|
-
export declare const ObjectLabel: ({ label }: Props) => React.JSX.Element;
|
|
5
|
+
export declare const ObjectLabel: ({ label, ...restProps }: Props) => React.JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,7 +1,29 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
1
23
|
import React from 'react';
|
|
2
24
|
import { useStyles } from './styles';
|
|
3
25
|
export var ObjectLabel = function (_a) {
|
|
4
|
-
var label = _a.label;
|
|
26
|
+
var label = _a.label, restProps = __rest(_a, ["label"]);
|
|
5
27
|
var styles = useStyles();
|
|
6
|
-
return React.createElement("span", { className: styles.objectLabel }, label);
|
|
28
|
+
return (React.createElement("span", __assign({ className: styles.objectLabel }, restProps), label));
|
|
7
29
|
};
|
|
@@ -4,7 +4,7 @@ import { CollapsibleActivityRecords } from '../../../CollapsibleActivityRecords'
|
|
|
4
4
|
import { PotentialMatchRecord } from '../../../PotentialMatchRecord';
|
|
5
5
|
export var PotentialMatchActivity = function (_a) {
|
|
6
6
|
var type = _a.type, data = _a.data;
|
|
7
|
-
return (React.createElement("div",
|
|
7
|
+
return (React.createElement("div", { "data-reltio-id": "potential-match-activity" },
|
|
8
8
|
React.createElement(ActivityTitle, { type: type }),
|
|
9
9
|
React.createElement(CollapsibleActivityRecords, { activityUri: data.uri, items: data.items, RecordComponent: PotentialMatchRecord })));
|
|
10
10
|
};
|