@saooti/octopus-sdk 42.0.0-beta → 42.0.0-beta2
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/eslint-config.d.ts +3 -0
- package/eslint-config.mjs +54 -0
- package/package.json +5 -2
- package/tests/api/podcastApi.spec.ts +43 -0
- package/tests/api/transcriptionApi.spec.ts +58 -0
- package/tests/components/composable/player/usePlayerTranscript.spec.ts +238 -0
- package/tests/components/composable/useAdvancedParamInit.spec.ts +91 -0
- package/tests/components/composable/usePresentationItem.spec.ts +164 -0
- package/tests/components/composable/useRights.spec.ts +838 -0
- package/tests/components/composable/useSeasonsManagement.spec.ts +35 -0
- package/tests/components/composable/useTranslation.spec.ts +209 -0
- package/tests/components/display/RightsIndicator.spec.ts +481 -0
- package/tests/components/display/comments/item/CommentMoreActions.spec.ts +75 -0
- package/tests/components/display/comments/modal/RecaptchaModal.spec.ts +43 -0
- package/tests/components/display/emission/EmissionItem.spec.ts +54 -0
- package/tests/components/display/emission/EmissionPresentationItem.spec.ts +46 -0
- package/tests/components/display/filter/AdvancedSearch.spec.ts +187 -0
- package/tests/components/display/podcasts/PodcastFilterList.spec.ts +34 -0
- package/tests/components/display/podcasts/PodcastInlineListTemplate.spec.ts +24 -0
- package/tests/components/display/podcasts/PodcastItemInfo.spec.ts +99 -0
- package/tests/components/display/podcasts/PodcastModuleBox.spec.ts +279 -0
- package/tests/components/display/podcasts/PodcastPresentationList.spec.ts +108 -0
- package/tests/components/display/podcasts/PodcastRawTranscript.spec.ts +254 -0
- package/tests/components/display/sharing/ShareNewsletter.spec.ts +68 -0
- package/tests/components/display/sharing/SharePlayer.spec.ts +59 -0
- package/tests/components/display/sharing/SharePlayerRadio.spec.ts +55 -0
- package/tests/components/form/ClassicButtonGroup.spec.ts +78 -0
- package/tests/components/form/ClassicInputText.spec.ts +24 -0
- package/tests/components/form/OctopusMultiselect.spec.ts +506 -0
- package/tests/components/form/OctopusSelect.spec.ts +240 -0
- package/tests/components/layouts/PresentationItem.spec.ts +37 -0
- package/tests/components/misc/ClassicAvatar.spec.ts +68 -0
- package/tests/components/misc/ClassicPopover.spec.ts +260 -0
- package/tests/components/misc/FooterSection.spec.ts +49 -0
- package/tests/components/misc/HomeDropdown.spec.ts +44 -0
- package/tests/components/misc/modal/ClipboardModal.spec.ts +51 -0
- package/tests/components/misc/player/PlayerLarge.spec.ts +72 -0
- package/tests/components/pages/EmissionPage.spec.ts +253 -0
- package/tests/components/pages/EmissionsPage.spec.ts +18 -0
- package/tests/components/pages/ParticipantPage.spec.ts +65 -0
- package/tests/components/pages/PlaylistPage.spec.ts +60 -0
- package/tests/components/pages/PodcastPage.spec.ts +89 -0
- package/tests/components/pages/PodcastsPage.spec.ts +18 -0
- package/tests/components/pages/RadioPage.spec.ts +65 -0
- package/tests/components/pages/SmartLinkPage.spec.ts +90 -0
- package/tests/helper/language.spec.ts +45 -0
- package/tests/index.ts +9 -0
- package/tests/localisation.ts +10 -0
- package/tests/mocks/i18n.ts +13 -0
- package/tests/mocks/index.ts +11 -0
- package/tests/mocks/rights.ts +17 -0
- package/tests/mocks/useAdvancedParamInit.ts +22 -0
- package/tests/mocks/useRouter.ts +11 -0
- package/tests/stores/CacheStore.spec.ts +110 -0
- package/tests/utils.ts +178 -0
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
// Must be before any other imports so vitest can hoist the mock correctly.
|
|
2
|
+
// We override the i18n mock here (rather than importing @tests/mocks/i18n)
|
|
3
|
+
// because RightsIndicator also calls `te`, which the shared mock does not provide.
|
|
4
|
+
import { vi } from 'vitest';
|
|
5
|
+
|
|
6
|
+
vi.mock('vue-i18n', () => {
|
|
7
|
+
const { ref } = require('vue');
|
|
8
|
+
// `te` returns true for entity-specific keys so we can verify that branch.
|
|
9
|
+
return {
|
|
10
|
+
useI18n: () => ({
|
|
11
|
+
t: (key: string) => key,
|
|
12
|
+
te: (key: string) => key.startsWith('RightsIndicator -'),
|
|
13
|
+
locale: ref('fr')
|
|
14
|
+
}),
|
|
15
|
+
createI18n: () => {}
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
import { describe, expect, it } from 'vitest';
|
|
20
|
+
import { mount, setupAuthStore } from '@tests/utils';
|
|
21
|
+
import { mockEmission, mockPodcast } from '@tests/mocks/rights';
|
|
22
|
+
import { useAuthStore } from '@/stores/AuthStore';
|
|
23
|
+
import RightsIndicator from '@/components/display/RightsIndicator.vue';
|
|
24
|
+
import type { Podcast } from '@/stores/class/general/podcast';
|
|
25
|
+
import type { Mix } from '@/stores/class/radio/mix';
|
|
26
|
+
import type { PlaylistMedia } from '@/stores/class/radio/playlistMedia';
|
|
27
|
+
import type { Cartouchier } from '@/stores/class/cartouchier/cartouchier';
|
|
28
|
+
import type { Media } from '@/stores/class/general/media';
|
|
29
|
+
import type { Emission } from '@/stores/class/general/emission';
|
|
30
|
+
|
|
31
|
+
// ── Fixtures ─────────────────────────────────────────────────────────────────
|
|
32
|
+
|
|
33
|
+
const ownUserId = 'test-user-123';
|
|
34
|
+
|
|
35
|
+
const ownPodcast = mockPodcast({ podcastId: 1, createdByUserId: ownUserId, valid: true });
|
|
36
|
+
const otherPodcast = mockPodcast({ podcastId: 2, createdByUserId: 'other-user', valid: true });
|
|
37
|
+
|
|
38
|
+
const ownScopedPodcast = mockPodcast({ podcastId: 3, createdByUserId: ownUserId, valid: true, rubriqueIds: [10] });
|
|
39
|
+
const emissionScopedPodcast = mockPodcast({
|
|
40
|
+
podcastId: 4, createdByUserId: ownUserId, valid: true,
|
|
41
|
+
emission: mockEmission({ rubriqueIds: [20] })
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const ownEmission = mockEmission({ emissionId: 1, createdByUserId: ownUserId });
|
|
45
|
+
const otherEmission = mockEmission({ emissionId: 2, createdByUserId: 'other-user' });
|
|
46
|
+
const scopedEmission = mockEmission({ emissionId: 3, createdByUserId: ownUserId, rubriqueIds: [10] });
|
|
47
|
+
|
|
48
|
+
const ownCartouchier = {
|
|
49
|
+
cartouchierId: 1, ownerId: ownUserId,
|
|
50
|
+
title: 'c', organisationId: 'o', cartouches: {}
|
|
51
|
+
} as Cartouchier;
|
|
52
|
+
const otherCartouchier = {
|
|
53
|
+
cartouchierId: 2, ownerId: 'other-user',
|
|
54
|
+
title: 'c', organisationId: 'o', cartouches: {}
|
|
55
|
+
} as Cartouchier;
|
|
56
|
+
|
|
57
|
+
const ownMix = {
|
|
58
|
+
mixId: 1, ownerId: ownUserId,
|
|
59
|
+
color: '', description: '', name: '', organisationId: 'o', samplings: []
|
|
60
|
+
} as Mix;
|
|
61
|
+
const otherMix = {
|
|
62
|
+
mixId: 2, ownerId: 'other-user',
|
|
63
|
+
color: '', description: '', name: '', organisationId: 'o', samplings: []
|
|
64
|
+
} as Mix;
|
|
65
|
+
|
|
66
|
+
const ownPlaylistMedia = {
|
|
67
|
+
playlistId: 1, ownerId: ownUserId,
|
|
68
|
+
color: '', description: '', name: '', organisationId: 'o', medias: []
|
|
69
|
+
} as PlaylistMedia;
|
|
70
|
+
const otherPlaylistMedia = {
|
|
71
|
+
playlistId: 2, ownerId: 'other-user',
|
|
72
|
+
color: '', description: '', name: '', organisationId: 'o', medias: []
|
|
73
|
+
} as PlaylistMedia;
|
|
74
|
+
|
|
75
|
+
const ownMedia = { mediaId: 1, ownerId: ownUserId } as Media;
|
|
76
|
+
const otherMedia = { mediaId: 2, ownerId: 'other-user' } as Media;
|
|
77
|
+
|
|
78
|
+
// ── Helper ───────────────────────────────────────────────────────────────────
|
|
79
|
+
|
|
80
|
+
async function mountWith(props: Record<string, unknown>, roles: string[], scope: number[] = []) {
|
|
81
|
+
return mount(RightsIndicator, {
|
|
82
|
+
props: { text: true, ...props },
|
|
83
|
+
beforeMount: async () => {
|
|
84
|
+
await setupAuthStore({ roles, scope })();
|
|
85
|
+
useAuthStore().$patch({
|
|
86
|
+
authProfile: { userId: ownUserId, scope },
|
|
87
|
+
authParam: { accessToken: 'test-token', refreshToken: undefined, expiration: undefined },
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
94
|
+
describe('RightsIndicator', () => {
|
|
95
|
+
|
|
96
|
+
// ── Entity detection ─────────────────────────────────────────────────────
|
|
97
|
+
describe('entity detection', () => {
|
|
98
|
+
it('detects podcast entity and grants access for privileged role', async () => {
|
|
99
|
+
const wrapper = await mountWith({ action: 'create', podcast: ownPodcast }, ['PRODUCTION']);
|
|
100
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
it('detects emission entity and grants access for privileged role', async () => {
|
|
104
|
+
const wrapper = await mountWith({ action: 'create', emission: ownEmission }, ['PRODUCTION']);
|
|
105
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
it('detects cartouchier entity and grants access for privileged role', async () => {
|
|
109
|
+
const wrapper = await mountWith({ action: 'create', cartouchier: ownCartouchier }, ['PRODUCTION']);
|
|
110
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
it('detects mix entity and grants access for privileged role', async () => {
|
|
114
|
+
const wrapper = await mountWith({ action: 'create', mix: ownMix }, ['ADMIN']);
|
|
115
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
it('detects playlistMedia entity and grants access for privileged role', async () => {
|
|
119
|
+
const wrapper = await mountWith({ action: 'create', playlistMedia: ownPlaylistMedia }, ['PRODUCTION']);
|
|
120
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
it('detects media entity and grants access for privileged role', async () => {
|
|
124
|
+
const wrapper = await mountWith({ action: 'create', media: ownMedia }, ['PRODUCTION']);
|
|
125
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
it('shows alert when entity prop is boolean false (no entity)', async () => {
|
|
129
|
+
// `podcast: false` — no real entity, so entity segment is undefined → DeniedNoRight
|
|
130
|
+
const wrapper = await mountWith({ action: 'create', podcast: false }, ['ADMIN']);
|
|
131
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// ── action = 'create' ────────────────────────────────────────────────────
|
|
136
|
+
describe("action = 'create'", () => {
|
|
137
|
+
it('hides alert when user has create right for podcast', async () => {
|
|
138
|
+
const wrapper = await mountWith({ action: 'create', podcast: ownPodcast }, ['PRODUCTION']);
|
|
139
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
it('shows alert when user lacks create right for podcast', async () => {
|
|
143
|
+
const wrapper = await mountWith({ action: 'create', podcast: ownPodcast }, ['PLAYLISTS']);
|
|
144
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
it('hides alert when user has create right for emission', async () => {
|
|
148
|
+
const wrapper = await mountWith({ action: 'create', emission: ownEmission }, ['RESTRICTED_PRODUCTION']);
|
|
149
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
it('shows alert when user lacks create right for emission', async () => {
|
|
153
|
+
const wrapper = await mountWith({ action: 'create', emission: ownEmission }, ['PLAYLISTS']);
|
|
154
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
it('hides alert when user has create right for mix', async () => {
|
|
158
|
+
const wrapper = await mountWith({ action: 'create', mix: ownMix }, ['RADIO']);
|
|
159
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
it('shows alert when user lacks create right for mix', async () => {
|
|
163
|
+
// PRODUCTION is not in the mix create allowlist (only ADMIN and RADIO)
|
|
164
|
+
const wrapper = await mountWith({ action: 'create', mix: ownMix }, ['PRODUCTION']);
|
|
165
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
it('hides alert when user has create right for media', async () => {
|
|
169
|
+
const wrapper = await mountWith({ action: 'create', media: ownMedia }, ['RADIO']);
|
|
170
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
it('shows alert when user lacks create right for media', async () => {
|
|
174
|
+
const wrapper = await mountWith({ action: 'create', media: ownMedia }, ['PLAYLISTS']);
|
|
175
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
// ── action = 'edit' ──────────────────────────────────────────────────────
|
|
180
|
+
describe("action = 'edit'", () => {
|
|
181
|
+
it('hides alert when user can edit their own podcast', async () => {
|
|
182
|
+
const wrapper = await mountWith({ action: 'edit', podcast: ownPodcast }, ['RESTRICTED_PRODUCTION']);
|
|
183
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
it('shows alert when restricted user cannot edit another user\'s podcast', async () => {
|
|
187
|
+
const wrapper = await mountWith({ action: 'edit', podcast: otherPodcast }, ['RESTRICTED_PRODUCTION']);
|
|
188
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
it('returns DeniedNoRight when arg is boolean true (not an object)', async () => {
|
|
192
|
+
// edit/delete require a real entity object; a boolean is rejected
|
|
193
|
+
const wrapper = await mountWith({ action: 'edit', podcast: true as unknown as Podcast }, ['ADMIN']);
|
|
194
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
it('hides alert when user can edit their own emission', async () => {
|
|
198
|
+
const wrapper = await mountWith({ action: 'edit', emission: ownEmission }, ['RESTRICTED_PRODUCTION']);
|
|
199
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
it('shows alert when restricted user cannot edit another user\'s emission', async () => {
|
|
203
|
+
const wrapper = await mountWith({ action: 'edit', emission: otherEmission }, ['RESTRICTED_PRODUCTION']);
|
|
204
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
it('hides alert when admin edits another user\'s cartouchier', async () => {
|
|
208
|
+
const wrapper = await mountWith({ action: 'edit', cartouchier: otherCartouchier }, ['ADMIN']);
|
|
209
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
it('shows alert when restricted user edits another user\'s cartouchier', async () => {
|
|
213
|
+
const wrapper = await mountWith({ action: 'edit', cartouchier: otherCartouchier }, ['RESTRICTED_PRODUCTION']);
|
|
214
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
it('hides alert when admin edits another user\'s media', async () => {
|
|
218
|
+
const wrapper = await mountWith({ action: 'edit', media: otherMedia }, ['ADMIN']);
|
|
219
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
it('shows alert when restricted user edits another user\'s media', async () => {
|
|
223
|
+
const wrapper = await mountWith({ action: 'edit', media: otherMedia }, ['RESTRICTED_PRODUCTION']);
|
|
224
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
// ── action = 'delete' ────────────────────────────────────────────────────
|
|
229
|
+
describe("action = 'delete'", () => {
|
|
230
|
+
it('hides alert when user can delete an emission', async () => {
|
|
231
|
+
const wrapper = await mountWith({ action: 'delete', emission: otherEmission }, ['ADMIN']);
|
|
232
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
it('shows alert when user lacks delete right for emission', async () => {
|
|
236
|
+
const wrapper = await mountWith({ action: 'delete', emission: otherEmission }, ['PLAYLISTS']);
|
|
237
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
it('hides alert when user can delete their own playlistMedia', async () => {
|
|
241
|
+
const wrapper = await mountWith({ action: 'delete', playlistMedia: ownPlaylistMedia }, ['RESTRICTED_ANIMATION']);
|
|
242
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
it('shows alert when restricted user deletes another user\'s playlistMedia', async () => {
|
|
246
|
+
const wrapper = await mountWith({ action: 'delete', playlistMedia: otherPlaylistMedia }, ['RESTRICTED_ANIMATION']);
|
|
247
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
it('returns DeniedNoRight when arg is boolean true (not an object)', async () => {
|
|
251
|
+
const wrapper = await mountWith({ action: 'delete', mix: true as unknown as Mix }, ['ADMIN']);
|
|
252
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
253
|
+
});
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
// ── action = 'any' with object arg ───────────────────────────────────────
|
|
257
|
+
describe("action = 'any' with object arg", () => {
|
|
258
|
+
it('returns Allowed if Create check passes (short-circuits on first Allowed)', async () => {
|
|
259
|
+
// RESTRICTED_ANIMATION can create cartouchier → returns Allowed immediately
|
|
260
|
+
const wrapper = await mountWith({ action: 'any', cartouchier: otherCartouchier }, ['RESTRICTED_ANIMATION']);
|
|
261
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
it('returns Allowed when all three checks (Create/Edit/Delete) pass', async () => {
|
|
265
|
+
const wrapper = await mountWith({ action: 'any', podcast: ownPodcast }, ['PRODUCTION']);
|
|
266
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
it('returns DeniedNoRight when no check passes and no DeniedNotOwner accrues', async () => {
|
|
270
|
+
// PLAYLISTS has no right for mix at all → stays at DeniedNoRight
|
|
271
|
+
const wrapper = await mountWith({ action: 'any', mix: otherMix }, ['PLAYLISTS']);
|
|
272
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
273
|
+
});
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
// ── action = 'any' with boolean arg ─────────────────────────────────────
|
|
277
|
+
describe("action = 'any' with boolean arg", () => {
|
|
278
|
+
it('only checks Create when arg is boolean true, grants access when allowed', async () => {
|
|
279
|
+
// RADIO can create mix
|
|
280
|
+
const wrapper = await mountWith({ action: 'any', mix: true as unknown as Mix }, ['RADIO']);
|
|
281
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
it('only checks Create when arg is boolean true, shows alert when denied', async () => {
|
|
285
|
+
// PLAYLISTS cannot create mix
|
|
286
|
+
const wrapper = await mountWith({ action: 'any', mix: true as unknown as Mix }, ['PLAYLISTS']);
|
|
287
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
288
|
+
});
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
// ── message computation ──────────────────────────────────────────────────
|
|
292
|
+
describe('message computation', () => {
|
|
293
|
+
it('renders nothing when hasAccess is true (ActionRight.Allowed)', async () => {
|
|
294
|
+
const wrapper = await mountWith({ action: 'create', podcast: ownPodcast }, ['PRODUCTION']);
|
|
295
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
it('renders "insufficient rights" for ActionRight.DeniedNoRight', async () => {
|
|
299
|
+
const wrapper = await mountWith({ action: 'create', podcast: ownPodcast }, ['PLAYLISTS']);
|
|
300
|
+
expect(wrapper.text()).toContain('insufficient rights');
|
|
301
|
+
});
|
|
302
|
+
|
|
303
|
+
it('renders entity-specific i18n key for ActionRight.DeniedNotOwner on podcast', async () => {
|
|
304
|
+
// te('RightsIndicator - Podcast - Not owner') returns true per our mock
|
|
305
|
+
const wrapper = await mountWith({ action: 'edit', podcast: otherPodcast }, ['RESTRICTED_PRODUCTION']);
|
|
306
|
+
expect(wrapper.text()).toContain('RightsIndicator - Podcast - Not owner');
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
it('renders entity-specific i18n key for ActionRight.DeniedNotOwner on emission', async () => {
|
|
310
|
+
const wrapper = await mountWith({ action: 'edit', emission: otherEmission }, ['RESTRICTED_PRODUCTION']);
|
|
311
|
+
expect(wrapper.text()).toContain('RightsIndicator - Emission - Not owner');
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
it('renders entity-specific i18n key for ActionRight.DeniedNotOwner on cartouchier', async () => {
|
|
315
|
+
const wrapper = await mountWith({ action: 'edit', cartouchier: otherCartouchier }, ['RESTRICTED_PRODUCTION']);
|
|
316
|
+
expect(wrapper.text()).toContain('RightsIndicator - Cartouchier - Not owner');
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
it('renders entity-specific i18n key for ActionRight.DeniedNotOwner on playlistMedia', async () => {
|
|
320
|
+
const wrapper = await mountWith({ action: 'edit', playlistMedia: otherPlaylistMedia }, ['RESTRICTED_PRODUCTION']);
|
|
321
|
+
expect(wrapper.text()).toContain('RightsIndicator - PlaylistMedia - Not owner');
|
|
322
|
+
});
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
// ── hasAccess computed ───────────────────────────────────────────────────
|
|
326
|
+
describe('hasAccess', () => {
|
|
327
|
+
it('is true only for ActionRight.Allowed (hides alert)', async () => {
|
|
328
|
+
const wrapper = await mountWith({ action: 'create', podcast: ownPodcast }, ['PRODUCTION']);
|
|
329
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
it('is false for ActionRight.DeniedNoRight (shows alert)', async () => {
|
|
333
|
+
const wrapper = await mountWith({ action: 'create', podcast: ownPodcast }, ['PLAYLISTS']);
|
|
334
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
it('is false for ActionRight.DeniedNotOwner (shows alert)', async () => {
|
|
338
|
+
const wrapper = await mountWith({ action: 'edit', podcast: otherPodcast }, ['RESTRICTED_PRODUCTION']);
|
|
339
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
// ── Method dispatch ───────────────────────────────────────────────────────
|
|
344
|
+
describe('right method dispatch', () => {
|
|
345
|
+
it('calls getCreateEmissionRight for action=create + emission', async () => {
|
|
346
|
+
const allowed = await mountWith({ action: 'create', emission: ownEmission }, ['ORGANISATION']);
|
|
347
|
+
expect(allowed.find('.alert').exists()).toBe(false);
|
|
348
|
+
|
|
349
|
+
const denied = await mountWith({ action: 'create', emission: ownEmission }, ['PLAYLISTS']);
|
|
350
|
+
expect(denied.find('.alert').exists()).toBe(true);
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
it('calls getDeleteEmissionRight for action=delete + emission', async () => {
|
|
354
|
+
const allowed = await mountWith({ action: 'delete', emission: otherEmission }, ['ORGANISATION']);
|
|
355
|
+
expect(allowed.find('.alert').exists()).toBe(false);
|
|
356
|
+
|
|
357
|
+
const denied = await mountWith({ action: 'delete', emission: otherEmission }, ['PLAYLISTS']);
|
|
358
|
+
expect(denied.find('.alert').exists()).toBe(true);
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
it('calls getCreateCartouchierRight for action=create + cartouchier', async () => {
|
|
362
|
+
// RADIO can create cartouchier
|
|
363
|
+
const allowed = await mountWith({ action: 'create', cartouchier: ownCartouchier }, ['RADIO']);
|
|
364
|
+
expect(allowed.find('.alert').exists()).toBe(false);
|
|
365
|
+
|
|
366
|
+
// PLAYLISTS cannot
|
|
367
|
+
const denied = await mountWith({ action: 'create', cartouchier: ownCartouchier }, ['PLAYLISTS']);
|
|
368
|
+
expect(denied.find('.alert').exists()).toBe(true);
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
it('calls getDeletePlaylistMediaRight for action=delete + playlistMedia', async () => {
|
|
372
|
+
const allowed = await mountWith({ action: 'delete', playlistMedia: ownPlaylistMedia }, ['ANIMATION']);
|
|
373
|
+
expect(allowed.find('.alert').exists()).toBe(false);
|
|
374
|
+
|
|
375
|
+
const denied = await mountWith({ action: 'delete', playlistMedia: ownPlaylistMedia }, ['PLAYLISTS']);
|
|
376
|
+
expect(denied.find('.alert').exists()).toBe(true);
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
it('calls getCreateMixRight for action=create + mix', async () => {
|
|
380
|
+
const allowed = await mountWith({ action: 'create', mix: ownMix }, ['ADMIN']);
|
|
381
|
+
expect(allowed.find('.alert').exists()).toBe(false);
|
|
382
|
+
|
|
383
|
+
// PRODUCTION is not in the mix create allowlist
|
|
384
|
+
const denied = await mountWith({ action: 'create', mix: ownMix }, ['PRODUCTION']);
|
|
385
|
+
expect(denied.find('.alert').exists()).toBe(true);
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
it('calls getDeleteCartouchierRight for action=delete + cartouchier', async () => {
|
|
389
|
+
const allowed = await mountWith({ action: 'delete', cartouchier: ownCartouchier }, ['ANIMATION']);
|
|
390
|
+
expect(allowed.find('.alert').exists()).toBe(false);
|
|
391
|
+
|
|
392
|
+
// PODCAST_CRUD on another user's cartouchier → DeniedNotOwner → no access
|
|
393
|
+
const denied = await mountWith({ action: 'delete', cartouchier: otherCartouchier }, ['PODCAST_CRUD']);
|
|
394
|
+
expect(denied.find('.alert').exists()).toBe(true);
|
|
395
|
+
});
|
|
396
|
+
|
|
397
|
+
it('calls getEditMediaRight for action=edit + media', async () => {
|
|
398
|
+
const allowed = await mountWith({ action: 'edit', media: ownMedia }, ['RESTRICTED_PRODUCTION']);
|
|
399
|
+
expect(allowed.find('.alert').exists()).toBe(false);
|
|
400
|
+
|
|
401
|
+
const denied = await mountWith({ action: 'edit', media: otherMedia }, ['RESTRICTED_PRODUCTION']);
|
|
402
|
+
expect(denied.find('.alert').exists()).toBe(true);
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
it('calls getDeleteMediaRight for action=delete + media', async () => {
|
|
406
|
+
const allowed = await mountWith({ action: 'delete', media: ownMedia }, ['PODCAST_CRUD']);
|
|
407
|
+
expect(allowed.find('.alert').exists()).toBe(false);
|
|
408
|
+
|
|
409
|
+
const denied = await mountWith({ action: 'delete', media: otherMedia }, ['PODCAST_CRUD']);
|
|
410
|
+
expect(denied.find('.alert').exists()).toBe(true);
|
|
411
|
+
});
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
// ── scope ─────────────────────────────────────────────────────────────────
|
|
415
|
+
describe('scope', () => {
|
|
416
|
+
it('hides alert on create when scope matches the podcast\'s own rubriques', async () => {
|
|
417
|
+
// action=create+podcast passes the podcast itself as the scope-check arg
|
|
418
|
+
const wrapper = await mountWith({ action: 'create', podcast: ownScopedPodcast }, ['PRODUCTION'], [10]);
|
|
419
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
it('shows insufficient scope alert on create when scope does not match', async () => {
|
|
423
|
+
const wrapper = await mountWith({ action: 'create', podcast: ownScopedPodcast }, ['PRODUCTION'], [999]);
|
|
424
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
425
|
+
expect(wrapper.text()).toContain('RightsIndicator - Podcast - Insufficient scope');
|
|
426
|
+
});
|
|
427
|
+
|
|
428
|
+
it('hides alert on edit when scope matches the podcast\'s own rubriques', async () => {
|
|
429
|
+
const wrapper = await mountWith({ action: 'edit', podcast: ownScopedPodcast }, ['PRODUCTION'], [10]);
|
|
430
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
it('hides alert on edit when scope matches only the emission\'s rubriques', async () => {
|
|
434
|
+
const wrapper = await mountWith({ action: 'edit', podcast: emissionScopedPodcast }, ['PRODUCTION'], [20]);
|
|
435
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
436
|
+
});
|
|
437
|
+
|
|
438
|
+
it('shows insufficient scope alert on edit when scope matches neither podcast nor emission', async () => {
|
|
439
|
+
const wrapper = await mountWith({ action: 'edit', podcast: ownScopedPodcast }, ['PRODUCTION'], [999]);
|
|
440
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
441
|
+
expect(wrapper.text()).toContain('RightsIndicator - Podcast - Insufficient scope');
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
it('shows insufficient scope alert (not "not owner") for restricted user with mismatched scope on own podcast', async () => {
|
|
445
|
+
const wrapper = await mountWith(
|
|
446
|
+
{ action: 'edit', podcast: ownScopedPodcast }, ['RESTRICTED_PRODUCTION'], [999]
|
|
447
|
+
);
|
|
448
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
449
|
+
expect(wrapper.text()).toContain('RightsIndicator - Podcast - Insufficient scope');
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
it('hides alert for ADMIN regardless of scope', async () => {
|
|
453
|
+
const wrapper = await mountWith({ action: 'edit', podcast: ownScopedPodcast }, ['ADMIN'], [999]);
|
|
454
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
455
|
+
});
|
|
456
|
+
|
|
457
|
+
it('shows insufficient scope alert on edit when scope does not match the emission\'s rubriques', async () => {
|
|
458
|
+
const wrapper = await mountWith({ action: 'edit', emission: scopedEmission }, ['PRODUCTION'], [999]);
|
|
459
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
460
|
+
expect(wrapper.text()).toContain('RightsIndicator - Emission - Insufficient scope');
|
|
461
|
+
});
|
|
462
|
+
|
|
463
|
+
it('hides alert on edit when scope matches the emission\'s rubriques', async () => {
|
|
464
|
+
const wrapper = await mountWith({ action: 'edit', emission: scopedEmission }, ['PRODUCTION'], [10]);
|
|
465
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
466
|
+
});
|
|
467
|
+
|
|
468
|
+
it('shows insufficient scope alert (not "not owner") for restricted user with mismatched scope on own emission', async () => {
|
|
469
|
+
const wrapper = await mountWith(
|
|
470
|
+
{ action: 'edit', emission: scopedEmission }, ['RESTRICTED_PRODUCTION'], [999]
|
|
471
|
+
);
|
|
472
|
+
expect(wrapper.find('.alert').exists()).toBe(true);
|
|
473
|
+
expect(wrapper.text()).toContain('RightsIndicator - Emission - Insufficient scope');
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
it('hides alert for ADMIN editing an out-of-scope emission', async () => {
|
|
477
|
+
const wrapper = await mountWith({ action: 'edit', emission: scopedEmission }, ['ADMIN'], [999]);
|
|
478
|
+
expect(wrapper.find('.alert').exists()).toBe(false);
|
|
479
|
+
});
|
|
480
|
+
});
|
|
481
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { mockI18n } from '@tests/mocks';
|
|
2
|
+
vi.mock('vue-i18n', () => mockI18n());
|
|
3
|
+
|
|
4
|
+
import CommentMoreActions from '@/components/display/comments/item/CommentMoreActions.vue';
|
|
5
|
+
import { emptyComment } from '@/stores/class/general/comment';
|
|
6
|
+
import { mount, setupAuthStore } from '@tests/utils';
|
|
7
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
8
|
+
|
|
9
|
+
// Stands in for the real implementation that a consuming app (e.g.
|
|
10
|
+
// frontoffice) registers globally via app.component("CommentMoreActionsAdmin", ...).
|
|
11
|
+
const FakeCommentMoreActionsAdmin = {
|
|
12
|
+
props: ['comment', 'actionsAdmin'],
|
|
13
|
+
emits: ['update:comment', 'update:actionsAdmin'],
|
|
14
|
+
template: `<div class="fake-comment-admin" :data-comment-id="comment?.commentId" :data-actions-admin="actionsAdmin">
|
|
15
|
+
<button class="fake-comment-admin-update" @click="$emit('update:comment', { ...comment, content: 'edited' })" />
|
|
16
|
+
<button class="fake-comment-admin-set-actions" @click="$emit('update:actionsAdmin', 'info')" />
|
|
17
|
+
</div>`,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
function mountComponent(globalComponents?: Record<string, unknown>) {
|
|
21
|
+
return mount(CommentMoreActions, {
|
|
22
|
+
props: { comment: { ...emptyComment(), commentId: 7 }, editRight: true },
|
|
23
|
+
stubs: ['ClassicPopover'],
|
|
24
|
+
globalComponents,
|
|
25
|
+
beforeMount: setupAuthStore()
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
describe('CommentMoreActions', () => {
|
|
30
|
+
describe('CommentMoreActionsAdmin resolution', () => {
|
|
31
|
+
it('passes the comment and actionsAdmin v-models to the globally registered component', async () => {
|
|
32
|
+
const wrapper = await mountComponent({ CommentMoreActionsAdmin: FakeCommentMoreActionsAdmin });
|
|
33
|
+
|
|
34
|
+
const admin = wrapper.find('.fake-comment-admin');
|
|
35
|
+
expect(admin.exists()).toBe(true);
|
|
36
|
+
expect(admin.attributes('data-comment-id')).toBe('7');
|
|
37
|
+
expect(admin.attributes('data-actions-admin')).toBeUndefined();
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it('threads comment updates from the admin component back out as update:comment', async () => {
|
|
41
|
+
const wrapper = await mountComponent({ CommentMoreActionsAdmin: FakeCommentMoreActionsAdmin });
|
|
42
|
+
|
|
43
|
+
await wrapper.find('.fake-comment-admin-update').trigger('click');
|
|
44
|
+
|
|
45
|
+
expect(wrapper.emitted('update:comment')?.[0]).toEqual([
|
|
46
|
+
{ ...emptyComment(), commentId: 7, content: 'edited' }
|
|
47
|
+
]);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it('threads actionsAdmin updates from the admin component back into its own v-model prop', async () => {
|
|
51
|
+
const wrapper = await mountComponent({ CommentMoreActionsAdmin: FakeCommentMoreActionsAdmin });
|
|
52
|
+
|
|
53
|
+
await wrapper.find('.fake-comment-admin-set-actions').trigger('click');
|
|
54
|
+
|
|
55
|
+
expect(wrapper.find('.fake-comment-admin').attributes('data-actions-admin')).toBe('info');
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it('renders nothing where CommentMoreActionsAdmin would be when no global component is registered', async () => {
|
|
59
|
+
const wrapper = await mountComponent();
|
|
60
|
+
|
|
61
|
+
expect(wrapper.find('.fake-comment-admin').exists()).toBe(false);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it('is not rendered when editRight is false', async () => {
|
|
65
|
+
const wrapper = await mount(CommentMoreActions, {
|
|
66
|
+
props: { comment: { ...emptyComment(), commentId: 7 }, editRight: false },
|
|
67
|
+
stubs: ['ClassicPopover'],
|
|
68
|
+
globalComponents: { CommentMoreActionsAdmin: FakeCommentMoreActionsAdmin },
|
|
69
|
+
beforeMount: setupAuthStore()
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
expect(wrapper.find('.fake-comment-admin').exists()).toBe(false);
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { mockI18n } from '@tests/mocks';
|
|
2
|
+
vi.mock('vue-i18n', () => mockI18n());
|
|
3
|
+
|
|
4
|
+
import RecaptchaModal from '@/components/display/comments/modal/RecaptchaModal.vue';
|
|
5
|
+
import { CHECK_TOKEN_KEY } from '@/components/composable/keys';
|
|
6
|
+
import { mount } from '@tests/utils';
|
|
7
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
8
|
+
import { nextTick } from 'vue';
|
|
9
|
+
|
|
10
|
+
function findRecaptcha(wrapper: Awaited<ReturnType<typeof mount>>) {
|
|
11
|
+
return wrapper.findComponent({ name: 'VueRecaptcha' });
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
describe('RecaptchaModal', () => {
|
|
15
|
+
describe('checkToken resolution', () => {
|
|
16
|
+
it('calls the app-provided checkToken implementation with the recaptcha token', async () => {
|
|
17
|
+
const checkToken = vi.fn().mockResolvedValue(false);
|
|
18
|
+
const wrapper = await mount(RecaptchaModal, {
|
|
19
|
+
stubs: ['VueRecaptcha'],
|
|
20
|
+
provide: { [CHECK_TOKEN_KEY]: checkToken }
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
await findRecaptcha(wrapper).vm.$emit('verify', 'token-123');
|
|
24
|
+
|
|
25
|
+
expect(checkToken).toHaveBeenCalledWith('token-123');
|
|
26
|
+
// checkToken resolved false here, so the widget must stay so the
|
|
27
|
+
// user can retry - proves isVerify was actually driven by the
|
|
28
|
+
// provided implementation's result, not just called.
|
|
29
|
+
expect(findRecaptcha(wrapper).exists()).toBe(true);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it('defaults to always-verified when no implementation is provided', async () => {
|
|
33
|
+
const wrapper = await mount(RecaptchaModal, { stubs: ['VueRecaptcha'] });
|
|
34
|
+
|
|
35
|
+
await findRecaptcha(wrapper).vm.$emit('verify', 'token-123');
|
|
36
|
+
await nextTick();
|
|
37
|
+
|
|
38
|
+
// The default checkToken resolves true, so the widget (v-if
|
|
39
|
+
//="!isVerify") should be gone once its result is applied.
|
|
40
|
+
expect(findRecaptcha(wrapper).exists()).toBe(false);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { mockI18n, mockUseRouter } from '@tests/mocks';
|
|
2
|
+
vi.mock('vue-i18n', () => mockI18n());
|
|
3
|
+
vi.mock('vue-router', () => mockUseRouter());
|
|
4
|
+
|
|
5
|
+
vi.mock('@/api/classicApi', () => ({
|
|
6
|
+
default: { fetchData: vi.fn().mockResolvedValue({ count: 1 }) }
|
|
7
|
+
}));
|
|
8
|
+
|
|
9
|
+
import EmissionItem from '@/components/display/emission/EmissionItem.vue';
|
|
10
|
+
import { useAuthStore } from '@/stores/AuthStore';
|
|
11
|
+
import { emptyEmissionData, Emission } from '@/stores/class/general/emission';
|
|
12
|
+
import { mount as testMount, setupAuthStore } from '@tests/utils';
|
|
13
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
14
|
+
|
|
15
|
+
const mount = (emission: Partial<Emission> = {}, auth?: { roles: string[], scope?: number[] }) => {
|
|
16
|
+
const base = emptyEmissionData();
|
|
17
|
+
return testMount(EmissionItem, {
|
|
18
|
+
props: { emission: { ...base, ...emission } },
|
|
19
|
+
beforeMount: auth ? async () => {
|
|
20
|
+
await setupAuthStore({ roles: auth.roles, scope: auth.scope })();
|
|
21
|
+
useAuthStore().$patch({
|
|
22
|
+
authProfile: { userId: 'test-user-123', scope: auth.scope ?? [] },
|
|
23
|
+
authParam: { accessToken: 'test-token', refreshToken: undefined, expiration: undefined },
|
|
24
|
+
});
|
|
25
|
+
} : undefined
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
describe('EmissionItem', () => {
|
|
30
|
+
describe('RightsIndicator (scope)', () => {
|
|
31
|
+
it('shows RightsIndicator when the emission is out of the user\'s scope', async () => {
|
|
32
|
+
const wrapper = await mount(
|
|
33
|
+
{ emissionId: 1, rubriqueIds: [10] },
|
|
34
|
+
{ roles: ['PRODUCTION'], scope: [999] }
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
const icon = wrapper.find('.rights-indicator-icon');
|
|
38
|
+
expect(icon.exists()).toBe(true);
|
|
39
|
+
expect(icon.classes()).not.toContain('invisible');
|
|
40
|
+
expect(wrapper.text()).toContain('RightsIndicator - Emission - Insufficient scope');
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('hides RightsIndicator when the emission is within the user\'s scope', async () => {
|
|
44
|
+
const wrapper = await mount(
|
|
45
|
+
{ emissionId: 1, rubriqueIds: [10] },
|
|
46
|
+
{ roles: ['PRODUCTION'], scope: [10] }
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
const icon = wrapper.find('.rights-indicator-icon');
|
|
50
|
+
expect(icon.exists()).toBe(true);
|
|
51
|
+
expect(icon.classes()).toContain('invisible');
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
});
|