itemengine-cypress-automation 1.0.585-IEI-7054-f7c1dac.0 → 1.0.585-IEI-7055-cypress-f1d43b9.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 (28) hide show
  1. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +0 -136
  2. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -121
  3. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -121
  4. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +0 -273
  5. package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +1 -6
  6. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +69 -0
  7. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +69 -0
  8. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +69 -0
  9. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +69 -1
  10. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +81 -0
  11. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +69 -0
  12. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +240 -0
  13. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +235 -0
  14. package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +87 -6
  15. package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +80 -2
  16. package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +81 -2
  17. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +98 -0
  18. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +98 -0
  19. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +98 -0
  20. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +86 -0
  21. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +74 -0
  22. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +86 -0
  23. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +258 -0
  24. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/allOrNothingForAllViews.smoke.js +241 -0
  25. package/cypress/pages/graphingPage.js +1 -33
  26. package/cypress/pages/numberLineLabelPage.js +12 -8
  27. package/cypress/pages/numberLinePage.js +15 -10
  28. package/package.json +1 -1
@@ -3,7 +3,6 @@ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
3
  import utilities from "../../../../support/helpers/utilities";
4
4
  const unselectedToolOption = ['Circle', 'Parabola', 'Sine', 'Polygon'];
5
5
  const css = Cypress.env('css');
6
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
7
6
 
