itemengine-cypress-automation 1.0.166-migrationScripts-b8c79a0.0 → 1.0.167-repoUpdate10April-1465c8c.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +83 -0
  2. package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +200 -0
  3. package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +56 -0
  4. package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +95 -0
  5. package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +71 -0
  6. package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +72 -0
  7. package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +71 -0
  8. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
  9. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +22 -11
  10. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
  11. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
  12. package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +161 -0
  13. package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +308 -0
  14. package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +216 -0
  15. package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +336 -0
  16. package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +570 -0
  17. package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +214 -0
  18. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +356 -0
  19. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +299 -0
  20. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +18 -7
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +11 -6
  22. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +355 -0
  23. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +0 -1
  24. package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +2 -36
  25. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +22 -34
  26. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +8 -24
  27. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +5 -25
  28. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +68 -114
  29. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +67 -111
  30. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +71 -123
  31. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +41 -63
  32. package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +21 -25
  33. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +50 -85
  34. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +68 -115
  35. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +54 -98
  36. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +72 -120
  37. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
  38. package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +309 -0
  39. package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
  40. package/cypress/e2e/ILC/Matching/toolSettings.js +72 -0
  41. package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +1033 -0
  42. package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +28 -0
  43. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +236 -0
  44. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +239 -0
  45. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +278 -0
  46. package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +178 -0
  47. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +407 -0
  48. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +273 -0
  49. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +278 -0
  50. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +228 -0
  51. package/cypress/e2e/ILC/NumberLine/additionalSettings.js +120 -0
  52. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +659 -0
  53. package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +149 -0
  54. package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +151 -0
  55. package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +171 -0
  56. package/cypress/e2e/ILC/NumberLine/headerSection.js +76 -0
  57. package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +54 -0
  58. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +200 -0
  59. package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +67 -0
  60. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +135 -0
  61. package/cypress/e2e/ILC/NumberLine/toolSettings.js +73 -0
  62. package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +372 -0
  63. package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +1014 -0
  64. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +235 -0
  65. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +235 -0
  66. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +235 -0
  67. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +457 -0
  68. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +342 -0
  69. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +342 -0
  70. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +342 -0
  71. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +155 -0
  72. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +314 -0
  73. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +275 -0
  74. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +314 -0
  75. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +290 -0
  76. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +142 -0
  77. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +137 -0
  78. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
  79. package/cypress/fixtures/theme/ilc.json +14 -26
  80. package/cypress/pages/brainingCampManipulativePage.js +122 -0
  81. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
  82. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
  83. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
  84. package/cypress/pages/components/colorPopupComponent.js +2 -2
  85. package/cypress/pages/components/defaultToolDropdown.js +77 -0
  86. package/cypress/pages/components/gridQuestionCommonComponent.js +629 -2
  87. package/cypress/pages/components/index.js +3 -0
  88. package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
  89. package/cypress/pages/components/measuringToolComponent.js +2 -2
  90. package/cypress/pages/components/resetPopupComponent.js +74 -0
  91. package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
  92. package/cypress/pages/components/setPointsPopupBase.js +6 -4
  93. package/cypress/pages/components/specifyRowsAndColumnsComponent.js +60 -3
  94. package/cypress/pages/components/toolSettingsComponent.js +80 -12
  95. package/cypress/pages/components/toolsAndControlsComponent.js +69 -0
  96. package/cypress/pages/dragAndDropIntoCategoriesPage.js +0 -8
  97. package/cypress/pages/feedbackScalePage copy.js +716 -0
  98. package/cypress/pages/feedbackScalePage.js +591 -449
  99. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +3 -1
  100. package/cypress/pages/graphingPage.js +9 -145
  101. package/cypress/pages/gridFillPage.js +135 -120
  102. package/cypress/pages/highlightPage.js +0 -394
  103. package/cypress/pages/index.js +5 -2
  104. package/cypress/pages/matchingPage.js +78 -20
  105. package/cypress/pages/multipleSelectionGridPage.js +88 -1
  106. package/cypress/pages/numberLinePage.js +723 -0
  107. package/cypress/pages/singleSelectionGridPage.js +86 -0
  108. package/cypress/pages/textSelectionPage.js +582 -0
  109. package/cypress/support/migrationHelpers/extractLrnQuestionData.js +3 -12
  110. package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +0 -1
  111. package/cypress/support/migrationHelpers/migrationScript.js +0 -10
  112. package/cypress/support/migrationHelpers/verifyIeQuestionData.js +0 -8
  113. package/package.json +1 -1
