itemengine-cypress-automation 1.0.150-migrationScripts-5e451b6.0 → 1.0.150

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +4 -4
  2. package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +3 -3
  3. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
  4. package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +2 -1
  5. package/cypress/e2e/ILC/ContentBlocks/additionalSection.js +2 -2
  6. package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +6 -6
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
  8. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +1 -1
  9. package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +3 -3
  10. package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +2 -2
  11. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +1 -1
  12. package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabBasicSection.js +1 -1
  13. package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +1 -1
  14. package/cypress/e2e/ILC/GridFill/additionalSettings.js +52 -0
  15. package/cypress/e2e/ILC/GridFill/headerSection.js +74 -0
  16. package/cypress/e2e/ILC/GridFill/minimumScoringPenaltyPointsAndRoundingDropdown.js +199 -0
  17. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -15
  18. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +3 -18
  19. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +4 -25
  20. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingPenaltyScoring.js +4 -7
  21. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +1 -14
  22. package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +1 -1
  23. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +4 -4
  24. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +256 -0
  25. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +213 -0
  26. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +258 -0
  27. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +206 -0
  28. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +198 -0
  29. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +4 -6
  30. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +10 -22
  31. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +421 -0
  32. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +247 -0
  33. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +219 -0
  34. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +247 -0
  35. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsBasic.js +168 -0
  36. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +227 -0
  37. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +199 -0
  38. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +227 -0
  39. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +345 -0
  40. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +340 -0
  41. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +421 -0
  42. package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabScoringSection.js +292 -0
  43. package/cypress/e2e/ILC/MultipleSelectionGridNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  44. package/cypress/e2e/ILC/MultipleSelectionGridNew/previewContentsForAllViews.smoke.js +10 -2
  45. package/cypress/e2e/ILC/MultipleSelectionGridNew/specifyCorrectAnswerSection.js +86 -0
  46. package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +189 -0
  47. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingPenaltyScoring.js +55 -0
  48. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsBasic.js +116 -0
  49. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +309 -0
  50. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +163 -0
  51. package/cypress/e2e/ILC/SingleSelectionGridNew/editTabScoringSection.js +292 -0
  52. package/cypress/e2e/ILC/SingleSelectionGridNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  53. package/cypress/e2e/ILC/SingleSelectionGridNew/previewContentsForAllViews.smoke.js +10 -2
  54. package/cypress/e2e/ILC/SingleSelectionGridNew/specifyCorrectAnswerSection.js +86 -0
  55. package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +189 -0
  56. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +1 -1
  57. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +1 -1
  58. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +1 -1
  59. package/cypress/fixtures/uploads/sampleVirus.zip +0 -0
  60. package/cypress/pages/audioResponsePage.js +2 -2
  61. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  62. package/cypress/pages/components/commonComponents.js +2 -1
  63. package/cypress/pages/components/customizeSpecialCharacterComponent.js +5 -5
  64. package/cypress/pages/components/desmosToolComponent.js +1 -1
  65. package/cypress/pages/components/gridQuestionCommonComponent.js +388 -35
  66. package/cypress/pages/components/maximumRecorderLengthComponent.js +4 -4
  67. package/cypress/pages/components/playbackControlsBaseComponent.js +8 -2
  68. package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
  69. package/cypress/pages/contentBlocksPage.js +1 -1
  70. package/cypress/pages/drawingResponsePage.js +9 -10
  71. package/cypress/pages/geoGebraActivityPage.js +2 -1
  72. package/cypress/pages/geoGebraToolsPage.js +1 -1
  73. package/cypress/pages/gridFillPage.js +108 -13
  74. package/cypress/pages/matchingPage.js +154 -2
  75. package/cypress/pages/multipleSelectionGridPage.js +10 -2
  76. package/cypress/pages/rulerPage.js +2 -5
  77. package/cypress/pages/singleSelectionGridPage.js +18 -2
  78. package/package.json +2 -2
