itemengine-cypress-automation 1.0.576 → 1.0.578-IEI-7079-de6e553.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +205 -0
  2. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +205 -0
  3. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +205 -0
  4. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +248 -1
  5. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +247 -0
  6. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +223 -0
  7. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +223 -0
  8. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +175 -0
  9. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +223 -0
  10. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePointsLocked.js +191 -0
  11. package/cypress/e2e/ILC/ChartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePointsLocked.js +184 -24
  12. package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +177 -0
  13. package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +206 -0
  14. package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +205 -0
  15. package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +228 -0
  16. package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +229 -1
  17. package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +229 -1
  18. package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +206 -0
  19. package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +183 -0
  20. package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +206 -0
  21. package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePointsLocked.js +184 -0
  22. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +164 -10
  23. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +165 -11
  24. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +165 -11
  25. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +164 -14
  26. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +121 -10
  27. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +167 -16
  28. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +178 -15
  29. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +121 -10
  30. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +165 -13
  31. package/cypress/pages/chartsBarPage.js +44 -1
  32. package/cypress/pages/chartsDotPlotPage.js +99 -1
  33. package/cypress/pages/chartsLinePage.js +48 -1
  34. package/package.json +1 -1
@@ -2,6 +2,8 @@ import { chartsDotPlotPage } from "../../../../pages";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
3
  const css = Cypress.env('css');
4
4
 
5
+ const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
6
+
5
7
  describe('Create item page - Charts - Dot plot: Partial different weights', () => {
6
8
  before(() => {
7
9
  cy.loginAs('admin');
@@ -23,14 +25,14 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
23
25
  chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(1, { point: 1, min: 1, interval: 1, defaultDots: 0 });
24
26
  chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });
25
27
  chartsDotPlotPage.steps.allotPoints(23);
26
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 1, min: 1, interval: 1, defaultDots: 0 });
27
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });
28
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
29
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
28
30
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
29
31
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
30
32
  chartsDotPlotPage.steps.clickOnAddAlternativeAnswerButton(1);
31
33
  chartsDotPlotPage.steps.allotPoints(30);
32
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 1, min: 1, interval: 1, defaultDots: 0 });
33
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 2, min: 1, interval: 1, defaultDots: 0 });
34
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
35
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
34
36
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
35
37
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
36
38
  chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