@@ -26,43 +26,36 @@ describe('Create item page - grid fill: All or nothing with alternative answers'
26
26
  gridFillPage.steps.switchToPreviewTab();
27
27
  });
28
28
 
29
- it('When the user selects \'Grading\' view without attempting the question, correct icons should be displayed for correct answer cells from the correct accordion', () => {
29
+ it('When the user selects \'Grading\' view without attempting the question, correct icons should be displayed for correct answer cells from the correct accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
30
30
  gridFillPage.steps.switchToGradingView();
31
- gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
32
- gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
33
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 0);
34
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
35
- gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
36
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
37
- gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
38
- gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
39
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
31
+ gridFillPage.steps.verifyCorrectIncorrectResponseIconNotExistPreviewTab(0, 0);
32
+ gridFillPage.steps.verifyCorrectIncorrectResponseIconNotExistPreviewTab(0, 1);
33
+ gridFillPage.steps.verifyCorrectIncorrectResponseIconNotExistPreviewTab(0, 2);
34
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 0);
35
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 1);
36
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 2);
37
+ gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
40
38
  gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
41
39
  });
42
40
 
43
- 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 in responses from correct accordion, a status message with text \'Your answer is correct\' should be displayed above the question preview', () => {
41
+ 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 in responses from correct accordion in response grid, correct answer section should not be displayed and a status message with text \'Your answer is correct\' should be displayed above the question preview', () => {
44
42
  gridFillPage.steps.resetQuestionPreview();
45
43
  gridFillPage.steps.selectCellPreviewTab(0, 0);
46
44
  gridFillPage.steps.selectCellPreviewTab(0, 1);
47
45
  gridFillPage.steps.selectCellPreviewTab(0, 2);
48
46
  gridFillPage.steps.verifyPreviewScore(20, 20);
49
47
  gridFillPage.steps.switchToGradingView();
50
- gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
51
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
52
- gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
53
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
54
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
55
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
48
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 0);
49
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 1);
50
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 2);
51
+ gridFillPage.steps.verifyCorrectAnswerSectionNotExists();
56
52
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
57
53
  gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
58
54
  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 in responses from correct accordion, a status message with text \'Your answer is correct\' should be displayed above the question preview')
59
55
  gridFillPage.steps.checkAnswer();
60
- gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
61
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
62
- gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
63
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
64
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
65
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
56
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 0);
57
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 1);
58
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 2);
66
59
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
67
60
  });
68
61
 
@@ -83,191 +76,146 @@ describe('Create item page - grid fill: All or nothing with alternative answers'
83
76
  'font-weight': css.fontWeight.regular
84
77
  });
85
78
  utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInPreviewTab(), 0), {
86
- 'border-color': css.color.correctAnswer,
87
- 'background-color': css.color.gridCellCorrectAnswerBg
79
+ 'border-color': css.color.correctAnswer
88
80
  });
81
+ gridFillPage.steps.verifyCorrectResponseBackgroundColorPreviewTab(0, 0);
89
82
  });
90
83
 
91
84
  it('Accessibility of correct answer state', { tags: 'a11y' }, () => {
92
85
  cy.checkAccessibility(gridFillPage.previewTabQuestionWrapper());
93
86
  });
94
87
 
