itemengine-cypress-automation 1.0.68 → 1.0.70

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +2 -2
  2. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +1 -1
  3. package/cypress/e2e/ILC/EssayResponse/essayResponseScoringSection.js +2 -2
  4. package/cypress/e2e/ILC/FeedbackScale/feedbackScaleAdditionalSettingsBasic.js +8 -9
  5. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropGroupedOptionsPartialEqualWeightsWithAlternateAnswer.js +0 -4
  6. package/cypress/e2e/ILC/Highlight/HighlightScoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +2 -0
  7. package/cypress/e2e/ILC/Highlight/HighlightScoring/allOrNothingScoring.js +2 -0
  8. package/cypress/e2e/ILC/Highlight/{highlightBasicScoringForTextSelectionTypes.js → HighlightScoring/highlightBasicScoringForTextSelectionTypes.js} +1 -1
  9. package/cypress/e2e/ILC/Highlight/HighlightScoring/{manualAndNonScored.js → manuallyAndNonScored.js} +1 -1
  10. package/cypress/e2e/ILC/Highlight/HighlightScoring/{partialDifferentWeightsCorrectEqualToAlternatePoints.js → partialDifferentWeightsCorrectPointsEqualToAlternatePoints.js} +2 -0
  11. package/cypress/e2e/ILC/Highlight/HighlightScoring/partialDifferentWeightsScoring.js +7 -2
  12. package/cypress/e2e/ILC/Highlight/HighlightScoring/partialEqualWeightsCorrectPointEqualToAlternatePoints.js +2 -0
  13. package/cypress/e2e/ILC/Highlight/HighlightScoring/partialEqualWeightsScoring.js +6 -1
  14. package/cypress/e2e/ILC/Highlight/highlightAdditionalSettingsBasic.js +2 -3
  15. package/cypress/e2e/ILC/Highlight/highlightAdditionalSettingsMaximumNumberOfAnswers.js +0 -2
  16. package/cypress/e2e/ILC/Highlight/highlightEditTabScoringSection.js +4 -3
  17. package/cypress/e2e/ILC/HighlightImage/highlightImageAdditionalSettings.js +4 -4
  18. package/cypress/e2e/ILC/HighlightImage/highlightImageAdditionalSettingsBasic.js +4 -10
  19. package/cypress/e2e/ILC/HighlightImage/highlightImageAllOrNothingScoring.js +3 -3
  20. package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabScoring.js +9 -5
  21. package/cypress/e2e/ILC/HighlightImage/highlightImageManuallyAndNonScoredScoring.js +1 -1
  22. package/cypress/e2e/ILC/HighlightImage/highlightImagePartialDifferentWeightsScoring.js +14 -15
  23. package/cypress/e2e/ILC/HighlightImage/highlightImagePartialDifferentWeightsWithAlternateAnswer.js +0 -3
  24. package/cypress/e2e/ILC/HighlightImage/highlightImagePartialEqualWeightsScoring.js +14 -14
  25. package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +60 -66
  26. package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +84 -109
  27. package/cypress/e2e/ILC/UploadResponse/uploadResponseHeaderSection.js +4 -18
  28. package/cypress/e2e/ILC/UploadResponse/uploadResponsePreview.js +119 -150
  29. package/cypress/e2e/ILC/UploadResponse/uploadResponseScoringSection.js +2 -2
  30. package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +110 -164
  31. package/cypress/e2e/ILC/VideoResponse/videoResponseAdditionalSettings.js +1 -1
  32. package/cypress/e2e/ILC/VideoResponse/videoResponseAdditionalSettingsBasic.js +11 -12
  33. package/cypress/e2e/ILC/VideoResponse/videoResponsePreviewTab.js +6 -5
  34. package/cypress/fixtures/theme/ilc.json +2 -1
  35. package/cypress/pages/audioPlayerPage.js +2 -2
  36. package/cypress/pages/components/additionalSettingsPanel.js +46 -14
  37. package/cypress/pages/components/autoScoredAdditionalSettings.js +6 -6
  38. package/cypress/pages/components/autoScoredPreviewBase.js +6 -8
  39. package/cypress/pages/components/autoScoredScoringSection.js +22 -18
  40. package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +60 -9
  41. package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +7 -7
  42. package/cypress/pages/components/createQuestionBasePage.js +8 -2
  43. package/cypress/pages/components/draggableOptionsContainer.js +2 -1
  44. package/cypress/pages/components/equationEditorFlyout.js +2 -1
  45. package/cypress/pages/components/essayResponseCommonComponents.js +10 -4
  46. package/cypress/pages/components/figOverImageCommonComponent.js +2 -1
  47. package/cypress/pages/components/fillInTheGapsCommonComponents.js +34 -14
  48. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -1
  49. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +7 -7
  50. package/cypress/pages/components/listSortingAndOrderingBase.js +1 -1
  51. package/cypress/pages/components/mcqAdditionalSettingsBase.js +10 -0
  52. package/cypress/pages/components/mcqQuestionCommonComponents.js +1 -1
  53. package/cypress/pages/components/mcqScoringComponent.js +1 -1
  54. package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +20 -18
  55. package/cypress/pages/components/questionInstructionsComponent.js +1 -1
  56. package/cypress/pages/components/scoringSectionBase.js +30 -1
  57. package/cypress/pages/components/setPointsPopupBase.js +2 -1
  58. package/cypress/pages/components/uploadImageSectionComponent.js +8 -8
  59. package/cypress/pages/createItemPage.js +83 -1
  60. package/cypress/pages/dialogBoxBase.js +3 -7
  61. package/cypress/pages/dragAndDropIntoCategoriesPage.js +5 -4
  62. package/cypress/pages/essayResponsePage.js +1 -0
  63. package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -0
  64. package/cypress/pages/fillInTheGapsScoring.js +215 -317
  65. package/cypress/pages/highlightImagePage.js +6 -4
  66. package/cypress/pages/highlightPage.js +1 -2
  67. package/cypress/pages/index.js +4 -0
  68. package/cypress/pages/listMatchingPage.js +5 -4
  69. package/cypress/pages/listMatchingScoring.js +274 -272
  70. package/cypress/pages/listOrderingPage.js +23 -14
  71. package/cypress/pages/listSortingPage.js +7 -9
  72. package/cypress/pages/multipleSelectionPage.js +2 -1
  73. package/cypress/pages/shortTextResponsePage.js +9 -0
  74. package/cypress/pages/singleSelectionPage.js +1 -0
  75. package/cypress/pages/uploadResponsePage.js +296 -15
  76. package/cypress/pages/videoResponsePage.js +5 -6
  77. package/package.json +1 -1
