itemengine-cypress-automation 1.0.577-IEI-7065-Improve-test-coverage-for-essay-response-1a0a73e.0 → 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
@@ -1,5 +1,6 @@
1
1
  import { chartsBarPage } from "../../../../pages";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+ const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
3
4
 
4
5
  describe('Create item page - Charts - Bar: Partial equal weights scoring with alternative answer - When Correct answer points are more than alternative Answer points with locked bars', () => {
5
6
  before(() => {
@@ -47,6 +48,29 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
47
48
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
48
49
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 6, range: 10 });
49
50
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 1, range: 10 });
51
+ if (alternativeAnswerCheck === 'true') {
52
+ chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 5 pts, 5 pts, 5 pts, 5 pts)');
53
+ chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
54
+ { barIndex: 1, barValue: 4, range: 10 },
55
+ { barIndex: 2, barValue: 5, range: 10 },
56
+ { barIndex: 3, barValue: 6, range: 10 },
57
+ { barIndex: 4, barValue: 1, range: 10 }
58
+ ], 1);
59
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
60
+ chartsBarPage.steps.disableShowAlternativeAnswersToggle();
61
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
62
+ chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
63
+ chartsBarPage.steps.clickShowAlternativeAnswersToggle();
64
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
65
+ chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 3 pts, 3 pts, 3 pts, 3 pts)');
66
+ chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
67
+ { barIndex: 1, barValue: 2, range: 10 },
68
+ { barIndex: 2, barValue: 3, range: 10 },
69
+ { barIndex: 3, barValue: 1, range: 10 }
70
+ ], 2);
71
+ chartsBarPage.steps.clickShowAlternativeAnswersToggle();
72
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
73
+ }
50
74
  chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
51
75
  });
52
76
 
@@ -69,6 +93,29 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
69
93
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
70
94
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 6, range: 10 });
71
95
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 1, range: 10 });
96
+ if (alternativeAnswerCheck === 'true') {
97
+ chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 5 pts, 5 pts, 5 pts, 5 pts)');
98
+ chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
99
+ { barIndex: 1, barValue: 4, range: 10 },
100
+ { barIndex: 2, barValue: 5, range: 10 },
101
+ { barIndex: 3, barValue: 6, range: 10 },
102
+ { barIndex: 4, barValue: 1, range: 10 }
103
+ ], 1);
104
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
105
+ chartsBarPage.steps.disableShowAlternativeAnswersToggle();
106
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
107
+ chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
108
+ chartsBarPage.steps.clickShowAlternativeAnswersToggle();
109
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
110
+ chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 3 pts, 3 pts, 3 pts, 3 pts)');
111
+ chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
112
+ { barIndex: 1, barValue: 2, range: 10 },
113
+ { barIndex: 2, barValue: 3, range: 10 },
114
+ { barIndex: 3, barValue: 1, range: 10 }
115
+ ], 2);
116
+ chartsBarPage.steps.clickShowAlternativeAnswersToggle();
117
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
118
+ }
72
119
  chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
73
120
  });
74
121
 
@@ -87,6 +134,9 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
87
134
  chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
88
135
  chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
89
136
  chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
137
+ if (alternativeAnswerCheck === 'true') {
138
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleNotExists();
139
+ }
90
140
  chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
91
141
  });
92
142
 
@@ -105,6 +155,9 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
105
155
  chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
106
156
  chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
107
157
  chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
158
+ if (alternativeAnswerCheck === 'true') {
159
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleNotExists();
160
+ }
108
161
  chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
109
162
  });
110
163
 
@@ -127,6 +180,29 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
127
180
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
128
181
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 6, range: 10 });
129
182
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 1, range: 10 });
183
+ if (alternativeAnswerCheck === 'true') {
184
+ chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 5 pts, 5 pts, 5 pts, 5 pts)');
185
+ chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
186
+ { barIndex: 1, barValue: 4, range: 10 },
187
+ { barIndex: 2, barValue: 5, range: 10 },
188
+ { barIndex: 3, barValue: 6, range: 10 },
189
+ { barIndex: 4, barValue: 1, range: 10 }
190
+ ], 1);
191
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
192
+ chartsBarPage.steps.disableShowAlternativeAnswersToggle();
193
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
194
+ chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
195
+ chartsBarPage.steps.clickShowAlternativeAnswersToggle();
196
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
197
+ chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 3 pts, 3 pts, 3 pts, 3 pts)');
198
+ chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
199
+ { barIndex: 1, barValue: 2, range: 10 },
200
+ { barIndex: 2, barValue: 3, range: 10 },
201
+ { barIndex: 3, barValue: 1, range: 10 }
202
+ ], 2);
203
+ chartsBarPage.steps.clickShowAlternativeAnswersToggle();
204
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
205
+ }
130
206
  chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
