@centreon/ui 24.12.2 → 24.12.4
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@centreon/ui",
|
|
3
|
-
"version": "24.12.
|
|
3
|
+
"version": "24.12.4",
|
|
4
4
|
"description": "Centreon UI Components",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update:deps": "pnpx npm-check-updates -i --format group",
|
|
@@ -51,72 +51,72 @@
|
|
|
51
51
|
],
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@cypress/react": "^8.0.2",
|
|
54
|
-
"@cypress/webpack-dev-server": "^3.
|
|
55
|
-
"@faker-js/faker": "^
|
|
56
|
-
"@mdx-js/react": "^3.0
|
|
54
|
+
"@cypress/webpack-dev-server": "^3.11.0",
|
|
55
|
+
"@faker-js/faker": "^9.3.0",
|
|
56
|
+
"@mdx-js/react": "^3.1.0",
|
|
57
57
|
"@simonsmith/cypress-image-snapshot": "^9.1.0",
|
|
58
|
-
"@storybook/addon-a11y": "^8.
|
|
59
|
-
"@storybook/addon-docs": "^8.
|
|
60
|
-
"@storybook/addon-essentials": "^8.
|
|
61
|
-
"@storybook/addon-interactions": "^8.
|
|
62
|
-
"@storybook/addon-themes": "^8.
|
|
63
|
-
"@storybook/blocks": "^8.
|
|
64
|
-
"@storybook/manager-api": "^8.
|
|
58
|
+
"@storybook/addon-a11y": "^8.4.7",
|
|
59
|
+
"@storybook/addon-docs": "^8.4.7",
|
|
60
|
+
"@storybook/addon-essentials": "^8.4.7",
|
|
61
|
+
"@storybook/addon-interactions": "^8.4.7",
|
|
62
|
+
"@storybook/addon-themes": "^8.4.7",
|
|
63
|
+
"@storybook/blocks": "^8.4.7",
|
|
64
|
+
"@storybook/manager-api": "^8.4.7",
|
|
65
65
|
"@storybook/mdx2-csf": "^1.1.0",
|
|
66
|
-
"@storybook/preview-api": "^8.
|
|
67
|
-
"@storybook/react": "^8.
|
|
68
|
-
"@storybook/react-vite": "^8.
|
|
69
|
-
"@storybook/test": "^8.
|
|
70
|
-
"@storybook/test-runner": "^0.
|
|
71
|
-
"@storybook/theming": "^8.
|
|
66
|
+
"@storybook/preview-api": "^8.4.7",
|
|
67
|
+
"@storybook/react": "^8.4.7",
|
|
68
|
+
"@storybook/react-vite": "^8.4.7",
|
|
69
|
+
"@storybook/test": "^8.4.7",
|
|
70
|
+
"@storybook/test-runner": "^0.20.1",
|
|
71
|
+
"@storybook/theming": "^8.4.7",
|
|
72
72
|
"@testing-library/cypress": "^10.0.2",
|
|
73
|
-
"@testing-library/jest-dom": "^6.
|
|
74
|
-
"@testing-library/react": "^16.
|
|
73
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
74
|
+
"@testing-library/react": "^16.1.0",
|
|
75
75
|
"@testing-library/react-hooks": "^8.0.1",
|
|
76
|
-
"@types/jest": "^29.5.
|
|
77
|
-
"@types/mocha": "^10.0.
|
|
78
|
-
"@types/ramda": "^0.30.
|
|
76
|
+
"@types/jest": "^29.5.14",
|
|
77
|
+
"@types/mocha": "^10.0.10",
|
|
78
|
+
"@types/ramda": "^0.30.2",
|
|
79
79
|
"@types/react": "^18.3.3",
|
|
80
80
|
"@types/testing-library__jest-dom": "^6.0.0",
|
|
81
|
-
"@vitejs/plugin-react": "^4.3.
|
|
82
|
-
"@vitejs/plugin-react-swc": "^3.7.
|
|
83
|
-
"chai": "^5.1.
|
|
84
|
-
"cypress": "^13.
|
|
81
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
82
|
+
"@vitejs/plugin-react-swc": "^3.7.2",
|
|
83
|
+
"chai": "^5.1.2",
|
|
84
|
+
"cypress": "^13.16.1",
|
|
85
85
|
"identity-obj-proxy": "^3.0.0",
|
|
86
86
|
"jest-transform-stub": "^2.0.0",
|
|
87
87
|
"mochawesome": "^7.1.3",
|
|
88
|
-
"msw": "2.
|
|
89
|
-
"msw-storybook-addon": "^2.0.
|
|
88
|
+
"msw": "2.6.8",
|
|
89
|
+
"msw-storybook-addon": "^2.0.4",
|
|
90
90
|
"react": "^18.3.1",
|
|
91
91
|
"react-dom": "^18.3.1",
|
|
92
|
-
"react-test-renderer": "^
|
|
92
|
+
"react-test-renderer": "^19.0.0",
|
|
93
93
|
"remark-gfm": "^4.0.0",
|
|
94
|
-
"speed-measure-vite-plugin": "^1.0
|
|
95
|
-
"storybook": "^8.
|
|
94
|
+
"speed-measure-vite-plugin": "^1.1.0",
|
|
95
|
+
"storybook": "^8.4.7",
|
|
96
96
|
"storybook-addon-mock": "^5.0.0",
|
|
97
97
|
"storybook-dark-mode": "^4.0.2",
|
|
98
|
-
"style-dictionary": "^4.0
|
|
98
|
+
"style-dictionary": "^4.3.0",
|
|
99
99
|
"ts-node": "^10.9.2",
|
|
100
100
|
"use-resize-observer": "^9.1.0",
|
|
101
|
-
"vite": "^
|
|
101
|
+
"vite": "^6.0.3",
|
|
102
102
|
"vite-plugin-istanbul": "^6.0.2",
|
|
103
|
-
"vite-plugin-svgr": "^4.
|
|
103
|
+
"vite-plugin-svgr": "^4.3.0",
|
|
104
104
|
"vite-plugin-turbosnap": "^1.0.3"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
107
|
"@centreon/ui-context": "file:../ui-context"
|
|
108
108
|
},
|
|
109
109
|
"dependencies": {
|
|
110
|
-
"@lexical/html": "^0.
|
|
111
|
-
"@lexical/link": "^0.
|
|
112
|
-
"@lexical/list": "^0.
|
|
113
|
-
"@lexical/react": "^0.
|
|
114
|
-
"@lexical/rich-text": "^0.
|
|
115
|
-
"@lexical/selection": "^0.
|
|
116
|
-
"@lexical/utils": "^0.
|
|
117
|
-
"@mui/material": "^
|
|
118
|
-
"@react-spring/web": "^9.7.
|
|
119
|
-
"@visx/clip-path": "^3.
|
|
110
|
+
"@lexical/html": "^0.21.0",
|
|
111
|
+
"@lexical/link": "^0.21.0",
|
|
112
|
+
"@lexical/list": "^0.21.0",
|
|
113
|
+
"@lexical/react": "^0.21.0",
|
|
114
|
+
"@lexical/rich-text": "^0.21.0",
|
|
115
|
+
"@lexical/selection": "^0.21.0",
|
|
116
|
+
"@lexical/utils": "^0.21.0",
|
|
117
|
+
"@mui/material": "^6.2.0",
|
|
118
|
+
"@react-spring/web": "^9.7.5",
|
|
119
|
+
"@visx/clip-path": "^3.12.0",
|
|
120
120
|
"@visx/curve": "^3.12.0",
|
|
121
121
|
"@visx/event": "^3.12.0",
|
|
122
122
|
"@visx/group": "^3.12.0",
|
|
@@ -128,23 +128,23 @@
|
|
|
128
128
|
"@visx/shape": "^3.12.0",
|
|
129
129
|
"@visx/text": "^3.12.0",
|
|
130
130
|
"@visx/threshold": "^3.12.0",
|
|
131
|
-
"@visx/visx": "3.
|
|
131
|
+
"@visx/visx": "3.12.0",
|
|
132
132
|
"@visx/zoom": "^3.12.0",
|
|
133
133
|
"anylogger": "^1.0.11",
|
|
134
134
|
"d3-array": "3.2.4",
|
|
135
|
-
"dayjs": "^1.11.
|
|
135
|
+
"dayjs": "^1.11.13",
|
|
136
136
|
"highlight.js": "^11.10.0",
|
|
137
|
-
"html-react-parser": "^5.
|
|
137
|
+
"html-react-parser": "^5.2.0",
|
|
138
138
|
"humanize-duration": "^3.32.1",
|
|
139
|
-
"lexical": "^0.
|
|
139
|
+
"lexical": "^0.21.0",
|
|
140
140
|
"notistack": "^3.0.1",
|
|
141
141
|
"numeral": "^2.0.6",
|
|
142
142
|
"ramda": "0.30.1",
|
|
143
|
-
"react-grid-layout": "^1.
|
|
143
|
+
"react-grid-layout": "^1.5.0",
|
|
144
144
|
"react-resizable": "^3.0.5",
|
|
145
|
-
"react-router-dom": "
|
|
145
|
+
"react-router-dom": "6",
|
|
146
146
|
"react-transition-group": "^4.4.5",
|
|
147
|
-
"sanitize-html": "^2.13.
|
|
147
|
+
"sanitize-html": "^2.13.1",
|
|
148
148
|
"ulog": "^2.0.0-beta.19"
|
|
149
149
|
},
|
|
150
150
|
"jest-junit": {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* - Please do NOT serve this file on production.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
const PACKAGE_VERSION = '2.
|
|
12
|
-
const INTEGRITY_CHECKSUM = '
|
|
11
|
+
const PACKAGE_VERSION = '2.6.8'
|
|
12
|
+
const INTEGRITY_CHECKSUM = '00729d72e3b82faf54ca8b9621dbb96f'
|
|
13
13
|
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
|
|
14
14
|
const activeClientIds = new Set()
|
|
15
15
|
|
|
@@ -62,7 +62,12 @@ self.addEventListener('message', async function (event) {
|
|
|
62
62
|
|
|
63
63
|
sendToClient(client, {
|
|
64
64
|
type: 'MOCKING_ENABLED',
|
|
65
|
-
payload:
|
|
65
|
+
payload: {
|
|
66
|
+
client: {
|
|
67
|
+
id: client.id,
|
|
68
|
+
frameType: client.frameType,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
66
71
|
})
|
|
67
72
|
break
|
|
68
73
|
}
|
|
@@ -155,6 +160,10 @@ async function handleRequest(event, requestId) {
|
|
|
155
160
|
async function resolveMainClient(event) {
|
|
156
161
|
const client = await self.clients.get(event.clientId)
|
|
157
162
|
|
|
163
|
+
if (activeClientIds.has(event.clientId)) {
|
|
164
|
+
return client
|
|
165
|
+
}
|
|
166
|
+
|
|
158
167
|
if (client?.frameType === 'top-level') {
|
|
159
168
|
return client
|
|
160
169
|
}
|
|
@@ -183,12 +192,26 @@ async function getResponse(event, client, requestId) {
|
|
|
183
192
|
const requestClone = request.clone()
|
|
184
193
|
|
|
185
194
|
function passthrough() {
|
|
186
|
-
|
|
195
|
+
// Cast the request headers to a new Headers instance
|
|
196
|
+
// so the headers can be manipulated with.
|
|
197
|
+
const headers = new Headers(requestClone.headers)
|
|
198
|
+
|
|
199
|
+
// Remove the "accept" header value that marked this request as passthrough.
|
|
200
|
+
// This prevents request alteration and also keeps it compliant with the
|
|
201
|
+
// user-defined CORS policies.
|
|
202
|
+
const acceptHeader = headers.get('accept')
|
|
203
|
+
if (acceptHeader) {
|
|
204
|
+
const values = acceptHeader.split(',').map((value) => value.trim())
|
|
205
|
+
const filteredValues = values.filter(
|
|
206
|
+
(value) => value !== 'msw/passthrough',
|
|
207
|
+
)
|
|
187
208
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
209
|
+
if (filteredValues.length > 0) {
|
|
210
|
+
headers.set('accept', filteredValues.join(', '))
|
|
211
|
+
} else {
|
|
212
|
+
headers.delete('accept')
|
|
213
|
+
}
|
|
214
|
+
}
|
|
192
215
|
|
|
193
216
|
return fetch(requestClone, { headers })
|
|
194
217
|
}
|
|
@@ -80,7 +80,7 @@ describe('Form list', () => {
|
|
|
80
80
|
|
|
81
81
|
cy.findByLabelText('sort-0').should('be.visible');
|
|
82
82
|
cy.findByLabelText('delete-0').should('be.visible');
|
|
83
|
-
cy.contains('
|
|
83
|
+
cy.contains('Lavinia (Wiegand LLC)').should('be.visible');
|
|
84
84
|
|
|
85
85
|
cy.makeSnapshot();
|
|
86
86
|
});
|
|
@@ -94,18 +94,18 @@ describe('Form list', () => {
|
|
|
94
94
|
|
|
95
95
|
cy.findByLabelText('sort-0').should('be.visible');
|
|
96
96
|
cy.findByLabelText('delete-0').should('be.visible');
|
|
97
|
-
cy.contains('
|
|
97
|
+
cy.contains('Sammie (Crist - Beer)').should('be.visible');
|
|
98
98
|
cy.findByLabelText('sort-1').should('be.visible');
|
|
99
99
|
cy.findByLabelText('delete-1').should('be.visible');
|
|
100
|
-
cy.contains('
|
|
100
|
+
cy.contains('Waino (Quigley Group)').should('be.visible');
|
|
101
101
|
|
|
102
102
|
cy.moveSortableElementUsingAriaLabel({
|
|
103
103
|
ariaLabel: 'sort-0',
|
|
104
104
|
direction: 'down'
|
|
105
105
|
});
|
|
106
106
|
|
|
107
|
-
cy.contains('
|
|
108
|
-
cy.contains('
|
|
107
|
+
cy.contains('Waino (Quigley Group)').should('be.visible');
|
|
108
|
+
cy.contains('Sammie (Crist - Beer)').should('be.visible');
|
|
109
109
|
|
|
110
110
|
cy.makeSnapshot();
|
|
111
111
|
});
|
|
@@ -119,14 +119,14 @@ describe('Form list', () => {
|
|
|
119
119
|
|
|
120
120
|
cy.findByLabelText('sort-0').should('be.visible');
|
|
121
121
|
cy.findByLabelText('delete-0').should('be.visible');
|
|
122
|
-
cy.contains('
|
|
122
|
+
cy.contains('Elliott (Effertz, Deckow and Deckow)').should('be.visible');
|
|
123
123
|
cy.findByLabelText('sort-1').should('be.visible');
|
|
124
124
|
cy.findByLabelText('delete-1').should('be.visible');
|
|
125
|
-
cy.contains('
|
|
125
|
+
cy.contains('Leopoldo (Kemmer Inc)').should('be.visible');
|
|
126
126
|
|
|
127
127
|
cy.findByLabelText('delete-0').click();
|
|
128
128
|
|
|
129
|
-
cy.contains('
|
|
129
|
+
cy.contains('Elliott (Effertz, Deckow and Deckow)').should('not.exist');
|
|
130
130
|
|
|
131
131
|
cy.makeSnapshot();
|
|
132
132
|
});
|
|
@@ -7,10 +7,8 @@ import {
|
|
|
7
7
|
buildResult,
|
|
8
8
|
emptyAccessRights,
|
|
9
9
|
labels,
|
|
10
|
-
removedAccessRights,
|
|
11
10
|
roles,
|
|
12
|
-
simpleAccessRights
|
|
13
|
-
updatedAccessRights
|
|
11
|
+
simpleAccessRights
|
|
14
12
|
} from './storiesData';
|
|
15
13
|
|
|
16
14
|
const initialize = ({
|
|
@@ -18,7 +16,7 @@ const initialize = ({
|
|
|
18
16
|
loading = false
|
|
19
17
|
}): unknown => {
|
|
20
18
|
const cancel = cy.stub();
|
|
21
|
-
const save = cy.stub();
|
|
19
|
+
const save = cy.stub().as('save');
|
|
22
20
|
const change = cy.stub();
|
|
23
21
|
|
|
24
22
|
cy.interceptAPIRequest({
|
|
@@ -108,15 +106,15 @@ describe('Access rights', () => {
|
|
|
108
106
|
it('displays a removed chip when the corresponding icon is clicked', () => {
|
|
109
107
|
initialize({});
|
|
110
108
|
|
|
111
|
-
cy.findByTestId('remove-
|
|
109
|
+
cy.findByTestId('remove-Erin Monahan').should(
|
|
112
110
|
'have.attr',
|
|
113
111
|
'data-removed',
|
|
114
112
|
'false'
|
|
115
113
|
);
|
|
116
114
|
|
|
117
|
-
cy.findByTestId('remove-
|
|
115
|
+
cy.findByTestId('remove-Erin Monahan').click();
|
|
118
116
|
|
|
119
|
-
cy.findByTestId('remove-
|
|
117
|
+
cy.findByTestId('remove-Erin Monahan').should(
|
|
120
118
|
'have.attr',
|
|
121
119
|
'data-removed',
|
|
122
120
|
'true'
|
|
@@ -129,9 +127,9 @@ describe('Access rights', () => {
|
|
|
129
127
|
it('restores the contact when the contact is removed and the corresponding icon is clicked', () => {
|
|
130
128
|
initialize({});
|
|
131
129
|
|
|
132
|
-
cy.findByTestId('remove-
|
|
130
|
+
cy.findByTestId('remove-Erin Monahan').click();
|
|
133
131
|
|
|
134
|
-
cy.findByTestId('remove-
|
|
132
|
+
cy.findByTestId('remove-Erin Monahan').should(
|
|
135
133
|
'have.attr',
|
|
136
134
|
'data-removed',
|
|
137
135
|
'false'
|
|
@@ -144,9 +142,9 @@ describe('Access rights', () => {
|
|
|
144
142
|
it('submits the new acces rights list without the removed contact', () => {
|
|
145
143
|
const { save } = initialize({});
|
|
146
144
|
|
|
147
|
-
cy.findByTestId('remove-
|
|
145
|
+
cy.findByTestId('remove-Erin Monahan').click();
|
|
148
146
|
|
|
149
|
-
cy.findByTestId('remove-
|
|
147
|
+
cy.findByTestId('remove-Erin Monahan').should(
|
|
150
148
|
'have.attr',
|
|
151
149
|
'data-removed',
|
|
152
150
|
'true'
|
|
@@ -154,11 +152,11 @@ describe('Access rights', () => {
|
|
|
154
152
|
cy.contains(labels.list.removed).should('be.visible');
|
|
155
153
|
cy.contains('1 removed').should('be.visible');
|
|
156
154
|
|
|
157
|
-
cy.contains(labels.actions.save)
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
155
|
+
cy.contains(labels.actions.save).click();
|
|
156
|
+
|
|
157
|
+
cy.get('@save').then(() => {
|
|
158
|
+
expect(save).to.have.been.called;
|
|
159
|
+
});
|
|
162
160
|
|
|
163
161
|
cy.makeSnapshot();
|
|
164
162
|
});
|
|
@@ -166,17 +164,17 @@ describe('Access rights', () => {
|
|
|
166
164
|
it('submits the new acces rights list with the updated contact', () => {
|
|
167
165
|
const { save } = initialize({});
|
|
168
166
|
|
|
169
|
-
cy.findByTestId('remove-
|
|
170
|
-
cy.findByTestId('role-
|
|
167
|
+
cy.findByTestId('remove-Erin Monahan').click();
|
|
168
|
+
cy.findByTestId('role-Erin Monahan').parent().click();
|
|
171
169
|
|
|
172
|
-
cy.get('li[data-value="
|
|
170
|
+
cy.get('li[data-value="viewer"]').click();
|
|
173
171
|
cy.contains(labels.list.updated).should('be.visible');
|
|
174
172
|
cy.contains('1 updated').should('be.visible');
|
|
175
173
|
|
|
176
174
|
cy.contains(labels.actions.save)
|
|
177
175
|
.click()
|
|
178
176
|
.then(() => {
|
|
179
|
-
expect(save).to.have.been.
|
|
177
|
+
expect(save).to.have.been.called;
|
|
180
178
|
});
|
|
181
179
|
|
|
182
180
|
cy.makeSnapshot();
|
|
@@ -185,12 +183,12 @@ describe('Access rights', () => {
|
|
|
185
183
|
it('removes the updated chip when the contact role is updated and its initial role is assigned back', () => {
|
|
186
184
|
initialize({});
|
|
187
185
|
|
|
188
|
-
cy.findByTestId('role-
|
|
186
|
+
cy.findByTestId('role-Erin Monahan').parent().click();
|
|
189
187
|
|
|
190
|
-
cy.get('li[data-value="
|
|
188
|
+
cy.get('li[data-value="viewer"]').click();
|
|
191
189
|
cy.contains(labels.list.updated).should('be.visible');
|
|
192
190
|
|
|
193
|
-
cy.get('li[data-value="
|
|
191
|
+
cy.get('li[data-value="editor"]').click();
|
|
194
192
|
cy.contains(labels.list.updated).should('not.exist');
|
|
195
193
|
|
|
196
194
|
cy.makeSnapshot();
|
|
@@ -275,10 +273,10 @@ describe('Access rights', () => {
|
|
|
275
273
|
|
|
276
274
|
cy.contains('Entity Group 10').should('be.visible');
|
|
277
275
|
|
|
278
|
-
cy.findByTestId('role-
|
|
279
|
-
cy.get('li[data-value="
|
|
276
|
+
cy.findByTestId('role-Erin Monahan').parent().click();
|
|
277
|
+
cy.get('li[data-value="viewer"]').click();
|
|
280
278
|
|
|
281
|
-
cy.findByTestId('remove-
|
|
279
|
+
cy.findByTestId('remove-Maryann Ferry').click();
|
|
282
280
|
|
|
283
281
|
cy.contains('3 added | 1 updated | 1 removed').should('be.visible');
|
|
284
282
|
|
|
@@ -136,41 +136,43 @@ export const roles = [
|
|
|
136
136
|
];
|
|
137
137
|
|
|
138
138
|
export const removedAccessRights = [
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
139
|
+
[
|
|
140
|
+
{
|
|
141
|
+
email: 'Dannie_Schumm@gmail.com',
|
|
142
|
+
id: 0,
|
|
143
|
+
isContactGroup: true,
|
|
144
|
+
name: 'Desiree Hauck II',
|
|
145
|
+
role: 'viewer'
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
email: 'Dulce48@gmail.com',
|
|
149
|
+
id: 2,
|
|
150
|
+
isContactGroup: false,
|
|
151
|
+
name: 'Maryann Ferry',
|
|
152
|
+
role: 'viewer'
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
email: 'Lora.Leuschke83@yahoo.com',
|
|
156
|
+
id: 3,
|
|
157
|
+
isContactGroup: false,
|
|
158
|
+
name: 'Angelica Pagac',
|
|
159
|
+
role: 'editor'
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
email: 'Daniela38@yahoo.com',
|
|
163
|
+
id: 4,
|
|
164
|
+
isContactGroup: false,
|
|
165
|
+
name: 'Ginger Walsh I',
|
|
166
|
+
role: 'viewer'
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
email: 'Reanna9@yahoo.com',
|
|
170
|
+
id: 5,
|
|
171
|
+
isContactGroup: true,
|
|
172
|
+
name: 'Luther Heller',
|
|
173
|
+
role: 'editor'
|
|
174
|
+
}
|
|
175
|
+
]
|
|
174
176
|
];
|
|
175
177
|
|
|
176
178
|
export const updatedAccessRights = [
|
package/test/setupTests.js
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
/* eslint-disable no-undef */
|
|
3
3
|
|
|
4
4
|
import '@testing-library/jest-dom';
|
|
5
|
+
import { TextDecoder, TextEncoder } from 'util';
|
|
5
6
|
import i18n from 'i18next';
|
|
6
|
-
import { initReactI18next } from 'react-i18next';
|
|
7
7
|
import fetchMock from 'jest-fetch-mock';
|
|
8
|
+
import { initReactI18next } from 'react-i18next';
|
|
8
9
|
|
|
9
10
|
const mockedMatchMedia = () => ({
|
|
10
11
|
addListener: () => {},
|
|
@@ -14,6 +15,8 @@ const mockedMatchMedia = () => ({
|
|
|
14
15
|
|
|
15
16
|
window.matchMedia = window.matchMedia || mockedMatchMedia;
|
|
16
17
|
|
|
18
|
+
Object.assign(global, { TextDecoder, TextEncoder });
|
|
19
|
+
|
|
17
20
|
document.createRange = () => ({
|
|
18
21
|
commonAncestorContainer: {
|
|
19
22
|
nodeName: 'BODY',
|