95
- it('When the user attempts the question with alternative accordion response, 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 in responses from alternative accordion, a status message with text \'Your answer is correct\' should be displayed', () => {
88
+ it('When the user attempts the question with alternative accordion response, 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 in responses from alternative accordion in response grid, correct icon should be displayed in responses from correct answer accordion in correct answer section and a status message with text \'Your answer is correct\' should be displayed', () => {
96
89
  gridFillPage.steps.resetQuestionPreview();
97
90
  gridFillPage.steps.selectCellPreviewTab(0, 2);
98
91
  gridFillPage.steps.selectCellPreviewTab(0, 3);
99
92
  gridFillPage.steps.selectCellPreviewTab(0, 4);
100
93
  gridFillPage.steps.verifyPreviewScore(10, 20);
101
94
  gridFillPage.steps.switchToGradingView();
102
- gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
103
- gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
104
- gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
105
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
106
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 4);
107
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
95
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 3);
96
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 4);
97
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 2);
98
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 0);
99
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 1);
100
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 2);
108
101
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
109
102
  gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
110
103
  cy.log('When the user has attempted the question with alternative accordion response and clicks on \'Check answer\' button, then correct icon should be displayed in responses from alternative accordion, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
111
104
  gridFillPage.steps.checkAnswer();
112
- gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
113
- gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
114
- gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
115
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
116
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
117
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 4);
105
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 3);
106
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 4);
107
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 2);
118
108
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
119
109
  });
120
110
 
121
- 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 icon, background and border should be displayed in the selected responses from correct accordion, correct icon and border should be displayed for unselected responses from correct accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
111
+ 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 icon should be displayed in the responses from correct accordion in response grid, correct icon should be displayed in responses from correct answer accordion in correct answer section and a status message with text \'Your answer is incorrect\' should be displayed', () => {
122
112
  gridFillPage.steps.resetQuestionPreview();
123
113
  gridFillPage.steps.selectCellPreviewTab(0, 0);
124
114
  gridFillPage.steps.selectCellPreviewTab(0, 1);
125
115
  gridFillPage.steps.verifyPreviewScore(0, 20);
126
116
  gridFillPage.steps.switchToGradingView();
127
- gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
128
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
129
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
130
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
131
- gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
132
- gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
133
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
117
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 0);
118
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 1);
119
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 0);
120
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 1);
121
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 2);
134
122
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
135
123
  gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
136
124
  cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed in the responses from correct accordion, no icon/border should be displayed for unselected responses from correct accordion and a status message with text \'Your answer is incorrect\' should be displayed')
137
125
  gridFillPage.steps.checkAnswer();
138
- gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
139
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
140
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
141
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
126
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 0);
127
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 1);
142
128
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
143
129
  });
144
130
 
145
- 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 and border should be displayed in response from correct accordion and incorrect icon should be displayed in selected response from alternative accordion, a status message with text \'Your answer is incorrect\' should be displayed', () => {
131
+ 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 in response from alternative accordion in response grid and correct icon should be displayed in responses from correct answer accordion in correct answer section, a status message with text \'Your answer is incorrect\' should be displayed', () => {
146
132
  gridFillPage.steps.resetQuestionPreview();
147
133
  gridFillPage.steps.selectCellPreviewTab(0, 3);
148
134
  gridFillPage.steps.verifyPreviewScore(0, 20);
149
135
  gridFillPage.steps.switchToGradingView();
150
- gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
151
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
152
- gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
153
- gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
154
- gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
155
- gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
156
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 0);
157
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
158
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
159
- gridFillPage.steps.verifyIncorrectResponseIcon(0, 3);
160
- gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 3);
136
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 3);
137
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 0);
138
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 1);
139
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 2);
161
140
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
162
141
  gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
163
- cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then incorrect icon should be displayed in the partially selected response from alternative accordion, a status message with text \'Your answer is incorrect\' should be displayed')
142
+ cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed in the partially selected response from alternative accordion, a status message with text \'Your answer is incorrect\' should be displayed');
164
143
  gridFillPage.steps.checkAnswer();