131
207
  });
132
208
 
@@ -149,6 +225,29 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
149
225
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
150
226
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 6, range: 10 });
151
227
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 1, range: 10 });
228
+ if (alternativeAnswerCheck === 'true') {
229
+ chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 5 pts, 5 pts, 5 pts, 5 pts)');
230
+ chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
231
+ { barIndex: 1, barValue: 4, range: 10 },
232
+ { barIndex: 2, barValue: 5, range: 10 },
233
+ { barIndex: 3, barValue: 6, range: 10 },
234
+ { barIndex: 4, barValue: 1, range: 10 }
235
+ ], 1);
236
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
237
+ chartsBarPage.steps.disableShowAlternativeAnswersToggle();
238
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
239
+ chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
240
+ chartsBarPage.steps.clickShowAlternativeAnswersToggle();
241
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
242
+ chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 3 pts, 3 pts, 3 pts, 3 pts)');
243
+ chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
244
+ { barIndex: 1, barValue: 2, range: 10 },
245
+ { barIndex: 2, barValue: 3, range: 10 },
246
+ { barIndex: 3, barValue: 1, range: 10 }
247
+ ], 2);
248
+ chartsBarPage.steps.clickShowAlternativeAnswersToggle();
249
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
250
+ }
152
251
  chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
153
252
  });
154
253
 
@@ -171,6 +270,29 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
171
270
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
172
271
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 6, range: 10 });
173
272
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 1, range: 10 });
273
+ if (alternativeAnswerCheck === 'true') {
274
+ chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 5 pts, 5 pts, 5 pts, 5 pts)');
275
+ chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
276
+ { barIndex: 1, barValue: 4, range: 10 },
277
+ { barIndex: 2, barValue: 5, range: 10 },
278
+ { barIndex: 3, barValue: 6, range: 10 },
279
+ { barIndex: 4, barValue: 1, range: 10 }
280
+ ], 1);
281
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
282
+ chartsBarPage.steps.disableShowAlternativeAnswersToggle();
283
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
284
+ chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
285
+ chartsBarPage.steps.clickShowAlternativeAnswersToggle();
286
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
287
+ chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 3 pts, 3 pts, 3 pts, 3 pts)');
288
+ chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
289
+ { barIndex: 1, barValue: 2, range: 10 },
290
+ { barIndex: 2, barValue: 3, range: 10 },
291
+ { barIndex: 3, barValue: 1, range: 10 }
292
+ ], 2);
293
+ chartsBarPage.steps.clickShowAlternativeAnswersToggle();
294
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
295
+ }
174
296
  chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
175
297
  });
176
298
 
@@ -193,6 +315,29 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
193
315
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
194
316
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 6, range: 10 });
195
317
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 1, range: 10 });
318
+ if (alternativeAnswerCheck === 'true') {
319
+ chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 5 pts, 5 pts, 5 pts, 5 pts)');
320
+ chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
321
+ { barIndex: 1, barValue: 4, range: 10 },
322
+ { barIndex: 2, barValue: 5, range: 10 },
323
+ { barIndex: 3, barValue: 6, range: 10 },
324
+ { barIndex: 4, barValue: 1, range: 10 }
325
+ ], 1);
326
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
327
+ chartsBarPage.steps.disableShowAlternativeAnswersToggle();
328
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
329
+ chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
330
+ chartsBarPage.steps.clickShowAlternativeAnswersToggle();
331
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
332
+ chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 3 pts, 3 pts, 3 pts, 3 pts)');
333
+ chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
334
+ { barIndex: 1, barValue: 2, range: 10 },
335
+ { barIndex: 2, barValue: 3, range: 10 },
336
+ { barIndex: 3, barValue: 1, range: 10 }
337
+ ], 2);
338
+ chartsBarPage.steps.clickShowAlternativeAnswersToggle();
339
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
340
+ }
196
341
  chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
197
342
  });
