itemengine-cypress-automation 1.0.576-IEI-7071-main-98ffd41.0 → 1.0.576-IEI-7079-0591b8d.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 +24 -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 +25 -15
  29. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +18 -10
  30. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +24 -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
@@ -1,6 +1,8 @@
1
1
  import { chartsLinePage } from "../../../../pages";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
3
 
4
+ const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
5
+
4
6
  describe('Create item page - Charts - Line: Partial equal weights scoring with alternative answer - When Correct answer points are more than alternative Answer points with locked Points', () => {
5
7
  before(() => {
6
8
  cy.loginAs('admin');
@@ -48,6 +50,28 @@ describe('Create item page - Charts - Line: Partial equal weights scoring with a
48
50
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
49
51
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 6, range: 10 });
50
52
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 1, range: 10 });
53
+ if (alternativeAnswerCheck === 'true') {
54
+ chartsLinePage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 5 pts, 5 pts, 5 pts, 5 pts)');
55
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
56
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 1, value: 4, range: 10 });
57
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
58
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 6, range: 10 });
59
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 1, range: 10 });
60
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleExists();
61
+ chartsLinePage.steps.disableShowAlternativeAnswersToggle();
62
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
63
+ chartsLinePage.steps.verifyAlternativeAnswersSectionNotExist();
64
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
65
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleChecked();
66
+ chartsLinePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 3 pts, 3 pts, 3 pts, 3 pts)');
67
+ chartsLinePage.steps.verifyLockedPointInAlternativeAnswerSection({ pointIndex: 0, value: 3, range: 10 });
68
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 1, value: 2, range: 10 });
69
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 2, value: 3, range: 10 });
70
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 3, value: 1, range: 10 });
71
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 4, value: 0, range: 10 });
72
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
73
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
74
+ }
51
75
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
52
76
  });
53
77
 
@@ -70,6 +94,28 @@ describe('Create item page - Charts - Line: Partial equal weights scoring with a
70
94
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
71
95
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 6, range: 10 });
72
96
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 1, range: 10 });
97
+ if (alternativeAnswerCheck === 'true') {
98
+ chartsLinePage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 5 pts, 5 pts, 5 pts, 5 pts)');
99
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
100
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 1, value: 4, range: 10 });
101
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
102
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 6, range: 10 });
103
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 1, range: 10 });
104
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleExists();
105
+ chartsLinePage.steps.disableShowAlternativeAnswersToggle();
106
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
107
+ chartsLinePage.steps.verifyAlternativeAnswersSectionNotExist();
108
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
109
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleChecked();
110
+ chartsLinePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 3 pts, 3 pts, 3 pts, 3 pts)');
111
+ chartsLinePage.steps.verifyLockedPointInAlternativeAnswerSection({ pointIndex: 0, value: 3, range: 10 });
112
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 1, value: 2, range: 10 });
113
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 2, value: 3, range: 10 });
114
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 3, value: 1, range: 10 });
115
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 4, value: 0, range: 10 });
116
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
117
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
118
+ }
73
119
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
74
120
  });
75
121
 
@@ -88,6 +134,9 @@ describe('Create item page - Charts - Line: Partial equal weights scoring with a
88
134
  chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
89
135
  chartsLinePage.steps.verifyCorrectIncorrectStatusMessageNotExists();
90
136
  chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();
137
+ if (alternativeAnswerCheck === 'true') {
138
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleNotExists();
139
+ }
91
140
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
92
141
  });
93
142
 
@@ -106,6 +155,9 @@ describe('Create item page - Charts - Line: Partial equal weights scoring with a
106
155
  chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
107
156
  chartsLinePage.steps.verifyCorrectIncorrectStatusMessageNotExists();
108
157
  chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();
158
+ if (alternativeAnswerCheck === 'true') {
159
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleNotExists();
160
+ }
109
161
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
110
162
  });
111
163
 
