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,233 @@
1
+ import { singleSelectionGridPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ describe('Create item page - Single 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
+ singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
13
+ cy.barsPreLoaderWait();
14
+ singleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not');
15
+ singleSelectionGridPage.steps.addInputToColumnInputStepper(4);
16
+ singleSelectionGridPage.steps.setQuestionGridLayoutForScoringFunctionalityTest();
17
+ singleSelectionGridPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
18
+ singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
19
+ singleSelectionGridPage.steps.allotPartialDifferentWeightsPoints({ 0: 3, 1: 9, 2: 2, 3: 6 });
20
+ singleSelectionGridPage.steps.addAlternativeAnswerAccordion(1);
21
+ singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
22
+ singleSelectionGridPage.steps.allotPartialDifferentWeightsPoints({ 0: 5, 1: 7, 2: 4, 3: 8 });
23
+ singleSelectionGridPage.steps.verifyPointsLabelAndPointsOnAnswerAccordion(1, '24');
24
+ singleSelectionGridPage.steps.checkAllowStudentToCheckAnswerCheckbox();
25
+ singleSelectionGridPage.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
+ singleSelectionGridPage.steps.switchToGradingView();
30
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
31
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
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
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
36
+ singleSelectionGridPage.steps.verifyPreviewScore(20, 24);
37
+ singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
38
+ singleSelectionGridPage.steps.switchToGradingView();
39
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
40
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
41
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
42
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
43
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
44
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
45
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
46
+ 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')
47
+ singleSelectionGridPage.steps.checkAnswer();
48
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
49
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
50
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
51
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
52
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
53
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
54
+ });
55
+
56
+ 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', () => {
57
+ singleSelectionGridPage.steps.resetQuestionPreview();
58
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
59
+ singleSelectionGridPage.steps.verifyPreviewScore(24, 24);
60
+ singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
61
+ singleSelectionGridPage.steps.switchToGradingView();
62
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
63
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
64
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
65
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
66
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
67
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
68
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
69
+ 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')
70
+ singleSelectionGridPage.steps.checkAnswer();
71
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
72
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
73
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
74
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
75
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
76
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
77
+ });
78
+
79
+ 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', () => {
80
+ singleSelectionGridPage.steps.resetQuestionPreview();
81
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 2, column: 1 }, { row: 3, column: 0 }]);
82
+ singleSelectionGridPage.steps.verifyPreviewScore(11, 24);
83
+ singleSelectionGridPage.steps.switchToGradingView();
84
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
85
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
86
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
87
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
88
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
89
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
90
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
91
+ 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')
92
+ singleSelectionGridPage.steps.checkAnswer();
93
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
94
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
95
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
96
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
97
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
98
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
99
+ });
100
+
101
+ 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', () => {
102
+ singleSelectionGridPage.steps.resetQuestionPreview();
103
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 2, column: 2 }, { row: 3, column: 2 }]);
104
+ singleSelectionGridPage.steps.verifyPreviewScore(11, 24);
105
+ singleSelectionGridPage.steps.switchToGradingView();
106
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
107
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
108
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
109
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
110
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
111
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
112
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
113
+ 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')
114
+ singleSelectionGridPage.steps.checkAnswer();
115
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
116
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
117
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
118
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
119
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
120
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
121
+ });
122
+
123
+ 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', () => {
124
+ singleSelectionGridPage.steps.resetQuestionPreview();
125
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }]);
126
+ singleSelectionGridPage.steps.verifyPreviewScore(14, 24);
127
+ singleSelectionGridPage.steps.switchToGradingView();
128
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
129
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
130
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
131
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
132
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
133
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
134
+ 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')
135
+ singleSelectionGridPage.steps.checkAnswer();
136
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
137
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
138
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
139
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
140
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
141
+ });
142
+
143
+ 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', () => {
144
+ singleSelectionGridPage.steps.resetQuestionPreview();
145
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
146
+ singleSelectionGridPage.steps.verifyPreviewScore(18, 24);
147
+ singleSelectionGridPage.steps.switchToGradingView();
148
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
149
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
150
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
151
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
152
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
153
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
154
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
155
+ 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')
156
+ singleSelectionGridPage.steps.checkAnswer();
157
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
158
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
159
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
160
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
161
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
162
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
163
+ });
164
+
165
+ 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', () => {
166
+ singleSelectionGridPage.steps.resetQuestionPreview();
167
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
168
+ singleSelectionGridPage.steps.verifyPreviewScore(20, 24);
169
+ singleSelectionGridPage.steps.switchToGradingView();
170
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
171
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
172
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
173
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
174
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
175
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
176
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
177
+ 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')
178
+ singleSelectionGridPage.steps.checkAnswer();
179
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
180
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
181
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
182
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
183
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
184
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
185
+ });
186
+
187
+ 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', () => {
188
+ singleSelectionGridPage.steps.resetQuestionPreview();
189
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 3, column: 1 }, { row: 4, column: 0 }]);
190
+ singleSelectionGridPage.steps.verifyPreviewScore(0, 24);
191
+ singleSelectionGridPage.steps.switchToGradingView();
192
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
193
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
194
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
195
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
196
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
197
+ 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')
198
+ singleSelectionGridPage.steps.checkAnswer();
199
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
200
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
201
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
202
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
203
+ });
204
+
205
+ 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', () => {
206
+ 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')
207
+ singleSelectionGridPage.steps.switchToEditTab();
208
+ singleSelectionGridPage.steps.deleteAlternativeAnswerAccordion(0);
209
+ singleSelectionGridPage.steps.addAlternativeAnswerAccordion(1);
210
+ singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 2 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 2 }]);
211
+ singleSelectionGridPage.steps.allotPartialDifferentWeightsPoints({ 0: 11.4, 1: 1.1, 2: 4.4, 3: 1.1 });
212
+ singleSelectionGridPage.steps.expandCorrectAnswerAccordion();
213
+ singleSelectionGridPage.steps.allotPartialDifferentWeightsPoints({ 0: 1.2, 1: 2.1, 2: 10.4, 3: 2.1 });
214
+ singleSelectionGridPage.steps.switchToPreviewTab();
215
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 2, column: 2 }, { row: 3, column: 0 }, { row: 4, column: 2 }]);
216
+ singleSelectionGridPage.steps.verifyPreviewScore(10.4, 18);
217
+ singleSelectionGridPage.steps.switchToGradingView();
218
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
219
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
220
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
221
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
222
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
223
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
224
+ 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')
225
+ singleSelectionGridPage.steps.checkAnswer();
226
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
227
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
228
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
229
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
230
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
231
+ });
232
+ });
233
+ });
@@ -0,0 +1,205 @@
1
+ import { singleSelectionGridPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ describe('Create item page - Single 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 \'Correct answer\' points equal to \'Alternative answer\' points', () => {
10
+ abortEarlySetup();
11
+ before(() => {
12
+ singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
13
+ cy.barsPreLoaderWait();
14
+ singleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not');
15
+ singleSelectionGridPage.steps.addInputToColumnInputStepper(4);
16
+ singleSelectionGridPage.steps.setQuestionGridLayoutForScoringFunctionalityTest();
17
+ singleSelectionGridPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
18
+ singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
19
+ singleSelectionGridPage.steps.allotPartialDifferentWeightsPoints({ 0: 5, 1: 7, 2: 4, 3: 8 });
20
+ singleSelectionGridPage.steps.addAlternativeAnswerAccordion(1);
21
+ singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
22
+ singleSelectionGridPage.steps.allotPartialDifferentWeightsPoints({ 0: 6, 1: 9, 2: 5, 3: 4 });
23
+ singleSelectionGridPage.steps.verifyPointsLabelAndPointsOnAnswerAccordion(1, '24');
24
+ singleSelectionGridPage.steps.checkAllowStudentToCheckAnswerCheckbox();
25
+ singleSelectionGridPage.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 correct accordion should be displayed', () => {
29
+ singleSelectionGridPage.steps.switchToGradingView();
30
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
31
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
32
+ });
33
+
34
+ it('When the user attempts the question with responses from the correct accordion, then the user should be awarded 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
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
36
+ singleSelectionGridPage.steps.verifyPreviewScore(24, 24);
37
+ singleSelectionGridPage.steps.switchToGradingView();
38
+ singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
39
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
40
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
41
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
42
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
43
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
44
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
45
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
46
+ 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')
47
+ singleSelectionGridPage.steps.checkAnswer();
48
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
49
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
50
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
51
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
52
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
53
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
54
+ });
55
+
56
+ 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', () => {
57
+ singleSelectionGridPage.steps.resetQuestionPreview();
58
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
59
+ singleSelectionGridPage.steps.verifyPreviewScore(24, 24);
60
+ singleSelectionGridPage.steps.switchToGradingView();
61
+ singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
62
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
63
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
64
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
65
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
66
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
67
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
68
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
69
+ 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')
70
+ singleSelectionGridPage.steps.checkAnswer();
71
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
72
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
73
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
74
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
75
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
76
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
77
+ });
78
+
79
+ 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 correct accordion should be displayed', () => {
80
+ singleSelectionGridPage.steps.resetQuestionPreview();
81
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 2, column: 1 }, { row: 3, column: 0 }]);
82
+ singleSelectionGridPage.steps.verifyPreviewScore(11, 24);
83
+ singleSelectionGridPage.steps.switchToGradingView();
84
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
85
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
86
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
87
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
88
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
89
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
90
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
91
+ 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')
92
+ singleSelectionGridPage.steps.checkAnswer();
93
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
94
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
95
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
96
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
97
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
98
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
99
+ });
100
+
101
+ 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 correct accordion should be displayed', () => {
102
+ singleSelectionGridPage.steps.resetQuestionPreview();
103
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 2, column: 2 }, { row: 3, column: 2 }]);
104
+ singleSelectionGridPage.steps.verifyPreviewScore(14, 24);
105
+ singleSelectionGridPage.steps.switchToGradingView();
106
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
107
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
108
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
109
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
110
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
111
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
112
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
113
+ 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')
114
+ singleSelectionGridPage.steps.checkAnswer();
115
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
116
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
117
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
118
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
119
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
120
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
121
+ });
122
+
123
+ it('When the user attempts the question partially correct with more number of questions exclusively from the alternative accordion but with one question response common across both accordion, 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 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 correct accordion should be displayed', () => {
124
+ singleSelectionGridPage.steps.resetQuestionPreview();
125
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }]);
126
+ singleSelectionGridPage.steps.verifyPreviewScore(20, 24);
127
+ singleSelectionGridPage.steps.switchToGradingView();
128
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
129
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
130
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
131
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
132
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
133
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
134
+ 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 alternative accordion responses, correct/incorrect answer status message and correct answer section should not be displayed')
135
+ singleSelectionGridPage.steps.checkAnswer();
136
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
137
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
138
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
139
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
140
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
141
+ });
142
+
143
+ 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 correct accordion should be displayed', () => {
144
+ singleSelectionGridPage.steps.resetQuestionPreview();
145
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
146
+ singleSelectionGridPage.steps.verifyPreviewScore(20, 24);
147
+ singleSelectionGridPage.steps.switchToGradingView();
148
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
149
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
150
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
151
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
152
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
153
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
154
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
155
+ 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')
156
+ singleSelectionGridPage.steps.checkAnswer();
157
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
158
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
159
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
160
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
161
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
162
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
163
+ });
164
+
165
+ 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 correct accordion should be displayed', () => {
166
+ singleSelectionGridPage.steps.resetQuestionPreview();
167
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
168
+ singleSelectionGridPage.steps.verifyPreviewScore(19, 24);
169
+ singleSelectionGridPage.steps.switchToGradingView();
170
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
171
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
172
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
173
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
174
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
175
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
176
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
177
+ 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')
178
+ singleSelectionGridPage.steps.checkAnswer();
179
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
180
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
181
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
182
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
183
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
184
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
185
+ });
186
+
187
+ 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 correct accordion should be displayed', () => {
188
+ singleSelectionGridPage.steps.resetQuestionPreview();
189
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 3, column: 1 }, { row: 4, column: 0 }]);
190
+ singleSelectionGridPage.steps.verifyPreviewScore(0, 24);
191
+ singleSelectionGridPage.steps.switchToGradingView();
192
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
193
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
194
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
195
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
196
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
197
+ 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')
198
+ singleSelectionGridPage.steps.checkAnswer();
199
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
200
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
201
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
202
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
203
+ });
204
+ });
205
+ });