itemengine-cypress-automation 1.0.119 → 1.0.121

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +13 -1
  2. package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +2 -0
  3. package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +1 -0
  4. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +2 -0
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -1
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -2
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +1 -4
  8. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingForAllViews.smoke.js +273 -0
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/checkAnswerFunctionalityForAllViews.smoke.js +116 -0
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +136 -0
  11. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +224 -0
  12. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +120 -0
  13. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/previewContentsForAllViews.smoke.js +158 -0
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +1 -1
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -4
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownAndDropdownMenuSection.js +246 -0
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +332 -0
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +409 -0
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +80 -0
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +213 -0
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsBasic.js +2 -2
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +1 -1
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +2 -2
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +68 -68
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +6 -6
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +3 -289
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -1
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +2 -2
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -23
  32. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +191 -0
  33. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +190 -0
  34. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +284 -0
  35. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
  36. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/manuallyAndNonScored.js +113 -0
  37. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +217 -0
  38. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +234 -0
  39. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +217 -0
  40. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +217 -0
  41. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsBasic.js +136 -0
  42. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +197 -0
  43. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +169 -0
  44. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +197 -0
  45. package/cypress/e2e/ILC/FillInTheGapsTextNew/allOrNothingForAllViews.smoke.js +219 -0
  46. package/cypress/e2e/ILC/FillInTheGapsTextNew/checkAnswerFunctionalityForAllViews.smoke.js +115 -0
  47. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +142 -0
  48. package/cypress/e2e/ILC/FillInTheGapsTextNew/previewContentsForAllViews.smoke.js +152 -0
  49. package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +39 -0
  50. package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +2 -12
  51. package/cypress/e2e/ILC/ShortTextResponseNew/conditionalCheckboxes.js +497 -0
  52. package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +503 -0
  53. package/cypress/e2e/ILC/ShortTextResponseNew/responseAnswersAndAcceptedStudentInput.js +233 -0
  54. package/cypress/e2e/ILC/ShortTextResponseNew/specialCharactersSection.js +291 -0
  55. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +332 -0
  56. package/cypress/e2e/ILC/SingleSelection/studentViewSettings.js +2 -12
  57. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +9 -8
  58. package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +4 -4
  59. package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +8 -2
  60. package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +5 -2
  61. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +334 -0
  62. package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +419 -0
  63. package/cypress/e2e/ILC/TextEntryMathWithImage/checkAnswerFunctionalityForAllViews.smoke.js +166 -0
  64. package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +166 -0
  65. package/cypress/e2e/ILC/UploadResponse/editTabScoringSection.js +51 -0
  66. package/cypress/e2e/ILC/UploadResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +99 -0
  67. package/cypress/e2e/ILC/UploadResponse/manuallyAndNonScoredScoring.js +71 -0
  68. package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +155 -0
  69. package/cypress/e2e/ILC/UploadResponse/uploadResponseHeaderSection.js +66 -0
  70. package/cypress/e2e/migration/migration.js +6 -5
  71. package/cypress/e2e/migration/migration2.js +4 -3
  72. package/cypress/e2e/migration/migration3.js +4 -3
  73. package/cypress/e2e/migration/migration4.js +4 -3
  74. package/cypress/e2e/migration/migration5.js +4 -3
  75. package/cypress/fixtures/theme/ilc.json +3 -1
  76. package/cypress/pages/audioResponsePage.js +2 -1
  77. package/cypress/pages/components/additionalSettingsPanel.js +27 -0
  78. package/cypress/pages/components/autoScoredPreviewBase.js +1 -1
  79. package/cypress/pages/components/autoScoredScoringSection.js +1 -1
  80. package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +1 -1
  81. package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +1 -1
  82. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +2 -2
  83. package/cypress/pages/components/autoScoredStudentViewSettings.js +8 -1
  84. package/cypress/pages/components/backgroundImageUploadComponent.js +5 -5
  85. package/cypress/pages/components/createQuestionBasePage.js +8 -2
  86. package/cypress/pages/components/essayResponseCommonComponents.js +6 -0
  87. package/cypress/pages/components/fillInTheGapsCommonComponents.js +13 -0
  88. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +40 -0
  89. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +422 -314
  90. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +438 -710
  91. package/cypress/pages/components/{figOverImageCanvasComponent.js → imageCanvasComponent.js} +274 -272
  92. package/cypress/pages/components/index.js +3 -3
  93. package/cypress/pages/components/maximumRecorderLengthComponent.js +55 -11
  94. package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +1 -1
  95. package/cypress/pages/components/questionInputFieldComponent.js +49 -23
  96. package/cypress/pages/components/scoringSectionBase.js +1 -1
  97. package/cypress/pages/createItemPage.js +67 -2
  98. package/cypress/pages/fillInTheGapsDragAndDropPage.js +172 -711
  99. package/cypress/pages/fillInTheGapsDropdownPage.js +75 -72
  100. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +4 -4
  101. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +109 -273
  102. package/cypress/pages/fillInTheGapsOverImageTextPage.js +49 -291
  103. package/cypress/pages/fillInTheGapsTextPage.js +52 -199
  104. package/cypress/pages/index.js +5 -5
  105. package/cypress/pages/multipleSelectionPage.js +1 -0
  106. package/cypress/pages/shortTextResponsePage.js +575 -33
  107. package/cypress/pages/singleSelectionGridPage.js +1 -2
  108. package/cypress/pages/singleSelectionPage.js +5 -6
  109. package/cypress/pages/textEntryMathPage.js +46 -22
  110. package/cypress/pages/textEntryMathWithImagePage.js +212 -0
  111. package/cypress/pages/uploadResponsePage.js +74 -21
  112. package/cypress/support/migrationHelpers/extractLrnQuestionData.js +73 -2
  113. package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
  114. package/cypress/support/migrationHelpers/verifyIeQuestionData.js +49 -2
  115. package/package.json +1 -1
  116. package/cypress/e2e/ILC/AudioResponseNew/minimalRecorderStyle.js +0 -482
  117. package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +0 -412
  118. package/cypress/pages/components/figOverImageCommonComponent.js +0 -1113
  119. package/cypress/pages/dragAndDropIntoCategoriesAllOrNothingScoring.js +0 -1155
  120. package/cypress/pages/dragAndDropIntoCategoriesCellsScoring.js +0 -1561
  121. package/cypress/pages/dragAndDropIntoCategoriesResponseScoring.js +0 -1396
  122. package/cypress/pages/fillInTheGapsScoring.js +0 -5872
  123. package/cypress/pages/fillInTheGapsSetCorrectAnswerSection.js +0 -260