198
343
 
@@ -215,6 +360,29 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
215
360
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
216
361
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 6, range: 10 });
217
362
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 1, range: 10 });
363
+ if (alternativeAnswerCheck === 'true') {
364
+ chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 5 pts, 5 pts, 5 pts, 5 pts)');
365
+ chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
366
+ { barIndex: 1, barValue: 4, range: 10 },
367
+ { barIndex: 2, barValue: 5, range: 10 },
368
+ { barIndex: 3, barValue: 6, range: 10 },
369
+ { barIndex: 4, barValue: 1, range: 10 }
370
+ ], 1);
371
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
372
+ chartsBarPage.steps.disableShowAlternativeAnswersToggle();
373
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
374
+ chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
375
+ chartsBarPage.steps.clickShowAlternativeAnswersToggle();
376
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
377
+ chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 3 pts, 3 pts, 3 pts, 3 pts)');
378
+ chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
379
+ { barIndex: 1, barValue: 2, range: 10 },
380
+ { barIndex: 2, barValue: 3, range: 10 },
381
+ { barIndex: 3, barValue: 1, range: 10 }
382
+ ], 2);
383
+ chartsBarPage.steps.clickShowAlternativeAnswersToggle();
384
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
385
+ }
218
386
  chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
219
387
  });
220
388
 
@@ -241,6 +409,29 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
241
409
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 6, range: 10 });
242
410
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 1, range: 10 });
243
411
  chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
412
+ if (alternativeAnswerCheck === 'true') {
413
+ chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 10 pts, 10 pts, 10 pts, 10 pts)');
414
+ chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
415
+ { barIndex: 1, barValue: 4, range: 10 },
416
+ { barIndex: 2, barValue: 5, range: 10 },
417
+ { barIndex: 3, barValue: 6, range: 10 },
418
+ { barIndex: 4, barValue: 1, range: 10 }
419
+ ], 1);
420
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
421
+ chartsBarPage.steps.disableShowAlternativeAnswersToggle();
422
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
423
+ chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
424
+ chartsBarPage.steps.clickShowAlternativeAnswersToggle();
425
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
426
+ chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 3 pts, 3 pts, 3 pts, 3 pts)');
427
+ chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
428
+ { barIndex: 1, barValue: 2, range: 10 },
429
+ { barIndex: 2, barValue: 3, range: 10 },
430
+ { barIndex: 3, barValue: 1, range: 10 }
431
+ ], 2);
432
+ chartsBarPage.steps.clickShowAlternativeAnswersToggle();
433
+ chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
434
+ }
244
435
  chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
245
436
  });
246
437
  });
@@ -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: Partial equal with alternative answers', () => {
5
7
  before(() => {
6
8
  cy.loginAs('admin');
@@ -24,15 +26,15 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
24
26
  chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });
25
27
  chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
26
28
  chartsDotPlotPage.steps.allotPoints(20);
27
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 2, min: 1, interval: 1, defaultDots: 0 });
28
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(5, { point: 3, min: 1, interval: 1, defaultDots: 0 });
29
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(6, { point: 2, min: 1, interval: 1, defaultDots: 2 });
30
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(8, { point: 3, min: 1, interval: 1, defaultDots: 3 });
29
31
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(6, { point: 4, min: 1, interval: 1, defaultDots: 0 });
30
32
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 5, min: 1, interval: 1, defaultDots: 0 });
31
33
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 6, min: 1, interval: 1, defaultDots: 0 });
32
34
  chartsDotPlotPage.steps.addAlternativeAnswerAccordion(1);
33
35
  chartsDotPlotPage.steps.allotPoints(12);
34
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });
35
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
36
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
37
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(6, { point: 3, min: 1, interval: 1, defaultDots: 3 });
36
38
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 4, min: 1, interval: 1, defaultDots: 0 });
37
39
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 6, min: 1, interval: 1, defaultDots: 0 });
38
40
  chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
@@ -43,8 +45,8 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
43
45
  chartsDotPlotPage.steps.switchToGradingView();
44
46
  chartsDotPlotPage.steps.verifyPreviewScore(0, 20);
45
47
  chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 1 });
46
- chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 1 });
47
- chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 1, defaultDots: 0 });
48
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 1 });
49
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 1, defaultDots: 0 });
48
50
  chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 1, defaultDots: 0 });