@@ -128,6 +180,28 @@ describe('Create item page - Charts - Line: Partial equal weights scoring with a
128
180
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
129
181
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 6, range: 10 });
130
182
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 1, range: 10 });
183
+ if (alternativeAnswerCheck === 'true') {
184
+ chartsLinePage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 5 pts, 5 pts, 5 pts, 5 pts)');
185
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
186
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 1, value: 4, range: 10 });
187
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
188
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 6, range: 10 });
189
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 1, range: 10 });
190
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleExists();
191
+ chartsLinePage.steps.disableShowAlternativeAnswersToggle();
192
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
193
+ chartsLinePage.steps.verifyAlternativeAnswersSectionNotExist();
194
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
195
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleChecked();
196
+ chartsLinePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 3 pts, 3 pts, 3 pts, 3 pts)');
197
+ chartsLinePage.steps.verifyLockedPointInAlternativeAnswerSection({ pointIndex: 0, value: 3, range: 10 });
198
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 1, value: 2, range: 10 });
199
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 2, value: 3, range: 10 });
200
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 3, value: 1, range: 10 });
201
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 4, value: 0, range: 10 });
202
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
203
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
204
+ }
131
205
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
132
206
  });
133
207
 
@@ -150,6 +224,28 @@ describe('Create item page - Charts - Line: Partial equal weights scoring with a
150
224
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
151
225
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 6, range: 10 });
152
226
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 1, range: 10 });
227
+ if (alternativeAnswerCheck === 'true') {
228
+ chartsLinePage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 5 pts, 5 pts, 5 pts, 5 pts)');
229
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
230
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 1, value: 4, range: 10 });
231
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
232
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 6, range: 10 });
233
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 1, range: 10 });
234
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleExists();
235
+ chartsLinePage.steps.disableShowAlternativeAnswersToggle();
236
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
237
+ chartsLinePage.steps.verifyAlternativeAnswersSectionNotExist();
238
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
239
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleChecked();
240
+ chartsLinePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 3 pts, 3 pts, 3 pts, 3 pts)');
241
+ chartsLinePage.steps.verifyLockedPointInAlternativeAnswerSection({ pointIndex: 0, value: 3, range: 10 });
242
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 1, value: 2, range: 10 });
243
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 2, value: 3, range: 10 });
244
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 3, value: 1, range: 10 });
245
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 4, value: 0, range: 10 });
246
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
247
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
248
+ }
153
249
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
154
250
  });
155
251
 
@@ -172,6 +268,28 @@ describe('Create item page - Charts - Line: Partial equal weights scoring with a
172
268
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
173
269
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 6, range: 10 });
174
270
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 1, range: 10 });
271
+ if (alternativeAnswerCheck === 'true') {
272
+ chartsLinePage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 5 pts, 5 pts, 5 pts, 5 pts)');
273
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
274
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 1, value: 4, range: 10 });
275
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
276
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 6, range: 10 });
277
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 1, range: 10 });
278
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleExists();
279
+ chartsLinePage.steps.disableShowAlternativeAnswersToggle();
280
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
281
+ chartsLinePage.steps.verifyAlternativeAnswersSectionNotExist();
282
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
283
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleChecked();
284
+ chartsLinePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 3 pts, 3 pts, 3 pts, 3 pts)');
285
+ chartsLinePage.steps.verifyLockedPointInAlternativeAnswerSection({ pointIndex: 0, value: 3, range: 10 });
286
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 1, value: 2, range: 10 });
287
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 2, value: 3, range: 10 });
288
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 3, value: 1, range: 10 });
289
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 4, value: 0, range: 10 });
290
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
291
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
292
+ }
175
293
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
176
294
  });
177
295
 
