itemengine-cypress-automation 1.0.585-IEI-7054-f7c1dac.0 → 1.0.585-cypressFixes-c9c94f0.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.
@@ -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(() => {
@@ -68,26 +67,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
68
67
  graphingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
69
68
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
70
69
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
71
-
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(), 1);
88
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
89
- utilities.verifyElementCount(graphingPage.graphPolygonAlternativeAnswerSection(), 1);
90
- }
91
70
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
92
71
 
93
72
  /*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')
@@ -121,9 +100,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
121
100
  //Correct/incorrect icon
122
101
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
123
102
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();
124
- if (alternativeAnswerCheck === 'true') {
125
- graphingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
126
- }
127
103
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
128
104
 
129
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')
@@ -159,9 +135,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
159
135
  //Correct/incorrect icon
160
136
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct')
161
137
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();
162
- if (alternativeAnswerCheck === 'true') {
163
- graphingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
164
- }
165
138
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
166
139
 
167
140
  /*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')
@@ -202,26 +175,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
202
175
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
203
176
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
204
177
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
205
-
206
- if (alternativeAnswerCheck === 'true') {
207
- // Correct answer label and points
208
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
209
- // Alternative answer toggle
210
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
211
- graphingPage.steps.disableShowAlternativeAnswersToggle();
212
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
213
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
214
- graphingPage.steps.clickShowAlternativeAnswersToggle();
215
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
216
- // Alternate answer section
217
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
218
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 2);
219
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
220
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
221
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 1);
222
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
223
- utilities.verifyElementCount(graphingPage.graphPolygonAlternativeAnswerSection(), 1);
224
- }
225
178
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
226
179
 
227
180
  /*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')
@@ -262,26 +215,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
262
215
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
263
216
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
264
217
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
265
-
266
- if (alternativeAnswerCheck === 'true') {
267
- // Correct answer label and points
268
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
269
- // Alternative answer toggle
270
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
271
- graphingPage.steps.disableShowAlternativeAnswersToggle();
272
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
273
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
274
- graphingPage.steps.clickShowAlternativeAnswersToggle();
275
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
276
- // Alternate answer section
277
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
278
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 2);
279
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
280
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
281
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 1);
282
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
283
- utilities.verifyElementCount(graphingPage.graphPolygonAlternativeAnswerSection(), 1);
284
- }
285
218
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
286
219
 
287
220
  /*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')
@@ -324,25 +257,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
324
257
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
325
258
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
326
259
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
327
- if (alternativeAnswerCheck === 'true') {
328
- // Correct answer label and points
329
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
330
- // Alternative answer toggle
331
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
332
- graphingPage.steps.disableShowAlternativeAnswersToggle();
333
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
334
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
335
- graphingPage.steps.clickShowAlternativeAnswersToggle();
336
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
337
- // Alternate answer section
338
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
339
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 2);
340
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
341
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
342
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 1);
343
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
344
- utilities.verifyElementCount(graphingPage.graphPolygonAlternativeAnswerSection(), 1);
345
- }
346
260
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
347
261
 
348
262
  /*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')
@@ -382,25 +296,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
382
296
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
383
297
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
384
298
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
385
- if (alternativeAnswerCheck === 'true') {
386
- // Correct answer label and points
387
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
388
- // Alternative answer toggle
389
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
390
- graphingPage.steps.disableShowAlternativeAnswersToggle();
391
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
392
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
393
- graphingPage.steps.clickShowAlternativeAnswersToggle();
394
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
395
- // Alternate answer section
396
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
397
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 2);
398
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
399
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
400
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 1);
401
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
402
- utilities.verifyElementCount(graphingPage.graphPolygonAlternativeAnswerSection(), 1);
403
- }
404
299
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
405
300
 
406
301
  /*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')
@@ -439,25 +334,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
439
334
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
440
335
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
441
336
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
442
- if (alternativeAnswerCheck === 'true') {
443
- // Correct answer label and points
444
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
445
- // Alternative answer toggle
446
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
447
- graphingPage.steps.disableShowAlternativeAnswersToggle();
448
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
449
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
450
- graphingPage.steps.clickShowAlternativeAnswersToggle();
451
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
452
- // Alternate answer section
453
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
454
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 2);
455
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
456
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
457
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 1);
458
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
459
- utilities.verifyElementCount(graphingPage.graphPolygonAlternativeAnswerSection(), 1);
460
- }
461
337
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
462
338
 
463
339
  /*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')
@@ -491,9 +367,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
491
367
  graphingPage.steps.switchToGradingView();
492
368
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
493
369
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();
494
- if (alternativeAnswerCheck === 'true') {
495
- graphingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
496
- }
497
370
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
498
371
  });
499
372
 
@@ -506,9 +379,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
506
379
  graphingPage.steps.switchToGradingView();
507
380
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();
508
381
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
509
- if (alternativeAnswerCheck === 'true') {
510
- graphingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
511
- }
512
382
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
513
383
  });
514
384
  });
@@ -537,9 +407,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
537
407
  graphingPage.steps.switchToGradingView();
538
408
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();
539
409
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
540
- if (alternativeAnswerCheck === 'true') {
541
- graphingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
542
- }
543
410
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
544
411
  });
545
412
 
@@ -550,9 +417,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
550
417
  graphingPage.steps.switchToGradingView();
551
418
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();
552
419
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
553
- if (alternativeAnswerCheck === 'true') {
554
- graphingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
555
- }
556
420
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
557
421
  });
558
422
  });
@@ -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', '(20 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')
@@ -157,9 +135,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
157
135
  //Correct/incorrect icon
158
136
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct')
159
137
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();
160
- if (alternativeAnswerCheck === 'true') {
161
- graphingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
162
- }
163
138
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
164
139
 
165
140
  /*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')
@@ -201,24 +176,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
201
176
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
202
177
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
203
178
  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 }]);
204
- if (alternativeAnswerCheck === 'true') {
205
- // Correct answer label and points
206
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
207
- // Alternative answer toggle
208
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
209
- graphingPage.steps.disableShowAlternativeAnswersToggle();
210
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
211
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
212
- graphingPage.steps.clickShowAlternativeAnswersToggle();
213
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
214
- // Alternate answer section
215
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
216
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 2);
217
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
218
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
219
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 2);
220
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
221
- }
222
179
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
223
180
 
224
181
  /*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')
@@ -260,24 +217,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
260
217
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
261
218
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
262
219
  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 }]);
263
- if (alternativeAnswerCheck === 'true') {
264
- // Correct answer label and points
265
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
266
- // Alternative answer toggle
267
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
268
- graphingPage.steps.disableShowAlternativeAnswersToggle();
269
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
270
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
271
- graphingPage.steps.clickShowAlternativeAnswersToggle();
272
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
273
- // Alternate answer section
274
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
275
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 2);
276
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
277
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
278
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 2);
279
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
280
- }
281
220
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
282
221
 
283
222
  /*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')
@@ -321,24 +260,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
321
260
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
322
261
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
323
262
  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 }]);
324
- if (alternativeAnswerCheck === 'true') {
325
- // Correct answer label and points
326
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
327
- // Alternative answer toggle
328
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
329
- graphingPage.steps.disableShowAlternativeAnswersToggle();
330
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
331
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
332
- graphingPage.steps.clickShowAlternativeAnswersToggle();
333
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
334
- // Alternate answer section
335
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
336
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 2);
337
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
338
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
339
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 2);
340
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
341
- }
342
263
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
343
264
 
344
265
  /*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')
@@ -379,24 +300,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
379
300
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
380
301
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
381
302
  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 }]);
382
- if (alternativeAnswerCheck === 'true') {
383
- // Correct answer label and points
384
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
385
- // Alternative answer toggle
386
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
387
- graphingPage.steps.disableShowAlternativeAnswersToggle();
388
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
389
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
390
- graphingPage.steps.clickShowAlternativeAnswersToggle();
391
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
392
- // Alternate answer section
393
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
394
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 2);
395
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
396
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
397
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 2);
398
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
399
- }
400
303
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
401
304
 
402
305
  /*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')
@@ -436,24 +339,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
436
339
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
437
340
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
438
341
  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 }]);
439
- if (alternativeAnswerCheck === 'true') {
440
- // Correct answer label and points
441
- graphingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
442
- // Alternative answer toggle
443
- graphingPage.steps.verifyShowAlternativeAnswersToggleExists();
444
- graphingPage.steps.disableShowAlternativeAnswersToggle();
445
- graphingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
446
- graphingPage.steps.verifyAlternativeAnswersSectionNotExist();
447
- graphingPage.steps.clickShowAlternativeAnswersToggle();
448
- graphingPage.steps.verifyShowAlternativeAnswersToggleChecked();
449
- // Alternate answer section
450
- graphingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
451
- utilities.verifyElementCount(graphingPage.graphCircleAlternativeAnswerSection(), 2);
452
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
453
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
454
- utilities.verifyElementCount(graphingPage.graphLineAlternativeAnswerSection(), 2);
455
- graphingPage.steps.verifyPointsPlottedOnAlternativeAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
456
- }
457
342
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
458
343
 
459
344
  /*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')
@@ -492,9 +377,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
492
377
  graphingPage.steps.switchToGradingView();
493
378
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();
494
379
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
495
- if (alternativeAnswerCheck === 'true') {
496
- graphingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
497
- }
498
380
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
499
381
  });
500
382
 
@@ -505,9 +387,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
505
387
  graphingPage.steps.switchToGradingView();
506
388
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();
507
389
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
508
- if (alternativeAnswerCheck === 'true') {
509
- graphingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
510
- }
511
390
  graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
512
391
  });
513
392
  });
@@ -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
 
@@ -506,7 +506,7 @@ describe('Create item page - List ordering: All or nothing ', () => {
506
506
  listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(2);
507
507
  listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(3);
508
508
  listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
509
- utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answer');
509
+ utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
510
510
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(['sprout', 'plant', 'flower', 'seed'], ['2', '3', '4', '1']);
511
511
  };
512
512
  });
@@ -713,7 +713,13 @@ const steps = {
713
713
  * @param {string} fileSize size of the file being uploaded
714
714
  */