49
51
  chartsDotPlotPage.steps.verifyEmptyDotColumnPreviewTab({ point: 5, min: 1, interval: 1 });
50
52
  chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 1, defaultDots: 0 });
@@ -54,13 +56,32 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
54
56
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 3, min: 1, interval: 1 });
55
57
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
56
58
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
59
+ //alternative answer
60
+ if (alternativeAnswerCheck === 'true') {
61
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 4 pts, 4 pts, 4 pts, 4 pts, 4 pts)');
62
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
63
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
64
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
65
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
66
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
67
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
68
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 2.4 pts, 2.4 pts, 2.4 pts, 2.4 pts, 2.4 pts)');
69
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
70
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
71
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
72
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
73
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
74
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
75
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
76
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
77
+ }
57
78
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
58
79
  });
59
80
 
60
81
  it('When the user incorrectly attempts the answer, then the user should be awarded with points for the correctly set bars and on switching to grading view, correct/incorrect status message should not be displayed, incorrect icons should be displayed on the incorrect bars and correct answer section should be displayed with the correct answers from the correct accordion', () => {
61
82
  chartsDotPlotPage.steps.resetQuestionPreview();
62
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1 });
63
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 3, min: 1, interval: 1 });
83
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(6, { point: 2, min: 1, interval: 1, defaultDots: 2 });
84
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 3, min: 1, interval: 1, defaultDots: 3 });
64
85
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 4, min: 1, interval: 1, defaultDots: 0 });
65
86
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 5, min: 1, interval: 1, defaultDots: 0 });
66
87
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 6, min: 1, interval: 1, defaultDots: 0 });
@@ -72,13 +93,32 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
72
93
  chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 1, defaultDots: 0 });
73
94
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 1 });
74
95
  chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 1 });
96
+ //alternative answer
97
+ if (alternativeAnswerCheck === 'true') {
98
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 4 pts, 4 pts, 4 pts, 4 pts, 4 pts)');
99
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
100
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
101
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
102
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
103
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
104
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
105
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 2.4 pts, 2.4 pts, 2.4 pts, 2.4 pts, 2.4 pts)');
106
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
107
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
108
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
109
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
110
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
111
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
112
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
113
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
114
+ }
75
115
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
76
116
  });
77
117
 
78
118
  it('When the user attempts the question with responses from the correct accordion, then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed', () => {
79
119
  chartsDotPlotPage.steps.resetQuestionPreview();
80
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1 });
81
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 3, min: 1, interval: 1 });
120
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(6, { point: 2, min: 1, interval: 1, defaultDots: 2 });
121
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(8, { point: 3, min: 1, interval: 1, defaultDots: 3 });
82
122
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(6, { point: 4, min: 1, interval: 1, defaultDots: 0 });
83
123
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 5, min: 1, interval: 1, defaultDots: 0 });
84
124
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 6, min: 1, interval: 1, defaultDots: 0 });
@@ -92,13 +132,16 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
92
132
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 1 });
93
133
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
94
134
  chartsDotPlotPage.steps.verifyCorrectAnswerSectionNotExist();
135
+ if (alternativeAnswerCheck === 'true') {
136
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleNotExists();
137
+ }
95
138
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
96
139
  });
97
140
 
98
141
  it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with points specified for alternative accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed', () => {
99
142
  chartsDotPlotPage.steps.resetQuestionPreview();
100
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1 });
101
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1 });
143
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
144
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(6, { point: 3, min: 1, interval: 1, defaultDots: 3 });
102
145
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 4, min: 1, interval: 1, defaultDots: 0 });
103
146
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 6, min: 1, interval: 1, defaultDots: 0 });
104
147
  chartsDotPlotPage.steps.verifyPreviewScore(12, 20);
@@ -110,13 +153,16 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
110
153
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 1 });
111
154
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
112
155
  chartsDotPlotPage.steps.verifyCorrectAnswerSectionNotExist();
156
+ if (alternativeAnswerCheck === 'true') {
157
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleNotExists();
158
+ }
113
159
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
114
160
  });
115
161
 
