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