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,183 @@
1
+ import { singleSelectionGridPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ describe('Create item page - Single selection grid: Partial equal weights with alternative answers', () => {
5
+ before(() => {
6
+ cy.loginAs('admin');
7
+ });
8
+
9
+ describe('Question preview: Auto scored - Partial equal 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 equal weights');
18
+ singleSelectionGridPage.steps.allotPoints(20);
19
+ singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
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.allotPoints(20);
23
+ singleSelectionGridPage.steps.verifyPointsLabelAndPointsOnAnswerAccordion(1, '20');
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(20, 20);
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 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(20, 20);
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 0 points 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(10, 20);
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 0 points 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(10, 20);
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(15, 20);
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 the response common across both accordions, incorrect 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 as per the alternative accordion mapping 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: 2 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
146
+ singleSelectionGridPage.steps.verifyPreviewScore(15, 20);
147
+ singleSelectionGridPage.steps.switchToGradingView();
148
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
149
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
150
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
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.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
159
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
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 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', () => {
166
+ singleSelectionGridPage.steps.resetQuestionPreview();
167
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 2 }, { row: 4, column: 2 }]);
168
+ singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
169
+ singleSelectionGridPage.steps.switchToGradingView();
170
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
171
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
172
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
173
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
174
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
175
+ 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')
176
+ singleSelectionGridPage.steps.checkAnswer();
177
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
178
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
179
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
180
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
181
+ });
182
+ });
183
+ });
@@ -0,0 +1,213 @@
1
+ import { singleSelectionGridPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ describe('Create item page - Single selection grid: Partial equal weights with alternative answers', () => {
5
+ before(() => {
6
+ cy.loginAs('admin');
7
+ });
8
+
9
+ describe('Question preview: Auto scored - Partial equal weights with alternative answer - When \'Correct answer\' points are more than \'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 equal weights');
18
+ singleSelectionGridPage.steps.allotPoints(20);
19
+ singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
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.allotPoints(12);
23
+ singleSelectionGridPage.steps.verifyPointsLabelAndPointsOnAnswerAccordion(1, '12');
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(20, 20);
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 points specified for alternative 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', () => {
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(12, 20);
60
+ singleSelectionGridPage.steps.switchToGradingView();
61
+ singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
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 0 points 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(10, 20);
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 0 points 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(6, 20);
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(9, 20);
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 the response common across both accordions, incorrect 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 as per the alternative accordion mapping 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: 2 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
146
+ singleSelectionGridPage.steps.verifyPreviewScore(15, 20);
147
+ singleSelectionGridPage.steps.switchToGradingView();
148
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
149
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
150
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
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.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
159
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
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 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', () => {
166
+ singleSelectionGridPage.steps.resetQuestionPreview();
167
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 2 }, { row: 4, column: 2 }]);
168
+ singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
169
+ singleSelectionGridPage.steps.switchToGradingView();
170
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
171
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
172
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
173
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
174
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
175
+ 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')
176
+ singleSelectionGridPage.steps.checkAnswer();
177
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
178
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
179
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
180
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
181
+ });
182
+
183
+ 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 correct accordion should be displayed', () => {
184
+ 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')
185
+ singleSelectionGridPage.steps.switchToEditTab();
186
+ singleSelectionGridPage.steps.deleteAlternativeAnswerAccordion(0);
187
+ singleSelectionGridPage.steps.addAlternativeAnswerAccordion(1);
188
+ singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 2 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 2 }]);
189
+ singleSelectionGridPage.steps.allotPoints(5);
190
+ singleSelectionGridPage.steps.expandCorrectAnswerAccordion();
191
+ singleSelectionGridPage.steps.allotPoints(23);
192
+ singleSelectionGridPage.steps.switchToPreviewTab();
193
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 2 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
194
+ singleSelectionGridPage.steps.verifyPreviewScore(5.75, 23);
195
+ singleSelectionGridPage.steps.switchToGradingView();
196
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
197
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
198
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
199
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
200
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
201
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
202
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
203
+ cy.log('When the user has attempted the question with more number of correct responses from the alternative accordion than the correct 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')
204
+ singleSelectionGridPage.steps.checkAnswer();
205
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
206
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
207
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
208
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
209
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
210
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
211
+ });
212
+ });
213
+ });
@@ -51,8 +51,8 @@ describe('Create item page - Text entry math: Question instructions, Add structu
51
51
  it('When user adds response tokens to the question input field, then the response tokens should be displayed with a numeric count along with a close button in the question input field', () => {
52
52
  textEntryMathPage.steps.addResponseToken();
53
53
  textEntryMathPage.steps.addResponseToken();
54
- textEntryMathPage.steps.verifyResponseTokenNumerationAndCloseButton(0);
55
- textEntryMathPage.steps.verifyResponseTokenNumerationAndCloseButton(1);
54
+ textEntryMathPage.steps.verifyResponseAreaContents(0);
55
+ textEntryMathPage.steps.verifyResponseAreaContents(1);
56
56
  });
57
57
 
58
58
  it('The user should be able to edit text in the question input field', () => {
@@ -61,23 +61,23 @@ describe('Create item page - Text entry math: Question instructions, Add structu
61
61
  });
62
62
 
63
63
  it('When the user focuses in the question input field, the CKEditor toolbar should be displayed with a \'+Response\' button and when the user clicks on \'+Response\' button, then a response token should be added in the question input field', () => {
64
- textEntryMathPage.steps.clickInQuestionInputField();
65
- utilities.verifyElementVisibilityState(textEntryMathPage.ckEditorAddResponseButton(), 'visible');
64
+ textEntryMathPage.steps.focusInQuestionInputField();
65
+ utilities.verifyElementVisibilityState(textEntryMathPage.responseToken(), 'visible');
66
66
  textEntryMathPage.steps.addResponseToken();
67
- utilities.verifyElementCount(textEntryMathPage.responseToken(), 3);
68
- textEntryMathPage.steps.verifyResponseTokenNumerationAndCloseButton(2);
67
+ utilities.verifyElementCount(textEntryMathPage.responseArea(), 3);
68
+ textEntryMathPage.steps.verifyResponseAreaContents(2);
69
69
  });
70
70
 
71
71
  it('When the user clicks on the \'close\' button present on a response token, then the response token in the question input field should get removed and the numeration of the remaining response tokens present in the question input field should get updated accordingly', () => {
72
- textEntryMathPage.steps.deleteAResponseToken(1);
73
- utilities.verifyElementCount(textEntryMathPage.responseToken(), 2);
74
- textEntryMathPage.steps.verifyResponseTokenNumerationAndCloseButton(0);
75
- textEntryMathPage.steps.verifyResponseTokenNumerationAndCloseButton(1);
72
+ textEntryMathPage.steps.deleteAResponseArea(1);
73
+ utilities.verifyElementCount(textEntryMathPage.responseArea(), 2);
74
+ textEntryMathPage.steps.verifyResponseAreaContents(0);
75
+ textEntryMathPage.steps.verifyResponseAreaContents(1);
76
76
  });
77
77
 
78
78
  it('When the user removes all response tokens from the question input field, an error message \'Error: Minimum one response token is required.\' should be displayed', () => {
79
- textEntryMathPage.steps.deleteAResponseToken(1);
80
- textEntryMathPage.steps.deleteAResponseToken(0);
79
+ textEntryMathPage.steps.deleteAResponseArea(1);
80
+ textEntryMathPage.steps.deleteAResponseArea(0);
81
81
  utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Minimum one response token is required.');
82
82
  });
83
83
 
@@ -85,7 +85,11 @@ describe('Create item page - Text entry math: Question instructions, Add structu
85
85
 
86
86
  textEntryMathPage.tests.verifyQuestionInputFieldPlaceholderText();
87
87
 
88
- textEntryMathPage.tests.addTokenAndVerifyMinimumOneTokenRequiredErrorMessageNotExist();
88
+ it('When the user adds a response area in the question field, then the error message should disappear', () => {
89
+ textEntryMathPage.steps.addResponseToken();
90
+ utilities.verifyElementCount(textEntryMathPage.responseArea(), 1);
91
+ commonComponents.steps.verifyErrorMessageIsNotDisplayed();
92
+ });
89
93
 
90
94
  it('CSS of question input field', { tags: 'css' }, () => {
91
95
  utilities.verifyCSS(textEntryMathPage.questionLabel(), {
@@ -98,7 +102,7 @@ describe('Create item page - Text entry math: Question instructions, Add structu
98
102
  'font-size': css.fontSize.default,
99
103
  'font-weight': css.fontWeight.regular
100
104
  });
101
- utilities.verifyCSS(textEntryMathPage.responseTokenNumeration(), {
105
+ utilities.verifyCSS(textEntryMathPage.responseAreaNumeration(), {
102
106
  'color': css.color.text,
103
107
  'font-size': css.fontSize.default,
104
108
  'font-weight': css.fontWeight.regular
@@ -139,7 +143,7 @@ describe('Create item page - Text entry math: Question instructions, Add structu
139
143
  });
140
144
 
141
145
  it('When the user removes a response token in the question input field, then its respective response accordion in the \'Specify correct answer\' section should be removed', () => {
142
- textEntryMathPage.steps.deleteAResponseToken(0);
146
+ textEntryMathPage.steps.deleteAResponseArea(0);
143
147
  utilities.verifyElementCount(textEntryMathPage.responseAccordion(), 2);
144
148
  textEntryMathPage.steps.verifyResponseAccordionIsCollapsed(0);
145
149
  textEntryMathPage.steps.verifyResponseAccordionIsCollapsed(1);
@@ -168,7 +172,7 @@ describe('Create item page - Text entry math: Question instructions, Add structu
168
172
  });
169
173
 
170
174
  it('When the user removes a response token in the question input field, then in additional settings accordion, the respective \'ARIA label for text containers\' input field should be removed', () => {
171
- textEntryMathPage.steps.deleteAResponseToken(0);
175
+ textEntryMathPage.steps.deleteAResponseArea(0);
172
176
  textEntryMathPage.steps.verifyTextContainerAriaLabelInputFieldCountAndNumeration(2);
173
177
  });
174
178
  });
@@ -203,7 +207,7 @@ describe('Create item page - Text entry math: Question instructions, Add structu
203
207
 
204
208
  it('When the user removes a response token in the question input field, then in preview tab response field should also be removed', () => {
205
209
  textEntryMathPage.steps.switchToEditTab();
206
- textEntryMathPage.steps.deleteAResponseToken(0);
210
+ textEntryMathPage.steps.deleteAResponseArea(0);
207
211
  textEntryMathPage.steps.switchToPreviewTab();
208
212
  utilities.verifyElementCount(textEntryMathPage.responseFieldPreviewTab(), 1);
209
213
  });
@@ -91,7 +91,7 @@ describe('Create item page - Text entry math: Scoring section', () => {
91
91
  });
92
92
 
93
93
  it('When the user deletes a response token, then points per response should get updated accordingly', () => {
94
- textEntryMathPage.steps.deleteAResponseToken(0);
94
+ textEntryMathPage.steps.deleteAResponseArea(0);
95
95
  textEntryMathPage.steps.verifyPointsDisplayedOnResponseAccordion(0, 2);
96
96
  textEntryMathPage.steps.verifyPointsDisplayedOnResponseAccordion(1, 2);
97
97
  });