715
715
  verifyUploadingFilesMessage: (fileName, fileSize) => {
716
- utilities.verifyInnerText(drawingResponsePage.insertImageContainer(), `Uploading files. Please wait...\n${fileName} - ${fileSize}`);
716
+ drawingResponsePage.insertImageContainer()
717
+ .should('be.visible')
718
+ .and(($el) => {
719
+ const text = $el.text();
720
+ expect(text).to.include('Uploading files. Please wait...');
721
+ expect(text).to.include(`${fileName} - ${fileSize}`);
722
+ });
717
723
  },
718
724
 
719
725
  /**
@@ -32,7 +32,7 @@ const selectors = {
32
32
  dropzoneSettingsSetForAllDropzoneLabel: () => cy.get('[data-ngie-testid="set-for-all-dropzones-checkbox"] [class*="label"]'),
33
33
  dropzoneSettingsSetForAllDropzoneCheckbox: () => cy.get('[data-ngie-testid="set-for-all-dropzones-checkbox"] input'),
34
34
  //Specify correct answer section
35
- dropzoneSpecifyCorrectAnswerSection: () => cy.get('[class="droppable-area"] [role="button"]'),
35
+ dropzoneSpecifyCorrectAnswerSection: () => cy.get('.authoring-droppable-hotspot-wrapper'),
36
36
  optionContainerOptionsSpecifyCorrectAnswerSection: () => cy.get('.draggable-selected-item'),
37
37
  optionsContainerSpecifyCorrectAnswerSection: () => cy.get('.draggable-wrapper'),
38
38
  addAlternateButtonSpecifyCorrectAnswer: () => cy.get('.alternate-option-btn-wrapper button'),
@@ -96,7 +96,8 @@ const selectors = {
96
96
  dropzoneNumerationBox: () => cy.get('.answer-numeration-number-box'),
97
97
  correctAnswerResponseWrapperWithoutEnumeration: () => cy.get('.dnd-correct-answer-wrapper [class*="ResponseDropZonestyles__ResponseWrapper"]'),
98
98
  responseAreaPreviewTab: () => cy.get('[class*="ResponseDropZonestyles__ResponseWrapper"] .cell'),
99
- droppedOptionPreviewTab: () => cy.get('.response-dropped')
99
+ droppedOptionPreviewTab: () => cy.get('.response-dropped'),
100
+ correctAnswersOptions: () => cy.get('[class*="ResponseComponentstyles__AnswerCell"] .question-text-wrapper'),
100
101
  }
101
102
 
102
103
  const steps = {
@@ -1225,6 +1226,16 @@ const steps = {
1225
1226
  'border-style': styleName
1226
1227
  });
1227
1228
  },
1229
+
1230
+ verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount: (correctAnswerArray) => {
1231
+ utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.correctAnswersOptions(), correctAnswerArray.length);
1232
+ correctAnswerArray.forEach((correctAnswer, index) => {
1233
+ utilities.verifyTextContent(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.dropzoneNumerationBox(), index), index + 1);
1234
+ correctAnswer.forEach((answerOption) => {
1235
+ utilities.verifyTextContent(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.correctAnswersOptions(), index), answerOption);
1236
+ });
1237
+ });
1238
+ },
1228
1239
  }
1229
1240
 
1230
1241
  const tests = {
@@ -1,5 +1,5 @@
1
1
  import utilities from "../support/helpers/utilities";
2
- import { questionInstructionsComponent, createQuestionBasePage, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, commonComponents, backgroundImageUploadComponent, imageCanvasComponent, opacityComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, toolsAndControlsComponent, resetPopupComponent, defaultToolDropdown, showAlternativeAnswersComponent } from "./components";
2
+ import { questionInstructionsComponent, createQuestionBasePage, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, commonComponents, backgroundImageUploadComponent, imageCanvasComponent, opacityComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, toolsAndControlsComponent, resetPopupComponent, defaultToolDropdown } from "./components";
3
3
  import { createItemPage } from "./createItemPage";
4
4
  const css = Cypress.env('css');
5
5
 
@@ -17,7 +17,6 @@ const selectors = {
17
17
  ...toolsAndControlsComponent,
18
18
  ...resetPopupComponent,
19
19
  ...defaultToolDropdown,
20
- ...showAlternativeAnswersComponent,
21
20
 
22
21
  //Edit tab
23
22
  graphEditTab: () => cy.get('[class*="GraphingWrapper"] .ngie-jxgbox svg'),
@@ -236,18 +235,13 @@ const selectors = {
236
235
  //Correct answer section
237
236
  correctAnswerLabel: () => cy.get('[class*="AnswerLabel"]'),
238
237
  graphCorrectAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox svg'),
239
- graphAlternativeAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox svg').eq(1),
240
238
  graphCircleCorrectAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox').eq(1).find('ellipse[fill-opacity="0"]'),
241
- graphCircleAlternativeAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox').eq(2).find('ellipse[fill-opacity="0"]'),
242
239
  graphLineCorrectAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox').eq(1).find('line[tabindex="0"][stroke-width="2px"]'),
243
- graphLineAlternativeAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox').eq(2).find('line[tabindex="0"][stroke-width="2px"]'),
244
240
  graphPolygonCorrectAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox').eq(1).find('polygon'),
245
- graphPolygonAlternativeAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox').eq(2).find('polygon'),
246
241
  graphSineWaveCorrectAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox').eq(1).find('[pointer-events="visiblePainted"][tabindex="0"][fill-rule="evenodd"]'),
247
242
  correctIncorrectStatusMessageText: () => cy.get('[class*="Graphingstyles__CorrectIncorrectWrapper"]'),
248
243
  incorrectIcon: () => cy.get('[data-icon="Incorrect"]'),
249
244
  correctIcon: () => cy.get('[data-icon="CorrectAnswer"]'),
250
- correctAnswerLabelWrapper: () => cy.get('[class*="CorrectAnswerLabelWrapper"]'),
251
245
 
252
246
  //Accept repeated points
253
247
  acceptRepeatedPointsToggle: () => cy.get('.repeated-points-wrapper input'),
@@ -272,7 +266,6 @@ const steps = {
272
266
  ...resetPopupComponent.steps,
273
267
  ...defaultToolDropdown.steps,
274
268
  ...createItemPage.steps,
275
- ...showAlternativeAnswersComponent.steps,
276
269
 
277
270
  //Edit tab
278
271
  checkPatternBackground: () => {
@@ -1721,31 +1714,6 @@ const steps = {
1721
1714
  });
1722
1715
  },
1723
1716
 
1724
- verifyPointsPlottedOnAlternativeAnswerSection: (coordinates) => {
1725
- coordinates.forEach(({ x, xRange, y, yRange }) => {
1726
- graphingPage.graphAlternativeAnswerSection()
1727
- .then(($graphElement) => {
1728
- const graphWidth = $graphElement[0].clientWidth;
1729
- const graphHeight = $graphElement[0].clientHeight;
1730
- const originX = graphWidth / 2;
1731
- const originY = graphHeight / 2;
1732
- const xPixel = originX + x * (graphWidth / (xRange + 1));
1733
- const yPixel = originY - y * (graphHeight / (yRange + 1));
1734
- cy.get('[class*="GraphingQuestion"] .ngie-jxgbox svg').eq(1).find(`ellipse[display="inline"][cx*="${xPixel}"][cy*="${yPixel}"]`)
1735
- .should('be.visible');
1736
- });
1737
- });
1738
- },
1739
-
1740
- verifyAnswerLabelAndPoints: (expectedLabel, expectedPoints, sectionIndex = 0) => {
1741
- graphingPage.correctAnswerLabelWrapper()
1742
- .eq(sectionIndex)
1743
- .within(() => {
1744
- cy.contains(expectedLabel).should('be.visible');
1745
- cy.get('p').should('contain.text', expectedPoints);
1746
- });
1747
- },
1748
-
1749
1717
  /**
1750
1718
  * This function verifies the plotted points are correct
1751
1719
  * @param {Object[]} coordinates - An array containing x and x coordinates along with their range
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.585-IEI-7054-f7c1dac.0",
3
+ "version": "1.0.585-cypressFixes-c9c94f0.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {