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
@@ -2,6 +2,7 @@ import { chartsLinePage } from "../../../../pages";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
3
  import utilities from "../../../../support/helpers/utilities";
4
4
  const css = Cypress.env('css');
5
+ const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
5
6
 
6
7
  describe('Create item page - Charts - Point: All or nothing scoring with alternative answer - When Correct answer points are more than alternative Answer points', () => {
7
8
  before(() => {
@@ -49,6 +50,28 @@ describe('Create item page - Charts - Point: All or nothing scoring with alterna
49
50
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
50
51
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
51
52
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
53
+ if (alternativeAnswerCheck === 'true') {
54
+ chartsLinePage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
55
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
56
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
57
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
58
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
59
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, 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, '(10 points)');
67
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 0, value: 4, range: 10 });
68
+ chartsLinePage.steps.verifyLockedPointInAlternativeAnswerSection({ pointIndex: 1, value: 2, range: 10 });
69
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 2, value: 0, range: 10 });
70
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 3, value: 4, range: 10 });
71
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 4, value: 6, range: 10 });
72
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
73
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
74
+ }
52
75
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
53
76
  /*cy.log('When the user selects check answer without attempting the question, then correct/incorrect status message should not be displayed, incorrect icons should be displayed on the unattempted bars and correct icons should be displayed on the bar which is correct by default')
54
77
  chartsLinePage.steps.checkAnswer();
@@ -95,6 +118,28 @@ describe('Create item page - Charts - Point: All or nothing scoring with alterna
95
118
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
96
119
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
97
120
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
121
+ if (alternativeAnswerCheck === 'true') {
122
+ chartsLinePage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
123
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
124
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
125
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
126
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
127
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
128
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleExists();
129
+ chartsLinePage.steps.disableShowAlternativeAnswersToggle();
130
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
131
+ chartsLinePage.steps.verifyAlternativeAnswersSectionNotExist();
132
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
133
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleChecked();
134
+ chartsLinePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
135
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 0, value: 4, range: 10 });
136
+ chartsLinePage.steps.verifyLockedPointInAlternativeAnswerSection({ pointIndex: 1, value: 2, range: 10 });
137
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 2, value: 0, range: 10 });
138
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 3, value: 4, range: 10 });
139
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 4, value: 6, range: 10 });
140
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
141
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
142
+ }
98
143
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
99
144
  /*cy.log('When the user selects check answer after incorrectly attempting the question, then \'Your answer is incorrect\' should be displayed, incorrect icons should be displayed on the incorrectly attempted bars')
100
145
  chartsLinePage.steps.checkAnswer();
@@ -142,6 +187,9 @@ describe('Create item page - Charts - Point: All or nothing scoring with alterna
142
187
  chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
143
188
  chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('correct');
144
189
  chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();
190
+ if (alternativeAnswerCheck === 'true') {
191
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleNotExists();
192
+ }
145
193
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
146
194
  /*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 besides the correct answer responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed')
147
195
  chartsLinePage.steps.checkAnswer();
@@ -194,6 +242,9 @@ describe('Create item page - Charts - Point: All or nothing scoring with alterna
194
242
  chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
195
243
  chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('correct');
196
244
  chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();
245
+ if (alternativeAnswerCheck === 'true') {
246
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleNotExists();
247
+ }
197
248
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
198
249
  /*cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed')
199
250
  chartsLinePage.steps.checkAnswer();
@@ -222,6 +273,28 @@ describe('Create item page - Charts - Point: All or nothing scoring with alterna
222
273
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
223
274
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
224
275
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
276
+ if (alternativeAnswerCheck === 'true') {
277
+ chartsLinePage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
278
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
279
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
280
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
281
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
282
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
283
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleExists();
284
+ chartsLinePage.steps.disableShowAlternativeAnswersToggle();
285
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
286
+ chartsLinePage.steps.verifyAlternativeAnswersSectionNotExist();
287
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
288
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleChecked();
289
+ chartsLinePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
290
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 0, value: 4, range: 10 });
291
+ chartsLinePage.steps.verifyLockedPointInAlternativeAnswerSection({ pointIndex: 1, value: 2, range: 10 });
292
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 2, value: 0, range: 10 });
293
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 3, value: 4, range: 10 });
294
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 4, value: 6, range: 10 });
295
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
296
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
297
+ }
225
298
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
226
299
  /*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 besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
227
300
  chartsLinePage.steps.checkAnswer();
@@ -252,6 +325,28 @@ describe('Create item page - Charts - Point: All or nothing scoring with alterna
252
325
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
253
326
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
254
327
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
328
+ if (alternativeAnswerCheck === 'true') {
329
+ chartsLinePage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
330
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
331
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
332
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
333
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
334
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
335
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleExists();
336
+ chartsLinePage.steps.disableShowAlternativeAnswersToggle();
337
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
338
+ chartsLinePage.steps.verifyAlternativeAnswersSectionNotExist();
339
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
340
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleChecked();
341
+ chartsLinePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
342
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 0, value: 4, range: 10 });
343
+ chartsLinePage.steps.verifyLockedPointInAlternativeAnswerSection({ pointIndex: 1, value: 2, range: 10 });
344
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 2, value: 0, range: 10 });
345
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 3, value: 4, range: 10 });
346
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 4, value: 6, range: 10 });
347
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
348
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
349
+ }
255
350
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
256
351
  /*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 besides the correct answer responses, incorrect icons should be displayed on the incorrect bars a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
257
352
  chartsLinePage.steps.checkAnswer();
@@ -282,6 +377,28 @@ describe('Create item page - Charts - Point: All or nothing scoring with alterna
282
377
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
283
378
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
284
379
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
380
+ if (alternativeAnswerCheck === 'true') {
381
+ chartsLinePage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
382
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
383
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
384
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
385
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
386
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
387
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleExists();
388
+ chartsLinePage.steps.disableShowAlternativeAnswersToggle();
389
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
390
+ chartsLinePage.steps.verifyAlternativeAnswersSectionNotExist();
391
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
392
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleChecked();
393
+ chartsLinePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
394
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 0, value: 4, range: 10 });
395
+ chartsLinePage.steps.verifyLockedPointInAlternativeAnswerSection({ pointIndex: 1, value: 2, range: 10 });
396
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 2, value: 0, range: 10 });
397
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 3, value: 4, range: 10 });
398
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 4, value: 6, range: 10 });
399
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
400
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
401
+ }
285
402
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
286
403
  /*cy.log('When the user attempts the question with all answers from the correct accordion except one and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
287
404
  chartsLinePage.steps.checkAnswer();
@@ -311,6 +428,28 @@ describe('Create item page - Charts - Point: All or nothing scoring with alterna
311
428
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
312
429
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
313
430
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
431
+ if (alternativeAnswerCheck === 'true') {
432
+ chartsLinePage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
433
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
434
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
435
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
436
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
437
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
438
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleExists();
439
+ chartsLinePage.steps.disableShowAlternativeAnswersToggle();
440
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
441
+ chartsLinePage.steps.verifyAlternativeAnswersSectionNotExist();
442
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
443
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleChecked();
444
+ chartsLinePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
445
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 0, value: 4, range: 10 });
446
+ chartsLinePage.steps.verifyLockedPointInAlternativeAnswerSection({ pointIndex: 1, value: 2, range: 10 });
447
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 2, value: 0, range: 10 });
448
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 3, value: 4, range: 10 });
449
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 4, value: 6, range: 10 });
450
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
451
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
452
+ }
314
453
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
315
454
  /*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 besides the correct accordion responses, incorrect icons should be displayed on the alternate accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
316
455
  chartsLinePage.steps.checkAnswer();
@@ -339,6 +478,28 @@ describe('Create item page - Charts - Point: All or nothing scoring with alterna
339
478
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
340
479
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
341
480
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
481
+ if (alternativeAnswerCheck === 'true') {
482
+ chartsLinePage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
483
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
484
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
485
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
486
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
487
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
488
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleExists();
489
+ chartsLinePage.steps.disableShowAlternativeAnswersToggle();
490
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
491
+ chartsLinePage.steps.verifyAlternativeAnswersSectionNotExist();
492
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
493
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleChecked();
494
+ chartsLinePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
495
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 0, value: 4, range: 10 });
496
+ chartsLinePage.steps.verifyLockedPointInAlternativeAnswerSection({ pointIndex: 1, value: 2, range: 10 });
497
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 2, value: 0, range: 10 });
498
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 3, value: 4, range: 10 });
499
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 4, value: 6, range: 10 });
500
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
501
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
502
+ }
342
503
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
343
504
  /*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 besides the correct accordion responses, incorrect icons should be displayed on the alternate accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
344
505
  chartsLinePage.steps.checkAnswer();
@@ -369,6 +530,28 @@ describe('Create item page - Charts - Point: All or nothing scoring with alterna
369
530
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
370
531
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
371
532
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
533
+ if (alternativeAnswerCheck === 'true') {
534
+ chartsLinePage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
535
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
536
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
537
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
538
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
539
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
540
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleExists();
541
+ chartsLinePage.steps.disableShowAlternativeAnswersToggle();
542
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
543
+ chartsLinePage.steps.verifyAlternativeAnswersSectionNotExist();
544
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
545
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleChecked();
546
+ chartsLinePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
547
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 0, value: 4, range: 10 });
548
+ chartsLinePage.steps.verifyLockedPointInAlternativeAnswerSection({ pointIndex: 1, value: 2, range: 10 });
549
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 2, value: 0, range: 10 });
550
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 3, value: 4, range: 10 });
551
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 4, value: 6, range: 10 });
552
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
553
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
554
+ }
372
555
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
373
556
  /*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 besides the correct answer responses, incorrect icon should be displayed beside empty responses a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
374
557
  chartsLinePage.steps.checkAnswer();
@@ -400,6 +583,28 @@ describe('Create item page - Charts - Point: All or nothing scoring with alterna
400
583
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
401
584
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
402
585
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
586
+ if (alternativeAnswerCheck === 'true') {
587
+ chartsLinePage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
588
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
589
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
590
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
591
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
592
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
593
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleExists();
594
+ chartsLinePage.steps.disableShowAlternativeAnswersToggle();
595
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
596
+ chartsLinePage.steps.verifyAlternativeAnswersSectionNotExist();
597
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
598
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleChecked();
599
+ chartsLinePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
600
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 0, value: 4, range: 10 });
601
+ chartsLinePage.steps.verifyLockedPointInAlternativeAnswerSection({ pointIndex: 1, value: 2, range: 10 });
602
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 2, value: 0, range: 10 });
603
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 3, value: 4, range: 10 });
604
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: 4, value: 6, range: 10 });
605
+ chartsLinePage.steps.clickShowAlternativeAnswersToggle();
606
+ chartsLinePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
607
+ }
403
608
  chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
404
609
  /*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 besides the correct answer responses, incorrect icons should be displayed on the incorrect bars a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
405
610
  chartsLinePage.steps.checkAnswer();