itemengine-cypress-automation 1.0.155-migrationScripts-86e4c95.0 → 1.0.155

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +1 -1
  2. package/cypress/e2e/ILC/DesmosGraphing/additionalSettings.js +5 -5
  3. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +2 -2
  4. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +4 -4
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +4 -4
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +1 -1
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionMinimumAndPenaltyScoring.js +1 -1
  8. package/cypress/e2e/ILC/EssayResponse/previewEditTable.js +6 -6
  9. package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +2 -3
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +1 -0
  11. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +34 -29
  12. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +2 -0
  13. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabBasicSection.js +1 -1
  14. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +1 -0
  15. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +4 -1
  16. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +1 -1
  17. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +2 -0
  18. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +1 -1
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +2 -2
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -1
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -2
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -0
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsForDropdowns.js +7 -7
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +1 -0
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +1 -0
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +20 -8
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +2 -2
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -0
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +1 -0
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +3 -3
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +5 -4
  32. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -0
  33. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +5 -2
  34. package/cypress/e2e/ILC/FillInTheGapsTextNew/additionalSettingsForAnswerInputFields.js +2 -2
  35. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +1 -1
  36. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +4 -3
  37. package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -0
  38. package/cypress/e2e/ILC/FillInTheGapsTextNew/specialCharactersSection.js +0 -8
  39. package/cypress/e2e/ILC/GeogebraActivity/additionalSettings.js +1 -1
  40. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +39 -35
  41. package/cypress/e2e/ILC/Graphing/additionalSettingsBasic.js +1 -1
  42. package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +8 -6
  43. package/cypress/e2e/ILC/GridFill/customizeLayoutFillColor.js +475 -0
  44. package/cypress/e2e/ILC/GridFill/customizeLayoutFillImageBackgroundImage.js +669 -0
  45. package/cypress/e2e/ILC/GridFill/customizeLayoutSectionShadeCellsGridBorders.js +1 -1
  46. package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +0 -11
  47. package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +204 -0
  48. package/cypress/e2e/ILC/GridFill/gridLayoutEditTabFunctionality.js +229 -0
  49. package/cypress/e2e/ILC/GridFill/gridLayoutPreviewTabFunctionality.js +219 -0
  50. package/cypress/e2e/ILC/GridFill/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -0
  51. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +2 -2
  52. package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +0 -2
  53. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
  54. package/cypress/e2e/ILC/Matching/draggableOptions.js +1 -1
  55. package/cypress/e2e/ILC/Matching/headerSection.js +82 -0
  56. package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +93 -0
  57. package/cypress/e2e/ILC/MultipleSelection/blockCreateItem.js +2 -2
  58. package/cypress/e2e/ILC/MultipleSelection/editTabScoringSection.js +3 -0
  59. package/cypress/e2e/ILC/MultipleSelection/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
  60. package/cypress/e2e/ILC/MultipleSelection/multipleSelectionBasicAccessibility.js +8 -10
  61. package/cypress/e2e/ILC/MultipleSelection/specifyCorrectAnswerSection.js +3 -3
  62. package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +16 -25
  63. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/manuallyAndNonScored.js +140 -0
  64. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +403 -0
  65. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +363 -0
  66. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +393 -0
  67. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +377 -0
  68. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +1 -1
  69. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +341 -0
  70. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +373 -0
  71. package/cypress/e2e/ILC/Ruler/rulerEditTabBasicsSection.js +0 -1
  72. package/cypress/e2e/ILC/ShortTextResponseNew/conditionalCheckboxes.js +27 -8
  73. package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +15 -34
  74. package/cypress/e2e/ILC/ShortTextResponseNew/responseAnswersAndAcceptedStudentInput.js +13 -15
  75. package/cypress/e2e/ILC/ShortTextResponseNew/specifyCorrectAnswerSection.js +4 -4
  76. package/cypress/e2e/ILC/SimpleCalculator/editTabFunctionality.js +4 -2
  77. package/cypress/e2e/ILC/SingleSelection/blockCreateItem.js +2 -2
  78. package/cypress/e2e/ILC/SingleSelection/specifyCorrectAnswerSection.js +3 -3
  79. package/cypress/e2e/ILC/SingleSelection/studentViewSettings.js +1 -1
  80. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +183 -0
  81. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +185 -0
  82. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +263 -0
  83. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/manuallyAndNonScored.js +140 -0
  84. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +233 -0
  85. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +205 -0
  86. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +233 -0
  87. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +214 -0
  88. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +1 -1
  89. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +183 -0
  90. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +213 -0
  91. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +21 -17
  92. package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +1 -1
  93. package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +25 -25
  94. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +20 -17
  95. package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +2 -2
  96. package/cypress/e2e/ILC/UploadResponse/manuallyAndNonScoredScoring.js +2 -3
  97. package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +3 -3
  98. package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +2 -2
  99. package/cypress/fixtures/fillColorDefaultProperties.js +35 -0
  100. package/cypress/fixtures/theme/ilc.json +2 -1
  101. package/cypress/fixtures/uploads/sampleVirus.zip +0 -0
  102. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  103. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
  104. package/cypress/pages/components/backgroundImageUploadComponent.js +4 -1
  105. package/cypress/pages/components/colorPopupComponent.js +6 -3
  106. package/cypress/pages/components/commonComponents.js +1 -1
  107. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +4 -3
  108. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +47 -12
  109. package/cypress/pages/components/gridQuestionCommonComponent.js +0 -81
  110. package/cypress/pages/components/imageCanvasComponent.js +10 -8
  111. package/cypress/pages/components/listSortingAndOrderingBase.js +1 -1
  112. package/cypress/pages/components/questionInputFieldComponent.js +1 -1
  113. package/cypress/pages/components/questionInstructionsComponent.js +1 -1
  114. package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -1
  115. package/cypress/pages/essayResponsePage.js +4 -4
  116. package/cypress/pages/fillInTheGapsDragAndDropPage.js +34 -23
  117. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +0 -1
  118. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +26 -4
  119. package/cypress/pages/fillInTheGapsOverImageTextPage.js +0 -29
  120. package/cypress/pages/graphingPage.js +26 -16
  121. package/cypress/pages/gridFillPage.js +1610 -90
  122. package/cypress/pages/matchingPage.js +164 -20
  123. package/cypress/pages/multipleSelectionGridPage.js +82 -2
  124. package/cypress/pages/multipleSelectionPage.js +7 -2
  125. package/cypress/pages/rulerPage.js +3 -8
  126. package/cypress/pages/shortTextResponsePage.js +13 -0
  127. package/cypress/pages/simpleCalculatorPage.js +8 -0
  128. package/cypress/pages/singleSelectionGridPage.js +58 -2
  129. package/cypress/pages/textEntryMathPage.js +58 -11
  130. package/cypress/pages/uploadResponsePage.js +4 -2
  131. package/package.json +2 -2
  132. package/cypress/e2e/ILC/MultipleSelection/multipleSelectionAdditionalSettings.js +0 -835
  133. package/cypress/e2e/ILC/SingleSelection/singleSelectionAdditionalSettings.js +0 -469
