itemengine-cypress-automation 1.0.145-equationAndCheckAnswerSeelctorUpdate-b61f46e.0 → 1.0.145

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +2 -2
  2. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingForAllViews.smoke.js +1 -1
  3. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingPenaltyScoring.js +0 -1
  4. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +0 -1
  5. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToCorrectPoints.js +0 -1
  6. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -1
  7. package/cypress/e2e/ILC/Graphing/Scoring/manuallyAndNonScoredScoring.js +0 -2
  8. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +0 -12
  9. package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
  10. package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +0 -2
  11. package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +1 -0
  12. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +0 -1
  13. package/cypress/e2e/ILC/Graphing/specifyCorrectAnswerSection.js +0 -1
  14. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +0 -1
  15. package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +8 -8
  16. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
  17. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +256 -0
  18. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +252 -0
  19. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +335 -0
  20. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingPenaltyScoring.js +60 -0
  21. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +157 -0
  22. package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +2 -2
  23. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +497 -0
  24. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +0 -0
  25. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +200 -0
  26. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +280 -0
  27. package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +281 -0
  28. package/cypress/e2e/ILC/Matching/checkAnswerFunctionalityForAllViews.smoke.js +142 -0
  29. package/cypress/e2e/ILC/Matching/previewTabContentsForAllViews.smoke.js +146 -0
  30. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingPenaltyScoring.js +55 -0
  31. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsBasic.js +116 -0
  32. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +307 -0
  33. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +163 -0
  34. package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +2 -3
  35. package/cypress/e2e/ILC/MultipleSelectionGridNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
  36. package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +3 -0
  37. package/cypress/e2e/ILC/SingleSelectionGridNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
  38. package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +2 -5
  39. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +11 -10
  40. package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +6 -9
  41. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +12 -5
  42. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +1 -2
  43. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -0
  44. package/cypress/pages/components/desmosToolComponent.js +1 -1
  45. package/cypress/pages/components/gridQuestionCommonComponent.js +28 -4
  46. package/cypress/pages/components/index.js +1 -0
  47. package/cypress/pages/components/specifyRowsAndColumnsComponent.js +132 -0
  48. package/cypress/pages/dragAndDropIntoCategoriesPage.js +3 -113
  49. package/cypress/pages/geoGebraToolsPage.js +1 -1
  50. package/cypress/pages/graphingPage.js +6 -0
  51. package/cypress/pages/gridFillPage.js +67 -12
  52. package/cypress/pages/index.js +2 -1
  53. package/cypress/pages/matchingPage.js +433 -0
  54. package/cypress/pages/multipleSelectionGridPage.js +11 -3
  55. package/cypress/pages/singleSelectionGridPage.js +2 -1
  56. package/cypress/pages/textEntryMathPage.js +5 -0
  57. package/cypress/pages/textEntryMathWithImagePage.js +6 -1
  58. package/package.json +2 -2