116
162
  it('When the user attempts the question with partially correct exclusively from the correct accordion, then the user should be awarded with points for the correctly set bars and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icons should be displayed on the incorrect bars, correct/incorrect status message should not be displayed and correct answer section should be displayed with the correct answers from the correct accordion', () => {
117
163
  chartsDotPlotPage.steps.resetQuestionPreview();
118
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1 });
119
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 3, min: 1, interval: 1 });
164
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(6, { point: 2, min: 1, interval: 1, defaultDots: 2 });
165
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(8, { point: 3, min: 1, interval: 1, defaultDots: 3 });
120
166
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(6, { point: 4, min: 1, interval: 1, defaultDots: 0 });
121
167
  chartsDotPlotPage.steps.verifyPreviewScore(12, 20);
122
168
  chartsDotPlotPage.steps.switchToGradingView();
@@ -127,13 +173,32 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
127
173
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 1, defaultDots: 0 });
128
174
  chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 1, defaultDots: 0 });
129
175
  chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 1, defaultDots: 0 });
176
+ //alternative answer
177
+ if (alternativeAnswerCheck === 'true') {
178
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 4 pts, 4 pts, 4 pts, 4 pts, 4 pts)');
179
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
180
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
181
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
182
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
183
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
184
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
185
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 2.4 pts, 2.4 pts, 2.4 pts, 2.4 pts, 2.4 pts)');
186
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
187
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
188
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
189
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
190
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
191
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
192
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
193
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
194
+ }
130
195
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
131
196
  });
132
197
 
133
198
  it('When the user attempts the question with partially correct exclusively from the alternative accordion, then the user should be awarded with points for the correctly set bars and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icons should be displayed on the incorrect bars correct/incorrect status message should not be displayed and correct answer section should be displayed with the correct answers from the correct accordion', () => {
134
199
  chartsDotPlotPage.steps.resetQuestionPreview();
135
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1 });
136
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1 });
200
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
201
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(6, { point: 3, min: 1, interval: 1, defaultDots: 3 });
137
202
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 4, min: 1, interval: 1, defaultDots: 0 });
138
203
  chartsDotPlotPage.steps.verifyPreviewScore(9.6, 20);
139
204
  chartsDotPlotPage.steps.switchToGradingView();
@@ -143,13 +208,32 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
143
208
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 1, defaultDots: 0 });
144
209
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 1, defaultDots: 0 });
145
210
  chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 1, defaultDots: 0 });
211
+ //alternative answer
212
+ if (alternativeAnswerCheck === 'true') {
213
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 4 pts, 4 pts, 4 pts, 4 pts, 4 pts)');
214
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
215
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
216
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
217
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
218
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
219
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
220
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 2.4 pts, 2.4 pts, 2.4 pts, 2.4 pts, 2.4 pts)');
221
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
222
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
223
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
224
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
225
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
226
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
227
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
228
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
229
+ }
146
230
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
147
231
  });
148
232
 
149
233
  it('When the user attempts the question with more answers from the correct accordion than the alternate accordion, then the user should be awarded with points for the correctly set bars from the correct accordion and on switching to \'Grading\' view, correct icon should be displayed besides the correct accordion responses, incorrect icons should be displayed on the alternate accordion responses, correct/incorrect status message should not be displayed and correct answer section should be displayed with the correct answers from the correct accordion', () => {
150
234
  chartsDotPlotPage.steps.resetQuestionPreview();
151
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1 });
152
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 3, min: 1, interval: 1 });
235
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(6, { point: 2, min: 1, interval: 1, defaultDots: 2 });
236
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(8, { point: 3, min: 1, interval: 1, defaultDots: 3 });
153
237
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(6, { point: 4, min: 1, interval: 1, defaultDots: 0 });
154
238
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 6, min: 1, interval: 1, defaultDots: 0 });
155
239
  chartsDotPlotPage.steps.verifyPreviewScore(12, 20);
@@ -160,13 +244,32 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
160
244
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 1, defaultDots: 0 });
161
245
  chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 1, defaultDots: 0 });
162
246
  chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 1, defaultDots: 0 });
247
+ //alternative answer
248
+ if (alternativeAnswerCheck === 'true') {
249
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 4 pts, 4 pts, 4 pts, 4 pts, 4 pts)');
250
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
251
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
252
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
253
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
254
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
255
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
256
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 2.4 pts, 2.4 pts, 2.4 pts, 2.4 pts, 2.4 pts)');
257
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
258
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
259
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
260
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
261
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
262
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
263
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
264
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
265
+ }
163
266
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
164
267
  });
165
268
 