@@ -1,1155 +0,0 @@
1
- import { autoScoredPreviewBase, createQuestionBasePage, previewScoringAndShowCorrectAnswerComponent, scoringSectionBase } from "./components";
2
- import { dragAndDropIntoCategoriesPage } from "./dragAndDropIntoCategoriesPage";
3
- let correctTabAnswerArray = [['Bat'], ['Eagle', 'Parrot'], ['Platypus', 'Whale'], ['Ostrich']];
4
- const cellNumerationArray = ['1', '2', '3', '4'];
5
- const css = Cypress.env('css');
6
-
7
- const tests = {
8
- verifyShowCorrectAnswerBasicFunctionality: () => {
9
- it('When the user has set correct answer options 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', () => {
10
- createQuestionBasePage.steps.switchToEditTab();
11
- dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
12
- scoringSectionBase.steps.allotPoints(10);
13
- createQuestionBasePage.steps.switchToPreviewTab();
14
- previewScoringAndShowCorrectAnswerComponent.steps.verifyDefaultShowCorrectAnswerCheckboxAndLabel();
15
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
16
- .verifyInnerText('0/10');
17
- });
18
-
19
- it('When the user attempts question in preview tab and switches to edit tab, then on re-switching to the preview tab users response should not persist', () => {
20
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
21
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
22
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
23
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
24
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
25
- for (let index = 0; index < 4; index++) {
26
- dragAndDropIntoCategoriesPage.steps.verifyEmptyStateOfCategoryCellInPreviewTab(index);
27
- }
28
- });
29
- },
30
-
31
- verifyAutoScoredAllOrNothingScoring: () => {
32
- it('Case: When user adds incorrect response', () => {
33
- cy.log('When the user attempts the question incorrectly and selects \'Show correct answer\' checkbox, the score provided should be 0 points, red cross-mark icon should be displayed besides the incorrect answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section with all correct answers along with category cell numeration should be displayed')
34
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 2);
35
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 3);
36
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 1);
37
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 0);
38
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 2);
39
-
40
- cy.log('User should be awarded 0 points')
41
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
42
- .verifyInnerText('0/10');
43
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
44
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
45
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
46
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
47
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
48
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(3);
49
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(4);
50
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
51
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
52
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
53
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctTabAnswerArray, [1, 2, 3, 4]);
54
-
55
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
56
-
57
- cy.log('When the user clicks on \'Check answer\' button, red cross-mark icon should be displayed besides the incorrect responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
58
- autoScoredPreviewBase.steps.checkAnswer();
59
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
60
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
61
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
62
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(3);
63
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(4);
64
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
65
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
66
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
67
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
68
- });
69
-
70
- it('CSS of incorrect answer state', { tags: 'css' }, () => {
71
- cy.log('Pre requisite: The user has attempted the question incorrectly')
72
- cy.log('Pre step: Select show answer checkbox')
73
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
74
- cy.log('Verifying CSS of incorrect cross-mark icon')
75
- dragAndDropIntoCategoriesPage.incorrectIcon()
76
- .eq(0)
77
- .verifyPseudoClassBeforeProperty('color', css.color.incorrectAnswer);
78
- dragAndDropIntoCategoriesPage.correctIncorrectAnswerLabel()
79
- .verifyCSS(css.color.incorrectAnswer, css.fontSize.normal, css.fontWeight.bold)
80
- .parents('[class*="AnswerStatusWrapper"]')
81
- .find('[class*="AnswerStatusIcon"]')
82
- .should('be.visible')
83
- .verifyPseudoClassBeforeProperty('color', css.color.incorrectAnswer);
84
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
85
- });
86
-
87
- it('Accessibility of incorrect answer state', { tags: 'a11y' }, () => {
88
- cy.checkAccessibility(dragAndDropIntoCategoriesPage.previewTabQuestionWrapper());
89
- });
90
-
91
- it('Case: When user enters partially correct response', () => {
92
- cy.log('Pre step: Deselect show answer checkbox')
93
- dragAndDropIntoCategoriesPage.steps.uncheckShowCorrectAnswerCheckbox();
94
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
95
-
96
- cy.log('When the user attempts the question partially correct with some cells correct, some cells partially correct but incomplete, some cells partially correct with incorrect options, and some cells empty and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the correct answer responses, red cross-mark should be displayed besides incorrect answer response, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the incorrect/not attempted options from the correct tab along with category cell numeration')
97
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
98
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
99
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 2);
100
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
101
-
102
- cy.log('User should be awarded 0 points')
103
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
104
- .verifyInnerText('0/10');
105
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
106
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
107
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
108
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
109
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
110
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
111
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
112
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
113
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
114
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Parrot'], ['Platypus'], ['Ostrich']], [2, 3, 4]);
115
-
116
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
117
-
118
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses, red cross-mark icon should be displayed besides the incorrect answer response, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
119
- autoScoredPreviewBase.steps.checkAnswer();
120
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
121
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
122
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
123
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
124
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
125
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
126
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
127
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
128
-
129
- cy.log('When the user attempts the question partially correct with all the cells correctly attempted but one cell incomplete and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the incorrect/not attempted options from the correct tab along with category cell numeration')
130
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
131
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
132
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
133
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 1);
134
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
135
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
136
-
137
- cy.log('User should be awarded 0 points')
138
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
139
- .verifyInnerText('0/10');
140
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
141
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
142
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
143
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
144
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
145
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
146
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
147
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
148
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
149
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
150
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Whale']], [3]);
151
-
152
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
153
-
154
- cy.log('When the user clicks on \'Check answer\' button, red cross-mark icon should be displayed besides the incorrect response option, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
155
- autoScoredPreviewBase.steps.checkAnswer();
156
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
157
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
158
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
159
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
160
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
161
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
162
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
163
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
164
-
165
- cy.log('When the user attempts the question partially correct with all the cells correctly attempted but with an extra option which is not set as correct answer and selects \'Show correct answer\' checkbox, 0 score should be provided, green check-mark icon should be displayed besides the correct answer responses, red cross-mark icon should appear besides the incorrect answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
166
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
167
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
168
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
169
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 1);
170
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
171
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
172
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
173
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 3);
174
-
175
- cy.log('User should be awarded 0 points')
176
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
177
- .verifyInnerText('0/10');
178
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
179
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
180
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
181
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
182
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
183
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
184
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
185
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(5);
186
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(6);
187
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
188
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
189
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
190
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
191
-
192
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
193
-
194
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses, red cross-mark icon should appear besides the incorrect answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
195
- autoScoredPreviewBase.steps.checkAnswer();
196
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
197
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
198
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
199
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
200
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
201
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(5);
202
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(6);
203
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
204
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
205
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
206
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
207
- });
208
-
209
- it('Case: When user adds correct response', () => {
210
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
211
- cy.log('When the user attempts the question correctly in the order same as set in the set correct answer section and selects \'Show correct answer\' checkbox, full score should be provided, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, correct answer border for the question should appear, a label \'Correct answer\' should be displayed below the question preview and no correct answer section should be displayed')
212
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
213
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
214
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 1);
215
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
216
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
217
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
218
-
219
- cy.log('User should be awarded full points')
220
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
221
- .verifyInnerText('10/10');
222
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
223
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
224
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
225
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
226
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
227
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
228
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
229
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(5);
230
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAttemptBorder();
231
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
232
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
233
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
234
-
235
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
236
-
237
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, correct answer border for the question should appear, a label \'Correct answer\' should be displayed below the question preview and no correct answer section should be displayed')
238
- autoScoredPreviewBase.steps.checkAnswer();
239
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
240
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
241
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
242
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
243
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
244
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(5);
245
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAttemptBorder();
246
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
247
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
248
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
249
-
250
- cy.log('When the user attempts the question with correct tab answers in a random order and selects \'Show correct answer\' checkbox, full score should be provided, correct/incorrect border and icon for cell should not be displayed, correct answer border for the question should appear, green check-mark icon should be displayed besides the correct answer responses, a label \'Correct answer\' should be displayed below the question preview and no correct answer section should be displayed')
251
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
252
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
253
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
254
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 1);
255
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
256
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
257
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
258
-
259
- cy.log('User should be awarded full points')
260
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
261
- .verifyInnerText('10/10');
262
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
263
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
264
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
265
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
266
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
267
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
268
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
269
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(5);
270
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAttemptBorder();
271
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
272
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
273
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
274
-
275
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
276
-
277
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, correct answer border for the question should appear, a label \'Correct answer\' should be displayed below the question preview and no correct answer section should be displayed')
278
- autoScoredPreviewBase.steps.checkAnswer();
279
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
280
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
281
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
282
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
283
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
284
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(5);
285
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAttemptBorder();
286
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
287
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
288
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
289
- });
290
-
291
- it('CSS of check score text full score state and \'Correct answer\' label', { tags: 'css' }, () => {
292
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
293
- .should('have.css', 'color', css.color.primaryBtn)
294
- .and('have.css', 'background-color', css.color.correctAnswer)
295
- dragAndDropIntoCategoriesPage.correctIncorrectAnswerLabel()
296
- .verifyCSS(css.color.correctAnswer, css.fontSize.normal, css.fontWeight.bold)
297
- .parent()
298
- .find('[class*="AnswerStatusIcon"]')
299
- .verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
300
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAttemptBorder();
301
- });
302
-
303
- it('Accessibility of check score text full score state and \'Correct answer\' label', { tags: 'a11y' }, () => {
304
- cy.checkAccessibility(dragAndDropIntoCategoriesPage.previewTabQuestionWrapper());
305
- });
306
-
307
- },
308
-
309
- verifyAutoScoredAllOrNothingWithAlternateAnswerWhenCorrectPointsAreGreaterThanAlternatePoints: () => {
310
- it('Alternate answer case: When \'Correct answer\' points are more than \'Alternate answer\' points', () => {
311
- cy.log('Total points displayed besides Show correct answer checkbox should be of Correct answer points')
312
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
313
- .verifyInnerText('0/10');
314
-
315
- cy.log('When the user selects the Show correct answer checkbox without attempting the question, correct answer section with mapping of correct tab should be displayed')
316
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox()
317
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctTabAnswerArray, [1, 2, 3, 4]);
318
- dragAndDropIntoCategoriesPage.correctIncorrectAnswerLabel()
319
- .should('not.exist');
320
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
321
-
322
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
323
-
324
- cy.log('When the user attempts the question fully correct as set in the \'Correct tab\' and selects \'Show correct answer\' checkbox, points specified for correct answers (full points) should be provided, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, correct answer border for the question should appear, a label \'Correct answer\' should be displayed below the question preview and no correct answer section should be displayed')
325
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
326
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
327
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 1);
328
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
329
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
330
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
331
- cy.log('User should be awarded full points')
332
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
333
- .verifyInnerText('10/10');
334
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
335
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
336
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
337
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
338
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
339
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
340
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
341
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(5);
342
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAttemptBorder();
343
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
344
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
345
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
346
-
347
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
348
-
349
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, correct answer border for the question should appear, a label \'Correct answer\' should be displayed below the question preview and no correct answer section should be displayed')
350
- autoScoredPreviewBase.steps.checkAnswer();
351
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
352
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
353
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
354
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
355
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
356
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(5);
357
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAttemptBorder();
358
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
359
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
360
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
361
-
362
- cy.log('When the user attempts the question fully correct as set in the \'Alternate tab\' and selects \'Show correct answer\' checkbox, points specified for alternate correct answer (less than overall points) should be provided, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, correct answer border for the question should appear, a label \'Correct answer\' should be displayed below the question preview and no correct answer section should be displayed')
363
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
364
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
365
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
366
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 2);
367
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
368
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
369
- cy.log('User should be awarded full points')
370
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
371
- .verifyInnerText('5/10');
372
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
373
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
374
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
375
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
376
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
377
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
378
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
379
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAttemptBorder();
380
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
381
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
382
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
383
-
384
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
385
-
386
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, correct answer border for the question should appear, a label \'Correct answer\' should be displayed below the question preview and no correct answer section should be displayed')
387
- autoScoredPreviewBase.steps.checkAnswer();
388
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
389
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
390
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
391
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
392
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
393
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAttemptBorder();
394
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
395
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
396
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
397
-
398
- cy.log('When the user attempts the question partially correct with options exclusively from the \'Correct tab\' and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the incorrect/not attempted options from the correct tab along with category cell numeration')
399
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
400
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
401
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
402
- cy.log('User should be awarded 0 points')
403
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
404
- .verifyInnerText('0/10');
405
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
406
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
407
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
408
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
409
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
410
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
411
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
412
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle', 'Parrot'], ['Whale'], ['Ostrich']], [2, 3, 4]);
413
-
414
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
415
-
416
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
417
- autoScoredPreviewBase.steps.checkAnswer();
418
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
419
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
420
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
421
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
422
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
423
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
424
-
425
- cy.log('When the user attempts the question partially correct with all the cells correct as per the \'Correct tab\' but one cell incomplete and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the incorrect/not attempted options from the correct tab along with category cell numeration')
426
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
427
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
428
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
429
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
430
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
431
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
432
- cy.log('User should be awarded 0 points')
433
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
434
- .verifyInnerText('0/10');
435
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
436
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
437
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
438
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
439
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
440
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
441
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
442
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
443
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
444
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
445
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Parrot']], [2]);
446
-
447
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
448
-
449
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and and no correct answer section should be displayed')
450
- autoScoredPreviewBase.steps.checkAnswer();
451
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
452
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
453
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
454
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
455
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
456
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
457
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
458
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
459
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
460
-
461
- cy.log('When the user attempts the question partially correct with options exclusively from the \'Alternate tab\' and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the not attempted options from the alternate tab along with category cell numeration')
462
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
463
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
464
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 2);
465
- cy.log('User should be awarded 0 points')
466
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
467
- .verifyInnerText('0/10');
468
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
469
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
470
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
471
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
472
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
473
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
474
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
475
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle'], ['Whale'], ['Ostrich']], [2, 3, 4]);
476
-
477
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
478
-
479
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
480
- autoScoredPreviewBase.steps.checkAnswer();
481
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
482
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
483
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
484
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
485
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
486
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
487
-
488
- cy.log('When the user attempts the question partially correct such that more number of options are exclusively from the alternate tab but with one option common across both the tabs and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the common correct answer responses from both the tabs, red cross-mark should be displayed besides the responses from the alternate tab, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the incorrect/not attempted options from the correct tab along with category cell numeration')
489
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
490
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
491
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
492
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 2);
493
- cy.log('User should be awarded 0 points')
494
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
495
- .verifyInnerText('0/10');
496
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
497
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
498
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
499
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
500
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
501
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
502
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
503
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
504
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Parrot'], ['Platypus', 'Whale'], ['Ostrich']], [1, 2, 3, 4]);
505
-
506
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
507
-
508
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the common correct answer responses from both the tabs, red cross-mark should be displayed besides the incorrect answer responses from the alternate tab, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
509
- autoScoredPreviewBase.steps.checkAnswer();
510
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
511
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
512
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
513
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
514
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
515
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
516
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
517
-
518
- cy.log('When the user attempts the question partially correct with all the cells correctly attempted as per the alternate tab but with an extra incorrect option and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the incorrect/not attempted options from the correct tab along with category cell numeration')
519
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
520
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
521
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
522
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
523
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 2);
524
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
525
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 3);
526
- cy.log('User should be awarded 0 points')
527
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
528
- .verifyInnerText('0/10');
529
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
530
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
531
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
532
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
533
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
534
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(3);
535
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
536
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(5);
537
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
538
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
539
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
540
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Parrot'], ['Platypus']], [1, 2, 3]);
541
-
542
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
543
-
544
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
545
- autoScoredPreviewBase.steps.checkAnswer();
546
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
547
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
548
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
549
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(3);
550
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
551
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(5);
552
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
553
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
554
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
555
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
556
-
557
- cy.log('When the user attempts the question partially correct such that more number of correct options are exclusively from the alternate tab but with one option exclusively from the correct tab in the same cell and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the common correct answer responses from both the tabs, red cross-mark should be displayed besides the incorrect answer responses from the alternate tab, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the incorrect/not attempted options from the correct tab along with category cell numeration')
558
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
559
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
560
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 2);
561
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
562
- cy.log('User should be awarded 0 points')
563
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
564
- .verifyInnerText('0/10');
565
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
566
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
567
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
568
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
569
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
570
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
571
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
572
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
573
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle', 'Parrot'], ['Platypus', 'Whale'], ['Ostrich']], [2, 3, 4]);
574
-
575
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
576
-
577
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the common correct answer responses from both the tabs, red cross-mark should be displayed besides the incorrect answer responses from the alternate tab, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
578
- autoScoredPreviewBase.steps.checkAnswer();
579
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
580
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
581
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
582
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
583
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
584
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
585
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
586
- });
587
- },
588
-
589
- verifyAutoScoredAllOrNothingWithAlternateAnswerWhenAlternatePointsAreGreaterThanCorrectPoints: () => {
590
- it('Alternate answer case: When \'Alternate answer\' points are more than \'Correct answer\' points', () => {
591
- cy.log('Total points displayed besides Show correct answer checkbox should be of Correct Answer points')
592
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
593
- .verifyInnerText('0/15');
594
-
595
- cy.log('When the user selects the Show correct answer checkbox without attempting the question, correct answer section with mapping of correct tab should be displayed')
596
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox()
597
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctTabAnswerArray, [1, 2, 3, 4]);
598
- dragAndDropIntoCategoriesPage.correctIncorrectAnswerLabel()
599
- .should('not.exist');
600
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
601
-
602
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
603
-
604
- cy.log('When the user attempts the question fully correct as set in the \'Correct tab\' and selects \'Show correct answer\' checkbox, points specified for correct answers should be provided, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, correct answer border for the question should appear, a label \'Correct answer\' should be displayed below the question preview and no correct answer section should be displayed')
605
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
606
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
607
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 1);
608
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
609
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
610
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
611
- cy.log('User should be awarded full points')
612
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
613
- .verifyInnerText('10/15');
614
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
615
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
616
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
617
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
618
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
619
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
620
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
621
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(5);
622
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAttemptBorder();
623
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
624
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
625
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
626
-
627
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
628
-
629
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, correct answer border should appear, a label \'Correct answer\' should be displayed below the question preview and no correct answer section should be displayed')
630
- autoScoredPreviewBase.steps.checkAnswer();
631
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
632
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
633
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
634
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
635
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
636
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(5);
637
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAttemptBorder();
638
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
639
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
640
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
641
-
642
- cy.log('When the user attempts the question fully correct as set in the \'Alternate tab\' and selects \'Show correct answer\' checkbox, points specified for alternate correct answer (full points) should be provided, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, correct answer border for the question should appear, a label \'Correct answer\' should be displayed below the question preview and no correct answer section should be displayed')
643
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
644
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
645
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
646
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 2);
647
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
648
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
649
- cy.log('User should be awarded full points')
650
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
651
- .verifyInnerText('15/15');
652
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
653
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
654
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
655
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
656
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
657
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
658
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
659
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAttemptBorder();
660
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
661
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
662
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
663
-
664
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
665
-
666
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, correct answer border should appear, a label \'Correct answer\' should be displayed below the question preview and no correct answer section should be displayed')
667
- autoScoredPreviewBase.steps.checkAnswer();
668
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
669
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
670
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
671
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
672
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
673
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAttemptBorder();
674
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
675
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
676
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
677
-
678
- cy.log('When the user attempts the question partially correct with options exclusively from the \'Correct tab\' and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the incorrect/not attempted options from the correct tab along with category cell numeration')
679
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
680
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
681
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
682
- cy.log('User should be awarded 0 points')
683
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
684
- .verifyInnerText('0/15');
685
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
686
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
687
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
688
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
689
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
690
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
691
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
692
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle', 'Parrot'], ['Whale'], ['Ostrich']], [2, 3, 4]);
693
-
694
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
695
-
696
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and correct answer section with only the correct option not answered from the correct tab along with category cell numeration should be displayed should be displayed')
697
- autoScoredPreviewBase.steps.checkAnswer();
698
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
699
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
700
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
701
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
702
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
703
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
704
-
705
- cy.log('When the user attempts the question partially correct with all the cells correct as per the \'Correct tab\' but one cell incomplete and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses from the correct tab, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the incorrect/not attempted options from the alternate tab along with category cell numeration')
706
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
707
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
708
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
709
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
710
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
711
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
712
- cy.log('User should be awarded 0 points')
713
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
714
- .verifyInnerText('0/15');
715
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
716
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
717
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
718
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
719
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
720
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
721
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
722
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
723
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
724
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
725
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Parrot']], [1, 3]);
726
-
727
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
728
-
729
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses from the correct tab, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
730
- autoScoredPreviewBase.steps.checkAnswer();
731
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
732
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
733
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
734
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
735
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
736
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
737
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
738
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
739
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
740
-
741
- cy.log('When the user attempts the question partially correct with options exclusively from the \'Alternate tab\' and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the incorrect/not attempted options from the alternate tab along with category cell numeration')
742
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
743
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
744
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 2);
745
- cy.log('User should be awarded 0 points')
746
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
747
- .verifyInnerText('0/15');
748
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
749
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
750
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
751
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
752
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
753
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
754
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
755
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle'], ['Whale'], ['Ostrich']], [2, 3, 4]);
756
-
757
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
758
-
759
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
760
- autoScoredPreviewBase.steps.checkAnswer();
761
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
762
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
763
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
764
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
765
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
766
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
767
-
768
- cy.log('When the user attempts the question partially correct such that more number of correct options are exclusively from the correct tab but with one option common across both the tabs and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the common correct answer responses from both the tabs, red cross-mark should be displayed besides the responses from the correct tab, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the incorrect/not attempted options from the alternate tab along with category cell numeration')
769
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
770
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
771
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
772
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
773
- cy.log('User should be awarded 0 points')
774
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
775
- .verifyInnerText('0/15');
776
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
777
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
778
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
779
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
780
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
781
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
782
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
783
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
784
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle'], ['Whale', 'Parrot']], [1, 2, 3]);
785
-
786
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
787
-
788
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the common correct answer responses from both the tabs, red cross-mark should be displayed besides the incorrect answer responses from the correct tab, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
789
- autoScoredPreviewBase.steps.checkAnswer();
790
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
791
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
792
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
793
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
794
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
795
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
796
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
797
-
798
- cy.log('When the user attempts the question partially correct with all the cells correctly attempted as per the correct tab but with an extra incorrect option and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the common correct answer responses from both the tabs, red cross-mark should be displayed besides the responses from the correct tab, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the incorrect/not attempted options from the alternate tab along with category cell numeration')
799
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
800
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
801
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
802
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 1);
803
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
804
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
805
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
806
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 3);
807
- cy.log('User should be awarded 0 points')
808
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
809
- .verifyInnerText('0/15');
810
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
811
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
812
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
813
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
814
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
815
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(3);
816
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
817
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(5);
818
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(6);
819
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
820
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
821
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
822
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Parrot']], [1, 3]);
823
-
824
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
825
-
826
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the common correct answer responses from both the tabs, red cross-mark should be displayed besides the incorrect answer responses from the correct tab, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
827
- autoScoredPreviewBase.steps.checkAnswer();
828
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
829
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
830
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
831
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(3);
832
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
833
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(5);
834
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(6);
835
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
836
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
837
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
838
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
839
-
840
- cy.log('When the user attempts the question partially correct such that more number of correct options are exclusively from the correct tab but with one option exclusively from the alternate tab in the same cell and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the common correct answer responses from both the tabs, red cross-mark should be displayed besides the incorrect answer responses from the correct tab, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the incorrect/not attempted options from the alternate tab along with category cell numeration')
841
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
842
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
843
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 1);
844
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
845
- cy.log('User should be awarded 0 points')
846
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
847
- .verifyInnerText('0/15');
848
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
849
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
850
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
851
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
852
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
853
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
854
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
855
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
856
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle'], ['Whale', 'Parrot'], ['Ostrich']], [2, 3, 4]);
857
-
858
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
859
-
860
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the common correct answer responses from both the tabs, red cross-mark should be displayed besides the incorrect answer responses from the alternate tab, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
861
- autoScoredPreviewBase.steps.checkAnswer();
862
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
863
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
864
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
865
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
866
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
867
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
868
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
869
- });
870
- },
871
-
872
- verifyAutoScoredAllOrNothingWithAlternateAnswerWhenCorrectPointsAreEqualToAlternatePoints: () => {
873
- it('Alternate answer case: When \'Alternate answer\' points and \'Correct answer\' points both are equal', () => {
874
- cy.log('Total points displayed besides Show correct answer checkbox should be of Correct Answer points')
875
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
876
- .verifyInnerText('0/10');
877
-
878
- cy.log('When the user selects the Show correct answer checkbox without attempting the question, correct answer section with mapping of correct tab should be displayed')
879
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox()
880
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctTabAnswerArray, [1, 2, 3, 4]);
881
- dragAndDropIntoCategoriesPage.correctIncorrectAnswerLabel()
882
- .should('not.exist');
883
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
884
-
885
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
886
-
887
- cy.log('When the user attempts the question fully correct as set in the \'Correct tab\' and selects \'Show correct answer\' checkbox, points specified for correct answers should be provided, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, correct answer border for the question should appear, a label \'Correct answer\' should be displayed below the question preview and no correct answer section should be displayed')
888
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
889
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
890
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 1);
891
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
892
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
893
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
894
- cy.log('User should be awarded full points')
895
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
896
- .verifyInnerText('10/10');
897
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
898
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
899
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
900
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
901
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
902
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
903
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
904
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(5);
905
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAttemptBorder();
906
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
907
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
908
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
909
-
910
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
911
-
912
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses, correct answer border should appear, a label \'Correct answer\' should be displayed below the question preview and no correct answer section should be displayed')
913
- autoScoredPreviewBase.steps.checkAnswer();
914
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
915
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
916
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
917
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
918
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
919
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(5);
920
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAttemptBorder();
921
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
922
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
923
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
924
-
925
- cy.log('When the user attempts the question fully correct as set in the \'Alternate tab\' and selects \'Show correct answer\' checkbox, points specified for alternate correct answer (equal to overall points) should be provided, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, correct answer border for the question should appear, a label \'Correct answer\' should be displayed below the question preview and no correct answer section should be displayed')
926
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
927
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
928
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
929
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 2);
930
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
931
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
932
- cy.log('User should be awarded full points')
933
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
934
- .verifyInnerText('10/10');
935
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
936
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
937
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
938
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
939
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
940
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
941
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
942
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAttemptBorder();
943
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
944
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
945
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
946
-
947
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
948
-
949
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses, correct answer border should appear, a label \'Correct answer\' should be displayed below the question preview and no correct answer section should be displayed')
950
- autoScoredPreviewBase.steps.checkAnswer();
951
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
952
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
953
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
954
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
955
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
956
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAttemptBorder();
957
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
958
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
959
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
960
-
961
- cy.log('When the user attempts the question partially correct with options exclusively from the \'Correct tab\' and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the incorrect/not attempted options from the correct tab along with category cell numeration')
962
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
963
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
964
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
965
- cy.log('User should be awarded 0 points')
966
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
967
- .verifyInnerText('0/10');
968
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
969
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
970
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
971
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
972
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
973
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
974
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
975
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle', 'Parrot'], ['Whale'], ['Ostrich']], [2, 3, 4]);
976
-
977
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
978
-
979
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and correct answer section with only the correct option not answered from the correct tab along with category cell numeration should be displayed should be displayed')
980
- autoScoredPreviewBase.steps.checkAnswer();
981
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
982
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
983
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
984
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
985
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
986
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
987
-
988
- cy.log('When the user attempts the question partially correct with all the cells correct as per the \'Correct tab\' but one cell incomplete and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the not attempted options from the correct tab along with category cell numeration')
989
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
990
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
991
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
992
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
993
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
994
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
995
- cy.log('User should be awarded 0 points')
996
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
997
- .verifyInnerText('0/10');
998
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
999
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
1000
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
1001
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
1002
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
1003
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
1004
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
1005
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
1006
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
1007
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
1008
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Parrot']], [2]);
1009
-
1010
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked()
1011
-
1012
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and correct answer section with only the correct option not answered from the correct tab along with category cell numeration should be displayed should be displayed')
1013
- autoScoredPreviewBase.steps.checkAnswer();
1014
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
1015
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
1016
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
1017
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
1018
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
1019
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
1020
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
1021
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
1022
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
1023
-
1024
- cy.log('When the user attempts the question partially correct with options exclusively from the \'Alternate tab\' and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the not attempted options from the alternate tab along with category cell numeration')
1025
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
1026
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
1027
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 2);
1028
- cy.log('User should be awarded 0 points')
1029
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
1030
- .verifyInnerText('0/10');
1031
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
1032
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
1033
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
1034
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
1035
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
1036
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
1037
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
1038
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle'], ['Whale'], ['Ostrich']], [2, 3, 4]);
1039
-
1040
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
1041
-
1042
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
1043
- autoScoredPreviewBase.steps.checkAnswer();
1044
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
1045
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
1046
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
1047
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
1048
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
1049
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
1050
-
1051
- cy.log('When the user attempts the question partially correct such that more number of correct options are exclusively from the alternate tab but with one option common across both the tabs and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the common correct answer responses from both the tabs and correct answer responses from the alternate tab, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the incorrect/not attempted options from the correct tab along with category cell numeration')
1052
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
1053
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
1054
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 2);
1055
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
1056
- cy.log('User should be awarded 0 points')
1057
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
1058
- .verifyInnerText('0/10');
1059
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
1060
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
1061
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
1062
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
1063
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
1064
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
1065
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
1066
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
1067
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle'], ['Whale']], [2, 3]);
1068
-
1069
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
1070
-
1071
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the common correct answer responses from both the tabs and correct answer responses from the alternate tab, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
1072
- autoScoredPreviewBase.steps.checkAnswer();
1073
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
1074
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
1075
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
1076
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
1077
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
1078
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
1079
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
1080
-
1081
- cy.log('When the user attempts the question partially correct with all the cells correctly attempted as per the alternate tab but with an extra incorrect option and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
1082
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
1083
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
1084
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
1085
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
1086
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 2);
1087
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
1088
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 3);
1089
- cy.log('User should be awarded 0 points')
1090
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
1091
- .verifyInnerText('0/10');
1092
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
1093
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
1094
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
1095
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
1096
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
1097
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
1098
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
1099
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(5);
1100
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
1101
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
1102
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
1103
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
1104
-
1105
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
1106
-
1107
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
1108
- autoScoredPreviewBase.steps.checkAnswer();
1109
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
1110
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
1111
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
1112
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
1113
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(4);
1114
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(5);
1115
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
1116
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
1117
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
1118
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
1119
-
1120
- cy.log('When the user attempts the question partially correct such that more number of correct options are exclusively from the alternate tab but with one option exclusively from the correct tab in the same cell and selects \'Show correct answer\' checkbox, the score provided should be 0 points, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses from the correct tab, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and the correct answer section should display the incorrect/not attempted options from the alternate tab along with category cell numeration')
1121
- dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
1122
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
1123
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 2);
1124
- dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
1125
- cy.log('User should be awarded 0 points')
1126
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
1127
- .verifyInnerText('0/10');
1128
- dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
1129
- dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
1130
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
1131
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
1132
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
1133
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
1134
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
1135
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
1136
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle'], ['Whale'], ['Ostrich']], [2, 3, 4]);
1137
-
1138
- dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
1139
-
1140
- cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses from the correct tab, correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question should appear, a label \'Incorrect answer\' should be displayed below the question preview and no correct answer section should be displayed')
1141
- autoScoredPreviewBase.steps.checkAnswer();
1142
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
1143
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
1144
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
1145
- dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
1146
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
1147
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
1148
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
1149
- });
1150
- }
1151
- }
1152
-
1153
- export const dragAndDropIntoCategoriesAllOrNothingScoring = {
1154
- tests
1155
- }