-
Notifications
You must be signed in to change notification settings - Fork 556
Expand file tree
/
Copy pathSpecialCase2optim.feature
More file actions
1041 lines (942 loc) · 45.7 KB
/
Copy pathSpecialCase2optim.feature
File metadata and controls
1041 lines (942 loc) · 45.7 KB
1
2
3
4
5
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Feature: Special admin settings flows — case 2
In order to exercise several admin settings quickly
As a platform administrator
I want to run a few targeted scenarios that change multiple settings
Background:
Given I am a platform administrator
And I wait very long for the page to be loaded
# ==============================================================
# SCENARIO 1 — Parkur01 self-registration + post-registration navigation
# ==============================================================
Scenario: New user self-registration and first navigation
Given I am not logged
And I am on "/home"
And I wait very long for the page to be loaded
Then I should see "Sign up"
When I follow "Sign up"
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see "Register"
And I wait for the element "[name='firstname']" to appear
And I fill in the following:
| firstname | Test |
| lastname | Learner |
| email | parkur01@example.test |
| username | parkur01 |
| pass1 | parkur01 |
| pass2 | parkur01 |
| phone | 0600000000 |
| extra_terms_adresse | 10 rue de la Paix |
| extra_terms_codepostal | 75001 |
| extra_terms_paysresidence | France |
| extra_terms_formation_niveau | Baccalaureat |
# Genre (radio)
And I wait for the element "input[name='extra_terms_genre[extra_terms_genre]'][value='homme']" to appear
And I click the "input[name='extra_terms_genre[extra_terms_genre]'][value='homme']" element
# Date of birth
And I set hidden field "extra_terms_datedenaissance" to "1990-01-01"
# Sector (radio)
And I wait for the element "input[name='extra_filiere_user[extra_filiere_user]'][value='art-et-culture']" to appear
And I click the "input[name='extra_filiere_user[extra_filiere_user]'][value='art-et-culture']" element
# Langue interface
And I wait for the element "[name='language']" to appear
And I select "en_US" from "language"
# Target learning language
And I wait for the element "[name='extra_langue_cible']" to appear
And I select "french" from "extra_langue_cible"
# Accepter les conditions
And I wait for the element "input[name='extra_platformuseconditions[extra_platformuseconditions]'][value='1']" to appear
And I click the "input[name='extra_platformuseconditions[extra_platformuseconditions]'][value='1']" element
And I press "Register"
And I wait very long for the page to be loaded
Then I should not see an error
# ---- DIAGNOSTIC LINK IN MENU ----
Then I should see "Diagnosis management"
And I wait for the element ".p-panelmenu-header[aria-label='Diagnosis management']" to appear
When I click the ".p-panelmenu-header[aria-label='Diagnosis management']" element
And I wait very long for the page to be loaded
When I follow "Diagnosis"
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see "Skills and objectives assessment"
And I should see "I would like to choose a sector"
And I should see "Availability before my internship/mobility"
And I should see "Availability during my internship/mobility"
And I should see "The topics that interest me / My learning objectives"
And I should see "My language level"
And I should see "My learning goals"
And I should see "My working method"
And I should see "My work environment"
And I should not see an error
# ---- DIAGNOSTIC FORM — Sector ----
And I wait for the element "#card_filiere a" to appear
And I click the "#card_filiere a" element
And I wait for the element "input[name='extra_filiere_user[extra_filiere_user]'][value='art-et-culture']" to appear
And I click the "input[name='extra_filiere_user[extra_filiere_user]'][value='art-et-culture']" element
And I wait for the element "[id='user_form_submit_partial[filiere]']" to appear
And I click the "[id='user_form_submit_partial[filiere]']" element
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should not see an error
# Domains and theme
And I wait for the element "#card_theme_obj a" to appear
And I click the "#card_theme_obj a" element
And I wait for the element "[name='extra_domaine_0']" to appear
And I select "vie-quotidienne" from "extra_domaine_0"
And I wait for the element "[name='extra_domaine_1']" to appear
And I select "arrivee-sur-mon-poste-de-travail" from "extra_domaine_1"
And I wait for the element "[name='extra_domaine_2']" to appear
And I select "competente-dans-mon-domaine-de-specialite" from "extra_domaine_2"
And I wait for the element "[name='extra_theme_fr_0']" to appear
And I select "theme1" from "extra_theme_fr_0"
And I wait for the element "[id='user_form_submit_partial[theme_obj]']" to appear
And I click the "[id='user_form_submit_partial[theme_obj]']" element
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should not see an error
# Language level
And I wait for the element "#card_niveau_langue a" to appear
And I click the "#card_niveau_langue a" element
And I wait for the element "[name='extra_ecouter']" to appear
And I select "JePeuxComprendreLessentielDannoncesEtDeMessagesSimplesEtClairs" from "extra_ecouter"
And I wait for the element "[name='extra_lire']" to appear
And I select "JePeuxComprendreDesTextesCourtsTresSimplesEtTrouverUneInformationParticuliere" from "extra_lire"
And I wait for the element "[name='extra_participer_a_une_conversation']" to appear
And I select "JePeuxAvoirDesEchangesTresBrefsMemeSiEnGeneralJeNeComprendsPasAssezPourPoursuivreUneConversation" from "extra_participer_a_une_conversation"
And I wait for the element "[name='extra_s_exprimer_oralement_en_continu']" to appear
And I select "JePeuxUtiliserUneSerieDePhrasesOuDexpressionsPourDecrireSimplementMonEntourage" from "extra_s_exprimer_oralement_en_continu"
And I wait for the element "[name='extra_ecrire']" to appear
And I select "JePeuxEcrireUneLettrePersonnelleTresSimplePExDeRemerciements" from "extra_ecrire"
And I wait for the element "[id='user_form_submit_partial[niveau_langue]']" to appear
And I click the "[id='user_form_submit_partial[niveau_langue]']" element
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should not see an error
And I wait for the element "#user_form_submit" to appear
And I click the "#user_form_submit" element
And I wait very long for the page to be loaded
Then I should not see an error
# ---- MY SESSIONS ----
When I follow "My sessions"
And I wait very long for the page to be loaded
Then I should see "My sessions"
Then I should not see an error
# ---- SOCIAL NETWORK ----
And I am on "/social"
And I wait very long for the page to be loaded
Then I should not see an error
# ---- MESSAGING ----
And I am on "/resources/messages"
And I wait very long for the page to be loaded
Then I should not see an error
# ==============================================================
# SCENARIO 2 — Admin creates tutors and assigns parkur01
# ==============================================================
Scenario: Admin creates tutors with language and assigns learner parkur01
# Tutor 1 — French language
When I am on "/main/admin/user_add.php"
And I wait very long for the page to be loaded
And I zoom out to maximum
And I wait for the element "[name='firstname']" to appear
And I fill in the following:
| firstname | Tuteur |
| lastname | Francais |
| email | tuteur.fr@example.test |
| username | tuteur_fr |
| password | tuteur_fr |
And I wait for the element "[name='user_add_roles']" to appear
And I select "STUDENT_BOSS" from "user_add_roles"
And I wait for the element "[name='user_edit_locale']" to appear
And I select "fr_FR" from "user_edit_locale"
And I wait for the element "input#send_mail_no" to appear
And I click the "input#send_mail_no" element
And I press "submit"
And I wait very long for the page to be loaded
Then I should not see an error
# Tutor 2 — English language
When I am on "/main/admin/user_add.php"
And I wait very long for the page to be loaded
And I zoom out to maximum
And I wait for the element "[name='firstname']" to appear
And I fill in the following:
| firstname | Tuteur |
| lastname | Anglais |
| email | tuteur.en@example.test |
| username | tuteur_en |
| password | tuteur_en |
And I wait for the element "[name='user_add_roles']" to appear
And I select "STUDENT_BOSS" from "user_add_roles"
And I wait for the element "[name='user_edit_locale']" to appear
And I select "en_US" from "user_edit_locale"
And I wait for the element "input#send_mail_no" to appear
And I click the "input#send_mail_no" element
And I press "submit"
And I wait very long for the page to be loaded
Then I should not see an error
When I am on "/resources/messages"
And I wait very long for the page to be loaded
Then I should see "The user has been added"
# ---- TC FOLLOW-UP — Student's superior follow up ----
When I am on "/main/my_space/index.php"
And I wait very long for the page to be loaded
And I wait for the element "i.mdi-star-outline" to appear
When I click the "i.mdi-star-outline" element
And I wait very long for the page to be loaded
When I follow "Student's superior follow up"
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see "Tracking for superior"
And I should not see an error
# ---- LANGUAGE FILTER: French ----
And I wait for the element "[name='language_filter_language']" to appear
And I select "fr_FR" from "language_filter_language"
And I wait for the element "em.mdi-magnify" to appear
And I click the "em.mdi-magnify" element
And I wait very long for the page to be loaded
And I zoom out to maximum
# ---- ASSIGNMENT OF PARKUR01 TO FRENCH TUTOR ----
And I wait for the element ".select2-selection__rendered" to appear
When I click the ".select2-selection__rendered" element
And I wait very long for the page to be loaded
And I type and select "parkur01" in select2 field "dummy"
And I wait very long for the page to be loaded
And I press "Add"
And I wait very long for the page to be loaded
And I should see "Test learner"
Then I should not see an error
# ==============================================================
# SCENARIO 3 — Tuteur_fr checks the diagnosis and sends messages
# ==============================================================
Scenario: Tuteur_fr verifies diagnosis and sends messages
Given I am not logged
And I am logged as "tuteur_fr"
And I wait very long for the page to be loaded
# ---- MESSAGING: verify learner assignment ----
When I am on "/resources/messages"
And I wait very long for the page to be loaded
Then I should see "You have been assigned the learner Test Learner"
When I follow "You have been assigned the learner Test Learner"
And I wait very long for the page to be loaded
Then I should see "http://127.0.0.1/main/my_space/myStudents.php?student=67"
# ---- LEARNER PROFILE ----
When I am on "/main/my_space/myStudents.php?student=67"
And I wait very long for the page to be loaded
Then I should see "Test Learner"
And I should see "Status"
And I should see "Official code"
And I should see "Tel"
And I should see "Timezone"
And I should see "Student's superior"
# ---- DIAGNOSTIC PAGE ----
When I am on "/main/search/load_search.php"
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see "Load diagnosis"
And I should not see an error
And I wait for the element "em.mdi-magnify" to appear
When I click the "em.mdi-magnify" element
And I wait for the element "#card_theme_obj a" to appear
And I click the "#card_theme_obj a" element
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see "vie-quotidienne"
And I should see "arrivee-sur-mon-poste-de-travail"
And I should see "competente-dans-mon-domaine-de-specialite"
And I should see "theme1"
And I should see "french"
# ---- SEND FINALIZATION MESSAGE ----
When I follow "Send diagnostic finalization message"
And I wait very long for the page to be loaded
Then I should not see an error
# ---- OPEN NEW MESSAGE FORM ----
And I wait for the element "span.mdi-plus" to appear
When I click the "span.mdi-plus" element
And I wait very long for the page to be loaded
Then I should not see an error
# ---- LEGAL AGREEMENT ----
When I am on "/main/my_space/myStudents.php?action=send_legal&student=67&course="
And I wait very long for the page to be loaded
And I press "Send legal agreement"
And I wait very long for the page to be loaded
Then I should not see an error
# ---- ASSIGNED SESSIONS ----
When I am on "/main/search/load_search.php?user_id=67&save=&_qf__load="
And I wait very long for the page to be loaded
And I zoom out to maximum
And I wait for the element "i.mdi-plus" to appear
And I click the "i.mdi-plus" element
And I wait very long for the page to be loaded
And I zoom out to maximum
And I wait for the element "i.mdi-plus" to appear
And I click the "i.mdi-plus" element
And I wait very long for the page to be loaded
And I zoom out to maximum
And I wait for the element "i.mdi-plus" to appear
And I click the "i.mdi-plus" element
And I wait very long for the page to be loaded
And I zoom out to maximum
And I wait for the element "i.mdi-plus" to appear
And I click the "i.mdi-plus" element
And I wait very long for the page to be loaded
And I zoom out to maximum
And I wait for the element "i.mdi-plus" to appear
And I click the "i.mdi-plus" element
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see 4 "i.mdi-delete" elements
# ==============================================================
# SCENARIO 4 — Admin checks sessions and creates a temptest session
# ==============================================================
Scenario: Admin validates sessions and creates temptest
# Background: already logged in as admin — starting directly
# ---- SESSION LIST ----
When I am on "/admin/session-list"
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see "Users"
And I should see "Session Status"
# ---- PRESENT SESSION ----
When I follow "Present session"
And I wait very long for the page to be loaded
Then I should see "general coach Teacher Teacher"
# ---- USER LIST ----
When I am on "/admin/user-list"
And I wait very long for the page to be loaded
And I wait for the element "span.mdi-account-key" to appear
When I click the "span.mdi-account-key" element
And I wait very long for the page to be loaded
# ---- ACCOUNT HOME PAGE ----
When I am on "/account/home"
And I wait very long for the page to be loaded
Then I should see "Tuteur Anglais"
# ---- LOGOUT AND LOGIN BACK AS ADMIN ----
Given I am not logged
And I am a platform administrator
And I wait very long for the page to be loaded
# ---- TC FOLLOW-UP ----
When I am on "/main/my_space/index.php"
And I wait very long for the page to be loaded
And I wait for the element "i.mdi-star-outline" to appear
When I click the "i.mdi-star-outline" element
And I wait very long for the page to be loaded
When I follow "General Coaches planning"
And I wait very long for the page to be loaded
And I wait for the element "em.mdi-filter" to appear
And I click the "em.mdi-filter" element
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see "coach"
And I should see "sessions"
# ---- SESSION LIST — ADD ----
When I am on "/admin/session-list"
And I wait very long for the page to be loaded
And I wait for the element "span.mdi-plus" to appear
When I click the "span.mdi-plus" element
And I wait very long for the page to be loaded
# ---- SESSION CREATION: step 1 (name + coach) ----
And I wait for the element "[name='name']" to appear
And I fill in "name" with "temptest"
And I wait very long for the page to be loaded
And I type and select "teacher" in select2 field "coach_username"
And I wait very long for the page to be loaded
And I wait for the element "em.mdi-arrow-right" to appear
And I click the "em.mdi-arrow-right" element
And I wait very long for the page to be loaded
# ---- SESSION CREATION: step 2 (courses) ----
Then I should see the ".select2-selection--multiple" element
And I wait for the element "em.mdi-check" to appear
When I click the "em.mdi-check" element
And I wait very long for the page to be loaded
Then I should see the ".select2-selection--multiple" element
And I wait for the element "em.mdi-check" to appear
When I click the "em.mdi-check" element
And I wait very long for the page to be loaded
Then I should see "Session overview"
# ---- SOCIAL NETWORK ----
When I am on "/social"
And I wait very long for the page to be loaded
Then I should not see an error
# ---- DELETE TEMPTEST SESSION ----
When I am on "/admin/session-list"
And I wait very long for the page to be loaded
And I wait for the element "[name='Search sessions']" to appear
And I fill in "Search sessions" with "temptest"
And I wait very long for the page to be loaded
And I press "Search"
And I wait very long for the page to be loaded
And I wait for the element "span.mdi-delete" to appear
When I click the "span.mdi-delete" element
And I wait very long for the page to be loaded
And I wait for the element ".p-confirmdialog-accept-button" to appear
When I click the ".p-confirmdialog-accept-button" element
And I wait very long for the page to be loaded
# ==============================================================
# SCENARIO 5 — Tutor assigns a skill and parkur01 does LP exercises
# ==============================================================
Scenario: Tuteur assigns skill and parkur01 completes exercises
# ---- STUDENT FOLLOW-UP PAGE (admin via Background) ----
When I am on "/main/my_space/myStudents.php?student=67"
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should not see an error
# ---- SEND LEGAL AGREEMENT ----
When I follow "Send legal agreement"
And I wait very long for the page to be loaded
Then I should not see an error
When I am on "/main/my_space/myStudents.php?student=67"
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should not see an error
# ---- OPEN SKILLS PANEL ----
And I wait for the element "i.mdi-shield-star" to appear
When I click the "i.mdi-shield-star" element
And I wait very long for the page to be loaded
Then I should see "Assign skill"
And I wait for the element "[name='skill']" to appear
And I select "NewSkill" from "skill"
And I wait for the element "[name='argumentation']" to appear
And I fill in "argumentation" with "test skills"
And I wait for the element "[name='assign_skill_save']" to appear
And I press "assign_skill_save"
And I wait very long for the page to be loaded
Then I should not see an error
# ---- LOGIN AS PARKUR01 ----
Given I am not logged
And I am logged as "parkur01"
And I wait very long for the page to be loaded
# ---- INBOX ----
And I wait for the element "i.mdi-inbox" to appear
When I click the "i.mdi-inbox" element
And I wait very long for the page to be loaded
Then I should see "vous avez obtenu une nouvelle compétence"
# ---- SIGN TERMS OF USE ----
When I am on "/main/auth/tc.php"
And I wait very long for the page to be loaded
And I press "Accept Terms and Conditions"
And I wait very long for the page to be loaded
Then I should not see an error
# ---- SESSIONS ----
When I am on "/sessions"
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see "Present session"
When I click element "div.flex.cursor-pointer" containing text "Present session"
And I wait very long for the page to be loaded
And I zoom out to maximum
And I wait for the element "span[title='Testing course fr']" to appear
When I click the "span[title='Testing course fr']" element
And I wait very long for the page to be loaded
Then I should not see an error
# ---- LEARNING PATH ----
And I am on "/course/15/home"
And I wait very long for the page to be loaded
And I zoom out to maximum
When I follow "LP Test"
And I wait very long for the page to be loaded
# QRU and Image Selection exercise
And I click element "a.items-list" containing text "QRU and Image Selection exercise"
And I wait very long for the page to be loaded
And I switch to the iframe "content_name"
And I wait very long for the page to be loaded
When I follow "Start test"
And I wait very long for the page to be loaded
And I wait for the element "#choice-10-1" to appear
And I click the "#choice-10-1" element
And I wait for the element "[name='save_now']" to appear
And I press "save_now"
And I wait very long for the page to be loaded
And I wait for the element ".p-radiobutton-icon" to appear
And I click the ".p-radiobutton-icon" element
And I wait for the element "[name='save_now']" to appear
And I press "save_now"
And I wait very long for the page to be loaded
And I switch back to the main window
And I wait very long for the page to be loaded
# Open question exercise
And I click element "a.items-list" containing text "Open question exercise"
And I wait very long for the page to be loaded
And I switch to the iframe "content_name"
And I wait very long for the page to be loaded
When I follow "Start test"
And I wait very long for the page to be loaded
And I fill in the first textarea with "example"
And I wait for the element "[name='save_now']" to appear
And I press "save_now"
And I wait very long for the page to be loaded
And I switch back to the main window
And I wait very long for the page to be loaded
And I click element "a.items-list" containing text "final"
And I wait very long for the page to be loaded
Then I should see "100%"
And I should not see an error
# ==============================================================
# SCENARIO 6 — Tutor deletes the legal agreement and generates the document
# ==============================================================
Scenario: Tuteur deletes legal agreement and generates document
Given I am not logged
And I am logged as "tuteur_fr"
And I wait very long for the page to be loaded
And I am on "/main/my_space/myStudents.php?student=67"
And I wait very long for the page to be loaded
Then I should see "Delete legal agreement"
When I follow "Generate"
And I wait very long for the page to be loaded
Then I should not see an error
# ==============================================================
# SCENARIO 7 — Teacher announcements, survey and video conference
# ==============================================================
Scenario: Teacher creates announcements, survey and videoconference
Given I am not logged
And I am logged as "teacher"
And I wait very long for the page to be loaded
And I am on "/sessions/past"
And I wait very long for the page to be loaded
Then I should not see an error
When I am on "/sessions"
And I wait very long for the page to be loaded
Then I should not see an error
When I am on "/course/15/home?sid=1"
And I wait very long for the page to be loaded
Then I should not see an error
When I follow "Annonces"
And I wait very long for the page to be loaded
And I wait for the element "i.mdi-bullhorn" to appear
And I click the "i.mdi-bullhorn" element
And I wait very long for the page to be loaded
Then I should not see an error
And I wait for the element "[name='announcement_title']" to appear
And I fill in "announcement_title" with "Test announcement"
And I wait very long for the page to be loaded
And I fill in tinymce field "content" with "Test announcement content"
And I wait very long for the page to be loaded
And I press "choose_recipients"
And I wait very long for the page to be loaded
Then I should see "users"
Then I should see "Test Learner"
And I press "choose_recipients"
And I wait very long for the page to be loaded
And I zoom out to maximum
And I should see "Send this announcement by email to selected groups/users"
And I should see "description"
And I should see "Send a copy by email to myself"
And I wait for the element "#announcement_preview" to appear
When I click the "#announcement_preview" element
And I wait very long for the page to be loaded
Then I should see "Send announcement"
And I should see "Test Learner"
And I wait for the element "em.mdi-check" to appear
When I click the "em.mdi-check" element
And I wait very long for the page to be loaded
Then I should not see an error
# ---- NEW ANNOUNCEMENT WITH DATE AND REMINDER ----
When I am on "/course/15/home?sid=1"
And I wait very long for the page to be loaded
Then I should not see an error
When I follow "Annonces"
And I wait very long for the page to be loaded
And I wait for the element "i.mdi-bullhorn" to appear
And I click the "i.mdi-bullhorn" element
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should not see an error
And I wait for the element "[name='announcement_title']" to appear
And I fill in "announcement_title" with "Test announcement"
And I wait very long for the page to be loaded
And I fill in tinymce field "content" with "Test announcement content"
And I wait very long for the page to be loaded
And I press "add_event"
And I wait very long for the page to be loaded
And I set flatpickr field "event_date_start" to "2026-06-02 08:00:00"
And I set flatpickr field "event_date_end" to "2026-06-30 23:59:00"
And I wait very long for the page to be loaded
And I press "announcement_add_notification"
And I wait very long for the page to be loaded
Then I should not see an error
And I wait for the element "#announcement_preview" to appear
When I click the "#announcement_preview" element
And I wait very long for the page to be loaded
Then I should not see an error
And I wait for the element "em.mdi-check" to appear
When I click the "em.mdi-check" element
And I wait very long for the page to be loaded
Then I should not see an error
# ---- SURVEY CREATION ----
When I am on "/course/15/home?sid=1"
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should not see an error
When I follow "Enquêtes"
And I wait very long for the page to be loaded
And I wait for the element "i.mdi-calendar-multiselect" to appear
And I click the "i.mdi-calendar-multiselect" element
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see "Title"
And I should see "Start Date"
And I should see "End Date"
And I should not see an error
And I wait for the element "[name='survey_survey_title']" to appear
And I fill in "survey_survey_title" with "Test survey"
And I wait very long for the page to be loaded
And I set flatpickr field "start_date" to "2026-06-02 08:00"
And I set flatpickr field "end_date" to "2026-06-30 23:59"
And I wait very long for the page to be loaded
And I wait for the element "em.mdi-plus" to appear
And I click the "em.mdi-plus" element
And I wait very long for the page to be loaded
Then I should not see an error
# ---- SURVEY EMAIL INVITATION ----
And I wait for the element "i.mdi-email-alert" to appear
When I click the "i.mdi-email-alert" element
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see "Users"
And I should see "Test Learner"
And I should see "Remind all users of the survey"
And I should see "Remind only users who didn't answer"
And I should see "Hide survey invitation link"
And I should see "Users who are not invited can use this link to take the survey:"
And I should not see an error
And I wait for the element "[name='publish_form_mail_title']" to appear
And I fill in "publish_form_mail_title" with "Test survey invitation"
And I wait very long for the page to be loaded
And I fill in tinymce field "mail_text" with "Please take the survey."
And I wait very long for the page to be loaded
And I wait for the element "em.mdi-check" to appear
When I click the "em.mdi-check" element
And I wait very long for the page to be loaded
Then I should not see an error
# ---- SURVEY NAVIGATION ----
When I am on "/course/15/home?sid=1"
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should not see an error
When I follow "Enquêtes"
And I wait very long for the page to be loaded
When I follow "Test survey"
And I wait very long for the page to be loaded
Then I should not see an error
# ---- VIDEOCONFERENCE ----
When I am on "/course/15/home?sid=1"
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should not see an error
When I follow "Vidéoconférence"
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see "Copy text"
And I should not see an error
# ==============================================================
# SCENARIO 8 — Parkur01 skills + teacher corrects the open question exercise
# ==============================================================
Scenario: Parkur01 skills review and teacher exercise correction
Given I am not logged
And I am logged as "parkur01"
And I wait very long for the page to be loaded
# ---- MY SKILLS ----
When I am on "/main/social/my_skills_report.php"
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see "NewSkill"
And I should not see an error
# ---- SOCIAL NETWORK ----
When I am on "/social"
And I wait very long for the page to be loaded
And I wait for the element "span.mdi-pencil" to appear
And I click the "span.mdi-pencil" element
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see "First name"
And I should see "Last name"
And I should see "E-mail"
And I should see the "input#profile_illustration" element
And I should not see an error
# ---- INBOX ----
When I am on "/resources/messages"
And I wait very long for the page to be loaded
When I follow "Vous avez obtenu une nouvelle compétence."
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see "NewSkill"
And I should see "/skill/2/user/67"
And I should not see an error
# ---- SKILL PAGE ----
When I am on "/skill/2/user/67"
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see "Recipient details"
And I should not see an error
# ---- OPEN QUESTION EXERCISE ----
When I am on "/course/15/home?sid=1"
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should not see an error
When I follow "Exercices"
And I wait very long for the page to be loaded
When I follow "Open question exercise"
And I wait very long for the page to be loaded
And I zoom out to maximum
When I follow "Start test"
And I wait very long for the page to be loaded
And I fill in the first textarea with "example"
And I wait for the element "[name='save_now']" to appear
And I press "save_now"
And I wait very long for the page to be loaded
Then I should not see an error
# ---- RECONNECT AS TEACHER ----
Given I am not logged
And I am logged as "teacher"
And I wait very long for the page to be loaded
# ---- INBOX ----
And I wait for the element "i.mdi-inbox" to appear
When I click the "i.mdi-inbox" element
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see "A learner attempted an exercise"
And I should not see an error
# ---- COURSE FOLLOW-UP ----
When I am on "/course/15/home?sid=1"
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should not see an error
And I wait for the element "#course-tool-404" to appear
When I click the "#course-tool-404" element
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should not see an error
# ---- LEARNER DETAILS ----
When I am on "/main/my_space/myStudents.php?details=true&cid=15&course=TESTINGCOURSEFR&origin=tracking_course&sid=1&student=67"
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should not see an error
# ---- CORRECTION OPEN QUESTION ----
And I wait for the element "i.mdi-order-bool-ascending-variant" to appear
When I click the "i.mdi-order-bool-ascending-variant" element
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see "Open question exercise : Result"
And I wait for the element "[name='show_ck']" to appear
And I press "show_ck"
And I wait very long for the page to be loaded
And I fill in tinymce field "comments_12" with "ZYX"
And I wait very long for the page to be loaded
And I wait for the element "input[name='send_notification']" to appear
And I click the "input[name='send_notification']" element
And I wait very long for the page to be loaded
Then I should not see an error
And I wait for the element "em.mdi-send" to appear
When I click the "em.mdi-send" element
And I wait very long for the page to be loaded
Then I should not see an error
# ==============================================================
# SCENARIO 9 — Admin calendar, social network, course creation and doodle
# ==============================================================
Scenario: Admin calendar events, social network, course and doodle
# Background: already logged in as admin
Then I should not see an error
# ---- AGENDA ----
When I follow "Agenda"
And I wait very long for the page to be loaded
Then I should see "Agenda"
And I wait for the element "span.mdi-calendar-plus" to appear
When I click the "span.mdi-calendar-plus" element
And I wait very long for the page to be loaded
Then I should see "Add event"
And I wait for the element "[name='event-title']" to appear
And I fill in "event-title" with "Evenement 4 jours"
And I wait very long for the page to be loaded
When I set datepicker "calendar-start-date" to "2026-06-15"
And I set datepicker "calendar-end-date" to "2026-06-18"
And I wait very long for the page to be loaded
And I fill in tinymce field "calendar-event-content" with "Evenement 4 jours"
And I wait very long for the page to be loaded
And I press "Add"
And I wait very long for the page to be loaded
Then I should not see an error
And I wait for the element "span.mdi-calendar-plus" to appear
When I click the "span.mdi-calendar-plus" element
And I wait very long for the page to be loaded
Then I should see "Add event"
And I wait for the element "[name='event-title']" to appear
And I fill in "event-title" with "Evenement mois avant"
And I wait very long for the page to be loaded
When I set datepicker "calendar-start-date" to "2026-05-15"
And I set datepicker "calendar-end-date" to "2026-06-18"
And I wait very long for the page to be loaded
And I fill in tinymce field "calendar-event-content" with "Evenement mois avant"
And I wait very long for the page to be loaded
And I press "Add"
And I wait very long for the page to be loaded
Then I should not see an error
And I wait for the element "span.mdi-calendar-plus" to appear
When I click the "span.mdi-calendar-plus" element
And I wait very long for the page to be loaded
Then I should see "Add event"
And I wait for the element "[name='event-title']" to appear
And I fill in "event-title" with "Evenement mois apres"
And I wait very long for the page to be loaded
When I set datepicker "calendar-start-date" to "2026-06-15"
And I set datepicker "calendar-end-date" to "2026-07-18"
And I wait very long for the page to be loaded
And I fill in tinymce field "calendar-event-content" with "Evenement mois apres"
And I wait very long for the page to be loaded
And I press "Add"
And I wait very long for the page to be loaded
Then I should not see an error
And I wait for the element "span.mdi-calendar-plus" to appear
When I click the "span.mdi-calendar-plus" element
And I wait very long for the page to be loaded
Then I should see "Add event"
And I wait for the element "[name='event-title']" to appear
And I fill in "event-title" with "Evenement avant et apres"
And I wait very long for the page to be loaded
When I set datepicker "calendar-start-date" to "2026-05-15"
And I set datepicker "calendar-end-date" to "2026-07-18"
And I wait very long for the page to be loaded
And I fill in tinymce field "calendar-event-content" with "Evenement avant et apres"
And I wait very long for the page to be loaded
And I press "Add"
And I wait very long for the page to be loaded
Then I should not see an error
# ---- SOCIAL NETWORK — Home ----
And I wait for the element "[aria-label='Social network']" to appear
When I click the "[aria-label='Social network']" element
And I wait very long for the page to be loaded
And I wait for the element "a.p-menuitem-link[href='/social']" to appear
And I click the "a.p-menuitem-link[href='/social']" element
And I wait very long for the page to be loaded
Then I should see "All Messages"
And I should see "Promoted Messages"
And I fill in tinymce field "content-editor" with "voici mon poste"
And I wait very long for the page to be loaded
And I wait for the element "span.mdi-send" to appear
And I click the "span.mdi-send" element
And I wait very long for the page to be loaded
Then I should see "voici mon poste"
And I should not see an error
# ---- ADMINISTRATION — Course creation ----
And I wait for the element "[aria-label='Administration']" to appear
When I click the "[aria-label='Administration']" element
And I wait very long for the page to be loaded
And I wait for the element "a.p-menuitem-link[href='/admin']" to appear
And I click the "a.p-menuitem-link[href='/admin']" element
And I wait very long for the page to be loaded
And I zoom out to maximum
And I wait very long for the page to be loaded
When I follow "Course list"
And I wait very long for the page to be loaded
And I wait for the element "span.mdi-plus" to appear
And I click the "span.mdi-plus" element
And I wait very long for the page to be loaded
And I zoom out to maximum
And I wait very long for the page to be loaded
And I wait for the element "[name='title']" to appear
And I fill in "title" with "Titre du cours"
And I wait very long for the page to be loaded
And I wait for the element "em.mdi-plus" to appear
And I click the "em.mdi-plus" element
And I wait very long for the page to be loaded
And I zoom out to maximum
Then I should see "Titre du cours"
And I should not see an error
# ---- SURVEY DOODLE ----
And I wait for the element "[aria-label='Administration']" to appear
When I click the "[aria-label='Administration']" element
And I wait very long for the page to be loaded
And I wait for the element "a.p-menuitem-link[href='/admin/course-list']" to appear
And I click the "a.p-menuitem-link[href='/admin/course-list']" element
And I wait very long for the page to be loaded
And I zoom out to maximum
And I wait very long for the page to be loaded
When I follow "Titre du cours"
And I wait very long for the page to be loaded
And I zoom out to maximum
And I wait very long for the page to be loaded
When I follow "Surveys"
And I wait very long for the page to be loaded
And I wait for the element "i.mdi-calendar-multiselect" to appear
And I click the "i.mdi-calendar-multiselect" element
And I wait very long for the page to be loaded
And I zoom out to maximum
And I wait very long for the page to be loaded
And I wait for the element "[name='survey_title']" to appear
And I fill in "survey_title" with "Test Doodle"
And I wait very long for the page to be loaded
And I set flatpickr field "start_date" to "2026-06-07"
And I wait very long for the page to be loaded
And I set flatpickr field "end_date" to "2026-06-14"
And I wait very long for the page to be loaded
And I set flatpickr field "time_1" to "2026-06-08"
And I wait very long for the page to be loaded
And I set flatpickr field "time_2" to "2026-06-09"
And I wait very long for the page to be loaded
And I set flatpickr field "time_3" to "2026-06-11"
And I wait very long for the page to be loaded
And I wait for the element "em.mdi-plus" to appear
And I click the "em.mdi-plus" element
And I wait very long for the page to be loaded
Then I should see "Test Doodle"
And I should not see an error
# ---- PUBLISH DOODLE INVITATION ----
And I zoom out to maximum
And I wait very long for the page to be loaded
And I wait for the element "i.mdi-email-alert" to appear
And I click the "i.mdi-email-alert" element
And I wait very long for the page to be loaded
And I zoom out to maximum
And I wait very long for the page to be loaded
And I wait for the element "#users_rightAll" to appear
And I click the "#users_rightAll" element
And I wait very long for the page to be loaded
And I wait for the element "[name='mail_title']" to appear
And I fill in "mail_title" with "Invitation Test Doodle"
And I wait very long for the page to be loaded
And I fill in tinymce field "mail_text" with "Vous etes invite a repondre a ce sondage."
And I wait very long for the page to be loaded
And I wait for the element "#publish_form_submit" to appear
And I click the "#publish_form_submit" element
And I wait very long for the page to be loaded
Then I should not see an error
# ---- FILL THE DOODLE ----
When I go to "/resources/messages"
And I wait very long for the page to be loaded
Then I should see "Invitation Test Doodle"