@@ -0,0 +1,309 @@
1
+ import { singleSelectionGridPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ describe('Create item page - Single selection grid: Partial different weights', () => {
5
+ before(() => {
6
+ cy.loginAs('admin');
7
+ });
8
+
9
+ describe('Question preview: Auto scored - Partial different weights: Minimum scoring', () => {
10
+ abortEarlySetup();
11
+ before(() => {
12
+ singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
13
+ cy.barsPreLoaderWait();
14
+ singleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not')
15
+ singleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
16
+ singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
17
+ singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
18
+ singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
19
+ singleSelectionGridPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
20
+ singleSelectionGridPage.steps.allotPartialDifferentWeightsPoints({ 0: 9, 1: 6, 2: 3, 3: 1 });
21
+ singleSelectionGridPage.steps.checkAllowStudentToCheckAnswerCheckbox();
22
+ });
23
+
24
+ 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', () => {
25
+ singleSelectionGridPage.steps.expandMinimumScoringDropdown();
26
+ singleSelectionGridPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
27
+ singleSelectionGridPage.steps.allotMinimumPoints(2);
28
+ singleSelectionGridPage.steps.switchToPreviewTab();
29
+ singleSelectionGridPage.steps.switchToGradingView();
30
+ singleSelectionGridPage.steps.verifyPreviewScore(2, 19);
31
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
32
+ });
33
+
34
+ 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', () => {
35
+ singleSelectionGridPage.steps.resetQuestionPreview();
36
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }]);
37
+ singleSelectionGridPage.steps.verifyPreviewScore(2, 19);
38
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
39
+ });
40
+
41
+ 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', () => {
42
+ singleSelectionGridPage.steps.switchToEditTab();
43
+ singleSelectionGridPage.steps.expandMinimumScoringDropdown();
44
+ singleSelectionGridPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
45
+ singleSelectionGridPage.steps.allotMinimumPoints(2);
46
+ singleSelectionGridPage.steps.switchToPreviewTab();
47
+ singleSelectionGridPage.steps.switchToGradingView();
48
+ singleSelectionGridPage.steps.verifyPreviewScore(0, 19);
49
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
50
+ });
51
+
52
+ it('When the user has selected \'Award minimum score only if attempted\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
53
+ singleSelectionGridPage.steps.resetQuestionPreview();
54
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }]);
55
+ singleSelectionGridPage.steps.verifyPreviewScore(2, 19);
56
+ });
57
+
58
+ it('When the user attempts the question partially correct such that points of the correctly attempted option are greater than minimum points, then the user should be awarded with points as per the correctly attempted response', () => {
59
+ singleSelectionGridPage.steps.resetQuestionPreview();
60
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }]);
61
+ singleSelectionGridPage.steps.verifyPreviewScore(9, 19);
62
+ });
63
+
64
+ it('When the user attempts the question partially correct such that minimum points are greater than points of the correctly attempted option, then the user should be awarded with minimum points', () => {
65
+ singleSelectionGridPage.steps.resetQuestionPreview();
66
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 4, column: 1 }]);
67
+ singleSelectionGridPage.steps.verifyPreviewScore(2, 19);
68
+ });
69
+ });
70
+
71
+ describe('Question preview: Auto scored - Partial different weights: Rounding', () => {
72
+ abortEarlySetup();
73
+ before(() => {
74
+
75
+ singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
76
+ cy.barsPreLoaderWait();
77
+ singleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not')
78
+ singleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
79
+ singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
80
+ singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
81
+ singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
82
+ singleSelectionGridPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
83
+ singleSelectionGridPage.steps.allotPartialDifferentWeightsPoints({ 0: 2.67, 1: 1.99, 2: 1.34, 3: 4.5 });
84
+ });
85
+
86
+ it('When the user sets \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an option such that points of the correctly attempted options 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', () => {
87
+ singleSelectionGridPage.steps.expandRoundingDropdown();
88
+ singleSelectionGridPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.99');
89
+ singleSelectionGridPage.steps.switchToPreviewTab();
90
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }]);
91
+ singleSelectionGridPage.steps.verifyPreviewScore(2, 10.5);
92
+ });
93
+
94
+ it('When the user has set \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value equal to 0.99, then the points awarded should be rounded down to the nearest integer value', () => {
95
+ singleSelectionGridPage.steps.resetQuestionPreview();
96
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 2, column: 1 }]);
97
+ singleSelectionGridPage.steps.verifyPreviewScore(1, 10.5);
98
+ });
99
+
100
+ it('When the user sets \'Rounding\' to \'Round down if <=0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value less than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
101
+ singleSelectionGridPage.steps.switchToEditTab();
102
+ singleSelectionGridPage.steps.expandRoundingDropdown();
103
+ singleSelectionGridPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50');
104
+ singleSelectionGridPage.steps.switchToPreviewTab();
105
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 3, column: 0 }]);
106
+ singleSelectionGridPage.steps.verifyPreviewScore(1, 10.5);
107
+ });
108
+
109
+ it('When the user has set \'Rounding\' to \'Round down if <=0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value equal to 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
110
+ singleSelectionGridPage.steps.resetQuestionPreview();
111
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 4, column: 1 }]);
112
+ singleSelectionGridPage.steps.verifyPreviewScore(4, 10.5);
113
+ });
114
+
115
+ it('When the user sets \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value less than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
116
+ singleSelectionGridPage.steps.switchToEditTab();
117
+ singleSelectionGridPage.steps.expandRoundingDropdown();
118
+ singleSelectionGridPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50; Round up if > 0.50');
119
+ singleSelectionGridPage.steps.switchToPreviewTab();
120
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 3, column: 0 }]);
121
+ singleSelectionGridPage.steps.verifyPreviewScore(1, 10.5);
122
+ });
123
+
124
+ 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 option such that points of the correctly attempted options has decimal value equal to 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
125
+ singleSelectionGridPage.steps.resetQuestionPreview();
126
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 4, column: 1 }]);
127
+ singleSelectionGridPage.steps.verifyPreviewScore(4, 10.5);
128
+ });
129
+
130
+ 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 option such that points of the correctly attempted options has decimal value greater than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
131
+ singleSelectionGridPage.steps.resetQuestionPreview();
132
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }]);
133
+ singleSelectionGridPage.steps.verifyPreviewScore(3, 10.5);
134
+ });
135
+
136
+ 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', () => {
137
+ cy.log('Pre-step: Setting penalty scoring to \'Penalty points for the entire question\', allotting penalty points')
138
+ singleSelectionGridPage.steps.switchToEditTab();
139
+ singleSelectionGridPage.steps.expandPenaltyScoringDropdown();
140
+ singleSelectionGridPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
141
+ singleSelectionGridPage.steps.allotPenaltyPoints(4);
142
+ singleSelectionGridPage.steps.switchToPreviewTab();
143
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }]);
144
+ singleSelectionGridPage.steps.verifyPreviewScore(0, 10.5);
145
+ });
146
+
147
+ 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', () => {
148
+ singleSelectionGridPage.steps.switchToEditTab();
149
+ singleSelectionGridPage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
150
+ singleSelectionGridPage.steps.switchToPreviewTab();
151
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }]);
152
+ singleSelectionGridPage.steps.verifyPreviewScore(-4, 10.5);
153
+ });
154
+ });
155
+
156
+ describe('Question preview: Auto scored - Partial different weights: Penalty scoring with \'Round negative score to zero\' unchecked', () => {
157
+ abortEarlySetup();
158
+ before(() => {
159
+ singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
160
+ cy.barsPreLoaderWait();
161
+ singleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not')
162
+ singleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
163
+ singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
164
+ singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
165
+ singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
166
+ singleSelectionGridPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
167
+ singleSelectionGridPage.steps.allotPartialDifferentWeightsPoints({ 0: 9, 1: 6, 2: 5, 3: 4 });
168
+ singleSelectionGridPage.steps.checkAllowStudentToCheckAnswerCheckbox();
169
+ });
170
+
171
+ //Penalty points for the entire question
172
+ it('When the user sets penalty scoring to \'Penalty points for the entire question\', allots penalty points and attempts the question completely incorrect, then the user should be awarded with negative points', () => {
173
+ singleSelectionGridPage.steps.expandPenaltyScoringDropdown();
174
+ singleSelectionGridPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
175
+ singleSelectionGridPage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
176
+ singleSelectionGridPage.steps.allotPenaltyPoints(4);
177
+ singleSelectionGridPage.steps.switchToPreviewTab();
178
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 0 }]);
179
+ singleSelectionGridPage.steps.verifyPreviewScore(-4, 24);
180
+ });
181
+
182
+ it('When the user attempts the question correctly with an incorrect row, then penalty points should get deducted from the awarded points', () => {
183
+ singleSelectionGridPage.steps.resetQuestionPreview();
184
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 0 }]);
185
+ singleSelectionGridPage.steps.verifyPreviewScore(16, 24);
186
+ });
187
+
188
+ it('When the user attempts the question correctly with multiple incorrect rows, 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 rows', () => {
189
+ singleSelectionGridPage.steps.resetQuestionPreview();
190
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 0 }, { row: 3, column: 0 }, { row: 4, column: 0 }]);
191
+ singleSelectionGridPage.steps.verifyPreviewScore(10, 24);
192
+ });
193
+
194
+ 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', () => {
195
+ singleSelectionGridPage.steps.switchToEditTab();
196
+ singleSelectionGridPage.steps.expandMinimumScoringDropdown();
197
+ singleSelectionGridPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
198
+ singleSelectionGridPage.steps.allotMinimumPoints(3);
199
+ singleSelectionGridPage.steps.switchToPreviewTab();
200
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }]);
201
+ singleSelectionGridPage.steps.verifyPreviewScore(3, 24);
202
+ cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
203
+ singleSelectionGridPage.steps.switchToEditTab();
204
+ singleSelectionGridPage.steps.expandMinimumScoringDropdown();
205
+ singleSelectionGridPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
206
+ });
207
+
208
+ //Penalty points for each incorrect row - Specify total penalty points
209
+ it('When the user sets penalty scoring to \'Penalty points for each incorrect row\', and \'Specify total penalty points\' radio button in checked state, allots total penalty points and attempts the question completely incorrect, then the user should be awarded with negative points of all the empty and incorrect row', () => {
210
+ singleSelectionGridPage.steps.expandPenaltyScoringDropdown();
211
+ singleSelectionGridPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for each incorrect row');
212
+ singleSelectionGridPage.steps.allotTotalPenaltyPoints(4);
213
+ singleSelectionGridPage.steps.switchToPreviewTab();
214
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 0 }]);
215
+ singleSelectionGridPage.steps.verifyPreviewScore(-4, 24);
216
+ });
217
+
218
+ it('When the user attempts the question correctly but with an incorrect row, then penalty points should get deducted from the awarded points', () => {
219
+ singleSelectionGridPage.steps.resetQuestionPreview();
220
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 0 }]);
221
+ singleSelectionGridPage.steps.verifyPreviewScore(19, 24);
222
+ });
223
+
224
+ it('When the user attempts the question correctly but with multiple incorrect rows, then penalty points for each incorrect row should get deducted from the awarded points', () => {
225
+ singleSelectionGridPage.steps.resetQuestionPreview();
226
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 0 }, { row: 3, column: 0 }, { row: 4, column: 0 }]);
227
+ singleSelectionGridPage.steps.verifyPreviewScore(12, 24);
228
+ });
229
+
230
+ 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', () => {
231
+ singleSelectionGridPage.steps.switchToEditTab();
232
+ singleSelectionGridPage.steps.expandMinimumScoringDropdown();
233
+ singleSelectionGridPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
234
+ singleSelectionGridPage.steps.allotMinimumPoints(3);
235
+ singleSelectionGridPage.steps.switchToPreviewTab();
236
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }]);
237
+ singleSelectionGridPage.steps.verifyPreviewScore(3, 24);
238
+ cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
239
+ singleSelectionGridPage.steps.switchToEditTab();
240
+ singleSelectionGridPage.steps.expandMinimumScoringDropdown();
241
+ singleSelectionGridPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
242
+ });
243
+
244
+ //Penalty points for each incorrect row - Specify points for each incorrect row
245
+ it('When the user has set penalty scoring to \'Penalty points for each incorrect row\', and \'Specify total penalty points\' radio button in checked state, allots total penalty points and attempts the question completely incorrect, then the user should be awarded with negative points for the incorrect row', () => {
246
+ singleSelectionGridPage.steps.selectPenaltyPointsForEachIncorrectOptionType('specify points for each incorrect option');
247
+ singleSelectionGridPage.steps.allotPenaltyPointsForEachIncorrectRow(4);
248
+ singleSelectionGridPage.steps.switchToPreviewTab();
249
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 0 }]);
250
+ singleSelectionGridPage.steps.verifyPreviewScore(-16, 24);
251
+ });
252
+
253
+ it('When the user attempts the question correctly but with an incorrect row, then penalty points should get deducted from the awarded points', () => {
254
+ singleSelectionGridPage.steps.resetQuestionPreview();
255
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 0 }]);
256
+ singleSelectionGridPage.steps.verifyPreviewScore(16, 24);
257
+ });
258
+
259
+ it('When the user attempts the question correctly along with multiple incorrect rows, then Penalty points for each incorrect row should get deducted from the awarded points', () => {
260
+ singleSelectionGridPage.steps.resetQuestionPreview();
261
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 0 }, { row: 3, column: 0 }, { row: 4, column: 0 }]);
262
+ singleSelectionGridPage.steps.verifyPreviewScore(6, 24);
263
+ });
264
+
265
+ 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', () => {
266
+ singleSelectionGridPage.steps.switchToEditTab();
267
+ singleSelectionGridPage.steps.expandMinimumScoringDropdown();
268
+ singleSelectionGridPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
269
+ singleSelectionGridPage.steps.allotMinimumPoints(3);
270
+ singleSelectionGridPage.steps.switchToPreviewTab();
271
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }]);
272
+ singleSelectionGridPage.steps.verifyPreviewScore(3, 24);
273
+ cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
274
+ singleSelectionGridPage.steps.switchToEditTab();
275
+ singleSelectionGridPage.steps.expandMinimumScoringDropdown();
276
+ singleSelectionGridPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
277
+ });
278
+
279
+ // Penalty points for each incorrect row - Automatically set penalty for each incorrect row to total points / no. of incorrect row
280
+ it('When the user has set penalty scoring to \'Penalty points for each incorrect row\', and checks \'Automatically set penalty for each incorrect row to total points / no. of incorrect row\' checkbox and attempts the question completely incorrect, then the user should be awarded with negative points for the incorrect rows ', () => {
281
+ singleSelectionGridPage.steps.checkAutomaticallySetPenaltyPointsCheckbox();
282
+ singleSelectionGridPage.steps.switchToPreviewTab();
283
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 0 }]);
284
+ singleSelectionGridPage.steps.verifyPreviewScore(-24, 24);
285
+ });
286
+
287
+ it('When the user attempts the question correctly but with an incorrect row, then penalty points should get deducted from the awarded points', () => {
288
+ singleSelectionGridPage.steps.resetQuestionPreview();
289
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 0 }]);
290
+ singleSelectionGridPage.steps.verifyPreviewScore(14, 24);
291
+ });
292
+
293
+ it('When the user attempts the question correctly along with multiple incorrect rows, then penalty points for each incorrect option should get deducted from the awarded points', () => {
294
+ singleSelectionGridPage.steps.resetQuestionPreview();
295
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 0 }, { row: 3, column: 0 }, { row: 4, column: 0 }]);
296
+ singleSelectionGridPage.steps.verifyPreviewScore(2, 24);
297
+ });
298
+
299
+ 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', () => {
300
+ singleSelectionGridPage.steps.switchToEditTab();
301
+ singleSelectionGridPage.steps.expandMinimumScoringDropdown();
302
+ singleSelectionGridPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
303
+ singleSelectionGridPage.steps.allotMinimumPoints(3);
304
+ singleSelectionGridPage.steps.switchToPreviewTab();
305
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }]);
306
+ singleSelectionGridPage.steps.verifyPreviewScore(3, 24);
307
+ });
308
+ });
309
+ });
@@ -0,0 +1,163 @@
1
+ import { singleSelectionGridPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ describe('Create item page - Single selection grid: Partial equal weights', () => {
5
+ before(() => {
6
+ cy.loginAs('admin');
7
+ });
8
+
9
+ describe('Auto scored - Partial equal weights', () => {
10
+ abortEarlySetup();
11
+ before(() => {
12
+ singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
13
+ cy.barsPreLoaderWait();
14
+ singleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not')
15
+ singleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
16
+ singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
17
+ singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
18
+ singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
19
+ singleSelectionGridPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
20
+ singleSelectionGridPage.steps.allotPoints(15);
21
+ singleSelectionGridPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
22
+ singleSelectionGridPage.steps.switchToPreviewTab();
23
+ });
24
+
25
+ it('When the user selects \'Grading\' view without attempting the question, correct answers section should be displayed with a preview of the entire grid with correct answers', () => {
26
+ singleSelectionGridPage.steps.verifyPreviewScore(0, 15);
27
+ singleSelectionGridPage.steps.switchToGradingView();
28
+ singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
29
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
30
+ });
31
+
32
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, correct/incorrect status message should not be displayed and correct answer section with a preview of the entire grid with correct answers should be displayed', () => {
33
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }]);
34
+ singleSelectionGridPage.steps.verifyPreviewScore(0, 15);
35
+ singleSelectionGridPage.steps.switchToGradingView();
36
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
37
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
38
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
39
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
40
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
41
+ cy.log('When the user attempts the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, correct/incorrect status message and correct answer section should not be displayed')
42
+ singleSelectionGridPage.steps.checkAnswer();
43
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
44
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
45
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
46
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
47
+ });
48
+
49
+ it('When the user attempts the question partially correct with incorrect responses, then the user should be awarded points of the correctly attempted responses and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, correct/incorrect status message should not be displayed and correct answer section with a preview of the entire grid with correct answers should be displayed', () => {
50
+ singleSelectionGridPage.steps.resetQuestionPreview();
51
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 1 }, { row: 4, column: 0 }]);
52
+ singleSelectionGridPage.steps.verifyPreviewScore(7.5, 15);
53
+ singleSelectionGridPage.steps.switchToGradingView();
54
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
55
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
56
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
57
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
58
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
59
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
60
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
61
+ cy.log('When the user attempts the question partially correct with incorrect responses and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, correct/incorrect status message and correct answer section should not be displayed')
62
+ singleSelectionGridPage.steps.checkAnswer();
63
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
64
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
65
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
66
+ singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
67
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
68
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
69
+ });
70
+
71
+ it('When the user attempts the question partially correct with incomplete responses, then the user should be awarded points of the correctly attempted responses and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, correct/incorrect status message should not be displayed and correct answer section with a preview of the entire grid with correct answers should be displayed', () => {
72
+ singleSelectionGridPage.steps.resetQuestionPreview();
73
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }]);
74
+ singleSelectionGridPage.steps.verifyPreviewScore(5, 15);
75
+ singleSelectionGridPage.steps.switchToGradingView();
76
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
77
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
78
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
79
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
80
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
81
+ singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
82
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
83
+ cy.log('When the user attempts the question partially correct with incomplete responses and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, correct/incorrect status message and correct answer section should not be displayed')
84
+ singleSelectionGridPage.steps.checkAnswer();
85
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
86
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
87
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
88
+ singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
89
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
90
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
91
+ });
92
+
93
+ 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 beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed', () => {
94
+ singleSelectionGridPage.steps.resetQuestionPreview();
95
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
96
+ singleSelectionGridPage.steps.verifyPreviewScore(15, 15);
97
+ singleSelectionGridPage.steps.switchToGradingView();
98
+ singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
99
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
100
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
101
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
102
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
103
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
104
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
105
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
106
+ cy.log('When user clicks on Check answer button after he attempts the question correctly, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
107
+ singleSelectionGridPage.steps.checkAnswer();
108
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
109
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
110
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
111
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
112
+ singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
113
+ singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
114
+ });
115
+ });
116
+
117
+ describe('Question preview: Auto scored - Partial equal weights: Minimum scoring', () => {
118
+ abortEarlySetup();
119
+ before(() => {
120
+ singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
121
+ cy.barsPreLoaderWait();
122
+ singleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not')
123
+ singleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
124
+ singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
125
+ singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
126
+ singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]); singleSelectionGridPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
127
+ singleSelectionGridPage.steps.allotPoints(15);
128
+ });
129
+
130
+ 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', () => {
131
+ singleSelectionGridPage.steps.expandMinimumScoringDropdown();
132
+ singleSelectionGridPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
133
+ singleSelectionGridPage.steps.allotMinimumPoints(2);
134
+ singleSelectionGridPage.steps.switchToPreviewTab();
135
+ singleSelectionGridPage.steps.switchToGradingView();
136
+ singleSelectionGridPage.steps.verifyPreviewScore(2, 15);
137
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
138
+ });
139
+
140
+ 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', () => {
141
+ singleSelectionGridPage.steps.resetQuestionPreview();
142
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }]);
143
+ singleSelectionGridPage.steps.verifyPreviewScore(2, 15);
144
+ });
145
+
146
+ 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', () => {
147
+ singleSelectionGridPage.steps.switchToEditTab();
148
+ singleSelectionGridPage.steps.expandMinimumScoringDropdown();
149
+ singleSelectionGridPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
150
+ singleSelectionGridPage.steps.allotMinimumPoints(2);
151
+ singleSelectionGridPage.steps.switchToPreviewTab();
152
+ singleSelectionGridPage.steps.switchToGradingView();
153
+ singleSelectionGridPage.steps.verifyPreviewScore(0, 15);
154
+ singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
155
+ });
156
+
157
+ 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', () => {
158
+ singleSelectionGridPage.steps.resetQuestionPreview();
159
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }]);
160
+ singleSelectionGridPage.steps.verifyPreviewScore(2, 15);
161
+ });
162
+ });
163
+ });