@@ -11,11 +11,22 @@ module('Integration | Component | organizations/information-section-view', funct
11
11
setupIntlRenderingTest (hooks);
12
12
13
13
module (' when user has access' , function (hooks ) {
14
+ let features;
14
15
hooks .beforeEach (function () {
15
16
class AccessControlStub extends Service {
16
17
hasAccessToOrganizationActionsScope = true ;
17
18
}
18
19
this .owner .register (' service:access-control' , AccessControlStub);
20
+ features = {
21
+ IS_MANAGING_STUDENTS : { active: false },
22
+ SHOW_NPS : { active: false , params: { formNPSUrl: ' plop' } },
23
+ SHOW_SKILLS : { active: false },
24
+ LEARNER_IMPORT : { active: false },
25
+ MULTIPLE_SENDING_ASSESSMENT : { active: false },
26
+ PLACES_MANAGEMENT : { active: false },
27
+ COMPUTE_ORGANIZATION_LEARNER_CERTIFICABILITY : { active: false },
28
+ ATTESTATIONS_MANAGEMENT : { active: false },
29
+ };
19
30
});
20
31
21
32
test (' it renders general information about organization' , async function (assert ) {
@@ -221,15 +232,17 @@ module('Integration | Component | organizations/information-section-view', funct
221
232
assert .dom (screen .getByText (' Archivée le 22/02/2022 par Rob Lochon.' )).exists ();
222
233
});
223
234
});
224
-
225
235
module (' when organization is parent' , function () {
226
236
test (' it should display parent label' , async function (assert ) {
227
237
// given
228
238
const store = this .owner .lookup (' service:store' );
229
- const child = store .createRecord (' organization' , { type: ' SCO' , isManagingStudents: true });
239
+ const child = store .createRecord (' organization' , {
240
+ type: ' SCO' ,
241
+ features,
242
+ });
230
243
const organization = store .createRecord (' organization' , {
231
244
type: ' SCO' ,
232
- isManagingStudents : true ,
245
+ features ,
233
246
children: [child],
234
247
});
235
248
@@ -245,10 +258,14 @@ module('Integration | Component | organizations/information-section-view', funct
245
258
test (' it displays child label and parent organization name' , async function (assert ) {
246
259
// given
247
260
const store = this .owner .lookup (' service:store' );
248
- const parentOrganization = store .createRecord (' organization' , { id: 5 , type: ' SCO' , isManagingStudents: true });
261
+ const parentOrganization = store .createRecord (' organization' , {
262
+ id: 5 ,
263
+ type: ' SCO' ,
264
+ features,
265
+ });
249
266
const organization = store .createRecord (' organization' , {
250
267
type: ' SCO' ,
251
- isManagingStudents : true ,
268
+ features ,
252
269
parentOrganizationId: parentOrganization .id ,
253
270
parentOrganizationName: ' Shibusen' ,
254
271
});
@@ -269,7 +286,7 @@ module('Integration | Component | organizations/information-section-view', funct
269
286
const organization = store .createRecord (' organization' , {
270
287
type: ' SCO' ,
271
288
name: ' notParent' ,
272
- isManagingStudents : true ,
289
+ features ,
273
290
});
274
291
275
292
// when
0 commit comments