@@ -194,6 +312,28 @@ describe('Create item page - Charts - Line: Partial equal weights scoring with a
194
312
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
195
313
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 6, range: 10 });
196
314
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 1, range: 10 });
315
+ if (alternativeAnswerCheck === 'true') {
316
+ chartsLinePage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 5 pts, 5 pts, 5 pts, 5 pts)');
317
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
318
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 1, value: 4, range: 10 });
319
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
320
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 6, range: 10 });
321
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 1, range: 10 });
322
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleExists();
323
+ chartsLinePage.steps.disableShowAlternativeAnswersToggle();
324
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
325
+ chartsLinePage.steps.verifyAlternativeAnswersSectionNotExist();
326
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
327
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleChecked();
328
+ chartsLinePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 3 pts, 3 pts, 3 pts, 3 pts)');
329
+ chartsLinePage.steps.verifyLockedPointInAlternativeAnswerSection({ pointIndex: 0, value: 3, range: 10 });
330
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 1, value: 2, range: 10 });
331
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 2, value: 3, range: 10 });
332
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 3, value: 1, range: 10 });
333
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 4, value: 0, range: 10 });
334
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
335
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
336
+ }
197
337
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
198
338
  });
199
339
 
@@ -216,6 +356,28 @@ describe('Create item page - Charts - Line: Partial equal weights scoring with a
216
356
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
217
357
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 6, range: 10 });
218
358
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 1, range: 10 });
359
+ if (alternativeAnswerCheck === 'true') {
360
+ chartsLinePage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 5 pts, 5 pts, 5 pts, 5 pts)');
361
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
362
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 1, value: 4, range: 10 });
363
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
364
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 6, range: 10 });
365
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 1, range: 10 });
366
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleExists();
367
+ chartsLinePage.steps.disableShowAlternativeAnswersToggle();
368
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
369
+ chartsLinePage.steps.verifyAlternativeAnswersSectionNotExist();
370
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
371
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleChecked();
372
+ chartsLinePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 3 pts, 3 pts, 3 pts, 3 pts)');
373
+ chartsLinePage.steps.verifyLockedPointInAlternativeAnswerSection({ pointIndex: 0, value: 3, range: 10 });
374
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 1, value: 2, range: 10 });
375
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 2, value: 3, range: 10 });
376
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 3, value: 1, range: 10 });
377
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 4, value: 0, range: 10 });
378
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
379
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
380
+ }
219
381
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
220
382
  });
221
383
 
@@ -242,6 +404,28 @@ describe('Create item page - Charts - Line: Partial equal weights scoring with a
242
404
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 6, range: 10 });
243
405
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 1, range: 10 });
244
406
  chartsLinePage.steps.verifyCorrectIncorrectStatusMessageNotExists();
407
+ if (alternativeAnswerCheck === 'true') {
408
+ chartsLinePage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 10 pts, 10 pts, 10 pts, 10 pts)');
409
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
410
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 1, value: 4, range: 10 });
411
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
412
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 6, range: 10 });
413
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 1, range: 10 });
414
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleExists();
415
+ chartsLinePage.steps.disableShowAlternativeAnswersToggle();
416
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
417
+ chartsLinePage.steps.verifyAlternativeAnswersSectionNotExist();
418
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
419
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleChecked();
420
+ chartsLinePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 3 pts, 3 pts, 3 pts, 3 pts)');
421
+ chartsLinePage.steps.verifyLockedPointInAlternativeAnswerSection({ pointIndex: 0, value: 3, range: 10 });
422
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 1, value: 2, range: 10 });
423
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 2, value: 3, range: 10 });
424
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 3, value: 1, range: 10 });
425
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 4, value: 0, range: 10 });
426
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
427
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
428
+ }
245
429
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
246
430
  });
247
431
  });
@@ -1,6 +1,8 @@
1
1
  import { chartsDotPlotPage } from "../../../../pages";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
3
 
