itemengine-cypress-automation 1.0.573-IEI-7080-f70315e.0 → 1.0.574-IEI-7080-e6d1871.0

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.
Files changed (44) hide show
  1. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +181 -0
  2. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsBasic.js +37 -2
  3. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsForAnswerInputFields.js +72 -4
  4. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +19 -1
  5. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +56 -1
  6. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +57 -3
  7. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +15 -18
  8. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +54 -1
  9. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomization.js +12 -0
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomizationAllViews.js +156 -0
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +0 -2
  12. package/cypress/e2e/ILC/ImageHighlight/additionalSettings.js +86 -0
  13. package/cypress/e2e/ILC/ImageHighlight/backgroundImageAndCanvasProperties.js +60 -9
  14. package/cypress/e2e/ILC/ImageHighlight/customiseHighlightStyle.js +14 -12
  15. package/cypress/e2e/ILC/ImageHighlight/imageHighlightStyle.js +12 -3
  16. package/cypress/e2e/ILC/ImageHighlight/minimumScoringPenaltyPointsAndRoundingDropdown.js +65 -2
  17. package/cypress/e2e/ILC/ImageHighlight/studentViewSettings.js +15 -1
  18. package/cypress/e2e/ILC/MultipleSelection/allOrNothingBasicForAllViews.smoke.js +1 -168
  19. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +284 -17
  20. package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsWithAlternativeAnswer.js +397 -25
  21. package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsWithAlternativeAnswer.js +320 -20
  22. package/cypress/e2e/ILC/SingleSelection/allOrNothingBasicForAllViews.smoke.js +0 -130
  23. package/cypress/e2e/ILC/SingleSelection/allOrNothingWithAlternativeAnswer.js +97 -10
  24. package/cypress/e2e/ILC/dataApi/saveItems.js +1 -1
  25. package/cypress/e2e/ILC/dataApi/saveQuestions.js +7 -7
  26. package/cypress/e2e/ILC/dataApi/saveQuestionsMCQAlternateAnswers.js +6 -6
  27. package/cypress/pages/components/additionalSettingsPanel.js +9 -0
  28. package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
  29. package/cypress/pages/components/colorPopupComponent.js +1 -1
  30. package/cypress/pages/components/figCommonStyleAndLayoutComponent.js +4 -10
  31. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +15 -2
  32. package/cypress/pages/components/gradingViewEnumerationComponent.js +5 -0
  33. package/cypress/pages/components/imageCanvasComponent.js +0 -3
  34. package/cypress/pages/components/placeholderTextSectionComponent.js +10 -0
  35. package/cypress/pages/components/showAlternativeAnswersComponent.js +41 -65
  36. package/cypress/pages/fillInTheGapsOverImageTextPage.js +21 -1
  37. package/cypress/pages/imageHighlightPage.js +184 -7
  38. package/cypress/pages/itemPreviewPage.js +1 -0
  39. package/cypress/pages/multipleSelectionPage.js +32 -0
  40. package/cypress/pages/singleSelectionPage.js +17 -0
  41. package/cypress/support/helpers/utilities.js +16 -0
  42. package/package.json +1 -1
  43. package/scripts/sorry-cypress.mjs +47 -53
  44. package/service.yaml +2 -2
@@ -50,7 +50,22 @@ describe('Create item page - Multiple selection: All or nothing with alternative
50
50
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(4);
51
51
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(5);
52
52
  if (alternativeAnswerCheck === 'true') {
53
- multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 10);
53
+ multipleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
54
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
55
+ multipleSelectionPage.steps.disableShowAlternativeAnswersToggle();
56
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
57
+ multipleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
58
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
59
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
60
+ multipleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
61
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(2);
62
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(3);
63
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(4);
64
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(0);
65
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(1);
66
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(5);
67
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
68
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
54
69
  }
55
70
  multipleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
56
71
  });
@@ -155,7 +170,22 @@ describe('Create item page - Multiple selection: All or nothing with alternative
155
170
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(5);
156
171
  //show alternative answers
157
172
  if (alternativeAnswerCheck === 'true') {
158
- multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 10);
173
+ multipleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
174
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
175
+ multipleSelectionPage.steps.disableShowAlternativeAnswersToggle();
176
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
177
+ multipleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
178
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
179
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
180
+ multipleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
181
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(2);
182
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(3);
183
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(4);
184
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(0);
185
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(1);
186
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(5);
187
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
188
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
159
189
  }
160
190
  multipleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