@@ -0,0 +1,403 @@
1
+ import { multipleSelectionGridPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ describe('Create item page - Multiple selection grid: Partial different weights with alternative answers', () => {
5
+ before(() => {
6
+ cy.loginAs('admin');
7
+ });
8
+
9
+ describe('Question preview: Auto scored - Partial different weights with alternative answer - When \'Alternative answer\' points are more than \'Correct answer\' points', () => {
10
+ abortEarlySetup();
11
+ before(() => {
12
+ multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
13
+ cy.barsPreLoaderWait();
14
+ multipleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not');
15
+ multipleSelectionGridPage.steps.addInputToColumnInputStepper(4);
16
+ multipleSelectionGridPage.steps.setQuestionGridLayoutForScoringFunctionalityTest();
17
+ multipleSelectionGridPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
18
+ multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 1, column: 2 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 1 }, { row: 4, column: 2 }]);
19
+ multipleSelectionGridPage.steps.allotPartialDifferentWeightsPoints({ 0: 3, 1: 9, 2: 2, 3: 6 });
20
+ multipleSelectionGridPage.steps.addAlternativeAnswerAccordion(1);
21
+ multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
22
+ multipleSelectionGridPage.steps.allotPartialDifferentWeightsPoints({ 0: 5, 1: 7, 2: 4, 3: 8 });
23
+ multipleSelectionGridPage.steps.verifyPointsLabelAndPointsOnAnswerAccordion(1, '24');
24
+ multipleSelectionGridPage.steps.checkAllowStudentToCheckAnswerCheckbox();
25
+ multipleSelectionGridPage.steps.switchToPreviewTab();
26
+ });
27
+
28
+ it('When the user selects \'Grading\' view without attempting the question, correct answers section should be displayed with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
29
+ multipleSelectionGridPage.steps.switchToGradingView();
30
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
31
+ multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
32
+ });
33
+
34
+ it('When the user attempts the question with responses from the correct accordion, then the user should be awarded points specified for correct accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect answer status message and correct answer section should not be displayed', () => {
35
+ multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 1, column: 2 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 1 }, { row: 4, column: 2 }]);
36
+ multipleSelectionGridPage.steps.verifyPreviewScore(20, 24);
37
+ multipleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
38
+ multipleSelectionGridPage.steps.switchToGradingView();
39
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
40
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
41
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
42
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
43
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
44
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
45
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
46
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
47
+ multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
48
+ multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
49
+ cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect answer status message and correct answer section should not be displayed')
50
+ multipleSelectionGridPage.steps.checkAnswer();
51
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
52
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
53
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
54
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
55
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
56
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
57
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
58
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
59
+ multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
60
+ });
61
+
62
+ it('When the user attempts the question with alternative accordion responses, then the user should be awarded with full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect answer status message and correct answer section should not be displayed', () => {
63
+ multipleSelectionGridPage.steps.resetQuestionPreview();
64
+ multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
65
+ multipleSelectionGridPage.steps.verifyPreviewScore(24, 24);
66
+ multipleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
67
+ multipleSelectionGridPage.steps.switchToGradingView();
68
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
69
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
70
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
71
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
72
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
73
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
74
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
75
+ multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
76
+ multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
77
+ cy.log('When the user has attempted the question with alternative accordion responses and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect answer status message and correct answer section should not be displayed')
78
+ multipleSelectionGridPage.steps.checkAnswer();
79
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
80
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
81
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
82
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
83
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
84
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
85
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
86
+ multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
87
+ });
88
+
89
+ it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded points as per the correct accordion mapping and on switching to \'Grading\' view, correct icons should be displayed besides the correct answer responses, no icons should be displayed for unattempted responses, correct/incorrect answer status message should not be displayed and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
90
+ multipleSelectionGridPage.steps.resetQuestionPreview();
91
+ multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 1, column: 2 }, { row: 2, column: 1 }]);
92
+ multipleSelectionGridPage.steps.verifyPreviewScore(12, 24);
93
+ multipleSelectionGridPage.steps.switchToGradingView();
94
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
95
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
96
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
97
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
98
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 1 });
99
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
100
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 2 });
101
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
102
+ multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
103
+ multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
104
+ cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion, and clicks on \'Check answer\' button, correct icons should be displayed besides the correct answer responses, no icons should be displayed for unattempted responses, correct/incorrect answer status message and correct answer section should not be displayed')
105
+ multipleSelectionGridPage.steps.checkAnswer();
106
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
107
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
108
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
109
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
110
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 1 });
111
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
112
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 2 });
113
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
114
+ multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
115
+ });
116
+
117
+ it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded points as per the alternative accordion mapping and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icons should be displayed for unattempted responses, correct/incorrect answer status message should not be displayed and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
118
+ multipleSelectionGridPage.steps.resetQuestionPreview();
119
+ multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }]);
120
+ multipleSelectionGridPage.steps.verifyPreviewScore(12, 24);
121
+ multipleSelectionGridPage.steps.switchToGradingView();
122
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
123
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
124
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
125
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
126
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 1 });
127
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 2 });
128
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
129
+ multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
130
+ multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
131
+ cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion, and clicks on \'Check answer\' button, correct icons should be displayed besides the correct answer responses, no icons should be displayed for unattempted responses, correct/incorrect answer status message and correct answer section should not be displayed')
132
+ multipleSelectionGridPage.steps.checkAnswer();
133
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
134
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
135
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
136
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
137
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 1 });
138
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 2 });
139
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
140
+ multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
141
+ });
142
+
143
+ it('When the user attempts the question partially correct with all the questions as per the correct accordion but one question incomplete, then the user should be awarded points as per the correct accordion mapping and on switching to \'Grading\' view, correct icons should be displayed besides correct responses from the correct accordion response, correct/incorrect answer status message should not be displayed and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
144
+ multipleSelectionGridPage.steps.resetQuestionPreview();
145
+ multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 1 }, { row: 4, column: 2 }]);
146
+ multipleSelectionGridPage.steps.verifyPreviewScore(17, 24);
147
+ multipleSelectionGridPage.steps.switchToGradingView();
148
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
149
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
150
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
151
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
152
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
153
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
154
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
155
+ multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
156
+ multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
157
+ cy.log('When the user has attempted the question with correct accordion responses but one question incomplete and clicks on \'Check answer\' button, then correct icons should be displayed besides correct responses from the correct accordion response, correct/incorrect answer status message and correct answer section should not be displayed')
158
+ multipleSelectionGridPage.steps.checkAnswer();
159
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
160
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
161
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
162
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
163
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
164
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
165
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
166
+ multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
167
+ });
168
+
169
+ it('When the user attempts the question partially correct with more number of questions exclusively from the correct accordion but with one question response common across both accordion, then the user should be awarded points as per the correct accordion mapping and on switching to \'Grading\' view, correct icons should be displayed besides correct accordion responses, correct/incorrect answer status message should not be displayed and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
170
+ multipleSelectionGridPage.steps.resetQuestionPreview();
171
+ multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 1, column: 2 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 3, column: 1 }]);
172
+ multipleSelectionGridPage.steps.verifyPreviewScore(14, 24);
173
+ multipleSelectionGridPage.steps.switchToGradingView();
174
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
175
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
176
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
177
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
178
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
179
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
180
+ multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
181
+ multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
182
+ cy.log('When the user has attempted the question partially correct with more number of questions exclusively from the alternative accordion but with one question response common across both accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides correct accordion responses, correct/incorrect answer status message and correct answer section should not be displayed')
183
+ multipleSelectionGridPage.steps.checkAnswer();
184
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
185
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
186
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
187
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
188
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
189
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
190
+ multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
191
+ });
192
+
193
+ it('When the user attempts the question partially correct with all the questions correctly attempted as per the correct accordion but with an extra incorrect option, then the user should be awarded points as per the correct accordion mapping and on switching to \'Grading\' view, correct icon should be displayed besides correct accordion responses, incorrect icon should be displayed besides incorrect response, correct/incorrect answer status message should not be displayed and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
194
+ multipleSelectionGridPage.steps.resetQuestionPreview();
195
+ multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 1, column: 2 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 0 }, { row: 4, column: 1 }, { row: 4, column: 2 }]);
196
+ multipleSelectionGridPage.steps.verifyPreviewScore(14, 24);
197
+ multipleSelectionGridPage.steps.switchToGradingView();
198
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
199
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
200
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
201
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
202
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
203
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
204
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
205
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
206
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
207
+ multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
208
+ multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
209
+ cy.log('When the user has attempted the question partially correct with all the questions correctly attempted as per the correct accordion but with an extra incorrect option and clicks on \'Check answer\' button, then correct icon should be displayed besides correct accordion responses, incorrect icon should be displayed besides incorrect response, correct/incorrect answer status message and correct answer section should not be displayed')
210
+ multipleSelectionGridPage.steps.checkAnswer();
211
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
212
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
213
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
214
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
215
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
216
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
217
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
218
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
219
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
220
+ multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
221
+ });
222
+
223
+ it('When the user attempts the question partially correct such that more number of correct options are exclusively from the correct accordion but with one option exclusively from the alternative accordion in the same question, then the user should be awarded points as per the correct accordion mapping and on switching to \'Grading\' view, correct icon should be displayed besides the correct accordion responses, incorrect icon should be displayed besides alternative accordion responses, correct/incorrect answer status message should not be displayed and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
224
+ multipleSelectionGridPage.steps.resetQuestionPreview();
225
+ multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 1, column: 2 }, { row: 2, column: 0 }, { row: 2, column: 1 }, { row: 2, column: 2 }]);
226
+ multipleSelectionGridPage.steps.verifyPreviewScore(3, 24);
227
+ multipleSelectionGridPage.steps.switchToGradingView();
228
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
229
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
230
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
231
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
232
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
233
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
234
+ multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
235
+ multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
236
+ cy.log('When the user has attempted the question partially correct such that more number of correct options are exclusively from the alternative accordion but with one option exclusively from the correct accordion in the same question and clicks on \'Check answer\' button, correct icon should be displayed besides the correct accordion responses, incorrect icon should be displayed besides alternative accordion responses, correct/incorrect answer status message and correct answer section should not be displayed')
237
+ multipleSelectionGridPage.steps.checkAnswer();
238
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
239
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
240
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
241
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
242
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
243
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
244
+ multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
245
+ });
246
+
247
+ it('When the user attempts the question such that equal number of options are correct from the both accordions, then the user should be awarded points from the accordion that awards maximum points i.e. correct accordion in this case and on switching to \'Grading\' view, correct icon should be displayed besides the correct accordion responses, incorrect icon should be displayed besides the alternative accordion responses, correct/incorrect answer status message should not be displayed and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
248
+ multipleSelectionGridPage.steps.resetQuestionPreview();
249
+ multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 3, column: 1 }]);
250
+ multipleSelectionGridPage.steps.verifyPreviewScore(11, 24);
251
+ multipleSelectionGridPage.steps.switchToGradingView();
252
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
253
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
254
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
255
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
256
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
257
+ multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
258
+ multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
259
+ cy.log('When the user has attempted the question such that equal number of options are correct from the both accordions and clicks on \'Check answer\' button, correct icon should be displayed besides the correct accordion responses, correct/incorrect answer status message and correct answer section should not be displayed')
260
+ multipleSelectionGridPage.steps.checkAnswer();
261
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
262
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
263
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
264
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
265
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
266
+ multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
267
+ });
268
+
269
+ it('When the user attempts the question such that equal number of options are correct from the both accordions, then the user should be awarded points from the accordion that awards maximum points i.e. alternative accordion in this case and on switching to \'Grading\' view, correct icon should be displayed besides the alternative accordion responses, incorrect icon should be displayed besides the correct accordion responses, correct/incorrect answer status message should not be displayed and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
270
+ multipleSelectionGridPage.steps.resetQuestionPreview();
271
+ multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 1, column: 2 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }]);
272
+ multipleSelectionGridPage.steps.verifyPreviewScore(11, 24);
273
+ multipleSelectionGridPage.steps.switchToGradingView();
274
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
275
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
276
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
277
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
278
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
279
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
280
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
281
+ multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
282
+ multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
283
+ cy.log('When the user has attempted the question such that equal number of options are correct from the both accordions and clicks on \'Check answer\' button, correct icon should be displayed besides the alternative accordion responses, incorrect icon should be displayed besides the correct accordion responses, correct/incorrect answer status message and correct answer section should not be displayed')
284
+ multipleSelectionGridPage.steps.checkAnswer();
285
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
286
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
287
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
288
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
289
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
290
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
291
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
292
+ multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
293
+ });
294
+
295
+ it('Race condition 1: When the user attempts the question partially with correct options of both correct and alternative accordions (same options set correct in both the accordions), then the user should be awarded points as per the alternative accordion mapping and on switching to \'Grading\' view, correct icons should be displayed besides the correct accordion response, incorrect icon should be displayed beside alternative accordion response, correct/incorrect answer status message should not be displayed and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
296
+ multipleSelectionGridPage.steps.resetQuestionPreview();
297
+ multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 3, column: 0 }, { row: 3, column: 1 }]);
298
+ multipleSelectionGridPage.steps.verifyPreviewScore(4, 24);
299
+ multipleSelectionGridPage.steps.switchToGradingView();
300
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
301
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
302
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
303
+ multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
304
+ multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
305
+ cy.log('When the user has attempted the question partially with correct options of both correct and alternative accordions (same options set correct in both the accordions) and clicks on \'Check answer\' button, correct icons should be displayed besides the correct accordion response, incorrect icon should be displayed beside alternative accordion response, correct/incorrect answer status message and correct answer section should not be displayed')
306
+ multipleSelectionGridPage.steps.checkAnswer();
307
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
308
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
309
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
310
+ multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
311
+ });
312
+
313
+ it('Race condition 2: When the user attempts a question with correct options of both correct and alternative accordion (one common option set correct in both the correct and alternative accordions), then the user should be awarded points as per the correct accordion mapping and on switching to \'Grading\' view, correct icon should be displayed besides the correct accordion response, incorrect icon should be displayed besides the alternative accordion responses, correct/incorrect answer status message should not be displayed and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
314
+ multipleSelectionGridPage.steps.resetQuestionPreview();
315
+ multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 4, column: 1 }, { row: 4, column: 2 }]);
316
+ multipleSelectionGridPage.steps.verifyPreviewScore(6, 24);
317
+ multipleSelectionGridPage.steps.switchToGradingView();
318
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
319
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
320
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
321
+ multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
322
+ multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
323
+ cy.log('When the user has attempted the question partially with correct options of both correct and alternative accordions (same options set correct in both the accordions) and clicks on \'Check answer\' button, correct icon should be displayed besides the correct accordion responses, correct/incorrect answer status message and correct answer section should not be displayed')
324
+ multipleSelectionGridPage.steps.checkAnswer();
325
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
326
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
327
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
328
+ multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
329
+ });
330
+
331
+ it('Race condition 3: When the user attempts a question with correct options of both correct and alternative accordion (both the correct and alternative accordions have exclusive options set correct), then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct accordion response, incorrect icon should be displayed besides the alternative accordion responses, correct/incorrect answer status message should not be displayed and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
332
+ multipleSelectionGridPage.steps.resetQuestionPreview();
333
+ multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 1, column: 1 }, { row: 1, column: 2 }]);
334
+ multipleSelectionGridPage.steps.verifyPreviewScore(0, 24);
335
+ multipleSelectionGridPage.steps.switchToGradingView();
336
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
337
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
338
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
339
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
340
+ multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
341
+ multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
342
+ cy.log('When the user has attempted the question partially with correct options of both correct and alternative accordion (both the correct and alternative accordions have exclusive options set correct) and clicks on \'Check answer\' button, correct icon should be displayed besides the correct accordion response, incorrect icon should be displayed besides the alternative accordion responses, correct/incorrect answer status message and correct answer section should not be displayed')
343
+ multipleSelectionGridPage.steps.checkAnswer();
344
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
345
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
346
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
347
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
348
+ multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
349
+ });
350
+
351
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, correct/incorrect answer status message should not be displayed and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
352
+ multipleSelectionGridPage.steps.resetQuestionPreview();
353
+ multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 3, column: 2 }, { row: 4, column: 0 }]);
354
+ multipleSelectionGridPage.steps.verifyPreviewScore(0, 24);
355
+ multipleSelectionGridPage.steps.switchToGradingView();
356
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
357
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
358
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
359
+ multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
360
+ multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
361
+ cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, incorrect icons should be displayed besides all incorrect responses, correct/incorrect answer status message and correct answer section should not be displayed')
362
+ multipleSelectionGridPage.steps.checkAnswer();
363
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
364
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
365
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
366
+ multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
367
+ });
368
+
369
+ it('Overachiever case: When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion but the score of the individual response from the correct accordion overpowers the combined score of the alternative accordion answers then on switching to the \'Grading view\', then points awarded should be of the correct accordion, correct icons should be displayed for the correct accordion response, incorrect icon should be displayed for the alternative accordion responses, correct/incorrect status message should not be displayed and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
370
+ cy.log('Pre-step: Switching to Edit tab and allotting points to alternative accordion such that the difference between the points is substantial and there are no common responses between the two accordions')
371
+ multipleSelectionGridPage.steps.switchToEditTab();
372
+ multipleSelectionGridPage.steps.deleteAlternativeAnswerAccordion(0);
373
+ multipleSelectionGridPage.steps.addAlternativeAnswerAccordion(1);
374
+ multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 2 }]);
375
+ multipleSelectionGridPage.steps.allotPartialDifferentWeightsPoints({ 0: 11.4, 1: 1.1, 2: 4.4, 3: 1.1 });
376
+ multipleSelectionGridPage.steps.expandCorrectAnswerAccordion();
377
+ multipleSelectionGridPage.steps.allotPartialDifferentWeightsPoints({ 0: 1.2, 1: 2.1, 2: 10.4, 3: 2.1 });
378
+ multipleSelectionGridPage.steps.switchToPreviewTab();
379
+ multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 1 }, { row: 4, column: 2 }]);
380
+ multipleSelectionGridPage.steps.verifyPreviewScore(10.4, 18);
381
+ multipleSelectionGridPage.steps.switchToGradingView();
382
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
383
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
384
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
385
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
386
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
387
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
388
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
389
+ multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
390
+ multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
391
+ cy.log('When the user has attempted the question with more number of correct responses from the correct accordion than the alternative accordion and clicks on \'Check answer\' button, correct icons should be displayed for the correct accordion response, incorrect icon should be displayed for the alternative accordion responses, correct/incorrect answer status message and correct answer section should not be displayed')
392
+ multipleSelectionGridPage.steps.checkAnswer();
393
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
394
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
395
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
396
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
397
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
398
+ multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
399
+ multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
400
+ multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
401
+ });
402
+ });
403
+ });