4
+ const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
5
+
4
6
  describe('Create item page - Charts - Dot plot : All or nothing with alternative answers', () => {
5
7
  before(() => {
6
8
  cy.loginAs('admin');
@@ -24,12 +26,12 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
24
26
  chartsDotPlotPage.steps.lockDotColumn({ point: 1, min: 1, interval: 1 });
25
27
  chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });
26
28
  chartsDotPlotPage.steps.allotPoints(12);
27
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });
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(3, { point: 2, min: 1, interval: 1, defaultDots: 0 });
34
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
33
35
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
34
36
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
35
37
  //chartsDotPlotPage.steps.checkAllowStudentToCheckAnswerCheckbox();
@@ -68,6 +70,8 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
68
70
 
69
71
  it('When the user attempts the question with responses from the correct accordion, then the user should be awarded points for correct accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed in responses from correct accordion in attempted dot plot chart, correct answer section should not be displayed and a status message with text \'Your answer is correct\' should be displayed above the question preview', () => {
70
72
  chartsDotPlotPage.steps.resetQuestionPreview();
73
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 1, min: 1, interval: 1, defaultDots: 1 });
74
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
71
75
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
72
76
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
73
77
  chartsDotPlotPage.steps.verifyPreviewScore(12, 30);
@@ -79,6 +83,9 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
79
83
  chartsDotPlotPage.steps.verifyEmptyDotColumnPreviewTab({ point: 5, min: 1, interval: 1 })
80
84
  chartsDotPlotPage.steps.verifyEmptyDotColumnPreviewTab({ point: 6, min: 1, interval: 1 });
81
85
  chartsDotPlotPage.steps.verifyCorrectAnswerSectionNotExists();
86
+ if (alternativeAnswerCheck === 'true') {
87
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleNotExists();
88
+ }
82
89
  chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