@@ -57,6 +59,24 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
57
59
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
58
60
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
59
61
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
62
+ //alternative answer
63
+ if (alternativeAnswerCheck === 'true') {
64
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response - 5 pts)');
65
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
66
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
67
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
68
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
69
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
70
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
71
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response - 3.83 pts)');
72
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
73
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
74
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
75
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
76
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
77
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
78
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
79
+ }
60
80
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
61
81
  /*cy.log('When the user clicks on \'Check answer\' button without attempting the question, locked bar should not have icon, correct icon should be displayed in dot column set correctly by default, incorrect icon should be displayed in dot column set to incorrectly by default and correct/incorrect status message and correct answer section should not be displayed')
62
82
  chartsDotPlotPage.steps.checkAnswer();
@@ -72,6 +92,8 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
72
92
 
73
93
  it('When the user attempts the question with responses from the correct accordion, then the user should be awarded points of the correct accordion (less than full points) and on switching to \'Grading\' view, correct icon should be displayed in dot column attempted correctly, status message and correct answer section should not be displayed', () => {
74
94
  chartsDotPlotPage.steps.resetQuestionPreview();
95
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
96
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
75
97
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
76
98
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
77
99
  chartsDotPlotPage.steps.verifyPreviewScore(23, 30);
@@ -84,6 +106,9 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
84
106
  chartsDotPlotPage.steps.verifyEmptyDotColumnPreviewTab({ point: 6, min: 1, interval: 1 });
85
107
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
86
108
  chartsDotPlotPage.steps.verifyCorrectAnswerSectionNotExists();
109
+ if (alternativeAnswerCheck === 'true') {
110
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleNotExists();
111
+ }
87
112
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
88
113
  /*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 dot column attempted correctly, status message and correct answer section should not be displayed')
89
114
  chartsDotPlotPage.steps.checkAnswer();
@@ -99,7 +124,8 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
99
124
 
100
125
  it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with full points and on switching to \'Grading\' view, correct icon should be displayed in dot column attempted correctly, status message and correct answer section should not be displayed', () => {
101
126
  chartsDotPlotPage.steps.resetQuestionPreview();
102
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
127
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
128
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
103
129
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
104
130
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
105
131
  chartsDotPlotPage.steps.verifyPreviewScore(30, 30);
@@ -112,6 +138,9 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
112
138
  chartsDotPlotPage.steps.verifyEmptyDotColumnPreviewTab({ point: 6, min: 1, interval: 1 });
113
139
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
114
140
  chartsDotPlotPage.steps.verifyCorrectAnswerSectionNotExists();
141
+ if (alternativeAnswerCheck === 'true') {
142
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleNotExists();
143
+ }
115
144
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
116
145
  /*cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed in dot column attempted correctly, status message and correct answer section should not be displayed')
117
146
  chartsDotPlotPage.steps.checkAnswer();
@@ -127,7 +156,8 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
127
156
 
128
157
  it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded with points of the correctly attempted responses according to the correct accordion and on switching to \'Grading\' view, correct icon should be displayed in dot column attempted correctly, incorrect icon should be displayed in dot column set to incorrectly, status message should not be displayed and correct answer section with all correct answers from the alternate accordion should be displayed', () => {
129
158
  chartsDotPlotPage.steps.resetQuestionPreview();
130
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1 });
159
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
160
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
131
161
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
132
162
  chartsDotPlotPage.steps.verifyPreviewScore(19.1667, 30);
133
163
  chartsDotPlotPage.steps.switchToGradingView();
@@ -146,6 +176,24 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
146
176
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
147
177
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
148
178
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
179
+ //alternative answer
180
+ if (alternativeAnswerCheck === 'true') {
181
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response - 5 pts)');
182
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
183
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
184
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
185
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
186
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
187
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
188
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response - 3.83 pts)');
189
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
190
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
191
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
192
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
193
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
194
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
195
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
196
+ }
149
197
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
150
198
  /*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 dot column attempted correctly, incorrect icon should be displayed in dot column set to incorrectly, status message and correct answer section should not be displayed')
151
199
  chartsDotPlotPage.steps.checkAnswer();
@@ -161,7 +209,8 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
161
209
 
162
210
  it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded with points of the correctly attempted responses from the alternative accordion and on switching to \'Grading\' view, correct icons should be displayed in the correctly attempted dot column, incorrect icons should be displayed in the unattempted dot column, status message should not be displayed and correct answer section with all correct answers from the alternate accordion should be displayed', () => {
163
211
  chartsDotPlotPage.steps.resetQuestionPreview();
164
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
212
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
213
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
165
214
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
166
215
  chartsDotPlotPage.steps.verifyPreviewScore(25, 30);
167
216
  chartsDotPlotPage.steps.switchToGradingView();
@@ -180,6 +229,24 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
180
229
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
181
230
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
182
231
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
232
+ //alternative answer
233
+ if (alternativeAnswerCheck === 'true') {
234
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response - 5 pts)');
235
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
236
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
237
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
238
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
239
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
240
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
241
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response - 3.83 pts)');
242
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
243
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
244
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
245
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
246
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
247
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
248
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
249
+ }
183
250
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
184
251
  /*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 dot column attempted correctly, incorrect icon should be displayed in dot column set to incorrectly, status message and correct answer section should not be displayed')
185
252
  chartsDotPlotPage.steps.checkAnswer();
@@ -195,6 +262,7 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
195
262
 
196
263
  it('When the user attempts the question partially correct with all the responses correct as per the correct accordion but one response incomplete, then the user should be awarded with points of the correctly attempted responses and on switching to \'Grading\' view, correct icon should be displayed in dot column attempted correctly, incorrect icon should be displayed in dot column set to incorrectly, status message should not be displayed and correct answer section with all correct answers from the alternate accordion should be displayed', () => {
197
264
  chartsDotPlotPage.steps.resetQuestionPreview();
265
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
198
266
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
199
267
  chartsDotPlotPage.steps.verifyPreviewScore(20, 30);
200
268
  chartsDotPlotPage.steps.switchToGradingView();
@@ -212,6 +280,24 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
212
280
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
213
281
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
214
282
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
283
+ //alternative answer
284
+ if (alternativeAnswerCheck === 'true') {
285
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response - 5 pts)');
286
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
287
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
288
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
289
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
290
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
291
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
292
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response - 3.83 pts)');
293
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
294
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
295
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
296
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
297
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
298
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
299
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
300
+ }
215
301
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
216
302
  /*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 incomplete and clicks on \'Check answer\' button, then correct icon should be displayed in dot column attempted correctly, incorrect icon should be displayed in dot column set to incorrectly, status message and correct answer section should not be displayed')
217
303
  chartsDotPlotPage.steps.checkAnswer();
@@ -227,7 +313,8 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
227
313
 
228
314
  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 with points of the correctly attempted responses and on switching to \'Grading\' view, correct icon should be displayed in dot column set correctly from alternate accordion, incorrect icon should be displayed in dot column set incorrectly from the correct accordion responses as score achieved from the alternative responses is more than correct responses, status message should not be displayed and correct answer section with all correct answers from the alternate accordion along with dropzone numeration should be displayed', () => {
229
315
  chartsDotPlotPage.steps.resetQuestionPreview();
230
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1 });
316
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
317
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
231
318
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
232
319
  chartsDotPlotPage.steps.verifyPreviewScore(20, 30);
233
320
  chartsDotPlotPage.steps.switchToGradingView();
@@ -245,6 +332,24 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
245
332
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
246
333
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
247
334
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
335
+ //alternative answer
336
+ if (alternativeAnswerCheck === 'true') {
337
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response - 5 pts)');
338
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
339
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
340
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
341
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
342
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
343
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
344
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response - 3.83 pts)');
345
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
346
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
347
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
348
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
349
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
350
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
351
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
352
+ }
248
353
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
249
354
  /*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 dot column set correctly from alternate accordion, incorrect icon should be displayed in dot column set incorrectly from the correct accordion, a status message and correct answer section should not be displayed')
250
355
  chartsDotPlotPage.steps.checkAnswer();
@@ -260,8 +365,9 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
260
365
 
261
366
  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 with points of the correctly attempted responses from the tab that has more points alloted for the response and on switching to \'Grading\' view, correct icon should be displayed in common dot column attempted correctly, incorrect icon should be displayed in dot column attempted incorrectly, status message should not be displayed and correct answer section with all correct answers from the alternate accordion along with dropzone numeration should be displayed', () => {
262
367
  chartsDotPlotPage.steps.resetQuestionPreview();
368
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
263
369
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
264
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(0, { point: 2, min: 1, interval: 1 });
370
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1, defaultDots: 2 });
265
371
  chartsDotPlotPage.steps.verifyPreviewScore(20, 30);
266
372
  chartsDotPlotPage.steps.switchToGradingView();
267
373
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 1, min: 1, interval: 1 });
@@ -278,6 +384,24 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
278
384
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
279
385
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
280
386
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
387
+ //alternative answer
388
+ if (alternativeAnswerCheck === 'true') {
389
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response - 5 pts)');
390
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
391
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
392
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
393
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
394
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
395
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
396
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response - 3.83 pts)');
397
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
398
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
399
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
400
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
401
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
402
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
403
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
404
+ }
281
405
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
282
406
  /*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 common dot column attempted correctly, incorrect icon should be displayed in dot column attempted incorrectly status message and correct answer section should not be displayed')
283
407
  chartsDotPlotPage.steps.checkAnswer();
@@ -293,7 +417,8 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
293
417
 
294
418
  it('When the user attempts the question incorrectly, then the user should be awarded with 0 points and on switching to \'Grading\' view, incorrect icon should be displayed in dot column attempted incorrectly, status message should not be displayed and correct answer section with all alternative answers along with dropzone numeration should be displayed', () => {
295
419
  chartsDotPlotPage.steps.resetQuestionPreview();
296
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(0, { point: 2, min: 1, interval: 1 });
420
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
421
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1, defaultDots: 2 });
297
422
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 4, min: 1, interval: 1, defaultDots: 0 });
298
423
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 5, min: 1, interval: 1, defaultDots: 0 });
299
424
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 6, min: 1, interval: 1, defaultDots: 0 });
@@ -313,6 +438,24 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
313
438
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
314
439
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
315
440
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
441
+ //alternative answer
442
+ if (alternativeAnswerCheck === 'true') {
443
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response - 5 pts)');
444
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
445
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
446
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
447
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
448
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
449
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
450
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response - 3.83 pts)');
451
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
452
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
453
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
454
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
455
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
456
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
457
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
458
+ }
316
459
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
317
460
  /*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icon should be displayed in dot column attempted incorrectly, a status message and correct answer section should not be displayed')
318
461
  chartsDotPlotPage.steps.checkAnswer();
@@ -332,14 +475,14 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
332
475
  chartsDotPlotPage.steps.deleteAlternativeAnswerAccordion(0);
333
476
  chartsDotPlotPage.steps.addAlternativeAnswerAccordion(1);
334
477
  chartsDotPlotPage.steps.allotPoints(42);
335
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 2, min: 1, interval: 1, defaultDots: 0 });
478
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 2, min: 1, interval: 1, defaultDots: 2 });
336
479
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 3, min: 1, interval: 1, defaultDots: 0 });
337
480
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 4, min: 1, interval: 1, defaultDots: 0 });
338
481
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 5, min: 1, interval: 1, defaultDots: 0 });
339
482
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 6, min: 1, interval: 1, defaultDots: 0 });
340
483
  chartsDotPlotPage.steps.expandCorrectAnswerAccordion();
341
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 2, min: 1, interval: 1, defaultDots: 0 });
342
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 2, min: 1, interval: 1 });
484
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
485
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
343
486
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 3, min: 1, interval: 1 });
344
487
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 4, min: 1, interval: 1 });
345
488
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 5, min: 1, interval: 1, defaultDots: 0 });
@@ -347,12 +490,13 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
347
490
  chartsDotPlotPage.steps.allotPoints(6);
348
491
  chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
349
492
  chartsDotPlotPage.steps.switchToPreviewTab();
350
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 2, min: 1, interval: 1 });
493
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 1, min: 1, interval: 1, defaultDots: 1 });
494
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1, defaultDots: 2 });
351
495
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 3, min: 1, interval: 1, defaultDots: 0 });
352
496
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 4, min: 1, interval: 1, defaultDots: 0 });
353
497
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 5, min: 1, interval: 1, defaultDots: 0 });
354
498
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 6, min: 1, interval: 1, defaultDots: 0 });
355
- chartsDotPlotPage.steps.verifyPreviewScore(8.4, 42);
499
+ chartsDotPlotPage.steps.verifyPreviewScore(14, 42);
356
500
  chartsDotPlotPage.steps.switchToGradingView();
357
501
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 1, min: 1, interval: 1 });
358
502
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 1 });
@@ -368,6 +512,25 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
368
512
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
369
513
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1, defaultDots: 0 });
370
514
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1, defaultDots: 0 });
515
+ //alternative answer
516
+ if (alternativeAnswerCheck === 'true') {
517
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response - 7 pts)');
518
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
519
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
520
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
521
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
522
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
523
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
524
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response - 1 pt)');
525
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
526
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
527
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
528
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
529
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
530
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
531
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
532
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
533
+ }
371
534
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
372
535
  /*cy.log('When user attempts the question correctly and clicks on the \'Check answer\' button, correct icons icons should be displayed beside the correct responses from the correct accordion, incorrect icons icons should be displayed beside the incorrectly answered responses, correct/incorrect answer label and its border, correct answer container should not be displayed')
373
536
  chartsDotPlotPage.steps.checkAnswer();