@@ -0,0 +1,497 @@
1
+ import { gridFillPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ describe('Create item page - Grid fill : Partial equal weights', () => {
5
+ before(() => {
6
+ cy.loginAs('admin');
7
+ });
8
+
9
+ describe('Auto scored - Partial equal weights', () => {
10
+ abortEarlySetup();
11
+ before(() => {
12
+ gridFillPage.steps.navigateToCreateQuestion('grid fill');
13
+ cy.barsPreLoaderWait();
14
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 0);
15
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 1);
16
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 2);
17
+ gridFillPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
18
+ gridFillPage.steps.allotPoints(15);
19
+ gridFillPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
20
+ gridFillPage.steps.switchToPreviewTab();
21
+ });
22
+
23
+ it('When the user selects \'Grading\' view without attempting the question, then 0 points should be awarded and correct answer cells should be displayed with correct icon, border and background', () => {
24
+ gridFillPage.steps.verifyPreviewScore(0, 15);
25
+ gridFillPage.steps.switchToGradingView();
26
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
27
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 0);
28
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
29
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
30
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
31
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
32
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
33
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
34
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
35
+ });
36
+
37
+ 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 all incorrect response cells, correct icon should be displayed in all correct response cells should be displayed and correct/incorrect status message should not be displayed', () => {
38
+ gridFillPage.steps.selectCellPreviewTab(1, 1);
39
+ gridFillPage.steps.verifyCellSelectedPreviewTab(1, 1);
40
+ gridFillPage.steps.verifyPreviewScore(0, 15);
41
+ gridFillPage.steps.switchToGradingView();
42
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
43
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 0);
44
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
45
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
46
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
47
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
48
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
49
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
50
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
51
+ gridFillPage.steps.verifyIncorrectResponseIcon(1, 1);
52
+ gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(1, 1);
53
+ gridFillPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
54
+ gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
55
+ cy.log('When the user attempts the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed in all incorrect responses and correct/incorrect status message should not be displayed')
56
+ gridFillPage.steps.checkAnswer();
57
+ gridFillPage.steps.verifyIncorrectResponseIcon(1, 1);
58
+ gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(1, 1);
59
+ });
60
+
61
+ it('When the user attempts the question partially correct, then the user should be awarded points of the correctly attempted responses and on switching to \'Grading\' view, correct icon should be displayed in the correct answer responses and correct/incorrect status message should not be displayed', () => {
62
+ gridFillPage.steps.resetQuestionPreview();
63
+ gridFillPage.steps.selectCellPreviewTab(0, 0);
64
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 0);
65
+ gridFillPage.steps.verifyPreviewScore(5, 15);
66
+ gridFillPage.steps.switchToGradingView();
67
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
68
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
69
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
70
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
71
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
72
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
73
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
74
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
75
+ gridFillPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
76
+ gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
77
+ cy.log('When the user attempts the question partially correct and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses and correct/incorrect status message should not be displayed')
78
+ gridFillPage.steps.checkAnswer();
79
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
80
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
81
+ gridFillPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
82
+ });
83
+
84
+ it('When the user attempts the question by selecting all the correct cells with one incorrect cell, then the user should be awarded full points and on switching to \'Grading\' view, correct icon should be displayed in the correct answer responses, incorrect icon should be displayed in incorrect answer response, and correct/incorrect status message should not be displayed', () => {
85
+ gridFillPage.steps.resetQuestionPreview();
86
+ gridFillPage.steps.selectCellPreviewTab(0, 0);
87
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 0);
88
+ gridFillPage.steps.selectCellPreviewTab(0, 1);
89
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
90
+ gridFillPage.steps.selectCellPreviewTab(0, 2);
91
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 2);
92
+ gridFillPage.steps.selectCellPreviewTab(1, 1);
93
+ gridFillPage.steps.verifyCellSelectedPreviewTab(1, 1);
94
+ gridFillPage.steps.verifyPreviewScore(15, 15);
95
+ gridFillPage.steps.switchToGradingView();
96
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
97
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
98
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
99
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
100
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
101
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
102
+ gridFillPage.steps.verifyIncorrectResponseIcon(1, 1);
103
+ gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(1, 1);
104
+ gridFillPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
105
+ gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
106
+ cy.log('When the user attempts the question partially correct and clicks on \'Check answer\' button, then correct icon should be displayed in the correct answer responses, incorrect icons should be displayed in all incorrect responses and correct/incorrect status message should not be displayed')
107
+ gridFillPage.steps.checkAnswer();
108
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
109
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
110
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
111
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
112
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
113
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
114
+ gridFillPage.steps.verifyIncorrectResponseIcon(1, 1);
115
+ gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(1, 1);
116
+ gridFillPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
117
+ });
118
+
119
+ it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed in all the correct responses, correct/incorrect status message should not be displayed', () => {
120
+ gridFillPage.steps.resetQuestionPreview();
121
+ gridFillPage.steps.selectCellPreviewTab(0, 0);
122
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 0);
123
+ gridFillPage.steps.selectCellPreviewTab(0, 1);
124
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
125
+ gridFillPage.steps.selectCellPreviewTab(0, 2);
126
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 2);
127
+ gridFillPage.steps.verifyPreviewScore(15, 15);
128
+ gridFillPage.steps.switchToGradingView();
129
+ gridFillPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
130
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
131
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
132
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
133
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
134
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
135
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
136
+ gridFillPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
137
+ gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
138
+ 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, correct/incorrect status message should not be displayed')
139
+ gridFillPage.steps.checkAnswer();
140
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
141
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
142
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
143
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
144
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
145
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
146
+ gridFillPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
147
+ });
148
+ });
149
+
150
+ describe('Question preview: Auto scored - Partial equal weights: Minimum scoring', () => {
151
+ abortEarlySetup();
152
+ before(() => {
153
+ gridFillPage.steps.navigateToCreateQuestion('grid fill');
154
+ cy.barsPreLoaderWait();
155
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 0);
156
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 1);
157
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 2);
158
+ gridFillPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
159
+ gridFillPage.steps.allotPoints(20);
160
+ gridFillPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
161
+ });
162
+
163
+ it('When the user selects \'Award minimum score\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with minimum points', () => {
164
+ gridFillPage.steps.expandMinimumScoringDropdown();
165
+ gridFillPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
166
+ gridFillPage.steps.allotMinimumPoints(2);
167
+ gridFillPage.steps.switchToPreviewTab();
168
+ gridFillPage.steps.switchToGradingView();
169
+ gridFillPage.steps.verifyPreviewScore(2, 20);
170
+ gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
171
+ });
172
+
173
+ it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
174
+ gridFillPage.steps.resetQuestionPreview();
175
+ gridFillPage.steps.selectCellPreviewTab(1, 0);
176
+ gridFillPage.steps.verifyCellSelectedPreviewTab(1, 0);
177
+ gridFillPage.steps.verifyPreviewScore(2, 20);
178
+ });
179
+
180
+ it('When the user selects \'Award minimum score only if attempted\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with 0 points', () => {
181
+ gridFillPage.steps.switchToEditTab();
182
+ gridFillPage.steps.expandMinimumScoringDropdown();
183
+ gridFillPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
184
+ gridFillPage.steps.allotMinimumPoints(2);
185
+ gridFillPage.steps.switchToPreviewTab();
186
+ gridFillPage.steps.switchToGradingView();
187
+ gridFillPage.steps.verifyPreviewScore(0, 20);
188
+ gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
189
+ });
190
+
191
+ it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
192
+ gridFillPage.steps.resetQuestionPreview();
193
+ gridFillPage.steps.selectCellPreviewTab(1, 4);
194
+ gridFillPage.steps.verifyCellSelectedPreviewTab(1, 4);
195
+ gridFillPage.steps.verifyPreviewScore(2, 20);
196
+ });
197
+ });
198
+
199
+ describe('Question preview: Auto scored - Partial equal weights: Rounding', () => {
200
+ abortEarlySetup();
201
+ before(() => {
202
+ gridFillPage.steps.navigateToCreateQuestion('grid fill');
203
+ cy.barsPreLoaderWait();
204
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 0);
205
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 1);
206
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 2);
207
+ gridFillPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
208
+ });
209
+
210
+ it('When the user sets \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value greater than 0.5 and less than 0.99, then the points awarded should be rounded down to the nearest integer value', () => {
211
+ gridFillPage.steps.expandRoundingDropdown();
212
+ gridFillPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.99');
213
+ gridFillPage.steps.allotPoints(11);
214
+ gridFillPage.steps.switchToPreviewTab();
215
+ gridFillPage.steps.selectCellPreviewTab(0, 1);
216
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
217
+ gridFillPage.steps.verifyPreviewScore(3, 11);
218
+ });
219
+
220
+ it('When the user has set \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value equal to 0.99, then the points awarded should be rounded down to the nearest integer value', () => {
221
+ cy.log('Points allocation based on the test case requirements.');
222
+ gridFillPage.steps.switchToEditTab();
223
+ gridFillPage.steps.allotPoints(8.97);
224
+ gridFillPage.steps.switchToPreviewTab();
225
+ gridFillPage.steps.selectCellPreviewTab(0, 1);
226
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
227
+ gridFillPage.steps.verifyPreviewScore(2, 8.97);
228
+ });
229
+
230
+ it('When the user sets \'Rounding\' to \'Round down if <=0.50\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value less than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
231
+ gridFillPage.steps.switchToEditTab();
232
+ gridFillPage.steps.expandRoundingDropdown();
233
+ gridFillPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50');
234
+ cy.log('Points allocation based on the test case requirements.');
235
+ gridFillPage.steps.allotPoints(10);
236
+ gridFillPage.steps.switchToPreviewTab();
237
+ gridFillPage.steps.selectCellPreviewTab(0, 1);
238
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
239
+ gridFillPage.steps.verifyPreviewScore(3, 10);
240
+ });
241
+
242
+ it('When the user has set \'Rounding\' to \'Round down if <=0.50\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value equal to 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
243
+ cy.log('Points allocation based on the test case requirements.');
244
+ gridFillPage.steps.switchToEditTab();
245
+ gridFillPage.steps.allotPoints(4.5);
246
+ gridFillPage.steps.switchToPreviewTab();
247
+ gridFillPage.steps.selectCellPreviewTab(0, 1);
248
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
249
+ gridFillPage.steps.verifyPreviewScore(1, 4.5);
250
+ });
251
+
252
+ it('When the user sets \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value less than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
253
+ gridFillPage.steps.switchToEditTab();
254
+ gridFillPage.steps.expandRoundingDropdown();
255
+ gridFillPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50; Round up if > 0.50');
256
+ cy.log('Points allocation based on the test case requirements.');
257
+ gridFillPage.steps.allotPoints(10);
258
+ gridFillPage.steps.switchToPreviewTab();
259
+ gridFillPage.steps.selectCellPreviewTab(0, 1);
260
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
261
+ gridFillPage.steps.verifyPreviewScore(3, 10);
262
+ });
263
+
264
+ it('When the user has set \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value equal to 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
265
+ cy.log('Points allocation based on the test case requirements.');
266
+ gridFillPage.steps.switchToEditTab();
267
+ gridFillPage.steps.allotPoints(4.5);
268
+ gridFillPage.steps.switchToPreviewTab();
269
+ gridFillPage.steps.selectCellPreviewTab(0, 1);
270
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
271
+ gridFillPage.steps.verifyPreviewScore(1, 4.5);
272
+ });
273
+
274
+ it('When the user has set \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value greater than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
275
+ cy.log('Points allocation based on the test case requirements.');
276
+ gridFillPage.steps.switchToEditTab();
277
+ gridFillPage.steps.allotPoints(11);
278
+ gridFillPage.steps.switchToPreviewTab();
279
+ gridFillPage.steps.selectCellPreviewTab(0, 1);
280
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
281
+ gridFillPage.steps.verifyPreviewScore(4, 11);
282
+ });
283
+
284
+ it('When \'Round negative score to zero\' is in checked state and the user attempts the question incorrectly, then the user should be awarded with 0 points', () => {
285
+ cy.log('Pre-step: Setting penalty scoring to \'Penalty points for the entire question\', allotting penalty points')
286
+ gridFillPage.steps.switchToEditTab();
287
+ gridFillPage.steps.expandPenaltyScoringDropdown();
288
+ gridFillPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
289
+ gridFillPage.steps.allotPenaltyPoints(4);
290
+ gridFillPage.steps.switchToPreviewTab();
291
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
292
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
293
+ gridFillPage.steps.verifyPreviewScore(0, 11);
294
+ });
295
+
296
+ it('When the user unchecks \'Round negative score to zero\' checkbox and the user attempts the question incorrectly, then the user should be awarded with negative points', () => {
297
+ gridFillPage.steps.switchToEditTab();
298
+ gridFillPage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
299
+ gridFillPage.steps.switchToPreviewTab();
300
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
301
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
302
+ gridFillPage.steps.verifyPreviewScore(-4, 11);
303
+ });
304
+ });
305
+
306
+ describe('Question preview: Auto scored - Partial equal weights: Penalty scoring with \'Round negative score to zero\' unchecked', () => {
307
+ abortEarlySetup();
308
+ before(() => {
309
+ gridFillPage.steps.navigateToCreateQuestion('grid fill');
310
+ cy.barsPreLoaderWait();
311
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 0);
312
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 1);
313
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 2);
314
+ gridFillPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
315
+ gridFillPage.steps.allotPoints(27);
316
+ gridFillPage.steps.checkAllowStudentToCheckAnswerCheckbox();
317
+ });
318
+
319
+ //Penalty points for the entire question
320
+ it('When the user sets penalty scoring to \'Penalty points for the entire question\', allots penalty points and attempts the question incorrectly, then the user should be awarded with negative points', () => {
321
+ gridFillPage.steps.expandPenaltyScoringDropdown();
322
+ gridFillPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
323
+ gridFillPage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
324
+ gridFillPage.steps.allotPenaltyPoints(2);
325
+ gridFillPage.steps.switchToPreviewTab();
326
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
327
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
328
+ gridFillPage.steps.verifyPreviewScore(-2, 27);
329
+ });
330
+
331
+ it('When the user attempts the question correctly along with an incorrect response, then penalty points should get deducted from the awarded points', () => {
332
+ gridFillPage.steps.resetQuestionPreview();
333
+ gridFillPage.steps.selectCellPreviewTab(0, 1);
334
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
335
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
336
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
337
+ gridFillPage.steps.verifyPreviewScore(7, 27);
338
+ });
339
+
340
+ it('When the user attempts the question correctly along with multiple incorrect responses, then penalty points should get deducted from the awarded points only once, the deducted penalty points should not increase as per number of attempted incorrect responses', () => {
341
+ gridFillPage.steps.resetQuestionPreview();
342
+ gridFillPage.steps.selectCellPreviewTab(0, 1);
343
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
344
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
345
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
346
+ gridFillPage.steps.selectCellPreviewTab(1, 1);
347
+ gridFillPage.steps.verifyCellSelectedPreviewTab(1, 1);
348
+ gridFillPage.steps.verifyPreviewScore(5, 27);
349
+ });
350
+
351
+ it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
352
+ gridFillPage.steps.switchToEditTab();
353
+ gridFillPage.steps.expandMinimumScoringDropdown();
354
+ gridFillPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
355
+ gridFillPage.steps.allotMinimumPoints(3);
356
+ gridFillPage.steps.switchToPreviewTab();
357
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
358
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
359
+ gridFillPage.steps.verifyPreviewScore(3, 27);
360
+ cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
361
+ gridFillPage.steps.switchToEditTab();
362
+ gridFillPage.steps.expandMinimumScoringDropdown();
363
+ gridFillPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
364
+ });
365
+
366
+ //Penalty points for each incorrect cell - Specify total penalty points
367
+ it('When the user sets penalty scoring to \'Penalty points for each incorrect cell\', and \'Specify total penalty points\' radio button in checked state, allots total penalty points and attempts the question incorrectly, then the user should be awarded with negative points of incorrect response', () => {
368
+ gridFillPage.steps.expandPenaltyScoringDropdown();
369
+ gridFillPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for each incorrect cell');
370
+ gridFillPage.steps.allotTotalPenaltyPoints(4);
371
+ gridFillPage.steps.switchToPreviewTab();
372
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
373
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
374
+ gridFillPage.steps.verifyPreviewScore(-2, 27);
375
+ });
376
+
377
+ it('When the user attempts the question correctly along with an incorrect response, then penalty points should get deducted from the awarded points', () => {
378
+ gridFillPage.steps.resetQuestionPreview();
379
+ gridFillPage.steps.selectCellPreviewTab(0, 1);
380
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
381
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
382
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
383
+ gridFillPage.steps.verifyPreviewScore(7, 27);
384
+ });
385
+
386
+ it('When the user attempts the question correctly along with multiple incorrect responses, then penalty points for each incorrect response should get deducted from the awarded points', () => {
387
+ gridFillPage.steps.resetQuestionPreview();
388
+ gridFillPage.steps.selectCellPreviewTab(0, 1);
389
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
390
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
391
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
392
+ gridFillPage.steps.selectCellPreviewTab(1, 1);
393
+ gridFillPage.steps.verifyCellSelectedPreviewTab(1, 1);
394
+ gridFillPage.steps.verifyPreviewScore(5, 27);
395
+ });
396
+
397
+ it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
398
+ gridFillPage.steps.switchToEditTab();
399
+ gridFillPage.steps.expandMinimumScoringDropdown();
400
+ gridFillPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
401
+ gridFillPage.steps.allotMinimumPoints(3);
402
+ gridFillPage.steps.switchToPreviewTab();
403
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
404
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
405
+ gridFillPage.steps.verifyPreviewScore(3, 27);
406
+ cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
407
+ gridFillPage.steps.switchToEditTab();
408
+ gridFillPage.steps.expandMinimumScoringDropdown();
409
+ gridFillPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
410
+ });
411
+
412
+ //Penalty points for each incorrect cell - Specify points for each incorrect cell
413
+ it('When the user has set penalty scoring to \'Penalty points for each incorrect cell\', and \'Specify total penalty points\' radio button in checked state, allots total penalty points and attempts the question incorrectly, then the user should be awarded with negative points for the incorrect response', () => {
414
+ gridFillPage.steps.selectPenaltyPointsForEachIncorrectCell();
415
+ gridFillPage.steps.allotPenaltyPointsForEachIncorrectCell(4);
416
+ gridFillPage.steps.switchToPreviewTab();
417
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
418
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
419
+ gridFillPage.steps.verifyPreviewScore(-2, 27);
420
+ });
421
+
422
+ it('When the user attempts the question correctly along with an incorrect response, then penalty points should get deducted from the awarded points', () => {
423
+ gridFillPage.steps.resetQuestionPreview();
424
+ gridFillPage.steps.selectCellPreviewTab(0, 0);
425
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 0);
426
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
427
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
428
+ gridFillPage.steps.verifyPreviewScore(7, 27);
429
+ });
430
+
431
+ it('When the user attempts the question correctly along with multiple incorrect responses, then penalty points for each incorrect cell should get deducted from the awarded points', () => {
432
+ gridFillPage.steps.resetQuestionPreview();
433
+ gridFillPage.steps.selectCellPreviewTab(0, 0);
434
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 0);
435
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
436
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
437
+ gridFillPage.steps.selectCellPreviewTab(1, 1);
438
+ gridFillPage.steps.verifyCellSelectedPreviewTab(1, 1);
439
+ gridFillPage.steps.verifyPreviewScore(5, 27);
440
+ });
441
+
442
+ it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
443
+ gridFillPage.steps.switchToEditTab();
444
+ gridFillPage.steps.expandMinimumScoringDropdown();
445
+ gridFillPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
446
+ gridFillPage.steps.allotMinimumPoints(3);
447
+ gridFillPage.steps.switchToPreviewTab();
448
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
449
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
450
+ gridFillPage.steps.verifyPreviewScore(3, 27);
451
+ cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
452
+ gridFillPage.steps.switchToEditTab();
453
+ gridFillPage.steps.expandMinimumScoringDropdown();
454
+ gridFillPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
455
+ });
456
+
457
+ // Penalty points for each incorrect cell - Automatically set penalty for each incorrect cell to total points / no. of incorrect cell
458
+ it('When the user has set penalty scoring to \'Penalty points for each incorrect cell\', and checks \'Automatically set penalty for each incorrect cell to total points / no. of incorrect cell\' checkbox and attempts the question incorrectly, then the user should be awarded with negative points for the incorrect response', () => {
459
+ gridFillPage.steps.checkAutomaticallySetPenaltyPointsCheckbox();
460
+ gridFillPage.steps.switchToPreviewTab();
461
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
462
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
463
+ gridFillPage.steps.verifyPreviewScore(-2, 27);
464
+ });
465
+
466
+ it('When the user attempts the question correctly along with an incorrect response, then penalty points should get deducted from the awarded points', () => {
467
+ gridFillPage.steps.resetQuestionPreview();
468
+ gridFillPage.steps.selectCellPreviewTab(0, 0);
469
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 0);
470
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
471
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
472
+ gridFillPage.steps.verifyPreviewScore(7, 27);
473
+ });
474
+
475
+ it('When the user attempts the question correctly along with multiple incorrect responses, then penalty points for each incorrect cell should get deducted from the awarded points', () => {
476
+ gridFillPage.steps.resetQuestionPreview();
477
+ gridFillPage.steps.selectCellPreviewTab(0, 0);
478
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 0);
479
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
480
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
481
+ gridFillPage.steps.selectCellPreviewTab(1, 4);
482
+ gridFillPage.steps.verifyCellSelectedPreviewTab(1, 4);
483
+ gridFillPage.steps.verifyPreviewScore(5, 27);
484
+ });
485
+
486
+ it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
487
+ gridFillPage.steps.switchToEditTab();
488
+ gridFillPage.steps.expandMinimumScoringDropdown();
489
+ gridFillPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
490
+ gridFillPage.steps.allotMinimumPoints(3);
491
+ gridFillPage.steps.switchToPreviewTab();
492
+ gridFillPage.steps.selectCellPreviewTab(1, 4);
493
+ gridFillPage.steps.verifyCellSelectedPreviewTab(1, 4);
494
+ gridFillPage.steps.verifyPreviewScore(3, 27);
495
+ });
496
+ });
497
+ });