83
90
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
84
91
  /*cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed in responses from correct accordion, a status message with text \'Your answer is correct\' should be displayed above the question preview')
@@ -95,7 +102,7 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
95
102
 
96
103
  it('When the user attempts the question with alternative accordion response, then the user should be awarded with full points and on switching to \'Grading\' view, correct icons should be displayed in responses from alternative accordion in dot column grid, correct answer section should be displayed with responses from alternate accordion and a status message with text \'Your answer is correct\' should be displayed', () => {
97
104
  chartsDotPlotPage.steps.resetQuestionPreview();
98
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
105
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
99
106
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
100
107
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
101
108
  chartsDotPlotPage.steps.verifyPreviewScore(30, 30);
@@ -107,6 +114,9 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
107
114
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 1 })
108
115
  chartsDotPlotPage.steps.verifyEmptyDotColumnPreviewTab({ point: 6, min: 1, interval: 1 });
109
116
  chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
117
+ if (alternativeAnswerCheck === 'true') {
118
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleNotExists();
119
+ }
110
120
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
111
121
  /*cy.log('When the user has attempted the question with alternative accordion dot column and clicks on \'Check answer\' button, then correct icon should be displayed in responses from alternative accordion, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
112
122
  chartsDotPlotPage.steps.checkAnswer();
@@ -121,7 +131,7 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
121
131
 
122
132
  it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed in dot column attempted/set from correct accordion , correct answer section should be displayed with responses from alternate accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
123
133
  chartsDotPlotPage.steps.resetQuestionPreview();
124
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1 });
134
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
125
135
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
126
136
  chartsDotPlotPage.steps.verifyPreviewScore(0, 30);
127
137
  chartsDotPlotPage.steps.switchToGradingView();
@@ -138,6 +148,24 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
138
148
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
139
149
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
140
150
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
151
+ if (alternativeAnswerCheck === 'true') {
152
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(30 points)');
153
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
154
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
155
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
156
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
157
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
158
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
159
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(12 points)');
160
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
161
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
162
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
163
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
164
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
165
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
166
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
167
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
168
+ }
141
169
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
142
170
  /*cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed in the responses from correct accordion, no icon/border should be displayed for unselected responses from correct accordion and a status message with text \'Your answer is incorrect\' should be displayed')
143
171
  chartsDotPlotPage.steps.checkAnswer();
@@ -152,7 +180,7 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
152
180
 
153
181
  it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed in the dot column from alternate accordion and incorrect icon should be displayed in dot column set incorrectly and correct answer section should be displayed with responses from alternate accordion, a status message with text \'Your answer is incorrect\' should be displayed', () => {
154
182
  chartsDotPlotPage.steps.resetQuestionPreview();
155
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
183
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
156
184
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
157
185
  chartsDotPlotPage.steps.verifyPreviewScore(0, 30);
158
186
  chartsDotPlotPage.steps.switchToGradingView();
@@ -169,6 +197,24 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
169
197
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
170
198
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
171
199
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
200
+ if (alternativeAnswerCheck === 'true') {
201
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(30 points)');
202
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
203
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
204
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
205
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
206
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
207
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
208
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(12 points)');
209
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
210
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
211
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
212
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
213
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
214
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
215
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
216
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
217
+ }
172
218
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
173
219
  /*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed in the dot column from alternate accordion and incorrect icon should be displayed in dot column set incorrectly, a status message with text \'Your answer is incorrect\' should be displayed');
174
220
  chartsDotPlotPage.steps.checkAnswer();
@@ -183,7 +229,7 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
183
229
 
184
230
  it('When the user attempts the question partially correct with all the responses correct as per the correct accordion but one dot column incomplete, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed in the dot column from the correct accordion, incorrect icon should be displayed in the responses from the alternative accordion, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion', () => {
185
231
  chartsDotPlotPage.steps.resetQuestionPreview();
186
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1 });
232
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
187
233
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
188
234
  chartsDotPlotPage.steps.verifyPreviewScore(0, 30);
189
235
  chartsDotPlotPage.steps.switchToGradingView();
@@ -200,6 +246,24 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
200
246
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
201
247
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
202
248
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
249
+ if (alternativeAnswerCheck === 'true') {
250
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(30 points)');
251
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
252
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
253
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
254
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
255
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
256
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
257
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(12 points)');
258
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
259
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
260
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
261
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
262
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
263
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
264
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
265
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
266
+ }
203
267
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
204
268
  /*cy.log('When the user has attempted the question with partially correct with all the dot column correct as per the alternative accordion but one dot column unselected and clicks on \'Check answer\' button, then correct icon should be displayed in the dot column from the correct accordion, incorrect icon should be displayed in the responses from the alternative accordion and a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed');
205
269
  chartsDotPlotPage.steps.checkAnswer();
@@ -231,6 +295,24 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
231
295
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
232
296
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
233
297
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
298
+ if (alternativeAnswerCheck === 'true') {
299
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(30 points)');
300
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
301
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
302
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
303
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
304
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
305
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
306
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(12 points)');
307
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
308
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
309
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
310
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
311
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
312
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
313
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
314
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
315
+ }
234
316
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
235
317
  /*cy.log('When the user attempts the question with more answers from the correct accordion than the alternate accordion and clicks on \'Check answer\' button, then correct icon should be displayed in the alternate accordion responses, incorrect icons should be displayed on the correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
236
318
  chartsDotPlotPage.steps.checkAnswer();
@@ -246,7 +328,7 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
246
328
 
247
329
  it('When the user attempts the question with more answers from the alternate accordion than the correct accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed in the alternate accordion responses, incorrect icons should be displayed on the correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should be displayed with the correct answers from the alternate accordion', () => {
248
330
  chartsDotPlotPage.steps.resetQuestionPreview();
249
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
331
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
250
332
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
251
333
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
252
334
  chartsDotPlotPage.steps.verifyPreviewScore(0, 30);
@@ -264,6 +346,24 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
264
346
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
265
347
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
266
348
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
349
+ if (alternativeAnswerCheck === 'true') {
350
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(30 points)');
351
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
352
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
353
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
354
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
355
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
356
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
357
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(12 points)');
358
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
359
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
360
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
361
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
362
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
363
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
364
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
365
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
366
+ }
267
367
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
268
368
  /*cy.log('When the user attempts the question with more answers from the alternate accordion than the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed in the alternate accordion responses, incorrect icons should be displayed on the correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
269
369
  chartsDotPlotPage.steps.checkAnswer();
@@ -279,7 +379,7 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
279
379
 
280
380
  it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, correct icon should be displayed in the dot column from alternate accordion, incorrect icon should be displayed in the dot column from accordion accordion, correct answer section should be displayed with responses from alternate accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
281
381
  chartsDotPlotPage.steps.resetQuestionPreview();
282
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
382
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
283
383
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
284
384
  chartsDotPlotPage.steps.verifyPreviewScore(0, 30);
285
385
  chartsDotPlotPage.steps.switchToGradingView();
@@ -296,6 +396,24 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
296
396
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
297
397
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
298
398
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
399
+ if (alternativeAnswerCheck === 'true') {
400
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(30 points)');
401
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
402
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
403
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
404
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
405
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
406
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
407
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(12 points)');
408
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
409
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
410
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
411
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
412
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
413
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
414
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
415
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
416
+ }
299
417
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
300
418
  /*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed in the dot column from correct answer accordion, incorrect icon should be displayed in the dot column from alternative answer accordion and a status message with text \'Your answer is incorrect\' should be displayed')
301
419
  chartsDotPlotPage.steps.checkAnswer();
@@ -311,7 +429,7 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
311
429
  it('Race condition : When the user attempts the question with the common dot column between correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, correct icon should be in the attempted common dot column and incorrect icon should be displayed in dot column set incorrectly, correct answer section should be displayed with responses from alternate accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
312
430
  chartsDotPlotPage.steps.resetQuestionPreview();
313
431
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
314
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(0, { point: 2, min: 1, interval: 1 });
432
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1, defaultDots: 2 });
315
433
  chartsDotPlotPage.steps.verifyPreviewScore(0, 30);
316
434
  chartsDotPlotPage.steps.switchToGradingView();
317
435
  chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 1 });
@@ -327,6 +445,24 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
327
445
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
328
446
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
329
447
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
448
+ if (alternativeAnswerCheck === 'true') {
449
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(30 points)');
450
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
451
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
452
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
453
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
454
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
455
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
456
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(12 points)');
457
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
458
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
459
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
460
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
461
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
462
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
463
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
464
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
465
+ }
330
466
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
331
467
  /*cy.log('When the user has attempted the question with common dot column between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be in the attempted common dot column and incorrect icon should be displayed in dot column set incorrectly and a status message with text \'Your answer is incorrect\' should be displayed')
332
468
  chartsDotPlotPage.steps.checkAnswer();
@@ -342,7 +478,7 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
342
478
  it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed in incorrect dot column in dot column grid, correct answer section should be displayed with responses from alternate accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
343
479
  chartsDotPlotPage.steps.resetQuestionPreview();
344
480
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 6, min: 1, interval: 1, defaultDots: 0 });
345
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(0, { point: 2, min: 1, interval: 1 });
481
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1, defaultDots: 2 });
346
482
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 4, min: 1, interval: 1, defaultDots: 0 });
347
483
  chartsDotPlotPage.steps.verifyPreviewScore(0, 30);
348
484
  chartsDotPlotPage.steps.switchToGradingView();
@@ -359,6 +495,24 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
359
495
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
360
496
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
361
497
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
498
+ if (alternativeAnswerCheck === 'true') {
499
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(30 points)');
500
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
501
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
502
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
503
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
504
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
505
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
506
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(12 points)');
507
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
508
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
509
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
510
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
511
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
512
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
513
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
514
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
515
+ }
362
516
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
363
517
  /*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed in incorrect responses and status message with text \'Your answer is incorrect\' should be displayed')
364
518
  chartsDotPlotPage.steps.checkAnswer();