8
7
  describe('Create Item page - Graphing: All or nothing with alternative answer', () => {
9
8
  before(() => {
@@ -69,24 +68,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
69
68
  graphingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
70
69
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
71
70
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
72
- if (alternativeAnswerCheck === 'true') {
73
- // Correct answer label and points
74
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
75
- // Alternative answer toggle
76
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
77
- graphingPage.steps.disableShowAlternativeAnswersToggle();
78
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
79
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
80
- graphingPage.steps.clickShowAlternativeAnswersToggle();
81
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
82
- // Alternate answer section
83
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
84
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 2);
85
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
86
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
87
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 2);
88
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
89
- }
90
71
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
91
72
 
92
73
  /*cy.log('When the user switches to \'Grading view\' without attempting the question and clicks on \'Check answer\' button, status message and correct answer section should not be displayed')
@@ -119,9 +100,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
119
100
  //Correct/incorrect icon
120
101
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
121
102
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();
122
- if (alternativeAnswerCheck === 'true') {
123
- graphingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
124
- }
125
103
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
126
104
 
127
105
  /*cy.log('When the user attempts the question with responses from the correct accordion and clicks on \'Check answer\' button, the attempted graph should be displayed correct, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
@@ -183,9 +161,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
183
161
  //Correct/incorrect icon
184
162
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct')
185
163
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();
186
- if (alternativeAnswerCheck === 'true') {
187
- graphingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
188
- }
189
164
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
190
165
 
191
166
  /*cy.log('When the user attempts the question with responses from the alternative accordion and clicks on \'Check answer\' button, the attempted graph should be displayed correct, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
@@ -227,24 +202,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
227
202
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
228
203
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
229
204
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
230
- if (alternativeAnswerCheck === 'true') {
231
- // Correct answer label and points
232
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
233
- // Alternative answer toggle
234
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
235
- graphingPage.steps.disableShowAlternativeAnswersToggle();
236
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
237
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
238
- graphingPage.steps.clickShowAlternativeAnswersToggle();
239
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
240
- // Alternate answer section
241
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
242
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 2);
243
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
244
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
245
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 2);
246
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
247
- }
248
205
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
249
206
 
250
207
  /*cy.log('When the user attempts the question with partially correct responses exclusively from the correct accordion and clicks on \'Check answer\' button, the attempted graph should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
@@ -286,24 +243,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
286
243
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
287
244
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
288
245
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
289
- if (alternativeAnswerCheck === 'true') {
290
- // Correct answer label and points
291
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
292
- // Alternative answer toggle
293
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
294
- graphingPage.steps.disableShowAlternativeAnswersToggle();
295
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
296
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
297
- graphingPage.steps.clickShowAlternativeAnswersToggle();
298
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
299
- // Alternate answer section
300
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
301
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 2);
302
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
303
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
304
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 2);
305
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
306
- }
307
246
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
308
247
 
309
248
  /*cy.log('When the user attempts the question with partially correct responses exclusively from the alternative accordion and clicks on \'Check answer\' button, the attempted graph should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
@@ -347,24 +286,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
347
286
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
348
287
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
349
288
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
350
- if (alternativeAnswerCheck === 'true') {
351
- // Correct answer label and points
352
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
353
- // Alternative answer toggle
354
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
355
- graphingPage.steps.disableShowAlternativeAnswersToggle();
356
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
357
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
358
- graphingPage.steps.clickShowAlternativeAnswersToggle();
359
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
360
- // Alternate answer section
361
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
362
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 2);
363
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
364
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
365
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 2);
366
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
367
- }
368
289
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
369
290
 
370
291
  /*cy.log('When the user attempts the question with equal number responses from the correct and alternative accordion and clicks on \'Check answer\' button, the attempted graph should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
@@ -405,24 +326,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
405
326
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
406
327
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
407
328
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }]);
408
- if (alternativeAnswerCheck === 'true') {
409
- // Correct answer label and points
410
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
411
- // Alternative answer toggle
412
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
413
- graphingPage.steps.disableShowAlternativeAnswersToggle();
414
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
415
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
416
- graphingPage.steps.clickShowAlternativeAnswersToggle();
417
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
418
- // Alternate answer section
419
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
420
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 2);
421
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
422
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
423
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 2);
424
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
425
- }
426
329
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
427
330
 
428
331
  /*cy.log('When the user attempts the question with common response from the alternative accordion and clicks on \'Check answer\' button, the attempted graph should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
@@ -462,24 +365,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
462
365
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
463
366
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
464
367
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
465
- if (alternativeAnswerCheck === 'true') {
466
- // Correct answer label and points
467
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
468
- // Alternative answer toggle
469
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
470
- graphingPage.steps.disableShowAlternativeAnswersToggle();
471
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
472
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
473
- graphingPage.steps.clickShowAlternativeAnswersToggle();
474
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
475
- // Alternate answer section
476
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
477
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 2);
478
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
479
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
480
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 2);
481
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
482
- }
483
368
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
484
369
 
485
370
  /*cy.log('When the user has attempted the question with incorrect responses 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\' and correct answer section should not be displayed')
@@ -538,9 +423,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
538
423
  graphingPage.steps.switchToGradingView();
539
424
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();
540
425
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
541
- if (alternativeAnswerCheck === 'true') {
542
- graphingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
543
- }
544
426
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
545
427
  });
546
428
 
@@ -551,9 +433,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
551
433
  graphingPage.steps.switchToGradingView();
552
434
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();
553
435
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
554
- if (alternativeAnswerCheck === 'true') {
555
- graphingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
556
- }
557
436
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
558
437
  });
559
438
  });
@@ -7,7 +7,6 @@ const unselectedToolOption = ['Circle', 'Parabola', 'Sine', 'Polygon'];
7
7
  const views = utilities.getViews(correctAnswerViews);
8
8
  var itemReferenceID = "";
9
9
  const css = Cypress.env('css');
10
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
11
10
 
12
11
  describe('Create Item page - Graphing: All or nothing ', () => {
13
12
  before(() => {
@@ -298,276 +297,10 @@ describe('Create Item page - Graphing: All or nothing ', () => {
298
297
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
299
298
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
300
299
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();
301
- if (alternativeAnswerCheck === 'true') {
302
- graphingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
303
- }
304
300
  });
305
301
  });
306
302
  });
307
303
 
308
- if (alternativeAnswerCheck === 'true') {
309
- views.forEach((view) => {
310
- describe(`Graphing: All or nothing scoring with alternative answer section - ${view}`, { tags: 'smoke' }, () => {
311
- abortEarlySetup();
312
- before(() => {
313
- switch (view) {
314
- case 'Question preview':
315
- graphingPage.steps.navigateToCreateQuestion('Graphing');
316
- cy.barsPreLoaderWait();
317
- graphingPage.steps.allotPoints(20);
318
- graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
319
- graphingPage.steps.selectToolOptions(unselectedToolOption);
320
- graphingPage.steps.checkPatternBackground();
321
- graphingPage.steps.selectGraphToolOptionEditTab('Line');
322
- graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
323
- graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
324
- graphingPage.steps.selectGraphToolOptionEditTab('Circle');
325
- graphingPage.steps.plotPointsOnGraphEditTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
326
- graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
327
- graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Polygon');
328
- graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
329
- graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
330
- graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Vector');
331
- graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
332
- graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
333
- graphingPage.steps.addAlternativeAnswerAccordion(1);
334
- graphingPage.steps.allotPoints(20);
335
- graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Vector');
336
- graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
337
- graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
338
- graphingPage.steps.switchToPreviewTab();
339
- break;
340
- case 'Item preview':
341
- cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
342
- itemPreviewPage.steps.switchToPreviewTab();
343
- break;
344
- case 'Grading view':
345
- cy.wait(5000);
346
- cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
347
- break;
348
- }
349
- });
350
-
351
- beforeEach(() => {
352
- switch (view) {
353
- case 'Question preview':
354
- graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
355
- graphingPage.steps.resetQuestionPreview();
356
- break;
357
- case 'Item preview':
358
- itemPreviewPage.steps.switchToStudentView();
359
- itemPreviewPage.steps.resetQuestionPreview();
360
- break;
361
- case 'Grading view':
362
- cy.wait(5000);
363
- cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
364
- break;
365
- }
366
- });
367
-
368
- if (view === 'Question preview') {
369
- after(() => {
370
- graphingPage.steps.clickOnSaveQuestionButton();
371
- utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
372
- itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
373
- });
374
- };
375
- // Not attempted
376
- it('When the user selects \'Grading\' view without attempting the question, the correct answer should be displayed in the correct answer section graph and correct/incorrect status message should not be displayed', () => {
377
- if (view === 'Grading view') {
378
- studentViewPage.steps.submitResponse();
379
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
380
- studentViewPage.steps.clickOnGoToGradingViewButton();
381
- gradingViewPage.steps.verifyGradingViewScore(0, 20);
382
- }
383
- if (view === 'Question preview' || view === 'Item preview') {
384
- graphingPage.steps.switchToGradingView();
385
- graphingPage.steps.verifyPreviewScore(0, 20);
386
- }
387
- //Preview tab
388
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
389
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
390
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
391
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
392
-
393
- //Correct answer section
394
- utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 1);
395
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
396
- utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 2);
397
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
398
- utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
399
-
400
- //Correct/incorrect icon
401
- //TODO: Remove comment after https://redmine.zeuslearning.com/issues/565569 is resolved
402
- //graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
403
- graphingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
404
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
405
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
406
- // Correct answer label and points
407
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
408
- // Alternative answer toggle
409
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
410
- graphingPage.steps.disableShowAlternativeAnswersToggle();
411
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
412
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
413
- graphingPage.steps.clickShowAlternativeAnswersToggle();
414
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
415
- // Alternate answer section
416
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
417
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 1);
418
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
419
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 2);
420
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
421
- });
422
- // Attempted incorrectly
423
- it('When the user attempts the question incorrectly then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the attempted graph should be displayed incorrect and the the correct answers should be displayed in the correct answer section graph', () => {
424
- graphingPage.steps.selectGraphToolOptionPreviewTab('Circle');
425
- graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -2, xRange: 20, y: 1, yRange: 20 }, { x: -4, xRange: 20, y: 1, yRange: 20 }]);
426
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: -2, xRange: 20, y: 1, yRange: 20 }, { x: -4, xRange: 20, y: 1, yRange: 20 }]);
427
- if (view === 'Grading view') {
428
- studentViewPage.steps.submitResponse();
429
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
430
- studentViewPage.steps.clickOnGoToGradingViewButton();
431
- gradingViewPage.steps.verifyGradingViewScore(0, 20);
432
- }
433
- if (view === 'Question preview' || view === 'Item preview') {
434
- graphingPage.steps.verifyPreviewScore(0, 20);
435
- graphingPage.steps.switchToGradingView();
436
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 2);
437
- }
438
- //Preview tab
439
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
440
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: -2, xRange: 20, y: 1, yRange: 20 }, { x: -4, xRange: 20, y: 1, yRange: 20 }]);
441
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
442
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
443
- graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: -2, xRange: 20, y: 1, yRange: 20 }, { x: -4, xRange: 20, y: 1, yRange: 20 }]);
444
-
445
- //Correct answer section
446
- utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 1);
447
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
448
- utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 2);
449
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
450
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
451
- utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
452
-
453
- //Correct/incorrect icon
454
- graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
455
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
456
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
457
-
458
- // Correct answer label and points
459
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
460
- // Alternative answer toggle
461
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
462
- graphingPage.steps.disableShowAlternativeAnswersToggle();
463
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
464
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
465
- graphingPage.steps.clickShowAlternativeAnswersToggle();
466
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
467
- // Alternate answer section
468
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
469
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 1);
470
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
471
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 2);
472
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
473
- });
474
- // Attempted partially correct
475
- it('When the user attempts the question partially correct with an incorrect response then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the attempted graph should be displayed correct for the correct response and incorrect for the incorrect response and the the correct answers should be displayed in the correct answer section graph', () => {
476
- if (view === 'Grading view') {
477
- studentViewPage.steps.clearResponses();
478
- }
479
- graphingPage.steps.selectGraphToolOptionPreviewTab('Polygon');
480
- graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: -4, yRange: 20 }, { x: -3, xRange: 20, y: 4, yRange: 20 }]);
481
- graphingPage.steps.selectGraphToolOptionPreviewTab('Polygon');
482
- graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
483
- if (view === 'Grading view') {
484
- studentViewPage.steps.submitResponse();
485
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
486
- studentViewPage.steps.clickOnGoToGradingViewButton();
487
- gradingViewPage.steps.verifyGradingViewScore(0, 20);
488
- }
489
- if (view === 'Question preview' || view === 'Item preview') {
490
- graphingPage.steps.verifyPreviewScore(0, 20);
491
- graphingPage.steps.switchToGradingView();
492
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
493
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
494
- utilities.verifyElementCount(graphingPage.graphPolygonPreviewTab(), 2);
495
- }
496
- //Preview tab
497
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
498
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
499
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: -3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: -4, yRange: 20 }, { x: -3, xRange: 20, y: 4, yRange: 20 }]);
500
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
501
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
502
- graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: -3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: -4, yRange: 20 }, { x: -3, xRange: 20, y: 4, yRange: 20 }]);
503
-
504
- //Correct answer section
505
- utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 1);
506
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
507
- utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 2);
508
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
509
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
510
- utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
511
-
512
- //Correct/incorrect icon
513
- graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
514
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
515
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
516
- // Correct answer label and points
517
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
518
- // Alternative answer toggle
519
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
520
- graphingPage.steps.disableShowAlternativeAnswersToggle();
521
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
522
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
523
- graphingPage.steps.clickShowAlternativeAnswersToggle();
524
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
525
- // Alternate answer section
526
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
527
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 1);
528
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
529
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 2);
530
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
531
- });
532
- // Attempted correctly
533
- it('When the user attempts the question correctly then the user should be awarded with full points and on switching to grading view \'Your answer is correct\' should be displayed and the attempted graph should be displayed correct and the correct answer section graph should not be displayed', () => {
534
- if (view === 'Grading view') {
535
- studentViewPage.steps.clearResponses();
536
- }
537
- graphingPage.steps.selectGraphToolOptionPreviewTab('Polygon');
538
- graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
539
- graphingPage.steps.selectGraphToolOptionPreviewTab('Vector');
540
- graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
541
-
542
- if (view === 'Grading view') {
543
- studentViewPage.steps.submitResponse();
544
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
545
- studentViewPage.steps.clickOnGoToGradingViewButton();
546
- gradingViewPage.steps.verifyGradingViewScore(20, 20);
547
- }
548
- if (view === 'Question preview' || view === 'Item preview') {
549
- graphingPage.steps.verifyPreviewScore(20, 20);
550
- graphingPage.steps.switchToGradingView();
551
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
552
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 2);
553
- utilities.verifyElementCount(graphingPage.graphPolygonPreviewTab(), 1);
554
- }
555
- //Preview tab
556
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
557
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
558
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
559
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
560
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
561
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
562
- graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
563
- graphingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
564
- graphingPage.steps.verifyCorrectAnswerSectionNotExist();
565
- graphingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
566
- });
567
- });
568
- });
569
- }
570
-
571
304
  describe('Graphing: Line tool - All or nothing', { tags: 'smoke' }, () => {
572
305
  abortEarlySetup();
573
306
  before(() => {
@@ -1180,9 +913,6 @@ describe('Create Item page - Graphing: All or nothing ', () => {
1180
913
  graphingPage.steps.verifyCorrectIncorrectIconsNotExist();
1181
914
  graphingPage.steps.verifyCorrectIncorrectBorderNotExists();
1182
915
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();
1183
- if (alternativeAnswerCheck === 'true') {
1184
- graphingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
1185
- }
1186
916
  });
1187
917
  });
1188
918
  });
@@ -1317,9 +1047,6 @@ describe('Create Item page - Graphing: All or nothing ', () => {
1317
1047
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 1, xRange: 20, y: 4, yRange: 20 }, { x: 1, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 1, xRange: 20, y: 4, yRange: 20 }]);
1318
1048
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
1319
1049
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();
1320
- if (alternativeAnswerCheck === 'true') {
1321
- graphingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
1322
- }
1323
1050
  });
1324
1051
  });
1325
1052
  });
@@ -6,7 +6,6 @@ let gradingAndCorrectAnsView = ['Grading view', 'Correct answer view']
6
6
  const views = utilities.getViews(gradingAndCorrectAnsView);
7
7
  var itemReferenceID = "";
8
8
  const css = Cypress.env('css');
9
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
10
9
 
11
10
  const unselectedToolOption = ['Circle', 'Parabola', 'Sine', 'Polygon'];
12
11
 
@@ -79,11 +78,7 @@ describe('Create item page - Graphing: Grading view, Correct answer view content
79
78
  });
80
79
 
81
80
  it('Correct answer label should be displayed', () => {
82
- if (alternativeAnswerCheck === 'true') {
83
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(10 points)', 0);
84
- } else {
85
- utilities.verifyInnerText(graphingPage.correctAnswerLabel(), 'Correct answers');
86
- }
81
+ utilities.verifyInnerText(graphingPage.correctAnswerLabel(), 'Correct answers');
87
82
  utilities.verifyElementVisibilityState(graphingPage.correctAnswerLabel(), 'visible');
88
83
  });
89
84