165
- gridFillPage.steps.verifyIncorrectResponseIcon(0, 3);
166
- gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 3);
144
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 3);
167
145
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
168
146
  });
169
147
 
170
- it('When the user attempts the question partially correct with all the responses correct as per the alternative accordion but one response incomplete, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed in response from alternative accordion, correct icon should be displayed in unselected response from correct accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
148
+ it('When the user attempts the question partially correct with all the responses correct as per the alternative accordion but one response incomplete, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed in response from alternative accordion, correct icon should be displayed in unselected response from correct accordion in response grid, correct icon should be displayed in responses from correct answer accordion in correct answer section and a status message with text \'Your answer is incorrect\' should be displayed', () => {
171
149
  gridFillPage.steps.resetQuestionPreview();
172
150
  gridFillPage.steps.selectCellPreviewTab(0, 3);
173
151
  gridFillPage.steps.selectCellPreviewTab(0, 4);
174
152
  gridFillPage.steps.verifyPreviewScore(0, 20);
175
153
  gridFillPage.steps.switchToGradingView();
176
- gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
177
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
178
- gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
179
- gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
180
- gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
181
- gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
182
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 0);
183
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
184
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
185
- gridFillPage.steps.verifyIncorrectResponseIcon(0, 3);
186
- gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 3);
187
- gridFillPage.steps.verifyIncorrectResponseIcon(0, 4);
188
- gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 4);
154
+ gridFillPage.steps.verifyIncorrectResponseIconPreviewTab(0, 3);
155
+ gridFillPage.steps.verifyIncorrectResponseIconPreviewTab(0, 4);
156
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 0);
157
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 1);
158
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 2);
189
159
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
190
160
  gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
191
161
  cy.log('When the user has attempted the question with partially correct with all the response correct as per the alternative accordion but one response unselected and clicks on \'Check answer\' button, then incorrect icon should be displayed in the partially selected responses from alternative accordion a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed');
192
162
  gridFillPage.steps.checkAnswer();
193
- gridFillPage.steps.verifyIncorrectResponseIcon(0, 3);
194
- gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 3);
195
- gridFillPage.steps.verifyIncorrectResponseIcon(0, 4);
196
- gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 4);
163
+ gridFillPage.steps.verifyIncorrectResponseIconPreviewTab(0, 3);
164
+ gridFillPage.steps.verifyIncorrectResponseIconPreviewTab(0, 4);
197
165
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
198
166
  });
199
167
 
200
- it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, correct icon should be displayed in the response from correct accordion, incorrect icon should be displayed in the response from alternative accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
168
+ it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, correct icon should be displayed in the response from correct accordion, incorrect icon should be displayed in the response from alternative accordion in response grid, correct icon should be displayed in responses from correct answer accordion in correct answer section and a status message with text \'Your answer is incorrect\' should be displayed', () => {
201
169
  gridFillPage.steps.resetQuestionPreview();
202
170
  gridFillPage.steps.selectCellPreviewTab(0, 0);
203
171
  gridFillPage.steps.selectCellPreviewTab(0, 4);
204
172
  gridFillPage.steps.verifyPreviewScore(0, 20);
205
173
  gridFillPage.steps.switchToGradingView();
206
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
207
- gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
208
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
209
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
210
- gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
211
- gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
212
- gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
213
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
214
- gridFillPage.steps.verifyIncorrectResponseIcon(0, 4);
215
- gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 4);
174
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 0);
175
+ gridFillPage.steps.verifyIncorrectResponseIconPreviewTab(0, 4);
176
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 0);
177
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 1);
178
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 2);
216
179
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
217
180
  gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
218
181
  cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed in the response from correct answer accordion, incorrect icon should be displayed in the response from alternative answer accordion and a status message with text \'Your answer is incorrect\' should be displayed')
219
182
  gridFillPage.steps.checkAnswer();