161
191
  /*cy.log('When the user has attempted the question with partially correct responses exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icons should only be displayed besides correct responses from the correct accordion, correct icons should not be displayed besides unattempted correct options, incorrect icon should be displayed besides the incorrect responses, and status message \'Your answer is incorrect\' should be displayed below the question preview')
@@ -190,7 +220,16 @@ describe('Create item page - Multiple selection: All or nothing with alternative
190
220
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(5);
191
221
  //show alternative answers
192
222
  if (alternativeAnswerCheck === 'true') {
193
- multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 10);
223
+ multipleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
224
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
225
+ multipleSelectionPage.steps.disableShowAlternativeAnswersToggle();
226
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
227
+ multipleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
228
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
229
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
230
+ multipleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
231
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
232
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
194
233
  }
195
234
  multipleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
196
235
  /*cy.log('When the user has attempted the question with partially correct responses exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icons should only be displayed besides correct responses from the alternative accordion, correct icons should not be displayed besides unattempted correct options, incorrect icon should be displayed besides the incorrect responses, and status message \'Your answer is incorrect\' should be displayed below the question preview')
@@ -224,7 +263,22 @@ describe('Create item page - Multiple selection: All or nothing with alternative
224
263
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(5);
225
264
  //show alternative answers
226
265
  if (alternativeAnswerCheck === 'true') {
227
- multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 10);
266
+ multipleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
267
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
268
+ multipleSelectionPage.steps.disableShowAlternativeAnswersToggle();
269
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
270
+ multipleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
271
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
272
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
273
+ multipleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
274
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(2);
275
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(3);
276
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(4);
277
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(0);
278
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(1);
279
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(5);
280
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
281
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
228
282
  }
229
283
  multipleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
230
284
  /*cy.log('When the user has attempted the question with equal number of correct responses from correct accordion and alternative accordion, then correct icon should be displayed besides correct accordion answer responses, correct icons should not be displayed besides unattempted correct options, incorrect icon should be displayed besides alternative accordion answer responses, and status message \'Your answer is incorrect\' should be displayed below the question preview')
@@ -258,7 +312,22 @@ describe('Create item page - Multiple selection: All or nothing with alternative
258
312
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(5);
259
313
  //show alternative answers
260
314
  if (alternativeAnswerCheck === 'true') {
261
- multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 10);
315
+ multipleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
316
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
317
+ multipleSelectionPage.steps.disableShowAlternativeAnswersToggle();
318
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
319
+ multipleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
320
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
321
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
322
+ multipleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
323
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(2);
324
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(3);
325
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(4);
326
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(0);
327
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(1);
328
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(5);
329
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
330
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
262
331
  }
263
332
  multipleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
264
333
  /*cy.log('When the user has attempted the question with the common response between correct accordion and alternative accordion, and clicks on \'Check answer\' button, then correct icons should only be displayed besides correct responses from the correct accordion, correct icons should not be displayed besides unattempted correct options, and status message \'Your answer is incorrect\' should be displayed below the question preview')
@@ -290,7 +359,22 @@ describe('Create item page - Multiple selection: All or nothing with alternative
290
359
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(5);
291
360
  //show alternative answers
292
361
  if (alternativeAnswerCheck === 'true') {
293
- multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 10);
362
+ multipleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
363
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
364
+ multipleSelectionPage.steps.disableShowAlternativeAnswersToggle();
365
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
366
+ multipleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
367
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
368
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
369
+ multipleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
370
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(2);
371
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(3);
372
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(4);
373
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(0);
374
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(1);
375
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(5);
376
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
377
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
294
378
  }
295
379
  // multipleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
296
380
  /*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should only be displayed besides incorrect responses, correct icons should not be displayed besides unattempted correct options, and status message \'Your answer is incorrect\' should be displayed below the question preview')
@@ -383,7 +467,22 @@ describe('Create item page - Multiple selection: All or nothing with alternative
383
467
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(5);
384
468
  //show alternative answers
385
469
  if (alternativeAnswerCheck === 'true') {
386
- multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 10);
470
+ multipleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
471
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
472
+ multipleSelectionPage.steps.disableShowAlternativeAnswersToggle();
473
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
474
+ multipleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
475
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
476
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
477
+ multipleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
478
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(0);
479
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(1);
480
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(2);
481
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(3);
482
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(4);
483
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(5);
484
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
485
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
387
486
  }
388
487
  multipleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
389
488
  });
@@ -468,7 +567,22 @@ describe('Create item page - Multiple selection: All or nothing with alternative
468
567
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(5);
469
568
  //show alternative answers
470
569
  if (alternativeAnswerCheck === 'true') {
471
- multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 10);
570
+ multipleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
571
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
572
+ multipleSelectionPage.steps.disableShowAlternativeAnswersToggle();
573
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
574
+ multipleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
575
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
576
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
577
+ multipleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
578
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(0);
579
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(1);
580
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(2);
581
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(3);
582
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(4);
583
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(5);
584
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
585
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
472
586
  }
473
587
  multipleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
474
588
  /*cy.log('When the user has attempted the question with partially correct responses exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icons should only be displayed besides correct responses from the correct accordion, correct icons should not be displayed besides unattempted correct options, incorrect icon should be displayed besides the incorrect responses, and status message \'Your answer is incorrect\' should be displayed below the question preview')
@@ -502,7 +616,22 @@ describe('Create item page - Multiple selection: All or nothing with alternative
502
616
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(5);
503
617
  //show alternative answers
504
618
  if (alternativeAnswerCheck === 'true') {
505
- multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 10);
619
+ multipleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
620
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
621
+ multipleSelectionPage.steps.disableShowAlternativeAnswersToggle();
622
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
623
+ multipleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
624
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
625
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
626
+ multipleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
627
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(0);
628
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(1);
629
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(2);
630
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(3);
631
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(4);
632
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(5);
633
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
634
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
506
635
  }
507
636
  multipleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
508
637
  /*cy.log('When the user has attempted the question with partially correct responses exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icons should only be displayed besides correct responses from the alternative accordion, correct icons should not be displayed besides unattempted correct options, incorrect icon should be displayed besides the incorrect responses, and status message \'Your answer is incorrect\' should be displayed below the question preview')
@@ -536,7 +665,22 @@ describe('Create item page - Multiple selection: All or nothing with alternative
536
665
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(5);
537
666
  //show alternative answers
538
667
  if (alternativeAnswerCheck === 'true') {
539
- multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 10);
668
+ multipleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
669
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
670
+ multipleSelectionPage.steps.disableShowAlternativeAnswersToggle();
671
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
672
+ multipleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
673
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
674
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
675
+ multipleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
676
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(0);
677
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(1);
678
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(2);
679
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(3);
680
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(4);
681
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(5);
682
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
683
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
540
684
  }
541
685
  multipleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
542
686
  /*cy.log('When the user has attempted the question with equal number of correct responses from correct accordion and alternative accordion, then correct icon should be displayed besides alternative accordion answer responses, correct icons should not be displayed besides unattempted correct options, incorrect icon should be displayed besides correct accordion answer responses, and status message \'Your answer is incorrect\' should be displayed below the question preview')
@@ -569,7 +713,22 @@ describe('Create item page - Multiple selection: All or nothing with alternative
569
713
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(5);
570
714
  //show alternative answers
571
715
  if (alternativeAnswerCheck === 'true') {
572
- multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 10);
716
+ multipleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
717
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
718
+ multipleSelectionPage.steps.disableShowAlternativeAnswersToggle();
719
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
720
+ multipleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
721
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
722
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
723
+ multipleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
724
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(0);
725
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(1);
726
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(2);
727
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(3);
728
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(4);
729
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(5);
730
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
731
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
573
732
  }
574
733
  multipleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
575
734
  /*cy.log('When the user has attempted the question with the common response between correct accordion and alternative accordion, and clicks on \'Check answer\' button, then correct icons should only be displayed besides the common response, correct icons should not be displayed besides unattempted correct options, and status message \'Your answer is incorrect\' should be displayed below the question preview')
@@ -601,7 +760,22 @@ describe('Create item page - Multiple selection: All or nothing with alternative
601
760
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(5);
602
761
  //show alternative answers
603
762
  if (alternativeAnswerCheck === 'true') {
604
- multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 10);
763
+ multipleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
764
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
765
+ multipleSelectionPage.steps.disableShowAlternativeAnswersToggle();
766
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
767
+ multipleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
768
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
769
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
770
+ multipleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
771
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(0);
772
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(1);
773
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(2);
774
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(3);
775
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(4);
776
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(5);
777
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
778
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
605
779
  }
606
780
  multipleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
607
781
  /*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides incorrect responses, correct icons should not be displayed besides unattempted correct options, and status message \'Your answer is incorrect\' should be displayed below the question preview')
@@ -655,7 +829,22 @@ describe('Create item page - Multiple selection: All or nothing with alternative
655
829
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(5);
656
830
  //show alternative answers
657
831
  if (alternativeAnswerCheck === 'true') {
658
- multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 20);
832
+ multipleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
833
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
834
+ multipleSelectionPage.steps.disableShowAlternativeAnswersToggle();
835
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
836
+ multipleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
837
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
838
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
839
+ multipleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(20 points)');
840
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(2);
841
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(3);
842
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(4);
843
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(0);
844
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(1);
845
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(5);
846
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
847
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
659
848
  }
660
849
  multipleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
661
850
  });
@@ -739,7 +928,22 @@ describe('Create item page - Multiple selection: All or nothing with alternative
739
928
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(5);
740
929
  //show alternative answers
741
930
  if (alternativeAnswerCheck === 'true') {
742
- multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 20);
931
+ multipleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
932
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
933
+ multipleSelectionPage.steps.disableShowAlternativeAnswersToggle();
934
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
935
+ multipleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
936
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
937
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
938
+ multipleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(20 points)');
939
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(2);
940
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(3);
941
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(4);
942
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(0);
943
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(1);
944
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(5);
945
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
946
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
743
947
  }
744
948
  multipleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
745
949
  /*cy.log('When the user has attempted the question with partially correct responses exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icons should only be displayed besides correct responses from the correct accordion, correct icons should not be displayed besides unattempted correct options, incorrect icon should be displayed besides the incorrect responses, and status message \'Your answer is incorrect\' should be displayed below the question preview')
@@ -774,7 +978,22 @@ describe('Create item page - Multiple selection: All or nothing with alternative
774
978
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(5);
775
979
  //show alternative answers
776
980
  if (alternativeAnswerCheck === 'true') {
777
- multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 20);
981
+ multipleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
982
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
983
+ multipleSelectionPage.steps.disableShowAlternativeAnswersToggle();
984
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
985
+ multipleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
986
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
987
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
988
+ multipleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(20 points)');
989
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(2);
990
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(3);
991
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(4);
992
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(0);
993
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(1);
994
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(5);
995
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
996
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
778
997
  }
779
998
  multipleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
780
999
  /*cy.log('When the user has attempted the question with partially correct responses exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icons should only be displayed besides correct responses from the alternative accordion, correct icons should not be displayed besides unattempted correct options, incorrect icon should be displayed besides the incorrect responses, and status message \'Your answer is incorrect\' should be displayed below the question preview')
@@ -808,7 +1027,22 @@ describe('Create item page - Multiple selection: All or nothing with alternative
808
1027
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(5);
809
1028
  //show alternative answers
810
1029
  if (alternativeAnswerCheck === 'true') {
811
- multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 20);
1030
+ multipleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
1031
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
1032
+ multipleSelectionPage.steps.disableShowAlternativeAnswersToggle();
1033
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
1034
+ multipleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
1035
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
1036
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
1037
+ multipleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(20 points)');
1038
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(2);
1039
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(3);
1040
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(4);
1041
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(0);
1042
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(1);
1043
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(5);
1044
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
1045
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
812
1046
  }
813
1047
  multipleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
814
1048
  /*cy.log('When the user has attempted the question with equal number of correct responses from correct accordion and alternative accordion, then correct icon should be displayed besides correct accordion answer responses, correct icons should not be displayed besides unattempted correct options, incorrect icon should be displayed besides alternative accordion answer responses, and status message \'Your answer is incorrect\' should be displayed below the question preview')
@@ -839,6 +1073,24 @@ describe('Create item page - Multiple selection: All or nothing with alternative
839
1073
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(3);
840
1074
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(4);
841
1075
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(5);
1076
+ if (alternativeAnswerCheck === 'true') {
1077
+ multipleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
1078
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
1079
+ multipleSelectionPage.steps.disableShowAlternativeAnswersToggle();
1080
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
1081
+ multipleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
1082
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
1083
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
1084
+ multipleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(20 points)');
1085
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(2);
1086
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(3);
1087
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(4);
1088
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(0);
1089
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(1);
1090
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(5);
1091
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
1092
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
1093
+ }
842
1094
  multipleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
843
1095
  /*cy.log('When the user has attempted the question with the common response between correct accordion and alternative accordion and clicks on \'Check answer\' button, then correct icons should only be displayed besides correct responses from the correct accordion, correct icons should not be displayed besides unattempted correct options, and status message \'Your answer is incorrect\' should be displayed below the question preview')
844
1096
  multipleSelectionPage.steps.checkAnswer();
@@ -869,7 +1121,22 @@ describe('Create item page - Multiple selection: All or nothing with alternative
869
1121
  multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleCorrectAnswerSection(5);
870
1122
  //show alternative answers
871
1123
  if (alternativeAnswerCheck === 'true') {
872
- multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 20);
1124
+ multipleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
1125
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
1126
+ multipleSelectionPage.steps.disableShowAlternativeAnswersToggle();
1127
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
1128
+ multipleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
1129
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
1130
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
1131
+ multipleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(20 points)');
1132
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(2);
1133
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(3);
1134
+ multipleSelectionPage.steps.verifyCorrectOptionIconAlternativeAnswerSection(4);
1135
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(0);
1136
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(1);
1137
+ multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection(5);
1138
+ multipleSelectionPage.steps.clickShowAlternativeAnswersToggle();
1139
+ multipleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
873
1140
  }
874
1141
  multipleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
875
1142
  /*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should only be displayed besides incorrect responses, correct icons should not be displayed besides unattempted correct options, and status message \'Your answer is incorrect\' should be displayed below the question preview')