@@ -11,13 +11,12 @@ const css = Cypress.env('css');
11
11
  const tests = {
12
12
  verifyAutoScoredPartialDifferentWeightsScoring: (questionType) => {
13
13
  it('When the user selects \'Show correct answer\' checkbox without attempting the question, then red cross-mark icon or green check-mark icon should not be displayed anywhere, correct/incorrect answer label and its border should not be displayed and the correct answer container should be displayed below the question field with the correct responses from the correct tab', () => {
14
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
15
- .click();
14
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
16
15
  autoScoredPreviewBase.incorrectIcon()
17
16
  .should('not.exist');
18
17
  autoScoredPreviewBase.correctIcon()
19
18
  .should('not.exist');
20
- autoScoredPreviewBase.correctIncorectAnswerLabel()
19
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
21
20
  .should('not.exist');
22
21
  autoScoredPreviewBase.correctIncorrectAnswerBorder()
23
22
  .should('not.exist');
@@ -35,8 +34,7 @@ const tests = {
35
34
  throw new Error('Invalid question type');
36
35
  };
37
36
  cy.log('De-selecting show correct answer checkbox')
38
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
39
- .click();
37
+ previewScoringAndShowCorrectAnswerComponent.steps.uncheckShowCorrectAnswerCheckbox();
40
38
  if (questionType === 'fill in the gaps - drag and drop') {
41
39
  fillInTheGapsDragAndDropPage.previewTabCorrectAnswerContainer()
42
40
  .should('not.exist');
@@ -60,7 +58,7 @@ const tests = {
60
58
  fillInTheGapsCommonComponents.previewTabCorrectAnswerContainer()
61
59
  .should('not.exist');
62
60
  };
63
- autoScoredPreviewBase.correctIncorectAnswerLabel()
61
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
64
62
  .should('not.exist');
65
63
  autoScoredPreviewBase.correctIncorrectAnswerBorder()
66
64
  .should('not.exist');
@@ -89,8 +87,7 @@ const tests = {
89
87
  autoScoredScoringSection.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
90
88
 
91
89
  cy.log('When the user selects \'Show correct answer\' checkbox, then red cross-mark icon should be displayed beside the incorrect responses, incorrect answer label and its border should not be displayed and the correct answer container should be displayed with the correct responses from the correct tab for the user responses marked incorrect')
92
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
93
- .click();
90
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
94
91
  if (questionType === 'fill in the gaps - drag and drop') {
95
92
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
96
93
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
@@ -113,7 +110,7 @@ const tests = {
113
110
  default:
114
111
  throw new Error('Invalid question type');
115
112
  };
116
- autoScoredPreviewBase.correctIncorectAnswerLabel()
113
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
117
114
  .should('not.exist');
118
115
  autoScoredPreviewBase.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
119
116
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -127,7 +124,7 @@ const tests = {
127
124
  cy.log('When the user clicks on \'Check answer\' button, then red cross-mark icon icon should be displayed besides incorrect answer response, incorrect answer label and its border should not be displayed and correct answers container should not be displayed')
128
125
  autoScoredPreviewBase.checkAnswerButton()
129
126
  .click();
130
- autoScoredPreviewBase.correctIncorectAnswerLabel()
127
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
131
128
  .should('not.exist');
132
129
  if (questionType === 'fill in the gaps - drag and drop') {
133
130
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
@@ -164,7 +161,7 @@ const tests = {
164
161
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
165
162
  .verifyInnerText('5.4/10.2');
166
163
  autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotExists()
167
- autoScoredPreviewBase.correctIncorectAnswerLabel()
164
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
168
165
  .should('not.exist');
169
166
  autoScoredScoringSection.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
170
167
  cy.log('Attempting the question partially correct for response 2');
@@ -187,12 +184,11 @@ const tests = {
187
184
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
188
185
  .verifyInnerText('4.8/10.2');
189
186
  autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotExists()
190
- autoScoredPreviewBase.correctIncorectAnswerLabel()
187
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
191
188
  .should('not.exist');
192
189
 
193
190
  cy.log('When user selects the \'Show correct answer\' checkbox, green check-mark icon should be displayed besides correct answer response, red cross-mark icon should be displayed besides incorrect answer response, correct/incorrect answer label and its border should not be displayed and the correct answer container should be displayed with the correct response for the user responses marked incorrect')
194
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
195
- .click();
191
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
196
192
  if (questionType === 'fill in the gaps - drag and drop') {
197
193
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
198
194
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(1);
@@ -215,7 +211,7 @@ const tests = {
215
211
  default:
216
212
  throw new Error('Invalid question type');
217
213
  };
218
- autoScoredPreviewBase.correctIncorectAnswerLabel()
214
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
219
215
  .should('not.exist');
220
216
  autoScoredPreviewBase.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
221
217
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -229,7 +225,7 @@ const tests = {
229
225
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides correct answer response, red cross-mark icon should be displayed besides incorrect answer response, correct/incorrect answer label and its border should not be displayed and correct answer container should not be displayed')
230
226
  autoScoredPreviewBase.checkAnswerButton()
231
227
  .click();
232
- autoScoredPreviewBase.correctIncorectAnswerLabel()
228
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
233
229
  .should('not.exist');
234
230
  if (questionType === 'fill in the gaps - drag and drop') {
235
231
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
@@ -263,8 +259,7 @@ const tests = {
263
259
  throw new Error('Invalid question type');
264
260
  };
265
261
  cy.log('When the user selects the show correct answer checkbox, green check-mark icon should be displayed besides both the responses, correct answer label and its border should not be displayed, correct answer container should not be displayed and user should be awarded with full points')
266
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
267
- .click();
262
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
268
263
  if (questionType === 'fill in the gaps - drag and drop') {
269
264
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
270
265
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(1);
@@ -278,7 +273,7 @@ const tests = {
278
273
  .should('not.exist');
279
274
  autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotVisible();
280
275
  };
281
- autoScoredPreviewBase.correctIncorectAnswerLabel()
276
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
282
277
  .should('not.exist');
283
278
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
284
279
  .verifyInnerText('10.2/10.2');
@@ -294,7 +289,7 @@ const tests = {
294
289
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides responses, correct answer label and its border should not be displayed and correct answer container should not be displayed')
295
290
  autoScoredPreviewBase.checkAnswerButton()
296
291
  .click();
297
- autoScoredPreviewBase.correctIncorectAnswerLabel()
292
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
298
293
  .should('not.exist');
299
294
 
300
295
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -327,15 +322,14 @@ const tests = {
327
322
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
328
323
  .verifyInnerText('0/12');
329
324
  cy.log('When user selects \'Show correct answer\' checkbox without attempting the question, then only correct answer responses should be displayed below the question field');
330
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
331
- .click();
325
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();;
332
326
  autoScoredPreviewBase.correctIcon()
333
327
  .should('not.exist');
334
328
  autoScoredPreviewBase.incorrectIcon()
335
329
  .should('not.exist');
336
330
  autoScoredPreviewBase.correctIncorrectAnswerBorder()
337
331
  .should('not.exist');
338
- autoScoredPreviewBase.correctIncorectAnswerLabel()
332
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
339
333
  .should('not.exist');
340
334
  switch (questionType) {
341
335
  case 'fill in the gaps - text':
@@ -351,8 +345,7 @@ const tests = {
351
345
  throw new Error('Invalid question type');
352
346
  };
353
347
  cy.log('De-selecting show correct answer checkbox')
354
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
355
- .click();
348
+ previewScoringAndShowCorrectAnswerComponent.steps.uncheckShowCorrectAnswerCheckbox();
356
349
  if (questionType === 'fill in the gaps - drag and drop') {
357
350
  fillInTheGapsDragAndDropPage.previewTabCorrectAnswerContainer()
358
351
  .should('not.exist');
@@ -377,8 +370,7 @@ const tests = {
377
370
  default:
378
371
  throw new Error('Invalid question type');
379
372
  };
380
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
381
- .click();
373
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();;
382
374
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
383
375
  .verifyInnerText('12/12');
384
376
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -394,7 +386,7 @@ const tests = {
394
386
  .should('not.exist');
395
387
  autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotVisible();
396
388
  };
397
- autoScoredPreviewBase.correctIncorectAnswerLabel()
389
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
398
390
  .should('not.exist');
399
391
  autoScoredPreviewBase.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
400
392
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -408,7 +400,7 @@ const tests = {
408
400
  cy.log('When user clicks on Check answer button then green check-mark icon should be displayed besides the response fields, correct answer label and its border should not be displayed and the correct answer container should not be displayed')
409
401
  autoScoredPreviewBase.checkAnswerButton()
410
402
  .click();
411
- autoScoredPreviewBase.correctIncorectAnswerLabel()
403
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
412
404
  .should('not.exist');
413
405
  if (questionType === 'fill in the gaps - drag and drop') {
414
406
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -440,11 +432,10 @@ const tests = {
440
432
  default:
441
433
  throw new Error('Invalid question type');
442
434
  };
443
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
444
- .click();
435
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();;
445
436
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
446
437
  .verifyInnerText('9/12');
447
- autoScoredPreviewBase.correctIncorectAnswerLabel()
438
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
448
439
  .should('not.exist');
449
440
  if (questionType === 'fill in the gaps - drag and drop') {
450
441
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -471,7 +462,7 @@ const tests = {
471
462
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides response fields, correct answer label and its border should not be displayed and correct answer container should not be displayed');
472
463
  autoScoredPreviewBase.checkAnswerButton()
473
464
  .click();
474
- autoScoredPreviewBase.correctIncorectAnswerLabel()
465
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
475
466
  .should('not.exist');
476
467
  if (questionType === 'fill in the gaps - drag and drop') {
477
468
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -502,8 +493,7 @@ const tests = {
502
493
  default:
503
494
  throw new Error('Invalid question type');
504
495
  };
505
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
506
- .click();
496
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();;;
507
497
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
508
498
  .verifyInnerText('7/12');
509
499
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -538,7 +528,7 @@ const tests = {
538
528
  cy.log('When the user clicks on \'Check answer\' button then green check-mark icon should be displayed besides correct answer response field, red cross-mark icon should be displayed beside incorrect answer response field and correct/incorrect label and its border should not be displayed and correct answer container should not be displayed')
539
529
  autoScoredPreviewBase.checkAnswerButton()
540
530
  .click();
541
- autoScoredPreviewBase.correctIncorectAnswerLabel()
531
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
542
532
  .should('not.exist');
543
533
  if (questionType === 'fill in the gaps - drag and drop') {
544
534
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
@@ -570,8 +560,7 @@ const tests = {
570
560
  default:
571
561
  throw new Error('Invalid question type');
572
562
  };
573
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
574
- .click();
563
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
575
564
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
576
565
  .verifyInnerText('6/12');
577
566
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -632,8 +621,7 @@ const tests = {
632
621
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
633
622
  .verifyInnerText('0/15')
634
623
  cy.log('When the user selects \'Show correct answer\' checkbox without attempting the question, then correct answer container with only alternate correct answer options and no label should be displayed below the question field')
635
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
636
- .click();
624
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
637
625
  autoScoredPreviewBase.correctIcon()
638
626
  .should('not.exist');
639
627
  autoScoredPreviewBase.incorrectIcon()
@@ -652,8 +640,7 @@ const tests = {
652
640
  throw new Error('Invalid question type');
653
641
  };
654
642
  cy.log('De-selecting show correct answer checkbox')
655
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
656
- .click();
643
+ previewScoringAndShowCorrectAnswerComponent.steps.uncheckShowCorrectAnswerCheckbox();
657
644
  if (questionType === 'fill in the gaps - drag and drop') {
658
645
  fillInTheGapsDragAndDropPage.previewTabCorrectAnswerContainer()
659
646
  .should('not.exist');
@@ -678,8 +665,7 @@ const tests = {
678
665
  default:
679
666
  throw new Error('Invalid question type');
680
667
  };
681
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
682
- .click();
668
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
683
669
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
684
670
  .verifyInnerText('12/15');
685
671
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -695,7 +681,7 @@ const tests = {
695
681
  .should('not.exist');
696
682
  autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotVisible();
697
683
  };
698
- autoScoredPreviewBase.correctIncorectAnswerLabel()
684
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
699
685
  .should('not.exist');
700
686
  autoScoredPreviewBase.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked()
701
687
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -709,7 +695,7 @@ const tests = {
709
695
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides response fields, correct answer label and its border should not be displayed, and correct answer container should not be displayed')
710
696
  autoScoredPreviewBase.checkAnswerButton()
711
697
  .click();
712
- autoScoredPreviewBase.correctIncorectAnswerLabel()
698
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
713
699
  .should('not.exist');
714
700
  if (questionType === 'fill in the gaps - drag and drop') {
715
701
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -741,11 +727,10 @@ const tests = {
741
727
  default:
742
728
  throw new Error('Invalid question type');
743
729
  };
744
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
745
- .click();
730
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
746
731
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
747
732
  .verifyInnerText('15/15');
748
- autoScoredPreviewBase.correctIncorectAnswerLabel()
733
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
749
734
  .should('not.exist');
750
735
  if (questionType === 'fill in the gaps - drag and drop') {
751
736
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -772,7 +757,7 @@ const tests = {
772
757
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides the response fields, correct answer label and its border should not be displayed and correct answer container should not be displayed');
773
758
  autoScoredPreviewBase.checkAnswerButton()
774
759
  .click();
775
- autoScoredPreviewBase.correctIncorectAnswerLabel()
760
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
776
761
  .should('not.exist');
777
762
  if (questionType === 'fill in the gaps - drag and drop') {
778
763
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -804,8 +789,7 @@ const tests = {
804
789
  default:
805
790
  throw new Error('Invalid question type');
806
791
  };
807
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
808
- .click();
792
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
809
793
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
810
794
  .verifyInnerText('5/15');
811
795
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -831,7 +815,7 @@ const tests = {
831
815
  default:
832
816
  throw new Error('Invalid question type');
833
817
  };
834
- autoScoredPreviewBase.correctIncorectAnswerLabel()
818
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
835
819
  .should('not.exist');
836
820
  autoScoredPreviewBase.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
837
821
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -845,7 +829,7 @@ const tests = {
845
829
  cy.log('When user clicks \'Check answer\' button, then correct icon should be displayed besides the response fields and incorrect icon should be displayed beside correct answer response');
846
830
  autoScoredPreviewBase.checkAnswerButton()
847
831
  .click();
848
- autoScoredPreviewBase.correctIncorectAnswerLabel()
832
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
849
833
  .should('not.exist');
850
834
  if (questionType === 'fill in the gaps - drag and drop') {
851
835
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -878,8 +862,7 @@ const tests = {
878
862
  default:
879
863
  throw new Error('Invalid question type');
880
864
  };
881
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
882
- .click();
865
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
883
866
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
884
867
  .verifyInnerText('11/15');
885
868
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -904,7 +887,7 @@ const tests = {
904
887
  default:
905
888
  throw new Error('Invalid question type');
906
889
  };
907
- autoScoredPreviewBase.correctIncorectAnswerLabel()
890
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
908
891
  .should('not.exist');
909
892
  autoScoredPreviewBase.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
910
893
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -931,7 +914,7 @@ const tests = {
931
914
  .should('not.exist');
932
915
  autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotVisible();
933
916
  };
934
- autoScoredPreviewBase.correctIncorectAnswerLabel()
917
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
935
918
  .should('not.exist');
936
919
  });
937
920
 
@@ -945,9 +928,8 @@ const tests = {
945
928
  .verifyInnerText('0/12');
946
929
 
947
930
  cy.log('When the user selects the Show correct answer checkbox without attempting the question, correct answer container with only correct answer options and no label should be displayed below the question field')
948
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
949
- .click();
950
- autoScoredPreviewBase.correctIncorectAnswerLabel()
931
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
932
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
951
933
  .should('not.exist');
952
934
  autoScoredPreviewBase.correctIcon()
953
935
  .should('not.exist');
@@ -969,8 +951,7 @@ const tests = {
969
951
  throw new Error('Invalid question type');
970
952
  };
971
953
  cy.log('De-selecting show correct answer checkbox')
972
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
973
- .click();
954
+ previewScoringAndShowCorrectAnswerComponent.steps.uncheckShowCorrectAnswerCheckbox();
974
955
  if (questionType === 'fill in the gaps - drag and drop') {
975
956
  fillInTheGapsDragAndDropPage.previewTabCorrectAnswerContainer()
976
957
  .should('not.exist');
@@ -995,8 +976,7 @@ const tests = {
995
976
  default:
996
977
  throw new Error('Invalid question type');
997
978
  };
998
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
999
- .click();
979
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
1000
980
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
1001
981
  .verifyInnerText('12/12');
1002
982
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -1012,7 +992,7 @@ const tests = {
1012
992
  .should('not.exist');
1013
993
  autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotVisible();
1014
994
  };
1015
- autoScoredPreviewBase.correctIncorectAnswerLabel()
995
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
1016
996
  .should('not.exist');
1017
997
  autoScoredPreviewBase.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked()
1018
998
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -1026,7 +1006,7 @@ const tests = {
1026
1006
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides the response fields, correct answer label and its border should not be displayed and correct answer container should not be displayed')
1027
1007
  autoScoredPreviewBase.checkAnswerButton()
1028
1008
  .click();
1029
- autoScoredPreviewBase.correctIncorectAnswerLabel()
1009
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
1030
1010
  .should('not.exist');
1031
1011
  if (questionType === 'fill in the gaps - drag and drop') {
1032
1012
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -1058,11 +1038,10 @@ const tests = {
1058
1038
  default:
1059
1039
  throw new Error('Invalid question type');
1060
1040
  };
1061
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
1062
- .click();
1041
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
1063
1042
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
1064
1043
  .verifyInnerText('12/12');
1065
- autoScoredPreviewBase.correctIncorectAnswerLabel()
1044
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
1066
1045
  .should('not.exist');
1067
1046
  if (questionType === 'fill in the gaps - drag and drop') {
1068
1047
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -1089,7 +1068,7 @@ const tests = {
1089
1068
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides the response fields, correct answer label and its border should not be displayed and correct answer container should not be displayed');
1090
1069
  autoScoredPreviewBase.checkAnswerButton()
1091
1070
  .click();
1092
- autoScoredPreviewBase.correctIncorectAnswerLabel()
1071
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
1093
1072
  .should('not.exist');
1094
1073
  if (questionType === 'fill in the gaps - drag and drop') {
1095
1074
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -1120,8 +1099,7 @@ const tests = {
1120
1099
  default:
1121
1100
  throw new Error('Invalid question type');
1122
1101
  };
1123
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
1124
- .click();
1102
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
1125
1103
  if (questionType === 'fill in the gaps - drag and drop') {
1126
1104
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
1127
1105
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
@@ -1146,7 +1124,7 @@ const tests = {
1146
1124
  default:
1147
1125
  throw new Error('Invalid question type');
1148
1126
  };
1149
- autoScoredPreviewBase.correctIncorectAnswerLabel()
1127
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
1150
1128
  .should('not.exist');
1151
1129
  autoScoredPreviewBase.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
1152
1130
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -1173,7 +1151,7 @@ const tests = {
1173
1151
  .should('not.exist');
1174
1152
  autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotVisible();
1175
1153
  };
1176
- autoScoredPreviewBase.correctIncorectAnswerLabel()
1154
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
1177
1155
  .should('not.exist');
1178
1156
 
1179
1157
  cy.log('When user gives an answer which is a combination of both correct and alternate answer and the individual points achieved via response from alternate answer tab is more than the individual points of the response entered from the correct tab then on selecting the \'Show correct answer\' checkbox the response with more points should have a correct icon, the other should have incorrect icon and the correct answer container should be displayed with the correct responses from the correct tab for the user responses marked incorrect')
@@ -1192,8 +1170,7 @@ const tests = {
1192
1170
  default:
1193
1171
  throw new Error('Invalid question type');
1194
1172
  };
1195
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
1196
- .click();
1173
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
1197
1174
  if (questionType === 'fill in the gaps - drag and drop') {
1198
1175
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
1199
1176
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
@@ -1218,7 +1195,7 @@ const tests = {
1218
1195
  default:
1219
1196
  throw new Error('Invalid question type');
1220
1197
  };
1221
- autoScoredPreviewBase.correctIncorectAnswerLabel()
1198
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
1222
1199
  .should('not.exist');
1223
1200
  autoScoredPreviewBase.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
1224
1201
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -1245,7 +1222,7 @@ const tests = {
1245
1222
  .should('not.exist');
1246
1223
  autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotVisible();
1247
1224
  };
1248
- autoScoredPreviewBase.correctIncorectAnswerLabel()
1225
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
1249
1226
  .should('not.exist');
1250
1227
  });
1251
1228
 
@@ -1387,13 +1364,12 @@ const tests = {
1387
1364
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
1388
1365
  .verifyInnerText('0/12');
1389
1366
  cy.log('When user selects the Show correct answer button without attempting the question then correct answer responses should be displayed in the correct answer container')
1390
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
1391
- .click();
1367
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
1392
1368
  fillInTheGapsDropdownPage.correctIcon()
1393
1369
  .should('not.exist');
1394
1370
  autoScoredPreviewBase.incorrectIcon()
1395
1371
  .should('not.exist');
1396
- autoScoredPreviewBase.correctIncorectAnswerLabel()
1372
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
1397
1373
  .should('not.exist');
1398
1374
  autoScoredPreviewBase.correctIncorrectAnswerBorder()
1399
1375
  .should('not.exist');
@@ -1411,8 +1387,7 @@ const tests = {
1411
1387
  throw new Error('Invalid question type');
1412
1388
  };
1413
1389
  cy.log('De-selecting show correct answer checkbox')
1414
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
1415
- .click();
1390
+ previewScoringAndShowCorrectAnswerComponent.steps.uncheckShowCorrectAnswerCheckbox();
1416
1391
  if (questionType === 'fill in the gaps - drag and drop') {
1417
1392
  fillInTheGapsDragAndDropPage.previewTabCorrectAnswerContainer()
1418
1393
  .should('not.exist');
@@ -1437,11 +1412,10 @@ const tests = {
1437
1412
  default:
1438
1413
  throw new Error('Invalid question type');
1439
1414
  };
1440
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
1441
- .click();
1415
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
1442
1416
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
1443
1417
  .verifyInnerText('12/12');
1444
- autoScoredPreviewBase.correctIncorectAnswerLabel()
1418
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
1445
1419
  .should('not.exist');
1446
1420
  if (questionType === 'fill in the gaps - drag and drop') {
1447
1421
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -1469,7 +1443,7 @@ const tests = {
1469
1443
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides the response input fields, correct answer label and its border should not be displayed and correct answer container should not be displayed');
1470
1444
  autoScoredPreviewBase.checkAnswerButton()
1471
1445
  .click();
1472
- autoScoredPreviewBase.correctIncorectAnswerLabel()
1446
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
1473
1447
  .should('not.exist');
1474
1448
  if (questionType === 'fill in the gaps - drag and drop') {
1475
1449
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -1498,8 +1472,7 @@ const tests = {
1498
1472
  default:
1499
1473
  throw new Error('Invalid question type');
1500
1474
  };
1501
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
1502
- .click();
1475
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();;
1503
1476
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
1504
1477
  .verifyInnerText('0/12')
1505
1478
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -1511,7 +1484,7 @@ const tests = {
1511
1484
  fillInTheGapsCommonComponents.steps.verifyIncorrectOptionCrossmarkIcon(1);
1512
1485
  autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotVisible();
1513
1486
  };
1514
- autoScoredPreviewBase.correctIncorectAnswerLabel()
1487
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
1515
1488
  .should('not.exist');
1516
1489
  switch (questionType) {
1517
1490
  case 'fill in the gaps - text':
@@ -1535,7 +1508,7 @@ const tests = {
1535
1508
  cy.log('When user clicks on \'Check answer\' button, then red cross-mark icon should be displayed besides the response input fields, incorrect answer label and its border should not be displayed and correct answer container should not be displayed');
1536
1509
  autoScoredPreviewBase.checkAnswerButton()
1537
1510
  .click();
1538
- autoScoredPreviewBase.correctIncorectAnswerLabel()
1511
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
1539
1512
  .should('not.exist');
1540
1513
  if (questionType == 'fill in the gaps - drag and drop') {
1541
1514
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
@@ -1568,8 +1541,7 @@ const tests = {
1568
1541
  default:
1569
1542
  throw new Error('Invalid question type');
1570
1543
  };
1571
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
1572
- .click();
1544
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
1573
1545
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
1574
1546
  .verifyInnerText('12/12');
1575
1547
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -1585,7 +1557,7 @@ const tests = {
1585
1557
  .should('not.exist');
1586
1558
  autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotVisible();
1587
1559
  };
1588
- autoScoredPreviewBase.correctIncorectAnswerLabel()
1560
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
1589
1561
  .should('not.exist');
1590
1562
  autoScoredPreviewBase.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked()
1591
1563
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -1611,7 +1583,7 @@ const tests = {
1611
1583
  .should('not.exist');
1612
1584
  autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotVisible();
1613
1585
  };
1614
- autoScoredPreviewBase.correctIncorectAnswerLabel()
1586
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
1615
1587
  .should('not.exist');
1616
1588
 
1617
1589
  cy.log('When user gives the alternate answer as input in the response fields, then full points should be displayed and correct icon should be displayed beside the response fields');
@@ -1630,8 +1602,7 @@ const tests = {
1630
1602
  default:
1631
1603
  throw new Error('Invalid question type');
1632
1604
  };
1633
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
1634
- .click();
1605
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
1635
1606
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
1636
1607
  .verifyInnerText('12/12');
1637
1608
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -1647,7 +1618,7 @@ const tests = {
1647
1618
  .should('not.exist');
1648
1619
  autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotVisible();
1649
1620
  };
1650
- autoScoredPreviewBase.correctIncorectAnswerLabel()
1621
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
1651
1622
  .should('not.exist');
1652
1623
  autoScoredPreviewBase.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
1653
1624
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -1674,7 +1645,7 @@ const tests = {
1674
1645
  .should('not.exist');
1675
1646
  autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotVisible();
1676
1647
  };
1677
- autoScoredPreviewBase.correctIncorectAnswerLabel()
1648
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
1678
1649
  .should('not.exist');
1679
1650
  });
1680
1651
  },
@@ -1722,9 +1693,8 @@ const tests = {
1722
1693
  it('When the \'Round down score\' checkbox is not selected, then in Preview tab when user selects partially or fully correct answers the points should be displayed in decimal points if applicable as per the options selected by the user', () => {
1723
1694
  cy.log('Switching to Edit tab')
1724
1695
  createQuestionBasePage.steps.switchToEditTab();
1725
- fillInTheGapsDropdownPage.rounddownScoreCheckbox()
1726
- .click()
1727
- .should('not.be.checked');
1696
+ fillInTheGapsDropdownPage.steps.expandRoundingDropdown();
1697
+ fillInTheGapsTextPage.steps.selectOptionFromRoundingDropdownOption('none');
1728
1698
  cy.log('Switching to Preview tab')
1729
1699
  createQuestionBasePage.steps.switchToPreviewTab();
1730
1700
  switch (questionType) {
@@ -1904,7 +1874,7 @@ const tests = {
1904
1874
  },
1905
1875
 
1906
1876
  verifyShowCorrectAnswerBasicFunctionality: (questionType) => {
1907
- it('When the user has set correct answer responses and alloted points \'Show correct answer\' checkbox should be displayed and it should be unchecked by default and points for the question should be displayed beside it', () => {
1877
+ it('When the user has set correct answer responses and alloted points, then \'Student view\' radio button should be checked, \'Grading view\' button should not be checked and points for the question should be displayed beside it', () => {
1908
1878
  createQuestionBasePage.steps.switchToEditTab();
1909
1879
  switch (questionType) {
1910
1880
  case 'fill in the gaps - text':
@@ -1923,12 +1893,14 @@ const tests = {
1923
1893
  }
1924
1894
  scoringSectionBase.steps.allotPoints(20);
1925
1895
  createQuestionBasePage.steps.switchToPreviewTab();
1926
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
1927
- .should('not.be.checked')
1928
- .parents('.MuiIconButton-label')
1929
- .should('be.visible');
1930
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckboxLabel()
1931
- .verifyInnerText('Show correct answer');
1896
+ previewScoringAndShowCorrectAnswerComponent.gradingViewRadioButton()
1897
+ .should('not.be.checked');
1898
+ previewScoringAndShowCorrectAnswerComponent.studentViewRadioButton()
1899
+ .should('be.checked');
1900
+ previewScoringAndShowCorrectAnswerComponent.gradingViewRadioButtonLabel()
1901
+ .verifyInnerText('Grading view');
1902
+ previewScoringAndShowCorrectAnswerComponent.studentViewRadioButtonLabel()
1903
+ .verifyInnerText('Student view');
1932
1904
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
1933
1905
  .verifyInnerText('0/20');
1934
1906
  });
@@ -1978,11 +1950,9 @@ const tests = {
1978
1950
  }
1979
1951
  });
1980
1952
 
1981
- it('CSS of the correct answer container when \'Show correct answer\' checkbox is checked', { tags: 'css' }, () => {
1953
+ it('CSS of the correct answer container when \'Grading view\' radio button is selected', { tags: 'css' }, () => {
1982
1954
  cy.log('Pre-step: Clicking on show correct answer checkbox');
1983
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
1984
- .click()
1985
- .should('be.checked');
1955
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
1986
1956
  if (questionType === 'fill in the gaps - drag and drop') {
1987
1957
  fillInTheGapsDragAndDropPage.previewTabCorrectAnswerContainer()
1988
1958
  .should('have.css', 'border', `1px solid ${css.color.correctAnswerContainerBorder}`);
@@ -1995,7 +1965,7 @@ const tests = {
1995
1965
  .verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
1996
1966
  fillInTheGapsDragAndDropPage.previewTabCorrectAnswerResponseWrapper()
1997
1967
  .should('have.css', 'border', `1px solid ${css.color.correctAnswerContainerResponseBlockBorder}`);
1998
- } else if ( questionType === 'fill in the gaps - dropdown') {
1968
+ } else if (questionType === 'fill in the gaps - dropdown') {
1999
1969
  fillInTheGapsCommonComponents.previewTabCorrectAnswerLabel()
2000
1970
  .verifyCSS(css.color.text, css.fontSize.normal, css.fontWeight.regular);
2001
1971
  fillInTheGapsCommonComponents.previewTabCorrectAnswerContainer()
@@ -2033,14 +2003,12 @@ const tests = {
2033
2003
  verifyAutoScoredAllOrNothingScoring: (questionType) => {
2034
2004
  //comment: need to add numeric count assertion for response field once they are added
2035
2005
  it('When the user selects \'Show correct answer\' checkbox without attempting the question, no correct/incorrect icons or label should be displayed, correct answer container along with \'Correct answers\' label and correct responses with numeric count should be displayed below the question field', () => {
2036
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2037
- .click()
2038
- .should('be.checked');
2006
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
2039
2007
  autoScoredPreviewBase.correctIcon()
2040
2008
  .should('not.exist');
2041
2009
  autoScoredPreviewBase.incorrectIcon()
2042
2010
  .should('not.exist');
2043
- autoScoredPreviewBase.correctIncorectAnswerLabel()
2011
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
2044
2012
  .should('not.exist');
2045
2013
  autoScoredPreviewBase.correctIncorrectAnswerBorder()
2046
2014
  .should('not.exist');
@@ -2058,9 +2026,7 @@ const tests = {
2058
2026
  throw new Error('Invalid question type');
2059
2027
  }
2060
2028
  cy.log('Post step: Unchecking the show correct answer checkbox')
2061
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2062
- .click()
2063
- .should('not.be.checked');
2029
+ previewScoringAndShowCorrectAnswerComponent.steps.uncheckShowCorrectAnswerCheckbox();
2064
2030
  });
2065
2031
 
2066
2032
  it('When user selects Check answer button without attempting the question, then then red cross-mark icon or green check-mark should not be displayed anywhere, correct/incorrect answer label and its border should not be displayed and the correct answer container should not be displayed', () => {
@@ -2077,7 +2043,7 @@ const tests = {
2077
2043
  fillInTheGapsCommonComponents.previewTabCorrectAnswerContainer()
2078
2044
  .should('not.exist');
2079
2045
  };
2080
- autoScoredPreviewBase.correctIncorectAnswerLabel()
2046
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
2081
2047
  .should('not.exist');
2082
2048
  autoScoredPreviewBase.correctIncorrectAnswerBorder()
2083
2049
  .should('not.exist');
@@ -2105,8 +2071,7 @@ const tests = {
2105
2071
  autoScoredScoringSection.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
2106
2072
 
2107
2073
  cy.log('When the user selects \'Show correct answer\' checkbox, red cross-mark icon should be displayed besides the incorrect answers input fields, incorrect answer border should appear, a label \'Incorrect Answer\' should be displayed below the question field and the correct answer container with both correct answers should be displayed')
2108
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2109
- .click();
2074
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
2110
2075
  //TODO Comment: Remove this assertion for check-mark and cross-mark and others once common selector is applied for response field wrapper https://redmine.zeuslearning.com/issues/530412
2111
2076
  if (questionType === 'fill in the gaps - drag and drop') {
2112
2077
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
@@ -2181,8 +2146,7 @@ const tests = {
2181
2146
  autoScoredScoringSection.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
2182
2147
 
2183
2148
  cy.log('When user selects the show correct answer checkbox, green check-mark icon should be displayed besides correct response field, red cross-mark icon should be displayed besides the incorrect response field, incorrect answer border should appear, a label \'Incorrect Answer\' should be displayed and correct answer container should be displayed with the correct responses from the correct tab for the user responses marked incorrect')
2184
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2185
- .click();
2149
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
2186
2150
  if (questionType === 'fill in the gaps - drag and drop') {
2187
2151
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
2188
2152
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
@@ -2233,8 +2197,7 @@ const tests = {
2233
2197
  }
2234
2198
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
2235
2199
  .verifyInnerText('0/20');
2236
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2237
- .click();
2200
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
2238
2201
  if (questionType === 'fill in the gaps - drag and drop') {
2239
2202
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
2240
2203
  fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotVisible(1);
@@ -2304,8 +2267,7 @@ const tests = {
2304
2267
  throw new Error('Invalid question type');
2305
2268
  }
2306
2269
  cy.log('When the user selects the show correct answer checkbox, green check-mark icon should be displayed besides both the response fields and a label \'Correct Answer\' should be displayed below the question field and user should be awarded with full points');
2307
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2308
- .click();
2270
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
2309
2271
  autoScoredPreviewBase.steps.verifyCorrectIncorrectAnswerLabel('Correct');
2310
2272
  autoScoredPreviewBase.steps.verifyCorrectAttemptBorder();
2311
2273
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
@@ -2354,8 +2316,7 @@ const tests = {
2354
2316
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
2355
2317
  .verifyInnerText('0/7');
2356
2318
  cy.log('When the user selects \'Show correct answer\' checkbox without attempting the question, correct answer container should be displayed with the correct responses from the correct tab')
2357
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2358
- .click();
2319
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
2359
2320
  switch (questionType) {
2360
2321
  case 'fill in the gaps - text':
2361
2322
  fillInTheGapsCommonComponents.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount('fill in the gaps - text', ['Response 1', 'Response 2']);
@@ -2369,7 +2330,7 @@ const tests = {
2369
2330
  default:
2370
2331
  throw new Error('Invalid question type');
2371
2332
  }
2372
- autoScoredPreviewBase.correctIncorectAnswerLabel()
2333
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
2373
2334
  .should('not.exist');
2374
2335
  autoScoredPreviewBase.correctIcon()
2375
2336
  .should('not.exist');
@@ -2378,8 +2339,7 @@ const tests = {
2378
2339
  autoScoredPreviewBase.correctIncorrectAnswerBorder()
2379
2340
  .should('not.exist');
2380
2341
  cy.log('After deselecting Show correct answer checkbox, the question preview should return to the previous state')
2381
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2382
- .click();
2342
+ previewScoringAndShowCorrectAnswerComponent.steps.uncheckShowCorrectAnswerCheckbox();
2383
2343
  if (questionType === 'fill in the gaps - drag and drop') {
2384
2344
  fillInTheGapsDragAndDropPage.previewTabCorrectAnswerContainer()
2385
2345
  .should('not.exist');
@@ -2406,8 +2366,7 @@ const tests = {
2406
2366
  }
2407
2367
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
2408
2368
  .verifyInnerText('7/7');
2409
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2410
- .click();
2369
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
2411
2370
  if (questionType === 'fill in the gaps - drag and drop') {
2412
2371
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
2413
2372
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(1);
@@ -2465,8 +2424,7 @@ const tests = {
2465
2424
  }
2466
2425
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
2467
2426
  .verifyInnerText('3/7');
2468
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2469
- .click();
2427
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
2470
2428
  if (questionType === 'fill in the gaps - drag and drop') {
2471
2429
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
2472
2430
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(1);
@@ -2524,8 +2482,7 @@ const tests = {
2524
2482
  }
2525
2483
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
2526
2484
  .verifyInnerText('0/7');
2527
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2528
- .click();
2485
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
2529
2486
  if (questionType === 'fill in the gaps - drag and drop') {
2530
2487
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
2531
2488
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
@@ -2591,8 +2548,7 @@ const tests = {
2591
2548
  }
2592
2549
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
2593
2550
  .verifyInnerText('0/7');
2594
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2595
- .click();
2551
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
2596
2552
  if (questionType === 'fill in the gaps - drag and drop') {
2597
2553
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
2598
2554
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
@@ -2659,8 +2615,7 @@ const tests = {
2659
2615
  }
2660
2616
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
2661
2617
  .verifyInnerText('0/7');
2662
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2663
- .click();
2618
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
2664
2619
  if (questionType === 'fill in the gaps - drag and drop') {
2665
2620
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
2666
2621
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
@@ -2714,8 +2669,7 @@ const tests = {
2714
2669
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
2715
2670
  .verifyInnerText('0/10');
2716
2671
  cy.log('When the user selects \'Show correct answer\' checkbox without attempting the question, correct answer container should be displayed with the correct responses from the alternate tab')
2717
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2718
- .click();
2672
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
2719
2673
  switch (questionType) {
2720
2674
  case 'fill in the gaps - text':
2721
2675
  fillInTheGapsCommonComponents.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount('fill in the gaps - text', ['Response 3', 'Response 4']);
@@ -2729,7 +2683,7 @@ const tests = {
2729
2683
  default:
2730
2684
  throw new Error('Invalid question type');
2731
2685
  }
2732
- autoScoredPreviewBase.correctIncorectAnswerLabel()
2686
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
2733
2687
  .should('not.exist');
2734
2688
  autoScoredPreviewBase.correctIcon()
2735
2689
  .should('not.exist');
@@ -2738,8 +2692,7 @@ const tests = {
2738
2692
  autoScoredPreviewBase.correctIncorrectAnswerBorder()
2739
2693
  .should('not.exist');
2740
2694
  cy.log('After deselecting Show correct answer checkbox, the question preview should return to the previous state')
2741
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2742
- .click();
2695
+ previewScoringAndShowCorrectAnswerComponent.steps.uncheckShowCorrectAnswerCheckbox();
2743
2696
  if (questionType === 'fill in the gaps - drag and drop') {
2744
2697
  fillInTheGapsDragAndDropPage.previewTabCorrectAnswerContainer()
2745
2698
  .should('not.exist');
@@ -2766,8 +2719,7 @@ const tests = {
2766
2719
  }
2767
2720
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
2768
2721
  .verifyInnerText('7/10');
2769
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2770
- .click();
2722
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
2771
2723
  if (questionType === 'fill in the gaps - drag and drop') {
2772
2724
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
2773
2725
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(1);
@@ -2825,8 +2777,7 @@ const tests = {
2825
2777
  }
2826
2778
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
2827
2779
  .verifyInnerText('10/10');
2828
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2829
- .click();
2780
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
2830
2781
  if (questionType === 'fill in the gaps - drag and drop') {
2831
2782
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
2832
2783
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(1);
@@ -2884,8 +2835,7 @@ const tests = {
2884
2835
  }
2885
2836
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
2886
2837
  .verifyInnerText('0/10');
2887
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2888
- .click();
2838
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
2889
2839
  if (questionType === 'fill in the gaps - drag and drop') {
2890
2840
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
2891
2841
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
@@ -2951,8 +2901,7 @@ const tests = {
2951
2901
  }
2952
2902
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
2953
2903
  .verifyInnerText('0/10');
2954
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
2955
- .click();
2904
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
2956
2905
  if (questionType === 'fill in the gaps - drag and drop') {
2957
2906
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
2958
2907
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
@@ -3019,8 +2968,7 @@ const tests = {
3019
2968
  }
3020
2969
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
3021
2970
  .verifyInnerText('0/10');
3022
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
3023
- .click();
2971
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
3024
2972
  if (questionType === 'fill in the gaps - drag and drop') {
3025
2973
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
3026
2974
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(1);
@@ -3075,8 +3023,7 @@ const tests = {
3075
3023
  .verifyInnerText('0/7');
3076
3024
 
3077
3025
  cy.log('When the user selects the Show correct answer checkbox without attempting the question, correct answer container should be displayed with the correct responses from the correct tab and no label should be displayed below the question field')
3078
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
3079
- .click();
3026
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
3080
3027
  switch (questionType) {
3081
3028
  case 'fill in the gaps - text':
3082
3029
  fillInTheGapsCommonComponents.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount('fill in the gaps - text', ['Response 1', 'Response 2']);
@@ -3090,7 +3037,7 @@ const tests = {
3090
3037
  default:
3091
3038
  throw new Error('Invalid question type');
3092
3039
  }
3093
- autoScoredPreviewBase.correctIncorectAnswerLabel()
3040
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
3094
3041
  .should('not.exist');
3095
3042
  autoScoredPreviewBase.correctIcon()
3096
3043
  .should('not.exist');
@@ -3099,8 +3046,7 @@ const tests = {
3099
3046
  autoScoredPreviewBase.correctIncorrectAnswerBorder()
3100
3047
  .should('not.exist');
3101
3048
  cy.log('After deselecting Show correct answer checkbox, the question preview should return to the previous state')
3102
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
3103
- .click();
3049
+ previewScoringAndShowCorrectAnswerComponent.steps.uncheckShowCorrectAnswerCheckbox();
3104
3050
  if (questionType === 'fill in the gaps - drag and drop') {
3105
3051
  fillInTheGapsDragAndDropPage.previewTabCorrectAnswerContainer()
3106
3052
  .should('not.exist');
@@ -3127,8 +3073,7 @@ const tests = {
3127
3073
  }
3128
3074
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
3129
3075
  .verifyInnerText('7/7');
3130
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
3131
- .click();
3076
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
3132
3077
  if (questionType === 'fill in the gaps - drag and drop') {
3133
3078
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
3134
3079
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(1);
@@ -3186,8 +3131,7 @@ const tests = {
3186
3131
  }
3187
3132
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
3188
3133
  .verifyInnerText('7/7');
3189
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
3190
- .click();
3134
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
3191
3135
  if (questionType === 'fill in the gaps - drag and drop') {
3192
3136
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
3193
3137
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(1);
@@ -3245,8 +3189,7 @@ const tests = {
3245
3189
  }
3246
3190
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
3247
3191
  .verifyInnerText('0/7');
3248
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
3249
- .click();
3192
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
3250
3193
  if (questionType === 'fill in the gaps - drag and drop') {
3251
3194
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
3252
3195
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
@@ -3312,8 +3255,7 @@ const tests = {
3312
3255
  }
3313
3256
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
3314
3257
  .verifyInnerText('0/7');
3315
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
3316
- .click();
3258
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
3317
3259
  if (questionType === 'fill in the gaps - drag and drop') {
3318
3260
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
3319
3261
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
@@ -3384,8 +3326,7 @@ const tests = {
3384
3326
  }
3385
3327
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
3386
3328
  .verifyInnerText('0/7');
3387
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
3388
- .click();
3329
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
3389
3330
  if (questionType === 'fill in the gaps - drag and drop') {
3390
3331
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
3391
3332
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
@@ -3438,8 +3379,7 @@ const tests = {
3438
3379
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
3439
3380
  .verifyInnerText('0/7');
3440
3381
  cy.log('When the user selects \'Show correct answer\' checkbox without attempting the question, correct answer container should be displayed with the correct responses from the correct tab and no label should be displayed')
3441
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
3442
- .click();
3382
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
3443
3383
  switch (questionType) {
3444
3384
  case 'fill in the gaps - text':
3445
3385
  fillInTheGapsCommonComponents.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount('fill in the gaps - text', ['Response 1', 'Response 2']);
@@ -3453,7 +3393,7 @@ const tests = {
3453
3393
  default:
3454
3394
  throw new Error('Invalid question type');
3455
3395
  }
3456
- autoScoredPreviewBase.correctIncorectAnswerLabel()
3396
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
3457
3397
  .should('not.exist');
3458
3398
  autoScoredPreviewBase.correctIcon()
3459
3399
  .should('not.exist');
@@ -3462,8 +3402,7 @@ const tests = {
3462
3402
  autoScoredPreviewBase.correctIncorrectAnswerBorder()
3463
3403
  .should('not.exist');
3464
3404
  cy.log('After deselecting Show correct answer checkbox, the question preview should return to the previous state')
3465
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
3466
- .click();
3405
+ previewScoringAndShowCorrectAnswerComponent.steps.uncheckShowCorrectAnswerCheckbox();
3467
3406
  if (questionType === 'fill in the gaps - drag and drop') {
3468
3407
  fillInTheGapsDragAndDropPage.previewTabCorrectAnswerContainer()
3469
3408
  .should('not.exist');
@@ -3490,8 +3429,7 @@ const tests = {
3490
3429
  }
3491
3430
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
3492
3431
  .verifyInnerText('7/7');
3493
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
3494
- .click();
3432
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
3495
3433
  if (questionType === 'fill in the gaps - drag and drop') {
3496
3434
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
3497
3435
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(1);
@@ -3544,8 +3482,7 @@ const tests = {
3544
3482
  }
3545
3483
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
3546
3484
  .verifyInnerText('7/7');
3547
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
3548
- .click();
3485
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
3549
3486
  if (questionType === 'fill in the gaps - drag and drop') {
3550
3487
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
3551
3488
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(1);
@@ -3593,8 +3530,7 @@ const tests = {
3593
3530
  }
3594
3531
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
3595
3532
  .verifyInnerText('0/7');
3596
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
3597
- .click();
3533
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
3598
3534
  if (questionType === 'fill in the gaps - drag and drop') {
3599
3535
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
3600
3536
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
@@ -3647,13 +3583,12 @@ const tests = {
3647
3583
 
3648
3584
  verifyAutoScoredPartialEqualWeightsScoring: (questionType) => {
3649
3585
  it('When user selects \'Show correct answer\' checkbox without attempting the question, then red cross-mark icon or green check-mark should not be displayed anywhere, correct/incorrect answer label and its border should not be displayed and the correct answer container should be displayed with the correct responses from the correct tab', () => {
3650
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
3651
- .click();
3586
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
3652
3587
  autoScoredPreviewBase.incorrectIcon()
3653
3588
  .should('not.exist');
3654
3589
  autoScoredPreviewBase.correctIcon()
3655
3590
  .should('not.exist');
3656
- autoScoredPreviewBase.correctIncorectAnswerLabel()
3591
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
3657
3592
  .should('not.exist');
3658
3593
  autoScoredPreviewBase.correctIncorrectAnswerBorder()
3659
3594
  .should('not.exist');
@@ -3671,8 +3606,7 @@ const tests = {
3671
3606
  throw new Error('Invalid question type');
3672
3607
  };
3673
3608
  cy.log('De-selecting show correct answer checkbox')
3674
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
3675
- .click();
3609
+ previewScoringAndShowCorrectAnswerComponent.steps.uncheckShowCorrectAnswerCheckbox();
3676
3610
  if (questionType === 'fill in the gaps - drag and drop') {
3677
3611
  fillInTheGapsDragAndDropPage.previewTabCorrectAnswerContainer()
3678
3612
  .should('not.exist');
@@ -3696,7 +3630,7 @@ const tests = {
3696
3630
  fillInTheGapsCommonComponents.previewTabCorrectAnswerContainer()
3697
3631
  .should('not.exist');
3698
3632
  };
3699
- autoScoredPreviewBase.correctIncorectAnswerLabel()
3633
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
3700
3634
  .should('not.exist');
3701
3635
  autoScoredPreviewBase.correctIncorrectAnswerBorder()
3702
3636
  .should('not.exist');
@@ -3725,8 +3659,7 @@ const tests = {
3725
3659
  autoScoredScoringSection.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
3726
3660
 
3727
3661
  cy.log('When the user selects \'Show correct answer\' checkbox, red cross-mark icon should be displayed besides incorrect response fields, incorrect answer label and its border should not be displayed and the correct answer container should be displayed with the correct responses from the correct tab for the user responses marked incorrect');
3728
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
3729
- .click();
3662
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
3730
3663
  if (questionType === 'fill in the gaps - drag and drop') {
3731
3664
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
3732
3665
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
@@ -3736,7 +3669,7 @@ const tests = {
3736
3669
  fillInTheGapsCommonComponents.steps.verifyIncorrectOptionCrossmarkIcon(1);
3737
3670
  autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotVisible();
3738
3671
  };
3739
- autoScoredPreviewBase.correctIncorectAnswerLabel()
3672
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
3740
3673
  .should('not.exist');
3741
3674
  switch (questionType) {
3742
3675
  case 'fill in the gaps - text':
@@ -3763,7 +3696,7 @@ const tests = {
3763
3696
  cy.log('When user clicks on \'Check answer\' button, then red cross-mark icon icon should be displayed besides incorrect answer response field, incorrect answer label and its border should not be displayed and correct answers container should not be displayed');
3764
3697
  autoScoredPreviewBase.checkAnswerButton()
3765
3698
  .click();
3766
- autoScoredPreviewBase.correctIncorectAnswerLabel()
3699
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
3767
3700
  .should('not.exist');
3768
3701
  if (questionType === 'fill in the gaps - drag and drop') {
3769
3702
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
@@ -3798,8 +3731,7 @@ const tests = {
3798
3731
  };
3799
3732
 
3800
3733
  cy.log('When user selects the \'Show correct answer\' checkbox, green check-mark icon should be displayed besides correct answer response field, red cross-mark icon should be displayed besides incorrect answer response field, correct/incorrect answer label and its border should not be displayed, the correct answer container should be displayed with the correct responses from the correct tab for the user responses marked incorrect, points should be updated accordingly and points text\'s background color should not change');
3801
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
3802
- .click();
3734
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
3803
3735
  if (questionType === 'fill in the gaps - drag and drop') {
3804
3736
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
3805
3737
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
@@ -3825,7 +3757,7 @@ const tests = {
3825
3757
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
3826
3758
  .verifyInnerText('5/10');
3827
3759
  autoScoredScoringSection.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
3828
- autoScoredPreviewBase.correctIncorectAnswerLabel()
3760
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
3829
3761
  .should('not.exist');
3830
3762
  autoScoredPreviewBase.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
3831
3763
  if (questionType === 'fill in the gaps - drag and drop') {
@@ -3839,7 +3771,7 @@ const tests = {
3839
3771
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides correct answer response field, red cross-mark icon should be displayed besides incorrect answer response field, correct/incorrect answer label and its border should not be displayed and correct answer container should not be displayed');
3840
3772
  autoScoredPreviewBase.checkAnswerButton()
3841
3773
  .click();
3842
- autoScoredPreviewBase.correctIncorectAnswerLabel()
3774
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
3843
3775
  .should('not.exist');
3844
3776
  if (questionType === 'fill in the gaps - drag and drop') {
3845
3777
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -3873,8 +3805,7 @@ const tests = {
3873
3805
  throw new Error('Invalid question type');
3874
3806
  };
3875
3807
  cy.log('When the user selects the show correct answer checkbox, green check-mark icon should be displayed besides both the response fields, correct answer label and its border should not be displayed, correct answer container should not be displayed and user should be awarded with full points');
3876
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
3877
- .click();
3808
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
3878
3809
  if (questionType === 'fill in the gaps - drag and drop') {
3879
3810
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
3880
3811
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(1);
@@ -3888,7 +3819,7 @@ const tests = {
3888
3819
  .should('not.exist');
3889
3820
  autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotVisible();
3890
3821
  };
3891
- autoScoredPreviewBase.correctIncorectAnswerLabel()
3822
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
3892
3823
  .should('not.exist');
3893
3824
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
3894
3825
  .verifyInnerText('10/10');
@@ -3899,7 +3830,7 @@ const tests = {
3899
3830
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides response fields, correct answer label and its border should not be displayed and correct answer container should not be displayed');
3900
3831
  autoScoredPreviewBase.checkAnswerButton()
3901
3832
  .click();
3902
- autoScoredPreviewBase.correctIncorectAnswerLabel()
3833
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
3903
3834
  .should('not.exist');
3904
3835
  if (questionType === 'fill in the gaps - drag and drop') {
3905
3836
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4040,8 +3971,7 @@ const tests = {
4040
3971
  .verifyInnerText('0/10');
4041
3972
 
4042
3973
  cy.log('When the user selects \'Show correct answer\' checkbox without attempting the question, then correct answer container with only correct answer options and no label should be displayed below the question field');
4043
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
4044
- .click();
3974
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
4045
3975
  switch (questionType) {
4046
3976
  case 'fill in the gaps - text':
4047
3977
  fillInTheGapsCommonComponents.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount('fill in the gaps - text', ['Response 1', 'Response 2']);
@@ -4055,7 +3985,7 @@ const tests = {
4055
3985
  default:
4056
3986
  throw new Error('Invalid question type');
4057
3987
  }
4058
- autoScoredPreviewBase.correctIncorectAnswerLabel()
3988
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4059
3989
  .should('not.exist');
4060
3990
  autoScoredPreviewBase.correctIcon()
4061
3991
  .should('not.exist');
@@ -4064,8 +3994,7 @@ const tests = {
4064
3994
  autoScoredPreviewBase.correctIncorrectAnswerBorder()
4065
3995
  .should('not.exist');
4066
3996
  cy.log('De-selecting show correct answer checkbox')
4067
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
4068
- .click();
3997
+ previewScoringAndShowCorrectAnswerComponent.steps.uncheckShowCorrectAnswerCheckbox();
4069
3998
  if (questionType === 'fill in the gaps - drag and drop') {
4070
3999
  fillInTheGapsDragAndDropPage.previewTabCorrectAnswerContainer()
4071
4000
  .should('not.exist');
@@ -4090,9 +4019,8 @@ const tests = {
4090
4019
  default:
4091
4020
  throw new Error('Invalid question type');
4092
4021
  }
4093
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
4094
- .click();
4095
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4022
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
4023
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4096
4024
  .should('not.exist');
4097
4025
  if (questionType === 'fill in the gaps - drag and drop') {
4098
4026
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4121,7 +4049,7 @@ const tests = {
4121
4049
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides the response fields, correct answer label and its border should not be displayed and correct answer container should not be displayed');
4122
4050
  autoScoredPreviewBase.checkAnswerButton()
4123
4051
  .click();
4124
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4052
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4125
4053
  .should('not.exist');
4126
4054
  if (questionType === 'fill in the gaps - drag and drop') {
4127
4055
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4153,9 +4081,8 @@ const tests = {
4153
4081
  default:
4154
4082
  throw new Error('Invalid question type');
4155
4083
  }
4156
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
4157
- .click();
4158
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4084
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
4085
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4159
4086
  .should('not.exist');
4160
4087
  if (questionType === 'fill in the gaps - drag and drop') {
4161
4088
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4184,7 +4111,7 @@ const tests = {
4184
4111
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides response fields, correct answer label and its border should not be displayed and correct answer container should not be displayed');
4185
4112
  autoScoredPreviewBase.checkAnswerButton()
4186
4113
  .click();
4187
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4114
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4188
4115
  .should('not.exist');
4189
4116
  if (questionType === 'fill in the gaps - drag and drop') {
4190
4117
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4215,11 +4142,10 @@ const tests = {
4215
4142
  default:
4216
4143
  throw new Error('Invalid question type');
4217
4144
  }
4218
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
4219
- .click();
4145
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
4220
4146
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
4221
4147
  .verifyInnerText('5/10');
4222
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4148
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4223
4149
  .should('not.exist');
4224
4150
  if (questionType === 'fill in the gaps - drag and drop') {
4225
4151
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4255,7 +4181,7 @@ const tests = {
4255
4181
  cy.log('When the user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides correct answer response field, red cross-mark icon should be displayed beside incorrect answer response field and correct/incorrect label and its border should not be displayed and correct answer container should not be displayed');
4256
4182
  autoScoredPreviewBase.checkAnswerButton()
4257
4183
  .click();
4258
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4184
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4259
4185
  .should('not.exist');
4260
4186
  if (questionType === 'fill in the gaps - drag and drop') {
4261
4187
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4288,9 +4214,8 @@ const tests = {
4288
4214
  }
4289
4215
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
4290
4216
  .verifyInnerText('5/10');
4291
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
4292
- .click();
4293
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4217
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
4218
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4294
4219
  .should('not.exist');
4295
4220
  if (questionType === 'fill in the gaps - drag and drop') {
4296
4221
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4326,7 +4251,7 @@ const tests = {
4326
4251
  cy.log('When the user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides correct answer response field, red cross-mark icon should be displayed beside incorrect answer response field and correct/incorrect answer label and its border should not be displayed and correct answer container should not be displayed');
4327
4252
  autoScoredPreviewBase.checkAnswerButton()
4328
4253
  .click();
4329
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4254
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4330
4255
  .should('not.exist');
4331
4256
  if (questionType === 'fill in the gaps - drag and drop') {
4332
4257
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4360,9 +4285,8 @@ const tests = {
4360
4285
  }
4361
4286
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
4362
4287
  .verifyInnerText('3/10');
4363
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
4364
- .click();
4365
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4288
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
4289
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4366
4290
  .should('not.exist');
4367
4291
  if (questionType === 'fill in the gaps - drag and drop') {
4368
4292
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4398,7 +4322,7 @@ const tests = {
4398
4322
  cy.log('When the user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides correct answer response field, red cross-mark icon should be displayed beside incorrect answer response field and correct/incorrect answer label and its border should not be displayed and correct answer container should not be displayed');
4399
4323
  autoScoredPreviewBase.checkAnswerButton()
4400
4324
  .click();
4401
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4325
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4402
4326
  .should('not.exist');
4403
4327
  if (questionType === 'fill in the gaps - drag and drop') {
4404
4328
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4432,8 +4356,7 @@ const tests = {
4432
4356
  .verifyInnerText('0/8');
4433
4357
 
4434
4358
  cy.log('When the user selects \'Show correct answer\' checkbox without attempting the question, then correct answer container with only alternate correct answer options and no label should be displayed below the question field');
4435
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
4436
- .click();
4359
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
4437
4360
  switch (questionType) {
4438
4361
  case 'fill in the gaps - text':
4439
4362
  fillInTheGapsCommonComponents.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount('fill in the gaps - text', ['Response 3', 'Response 4']);
@@ -4447,7 +4370,7 @@ const tests = {
4447
4370
  default:
4448
4371
  throw new Error('Invalid question type');
4449
4372
  }
4450
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4373
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4451
4374
  .should('not.exist');
4452
4375
  autoScoredPreviewBase.correctIcon()
4453
4376
  .should('not.exist');
@@ -4456,8 +4379,7 @@ const tests = {
4456
4379
  autoScoredPreviewBase.correctIncorrectAnswerBorder()
4457
4380
  .should('not.exist');
4458
4381
  cy.log('De-selecting show correct answer checkbox')
4459
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
4460
- .click();
4382
+ previewScoringAndShowCorrectAnswerComponent.steps.uncheckShowCorrectAnswerCheckbox();
4461
4383
  if (questionType === 'fill in the gaps - drag and drop') {
4462
4384
  fillInTheGapsDragAndDropPage.previewTabCorrectAnswerContainer()
4463
4385
  .should('not.exist');
@@ -4482,9 +4404,8 @@ const tests = {
4482
4404
  default:
4483
4405
  throw new Error('Invalid question type');
4484
4406
  }
4485
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
4486
- .click();
4487
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4407
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
4408
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4488
4409
  .should('not.exist');
4489
4410
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
4490
4411
  .verifyInnerText('4/8');
@@ -4513,7 +4434,7 @@ const tests = {
4513
4434
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides response fields, correct answer label and its border should not be displayed, and correct answer container should not be displayed');
4514
4435
  autoScoredPreviewBase.checkAnswerButton()
4515
4436
  .click();
4516
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4437
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4517
4438
  .should('not.exist');
4518
4439
  if (questionType === 'fill in the gaps - drag and drop') {
4519
4440
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4545,9 +4466,8 @@ const tests = {
4545
4466
  default:
4546
4467
  throw new Error('Invalid question type');
4547
4468
  }
4548
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
4549
- .click();
4550
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4469
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
4470
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4551
4471
  .should('not.exist');
4552
4472
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
4553
4473
  .verifyInnerText('8/8');
@@ -4576,7 +4496,7 @@ const tests = {
4576
4496
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides the response fields, correct answer label and its border should not be displayed and correct answer container should not be displayed');
4577
4497
  autoScoredPreviewBase.checkAnswerButton()
4578
4498
  .click();
4579
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4499
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4580
4500
  .should('not.exist');
4581
4501
  if (questionType === 'fill in the gaps - drag and drop') {
4582
4502
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4607,11 +4527,10 @@ const tests = {
4607
4527
  default:
4608
4528
  throw new Error('Invalid question type');
4609
4529
  }
4610
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
4611
- .click();
4530
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
4612
4531
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
4613
4532
  .verifyInnerText('4/8');
4614
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4533
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4615
4534
  .should('not.exist');
4616
4535
  if (questionType === 'fill in the gaps - drag and drop') {
4617
4536
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4647,7 +4566,7 @@ const tests = {
4647
4566
  cy.log('When the user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides correct answer response field, red cross-mark icon should be displayed beside incorrect answer response field and correct/incorrect answer label should not be displayed and correct answer container should not be displayed');
4648
4567
  autoScoredPreviewBase.checkAnswerButton()
4649
4568
  .click();
4650
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4569
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4651
4570
  .should('not.exist');
4652
4571
  if (questionType === 'fill in the gaps - drag and drop') {
4653
4572
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4682,9 +4601,8 @@ const tests = {
4682
4601
  }
4683
4602
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
4684
4603
  .verifyInnerText('2/8');
4685
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
4686
- .click();
4687
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4604
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
4605
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4688
4606
  .should('not.exist');
4689
4607
  if (questionType === 'fill in the gaps - drag and drop') {
4690
4608
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4720,7 +4638,7 @@ const tests = {
4720
4638
  cy.log('When the user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides correct answer response field, red cross-mark icon should be displayed beside incorrect answer response field and correct/incorrect label should not be displayed and correct answer container should not be displayed');
4721
4639
  autoScoredPreviewBase.checkAnswerButton()
4722
4640
  .click();
4723
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4641
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4724
4642
  .should('not.exist');
4725
4643
  if (questionType === 'fill in the gaps - drag and drop') {
4726
4644
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4753,8 +4671,7 @@ const tests = {
4753
4671
  }
4754
4672
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
4755
4673
  .verifyInnerText('4/8');
4756
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
4757
- .click();
4674
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
4758
4675
  if (questionType === 'fill in the gaps - drag and drop') {
4759
4676
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
4760
4677
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
@@ -4764,7 +4681,7 @@ const tests = {
4764
4681
  fillInTheGapsCommonComponents.steps.verifyIncorrectOptionCrossmarkIcon(1);
4765
4682
  autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotVisible();
4766
4683
  };
4767
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4684
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4768
4685
  .should('not.exist');
4769
4686
  switch (questionType) {
4770
4687
  case 'fill in the gaps - text':
@@ -4791,7 +4708,7 @@ const tests = {
4791
4708
  cy.log('When the user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides correct answer response field, red cross-mark icon should be displayed beside incorrect answer response field and correct/incorrect label should not be displayed and correct answer container should not be displayed');
4792
4709
  autoScoredPreviewBase.checkAnswerButton()
4793
4710
  .click();
4794
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4711
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4795
4712
  .should('not.exist');
4796
4713
  if (questionType === 'fill in the gaps - drag and drop') {
4797
4714
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4822,8 +4739,7 @@ const tests = {
4822
4739
  .verifyInnerText('0/8');
4823
4740
 
4824
4741
  cy.log('When the user selects the Show correct answer checkbox without attempting the question, correct answer container with only correct answer options and no label should be displayed below the question field');
4825
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
4826
- .click();
4742
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
4827
4743
  switch (questionType) {
4828
4744
  case 'fill in the gaps - text':
4829
4745
  fillInTheGapsCommonComponents.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount('fill in the gaps - text', ['Response 1', 'Response 2']);
@@ -4837,7 +4753,7 @@ const tests = {
4837
4753
  default:
4838
4754
  throw new Error('Invalid question type');
4839
4755
  }
4840
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4756
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4841
4757
  .should('not.exist');
4842
4758
  autoScoredPreviewBase.correctIcon()
4843
4759
  .should('not.exist');
@@ -4846,8 +4762,7 @@ const tests = {
4846
4762
  autoScoredPreviewBase.correctIncorrectAnswerBorder()
4847
4763
  .should('not.exist');
4848
4764
  cy.log('De-selecting show correct answer checkbox')
4849
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
4850
- .click();
4765
+ previewScoringAndShowCorrectAnswerComponent.steps.uncheckShowCorrectAnswerCheckbox();
4851
4766
  if (questionType === 'fill in the gaps - drag and drop') {
4852
4767
  fillInTheGapsDragAndDropPage.previewTabCorrectAnswerContainer()
4853
4768
  .should('not.exist');
@@ -4872,9 +4787,8 @@ const tests = {
4872
4787
  default:
4873
4788
  throw new Error('Invalid question type');
4874
4789
  }
4875
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
4876
- .click();
4877
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4790
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
4791
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4878
4792
  .should('not.exist');
4879
4793
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
4880
4794
  .verifyInnerText('8/8');
@@ -4903,7 +4817,7 @@ const tests = {
4903
4817
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides the response fields, correct answer label and its border should not be displayed and correct answer container should not be displayed');
4904
4818
  autoScoredPreviewBase.checkAnswerButton()
4905
4819
  .click();
4906
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4820
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4907
4821
  .should('not.exist');
4908
4822
  if (questionType === 'fill in the gaps - drag and drop') {
4909
4823
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -4935,9 +4849,8 @@ const tests = {
4935
4849
  default:
4936
4850
  throw new Error('Invalid question type');
4937
4851
  }
4938
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
4939
- .click();
4940
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4852
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
4853
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4941
4854
  .should('not.exist');
4942
4855
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
4943
4856
  .verifyInnerText('8/8');
@@ -4966,7 +4879,7 @@ const tests = {
4966
4879
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides the response fields, correct answer label and its border should not be displayed and correct answer container should not be displayed');
4967
4880
  autoScoredPreviewBase.checkAnswerButton()
4968
4881
  .click();
4969
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4882
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
4970
4883
  .should('not.exist');
4971
4884
  if (questionType === 'fill in the gaps - drag and drop') {
4972
4885
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -5000,9 +4913,8 @@ const tests = {
5000
4913
  }
5001
4914
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
5002
4915
  .verifyInnerText('4/8');
5003
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
5004
- .click();
5005
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4916
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
4917
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
5006
4918
  .should('not.exist');
5007
4919
  if (questionType === 'fill in the gaps - drag and drop') {
5008
4920
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -5038,7 +4950,7 @@ const tests = {
5038
4950
  cy.log('When the user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides correct answer response field, red cross-mark icon should be displayed beside incorrect answer response field and correct/incorrect answer label and its border should not be displayed and correct answer container should not be displayed');
5039
4951
  autoScoredPreviewBase.checkAnswerButton()
5040
4952
  .click();
5041
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4953
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
5042
4954
  .should('not.exist');
5043
4955
  if (questionType === 'fill in the gaps - drag and drop') {
5044
4956
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -5071,9 +4983,8 @@ const tests = {
5071
4983
  }
5072
4984
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
5073
4985
  .verifyInnerText('4/8');
5074
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
5075
- .click();
5076
- autoScoredPreviewBase.correctIncorectAnswerLabel()
4986
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
4987
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
5077
4988
  .should('not.exist');
5078
4989
  if (questionType === 'fill in the gaps - drag and drop') {
5079
4990
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -5109,7 +5020,7 @@ const tests = {
5109
5020
  cy.log('When the user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides correct answer response field, red cross-mark icon should be displayed beside incorrect answer response field and correct/incorrect label and its border should not be displayed and correct answer container should not be displayed')
5110
5021
  autoScoredPreviewBase.checkAnswerButton()
5111
5022
  .click();
5112
- autoScoredPreviewBase.correctIncorectAnswerLabel()
5023
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
5113
5024
  .should('not.exist');
5114
5025
  if (questionType === 'fill in the gaps - drag and drop') {
5115
5026
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -5141,9 +5052,8 @@ const tests = {
5141
5052
  default:
5142
5053
  throw new Error('Invalid question type');
5143
5054
  }
5144
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
5145
- .click();
5146
- autoScoredPreviewBase.correctIncorectAnswerLabel()
5055
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
5056
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
5147
5057
  .should('not.exist');
5148
5058
  if (questionType === 'fill in the gaps - drag and drop') {
5149
5059
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -5181,7 +5091,7 @@ const tests = {
5181
5091
  cy.log('When user clicks \'Check answer\' button, then the correct answer\'s response should have a green check-mark icon, alternate answer\'s response should have a red cross-mark icon, correct/incorrect answer label and its border should not be displayed and correct answer container should not be displayed');
5182
5092
  autoScoredPreviewBase.checkAnswerButton()
5183
5093
  .click();
5184
- autoScoredPreviewBase.correctIncorectAnswerLabel()
5094
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
5185
5095
  .should('not.exist');
5186
5096
  if (questionType === 'fill in the gaps - drag and drop') {
5187
5097
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -5339,8 +5249,8 @@ const tests = {
5339
5249
  .verifyInnerText('0/10');
5340
5250
 
5341
5251
  cy.log('When user selects the Show correct answer button then correct answer responses should be displayed in the correct answer container and not labels and check/cross marks are displayed');
5342
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
5343
- .click(); switch (questionType) {
5252
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
5253
+ switch (questionType) {
5344
5254
  case 'fill in the gaps - text':
5345
5255
  fillInTheGapsCommonComponents.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount('fill in the gaps - text', ['Response 1', 'Response 2']);
5346
5256
  break;
@@ -5357,13 +5267,12 @@ const tests = {
5357
5267
  .should('not.exist');
5358
5268
  autoScoredPreviewBase.incorrectIcon()
5359
5269
  .should('not.exist');
5360
- autoScoredPreviewBase.correctIncorectAnswerLabel()
5270
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
5361
5271
  .should('not.exist');
5362
5272
  autoScoredPreviewBase.correctIncorrectAnswerBorder()
5363
5273
  .should('not.exist');
5364
5274
  cy.log('De-selecting show correct answer checkbox')
5365
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
5366
- .click();
5275
+ previewScoringAndShowCorrectAnswerComponent.steps.uncheckShowCorrectAnswerCheckbox();
5367
5276
  if (questionType === 'fill in the gaps - drag and drop') {
5368
5277
  fillInTheGapsDragAndDropPage.previewTabCorrectAnswerContainer()
5369
5278
  .should('not.exist');
@@ -5388,9 +5297,8 @@ const tests = {
5388
5297
  default:
5389
5298
  throw new Error('Invalid question type');
5390
5299
  }
5391
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
5392
- .click();
5393
- autoScoredPreviewBase.correctIncorectAnswerLabel()
5300
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
5301
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
5394
5302
  .should('not.exist');
5395
5303
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
5396
5304
  .verifyInnerText('10/10');
@@ -5419,7 +5327,7 @@ const tests = {
5419
5327
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides the response input fields, correct answer label and its border should not be displayed and correct answer container should not be displayed');
5420
5328
  autoScoredPreviewBase.checkAnswerButton()
5421
5329
  .click();
5422
- autoScoredPreviewBase.correctIncorectAnswerLabel()
5330
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
5423
5331
  .should('not.exist');
5424
5332
  if (questionType === 'fill in the gaps - drag and drop') {
5425
5333
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -5450,9 +5358,8 @@ const tests = {
5450
5358
  default:
5451
5359
  throw new Error('Invalid question type');
5452
5360
  }
5453
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
5454
- .click();
5455
- autoScoredPreviewBase.correctIncorectAnswerLabel()
5361
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
5362
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
5456
5363
  .should('not.exist');
5457
5364
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
5458
5365
  .verifyInnerText('10/10');
@@ -5481,7 +5388,7 @@ const tests = {
5481
5388
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides the response input fields, correct answer label and its border should not be displayed and correct answer container should not be displayed');
5482
5389
  autoScoredPreviewBase.checkAnswerButton()
5483
5390
  .click();
5484
- autoScoredPreviewBase.correctIncorectAnswerLabel()
5391
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
5485
5392
  .should('not.exist');
5486
5393
  if (questionType === 'fill in the gaps - drag and drop') {
5487
5394
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -5510,9 +5417,8 @@ const tests = {
5510
5417
  default:
5511
5418
  throw new Error('Invalid question type');
5512
5419
  };
5513
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
5514
- .click();
5515
- autoScoredPreviewBase.correctIncorectAnswerLabel()
5420
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
5421
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
5516
5422
  .should('not.exist');
5517
5423
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
5518
5424
  .verifyInnerText('0/10');
@@ -5547,7 +5453,7 @@ const tests = {
5547
5453
  cy.log('When user clicks on \'Check answer\' button, then red cross-mark icon should be displayed besides the response input fields, incorrect answer label and its border should not be displayed and correct answer container should not be displayed');
5548
5454
  autoScoredPreviewBase.checkAnswerButton()
5549
5455
  .click();
5550
- autoScoredPreviewBase.correctIncorectAnswerLabel()
5456
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
5551
5457
  .should('not.exist');
5552
5458
  if (questionType == 'fill in the gaps - drag and drop') {
5553
5459
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
@@ -5580,8 +5486,7 @@ const tests = {
5580
5486
  default:
5581
5487
  throw new Error('Invalid question type');
5582
5488
  }
5583
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
5584
- .click();
5489
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
5585
5490
  if (questionType === 'fill in the gaps - drag and drop') {
5586
5491
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
5587
5492
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(1);
@@ -5595,7 +5500,7 @@ const tests = {
5595
5500
  .should('not.exist');
5596
5501
  autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotVisible();
5597
5502
  };
5598
- autoScoredPreviewBase.correctIncorectAnswerLabel()
5503
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
5599
5504
  .should('not.exist');
5600
5505
  previewScoringAndShowCorrectAnswerComponent.previewScoreText()
5601
5506
  .verifyInnerText('10/10');
@@ -5611,7 +5516,7 @@ const tests = {
5611
5516
  cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides the response field, correct answer label and its border should not be displayed and correct answer container should not be displayed');
5612
5517
  autoScoredPreviewBase.checkAnswerButton()
5613
5518
  .click();
5614
- autoScoredPreviewBase.correctIncorectAnswerLabel()
5519
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
5615
5520
  .should('not.exist');
5616
5521
  if (questionType === 'fill in the gaps - drag and drop') {
5617
5522
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
@@ -5674,9 +5579,8 @@ const tests = {
5674
5579
  it('When the \'Round down score\' checkbox is not selected, then in Preview tab when user selects partially or fully correct answers the points should be displayed in decimal points if applicable as per the options selected by the user', () => {
5675
5580
  cy.log('Switching to Edit tab')
5676
5581
  createQuestionBasePage.steps.switchToEditTab();
5677
- fillInTheGapsTextPage.rounddownScoreCheckbox()
5678
- .click()
5679
- .should('not.be.checked');
5582
+ fillInTheGapsTextPage.steps.expandRoundingDropdown();
5583
+ fillInTheGapsTextPage.steps.selectOptionFromRoundingDropdownOption('none');
5680
5584
  cy.log('Switching to Preview tab')
5681
5585
  createQuestionBasePage.steps.switchToPreviewTab();
5682
5586
  switch (questionType) {
@@ -5720,15 +5624,14 @@ const tests = {
5720
5624
  previewScoringAndShowCorrectAnswerComponent.tests.verifyShowCorrectAnswerLabelAndCheckboxExistAndPreviewScoreNotExistInPreviewTab();
5721
5625
 
5722
5626
  it('When the user selects \'Show correct answer\' checkbox without attempting the question, then no correct/incorrect icons should be displayed besides the response fields, no label should be displayed below the box and correct answers should be displayed below the box', () => {
5723
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
5724
- .click();
5627
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
5725
5628
  autoScoredPreviewBase.incorrectIcon()
5726
5629
  .should('not.exist');
5727
5630
  autoScoredPreviewBase.correctIcon()
5728
5631
  .should('not.exist');
5729
5632
  autoScoredPreviewBase.correctIncorrectAnswerBorder()
5730
5633
  .should('not.exist');
5731
- autoScoredPreviewBase.correctIncorectAnswerLabel()
5634
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
5732
5635
  .should('not.exist');
5733
5636
  switch (questionType) {
5734
5637
  case 'fill in the gaps - text':
@@ -5744,9 +5647,7 @@ const tests = {
5744
5647
  throw new Error('Invalid question type');
5745
5648
  }
5746
5649
  cy.log('Post step: De-selecting the Show correct answer checkbox');
5747
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
5748
- .click()
5749
- .should('not.be.checked');
5650
+ previewScoringAndShowCorrectAnswerComponent.steps.uncheckShowCorrectAnswerCheckbox();
5750
5651
  });
5751
5652
 
5752
5653
  it('When user selects Check answer button without attempting the question, then correct/incorrect icons besides the response fields, border around the question, label below the box and correct answer container should not be displayed', () => {
@@ -5763,7 +5664,7 @@ const tests = {
5763
5664
  fillInTheGapsCommonComponents.previewTabCorrectAnswerContainer()
5764
5665
  .should('not.exist');
5765
5666
  };
5766
- autoScoredPreviewBase.correctIncorectAnswerLabel()
5667
+ autoScoredPreviewBase.correctIncorrectAnswerLabel()
5767
5668
  .should('not.exist');
5768
5669
  autoScoredPreviewBase.correctIncorrectAnswerBorder()
5769
5670
  .should('not.exist');
@@ -5788,8 +5689,7 @@ const tests = {
5788
5689
  };
5789
5690
 
5790
5691
  cy.log('When the user selects \'Show correct answer\' checkbox, red crossmark icon should be displayed besides the response fields, incorrect answer border, a label \'Incorrect Answer\' and the correct answer container should be displayed below the question field')
5791
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
5792
- .click();
5692
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
5793
5693
  if (questionType === 'fill in the gaps - drag and drop') {
5794
5694
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
5795
5695
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
@@ -5857,8 +5757,7 @@ const tests = {
5857
5757
  }
5858
5758
 
5859
5759
  cy.log('When user selects the show correct answer checkbox, green checkmark icon should be displayed besides correct response field, red crossmark icon should be displayed besides the incorrect response field and incorrect answer border, a label \'Incorrect Answer\' and correct answer container with correct answer for the incorrectly entered response should be displayed')
5860
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
5861
- .click();
5760
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();
5862
5761
  if (questionType === 'fill in the gaps - drag and drop') {
5863
5762
  fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
5864
5763
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(1);
@@ -5925,8 +5824,7 @@ const tests = {
5925
5824
  }
5926
5825
 
5927
5826
  cy.log('When the user selects the show correct answer checkbox, green checkmark icon should be displayed besides the response fields and a correct answer border with label \'Correct Answer\' should be displayed below the question field. The correct answer container should not be displayed')
5928
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
5929
- .click();
5827
+ previewScoringAndShowCorrectAnswerComponent.steps.checkShowCorrectAnswerCheckbox();;
5930
5828
  if (questionType === 'fill in the gaps - drag and drop') {
5931
5829
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(0);
5932
5830
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionCheckmarkIcon(1);