220
- gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
221
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
222
- gridFillPage.steps.verifyIncorrectResponseIcon(0, 4);
223
- gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 4);
183
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 0);
184
+ gridFillPage.steps.verifyIncorrectResponseIconPreviewTab(0, 4);
224
185
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
225
186
  });
226
187
 
227
- it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, correct icon, background and border should be in the common response, correct icon should be displayed in responses from unselected correct accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
188
+ it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, correct icon should be in the common response in response grid, correct icon should be displayed in responses from correct answer accordion in correct answer section and a status message with text \'Your answer is incorrect\' should be displayed', () => {
228
189
  gridFillPage.steps.resetQuestionPreview();
229
190
  gridFillPage.steps.selectCellPreviewTab(0, 2);
230
191
  gridFillPage.steps.verifyPreviewScore(0, 20);
231
192
  gridFillPage.steps.switchToGradingView();
232
- gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
233
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 0);
234
- gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
235
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
236
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
237
- gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
238
- gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
239
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
193
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 2);
194
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 0);
195
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 1);
196
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 2);
240
197
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
241
198
  gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
242
199
  cy.log('When the user has attempted the question with common response between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed in the correct answer responses, no icon should be displayed for unselected response area and a status message with text \'Your answer is incorrect\' should be displayed')
243
200
  gridFillPage.steps.checkAnswer();
244
- gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
245
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
201
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 2);
246
202
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
247
203
  });
248
204
 
249
- it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon, background and border should be displayed in incorrect response and correct icon in response from correct accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
205
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed in incorrect response in response grid, correct icon should be displayed in responses from correct answer accordion in correct answer section and a status message with text \'Your answer is incorrect\' should be displayed', () => {
250
206
  gridFillPage.steps.resetQuestionPreview();
251
207
  gridFillPage.steps.selectCellPreviewTab(1, 1);
252
208
  gridFillPage.steps.verifyPreviewScore(0, 20);
253
209
  gridFillPage.steps.switchToGradingView();
254
- gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
255
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
256
- gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
257
- gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
258
- gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
259
- gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
260
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 0);
261
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
262
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
263
- gridFillPage.steps.verifyIncorrectResponseIcon(1, 1);
264
- gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(1, 1);
210
+ gridFillPage.steps.verifyIncorrectResponseIconPreviewTab(1, 1);
211
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 0);
212
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 1);
213
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 2);
265
214
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
266
215
  gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
267
216
  cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed in incorrect responses and status message with text \'Your answer is incorrect\' should be displayed')
268
217
  gridFillPage.steps.checkAnswer();
269
- gridFillPage.steps.verifyIncorrectResponseIcon(1, 1);
270
- gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(1, 1);
218
+ gridFillPage.steps.verifyIncorrectResponseIconPreviewTab(1, 1);
271
219
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
272
220
  });
273
221
 
@@ -20,15 +20,12 @@ describe('Create item page - Grid fill : Partial equal weights', () => {
20
20
  it('When the user selects \'Grading\' view without attempting the question, correct icons should be displayed in exact number of cells specified in specify correct answer section', () => {
21
21
  gridFillPage.steps.switchToPreviewTab();
22
22
  gridFillPage.steps.switchToGradingView();
23
- gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
24
- gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
25
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 0);
26
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
27
- gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
28
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
29
- gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
30
- gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
31
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
23
+ gridFillPage.steps.verifyCorrectIncorrectResponseIconNotExistPreviewTab(0,2);
24
+ gridFillPage.steps.verifyCorrectIncorrectResponseIconNotExistPreviewTab(0,3);
25
+ gridFillPage.steps.verifyCorrectIncorrectResponseIconNotExistPreviewTab(0,4);
26
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 0);
27
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 1);
28
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 2);
32
29
  gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
33
30
  });
34
31
 