166
269
  it('When the user attempts the question with more answers from the alternate accordion than the correct accordion, then the user should be awarded with points for the correctly set bars from the alternate accordion and on switching to \'Grading\' view, correct icon should be displayed besides the correct accordion responses, incorrect icons should be displayed on the alternate accordion responses, correct/incorrect status message should not be displayed and correct answer section should be displayed with the correct answers from the correct accordion', () => {
167
270
  chartsDotPlotPage.steps.resetQuestionPreview();
168
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1 });
169
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1 });
271
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
272
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(6, { point: 3, min: 1, interval: 1,defaultDots: 3 });
170
273
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 4, min: 1, interval: 1, defaultDots: 0 });
171
274
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 6, min: 1, interval: 1, defaultDots: 0 });
172
275
  chartsDotPlotPage.steps.verifyPreviewScore(9.6, 20);
@@ -176,13 +279,32 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
176
279
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 1, defaultDots: 0 });
177
280
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 1, defaultDots: 0 });
178
281
  chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 1, defaultDots: 0 });
282
+ //alternative answer
283
+ if (alternativeAnswerCheck === 'true') {
284
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 4 pts, 4 pts, 4 pts, 4 pts, 4 pts)');
285
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
286
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
287
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
288
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
289
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
290
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
291
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 2.4 pts, 2.4 pts, 2.4 pts, 2.4 pts, 2.4 pts)');
292
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
293
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
294
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
295
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
296
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
297
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
298
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
299
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
300
+ }
179
301
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
180
302
  });
181
303
 
182
304
  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 points for the correctly set bars and on switching to \'Grading\' view, correct icon should be displayed besides response field with correct answer responses, incorrect icon should be displayed beside responses from the alternative tab, correct/incorrect status message should not be displayed and correct answer section should be displayed with the correct answers from the correct accordion', () => {
183
305
  chartsDotPlotPage.steps.resetQuestionPreview();
184
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1 });
185
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1 });
306
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(6, { point: 2, min: 1, interval: 1, defaultDots: 2 });
307
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(6, { point: 3, min: 1, interval: 1, defaultDots: 3 });
186
308
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(6, { point: 4, min: 1, interval: 1, defaultDots: 0 });
187
309
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 6, min: 1, interval: 1, defaultDots: 0 });
188
310
  chartsDotPlotPage.steps.verifyPreviewScore(8, 20);
@@ -193,6 +315,25 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
193
315
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 1, defaultDots: 0 });
194
316
  chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 1, defaultDots: 0 });
195
317
  chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 1, defaultDots: 0 });
318
+ //alternative answer
319
+ if (alternativeAnswerCheck === 'true') {
320
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 4 pts, 4 pts, 4 pts, 4 pts, 4 pts)');
321
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
322
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
323
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
324
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
325
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
326
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
327
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 2.4 pts, 2.4 pts, 2.4 pts, 2.4 pts, 2.4 pts)');
328
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
329
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
330
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
331
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
332
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
333
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
334
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
335
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
336
+ }
196
337
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
197
338
  });
198
339
 
@@ -202,8 +343,8 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
202
343
  chartsDotPlotPage.steps.expandCorrectAnswerAccordion();
203
344
  chartsDotPlotPage.steps.allotPoints(40);
204
345
  chartsDotPlotPage.steps.switchToPreviewTab();
205
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1 });
206
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1 });
346
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(6, { point: 2, min: 1, interval: 1, defaultDots: 2 });
347
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(6, { point: 3, min: 1, interval: 1, defaultDots: 3 });
207
348
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 4, min: 1, interval: 1, defaultDots: 0 });
208
349
  chartsDotPlotPage.steps.verifyPreviewScore(8, 40);
209
350
  chartsDotPlotPage.steps.switchToGradingView();
@@ -213,6 +354,25 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
213
354
  chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 1, defaultDots: 0 });
214
355
  chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 1, defaultDots: 0 });
215
356
  chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 1, defaultDots: 0 });
357
+ //alternative answer
358
+ if (alternativeAnswerCheck === 'true') {
359
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 0 pts, 8 pts, 8 pts, 8 pts, 8 pts, 8 pts)');
360
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
361
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
362
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
363
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
364
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
365
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
366
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0 pts, 2.4 pts, 2.4 pts, 2.4 pts, 2.4 pts, 2.4 pts)');
367
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
368
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
369
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
370
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
371
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
372
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
373
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
374
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
375
+ }
216
376
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
217
377
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
218
378
  });