@@ -38,20 +35,16 @@ describe('Create item page - Grid fill : Partial equal weights', () => {
38
35
  gridFillPage.steps.selectCellPreviewTab(1, 3);
39
36
  gridFillPage.steps.verifyPreviewScore(0, 27);
40
37
  gridFillPage.steps.switchToGradingView();
41
- gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
42
- gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
43
- gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 0);
44
- gridFillPage.steps.verifyCorrectResponseIcon(1, 1);
45
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(1, 1);
46
- gridFillPage.steps.verifyCorrectResponseIcon(1, 3);
47
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(1, 3);
38
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(1, 1);
39
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(1, 3);
40
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 0);
41
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 1);
42
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 2);
48
43
  gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
49
44
  cy.log('When user attempt questions by selecting the less number of cells specified in specify correct answer section and clicks on \'Check answer\' button, then correct icon, border and background should be displayed in selected responses and status message \'Your answer is incorrect\' should be displayed');
50
45
  gridFillPage.steps.checkAnswer();
51
- gridFillPage.steps.verifyCorrectResponseIcon(1, 3);
52
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(1, 3);
53
- gridFillPage.steps.verifyCorrectResponseIcon(1, 1);
54
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(1, 1);
46
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(1, 1);
47
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(1, 3);
55
48
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
56
49
  });
57
50
 
@@ -63,25 +56,20 @@ describe('Create item page - Grid fill : Partial equal weights', () => {
63
56
  gridFillPage.steps.selectCellPreviewTab(0, 3);
64
57
  gridFillPage.steps.verifyPreviewScore(0, 27);
65
58
  gridFillPage.steps.switchToGradingView();
66
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
67
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
68
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
69
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
70
- gridFillPage.steps.verifyCorrectResponseIcon(1, 3);
71
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(1, 3);
72
- gridFillPage.steps.verifyIncorrectResponseIcon(1, 1);
73
- gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(1, 1);
59
+ gridFillPage.steps.verifyIncorrectResponseIconPreviewTab(1, 1);
60
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(1, 3);
61
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 1);
62
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 3);
63
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 0);
64
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 1);
65
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 2);
74
66
  gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
75
67
  cy.log('When user attempt questions by selecting the more number of cells specified in specify correct answer section and clicks on \'Check answer\' button, then correct icon, border and background should be displayed in selected responses and incorrect icon should be displayed in extra selected response and status message \'Your answer is incorrect\' should be displayed');
76
68
  gridFillPage.steps.checkAnswer();
77
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
78
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
79
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
80
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
81
- gridFillPage.steps.verifyCorrectResponseIcon(1, 3);
82
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(1, 3);
83
- gridFillPage.steps.verifyIncorrectResponseIcon(1, 1);
84
- gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(1, 1);
69
+ gridFillPage.steps.verifyIncorrectResponseIconPreviewTab(1, 1);
70
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(1, 3);
71
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 1);
72
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 3);
85
73
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
86
74
  });
87
75
 
@@ -92,25 +80,19 @@ describe('Create item page - Grid fill : Partial equal weights', () => {
92
80
  gridFillPage.steps.selectCellPreviewTab(0, 1);
93
81
  gridFillPage.steps.verifyPreviewScore(27, 27);
94
82
  gridFillPage.steps.switchToGradingView();
95
- gridFillPage.steps.verifyCorrectResponseIcon(1, 1);
96
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(1, 1);
97
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
98
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
99
- gridFillPage.steps.verifyCorrectResponseIcon(1, 3);
100
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(1, 3);
83
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(1, 1);
84
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 1);
85
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(1, 3);
101
86
  gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
102
87
  cy.log('When user attempt questions by selecting the exact number of cells specified in specify correct answer section and clicks on \'Check answer\' button, then correct icon, border and background should be displayed in selected responses and status message \'Your answer is incorrect\' should be displayed');
103
88
  gridFillPage.steps.checkAnswer();
104
- gridFillPage.steps.verifyCorrectResponseIcon(1, 1);
105
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(1, 1);
106
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
107
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
108
- gridFillPage.steps.verifyCorrectResponseIcon(1, 3);
109
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(1, 3);
89
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(1, 1);
90
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 1);
91
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(1, 3);
110
92
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
111
93
  });
112
94
 
113
- it('When user attempt questions by selecting the exact number of cells specified in specify correct answer section and one incorrect response, then user should be awarded 0 points and when user unselects the extra response then user should be awarded full points', () => {
95
+ it('When user attempt questions by selecting the exact number of cells specified in specify correct answer section and one extra response, then user should be awarded 0 points and when user unselects the extra response then user should be awarded full points', () => {
114
96
  gridFillPage.steps.resetQuestionPreview();
115
97
  gridFillPage.steps.selectCellPreviewTab(1, 1);
116
98
  gridFillPage.steps.selectCellPreviewTab(1, 3);
@@ -118,26 +100,22 @@ describe('Create item page - Grid fill : Partial equal weights', () => {
118
100
  gridFillPage.steps.selectCellPreviewTab(0, 0);
119
101
  gridFillPage.steps.verifyPreviewScore(0, 27);
120
102
  gridFillPage.steps.switchToGradingView();
121
- gridFillPage.steps.verifyIncorrectResponseIcon(1, 1);
122
- gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(1, 1);
123
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
124
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
125
- gridFillPage.steps.verifyCorrectResponseIcon(1, 3);
126
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(1, 3);
127
- gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
128
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
103
+ gridFillPage.steps.verifyIncorrectResponseIconPreviewTab(1, 1);
104
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 1);
105
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(1, 3);
106
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 0);
107
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 0);
108
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 1);
109
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 2);
129
110
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
130
111
  cy.log('User unselects extra response in student view and switches to grading view');
131
112
  gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
132
113
  gridFillPage.steps.unselectCellPreviewTab(0, 0);
133
114
  gridFillPage.steps.verifyPreviewScore(27, 27);
134
115
  gridFillPage.steps.switchToGradingView();
135
- gridFillPage.steps.verifyCorrectResponseIcon(1, 1);
136
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(1, 1);
137
- gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
138
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
139
- gridFillPage.steps.verifyCorrectResponseIcon(1, 3);
140
- gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(1, 3);
116
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(1, 1);
117
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 1);
118
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(1, 3);
141
119
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
142
120
  });
143
121
  });
@@ -44,62 +44,58 @@ describe('Create Item page - Grid fill: Manually and non scored', () => {
44
44
 
45
45
  it('When the user selects \'Grading\' view without attempting the question, correct/incorrect icons should not be displayed', () => {
46
46
  gridFillPage.steps.switchToGradingView();
47
- gridFillPage.steps.verifyCorrectIncorrectIconsNotExist();
47
+ gridFillPage.steps.verifyCorrectIncorrectResponseIconNotExistPreviewTab(0,2);
48
+ gridFillPage.steps.verifyCorrectIncorrectResponseIconNotExistPreviewTab(0,3);
49
+ gridFillPage.steps.verifyCorrectIncorrectResponseIconNotExistPreviewTab(0,4);
48
50
  gridFillPage.steps.switchToStudentView();
49
51
  });
50
52
 
51
- it('When the user attempts the question incorrectly and on switching to \'Grading\' view, incorrect icon should be displayed in all incorrect responses, correct icon should be displayed in all correct responses, a status message with text \'Your answer is incorrect\'', () => {
53
+ it('When the user attempts the question incorrectly and on switching to \'Grading\' view, incorrect icon should be displayed in all incorrect responses in response grid, a status message with text \'Your answer is incorrect\' with correct responses icon should be displayed in the correct answers section', () => {
52
54
  gridFillPage.steps.selectCellPreviewTab(0, 2);
53
55
  gridFillPage.steps.switchToGradingView();
54
- gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
55
- gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
56
- gridFillPage.steps.verifyIncorrectResponseIcon(0, 2);
56
+ gridFillPage.steps.verifyIncorrectResponseIconPreviewTab(0, 2);
57
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 4);
58
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 3);
57
59
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
58
60
  gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
59
61
  cy.log('When user clicks on Check answer button after he attempts the question incorrectly incorrect icons should be displayed in all incorrect responses, status message \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
60
62
  gridFillPage.steps.checkAnswer();
61
- gridFillPage.steps.verifyIncorrectResponseIcon(0, 2);
63
+ gridFillPage.steps.verifyIncorrectResponseIconPreviewTab(0, 2);
62
64
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
63
65
  });
64
66
 
65
- it('When the user attempts the question partially correct, then on switching to \'Grading\' view, correct icon should be displayed in the correct answer responses, incorrect icon should be displayed in incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
67
+ it('When the user attempts the question partially correct, then on switching to \'Grading\' view, correct icon should be displayed in the correct answer responses, incorrect icon should be displayed in incorrect answer response in response grid, a status message with text \'Your answer is incorrect\' and correct responses icon should be displayed in the correct answers section', () => {
66
68
  gridFillPage.steps.resetQuestionPreview();
67
69
  gridFillPage.steps.selectCellPreviewTab(0, 3);
68
70
  gridFillPage.steps.selectCellPreviewTab(0, 2);
69
71
  gridFillPage.steps.switchToGradingView();
70
- gridFillPage.steps.verifyIncorrectResponseIcon(0, 2);
71
- gridFillPage.steps.verifyIncorrectResponseBackgroundColor(0, 2);
72
- gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
73
- gridFillPage.steps.verifyCorrectResponseBackgroundColor(0, 3);
74
- gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
72
+ gridFillPage.steps.verifyIncorrectResponseIconPreviewTab(0, 2);
73
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 3);
74
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 4);
75
+ gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 3);
75
76
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
76
77
  gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
77
78
  cy.log('When user clicks on Check answer button after he attempts the question partially correct, correct icon should be displayed in the correct answer responses, incorrect icon should be displayed in incorrect answer response, status message \'Your answer is incorrect\' should be displayed')
78
79
  gridFillPage.steps.checkAnswer();
79
- gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
80
- gridFillPage.steps.verifyCorrectResponseBackgroundColor(0, 3);
81
- gridFillPage.steps.verifyIncorrectResponseIcon(0, 2);
82
- gridFillPage.steps.verifyIncorrectResponseBackgroundColor(0, 2);
80
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 3);
81
+ gridFillPage.steps.verifyIncorrectResponseIconPreviewTab(0, 2);
83
82
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
84
83
  });
85
84
 
86
- it('When user attempts the question correctly, on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed in the correct answer responses, a status message with text \'Your answer is correct\'', () => {
85
+ it('When user attempts the question correctly, on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed in the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
87
86
  gridFillPage.steps.resetQuestionPreview();
88
87
  gridFillPage.steps.selectCellPreviewTab(0, 3);
89
88
  gridFillPage.steps.selectCellPreviewTab(0, 4);
90
89
  gridFillPage.steps.switchToGradingView();
91
- gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
92
- gridFillPage.steps.verifyCorrectResponseBackgroundColor(0, 3);
93
- gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
94
- gridFillPage.steps.verifyCorrectResponseBackgroundColor(0, 3);
90
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 3);
91
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 4);
95
92
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
93
+ gridFillPage.steps.verifyCorrectAnswerSectionNotExists();
96
94
  gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
97
95
  cy.log('When user clicks on Check answer button after he attempts the question correctly, then correct icon should be displayed in the correct answer responses, status message \'Your answer is correct\' should be displayed')
98
96
  gridFillPage.steps.checkAnswer();
99
- gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
100
- gridFillPage.steps.verifyCorrectResponseBackgroundColor(0, 3);
101
- gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
102
- gridFillPage.steps.verifyCorrectResponseBackgroundColor(0, 4);
97
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 3);
98
+ gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 4);
103
99
  gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
104
100
  });
105
101
  });