itemengine-cypress-automation 1.0.577-IEI-7065-Improve-test-coverage-for-essay-response-1a0a73e.0 → 1.0.578-IEI-7079-de6e553.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +205 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +205 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +205 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +248 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +247 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +223 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +223 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +175 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +223 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePointsLocked.js +191 -0
- package/cypress/e2e/ILC/ChartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePointsLocked.js +184 -24
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +177 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +206 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +205 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +228 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +229 -1
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +229 -1
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +206 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +183 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +206 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePointsLocked.js +184 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +164 -10
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +165 -11
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +165 -11
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +164 -14
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +121 -10
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +167 -16
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +178 -15
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +121 -10
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +165 -13
- package/cypress/pages/chartsBarPage.js +44 -1
- package/cypress/pages/chartsDotPlotPage.js +99 -1
- package/cypress/pages/chartsLinePage.js +48 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { chartsBarPage } from "../../../../pages/chartsBarPage";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
3
4
|
|
|
4
5
|
describe('Create Item page - Charts - Bar: Partial different weights scoring with alternative answer - When correct answer points are more than alternative answer points', () => {
|
|
5
6
|
before(() => {
|
|
@@ -48,6 +49,30 @@ describe('Create Item page - Charts - Bar: Partial different weights scoring wit
|
|
|
48
49
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
|
49
50
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
50
51
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
|
52
|
+
if (alternativeAnswerCheck === 'true') {
|
|
53
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 7 pts, 5 pts, 4 pts, 8 pts, 4 pts)');
|
|
54
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
55
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
56
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
57
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
58
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
59
|
+
], 1);
|
|
60
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
61
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
62
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
63
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
64
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
65
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
66
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 6 pts, 3 pts, 2 pts, 9 pts, 2 pts)');
|
|
67
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
68
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
69
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
70
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
71
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
72
|
+
], 2);
|
|
73
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
74
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
75
|
+
}
|
|
51
76
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
52
77
|
/* cy.log('When the user selects check answer without attempting the question, then correct/incorrect status message should not be displayed, incorrect icons should be displayed on the unattempted bars and correct icons should be displayed on the bar which is correct by default')
|
|
53
78
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -78,6 +103,30 @@ describe('Create Item page - Charts - Bar: Partial different weights scoring wit
|
|
|
78
103
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
|
79
104
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
80
105
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
|
106
|
+
if (alternativeAnswerCheck === 'true') {
|
|
107
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 7 pts, 5 pts, 4 pts, 8 pts, 4 pts)');
|
|
108
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
109
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
110
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
111
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
112
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
113
|
+
], 1);
|
|
114
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
115
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
116
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
117
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
118
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
119
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
120
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 6 pts, 3 pts, 2 pts, 9 pts, 2 pts)');
|
|
121
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
122
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
123
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
124
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
125
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
126
|
+
], 2);
|
|
127
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
128
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
129
|
+
}
|
|
81
130
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
82
131
|
/* cy.log('When the user selects check answer after incorrectly attempting the question, then correct/incorrect status message should not be displayed, incorrect icons should be displayed on the incorrectly attempted bars')
|
|
83
132
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -103,6 +152,9 @@ describe('Create Item page - Charts - Bar: Partial different weights scoring wit
|
|
|
103
152
|
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
|
104
153
|
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
105
154
|
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
|
|
155
|
+
if (alternativeAnswerCheck === 'true') {
|
|
156
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
157
|
+
}
|
|
106
158
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
107
159
|
/* cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
|
108
160
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -129,6 +181,9 @@ describe('Create Item page - Charts - Bar: Partial different weights scoring wit
|
|
|
129
181
|
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
|
130
182
|
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
131
183
|
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
|
|
184
|
+
if (alternativeAnswerCheck === 'true') {
|
|
185
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
186
|
+
}
|
|
132
187
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
133
188
|
/* cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
|
134
189
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -158,6 +213,30 @@ describe('Create Item page - Charts - Bar: Partial different weights scoring wit
|
|
|
158
213
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
|
159
214
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
160
215
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
|
216
|
+
if (alternativeAnswerCheck === 'true') {
|
|
217
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 7 pts, 5 pts, 4 pts, 8 pts, 4 pts)');
|
|
218
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
219
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
220
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
221
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
222
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
223
|
+
], 1);
|
|
224
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
225
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
226
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
227
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
228
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
229
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
230
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 6 pts, 3 pts, 2 pts, 9 pts, 2 pts)');
|
|
231
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
232
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
233
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
234
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
235
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
236
|
+
], 2);
|
|
237
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
238
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
239
|
+
}
|
|
161
240
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
162
241
|
/* cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
|
163
242
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -216,6 +295,30 @@ describe('Create Item page - Charts - Bar: Partial different weights scoring wit
|
|
|
216
295
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
|
217
296
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
218
297
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
|
298
|
+
if (alternativeAnswerCheck === 'true') {
|
|
299
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 7 pts, 5 pts, 4 pts, 8 pts, 4 pts)');
|
|
300
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
301
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
302
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
303
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
304
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
305
|
+
], 1);
|
|
306
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
307
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
308
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
309
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
310
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
311
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
312
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 6 pts, 3 pts, 2 pts, 9 pts, 2 pts)');
|
|
313
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
314
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
315
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
316
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
317
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
318
|
+
], 2);
|
|
319
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
320
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
321
|
+
}
|
|
219
322
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
220
323
|
/* cy.log('When the user attempts the question with more answers from the correct accordion than the alternate accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct accordion responses, incorrect icons should be displayed on the alternate accordion responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
|
221
324
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -244,6 +347,30 @@ describe('Create Item page - Charts - Bar: Partial different weights scoring wit
|
|
|
244
347
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
|
245
348
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
246
349
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
|
350
|
+
if (alternativeAnswerCheck === 'true') {
|
|
351
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 7 pts, 5 pts, 4 pts, 8 pts, 4 pts)');
|
|
352
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
353
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
354
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
355
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
356
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
357
|
+
], 1);
|
|
358
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
359
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
360
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
361
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
362
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
363
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
364
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 6 pts, 3 pts, 2 pts, 9 pts, 2 pts)');
|
|
365
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
366
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
367
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
368
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
369
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
370
|
+
], 2);
|
|
371
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
372
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
373
|
+
}
|
|
247
374
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
248
375
|
/* cy.log('When the user attempts the question with more answers from the alternate accordion than the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct accordion responses, incorrect icons should be displayed on the alternate accordion responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
|
249
376
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -273,6 +400,30 @@ describe('Create Item page - Charts - Bar: Partial different weights scoring wit
|
|
|
273
400
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
|
274
401
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
275
402
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
|
403
|
+
if (alternativeAnswerCheck === 'true') {
|
|
404
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 7 pts, 5 pts, 4 pts, 8 pts, 4 pts)');
|
|
405
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
406
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
407
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
408
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
409
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
410
|
+
], 1);
|
|
411
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
412
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
413
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
414
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
415
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
416
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
417
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 6 pts, 3 pts, 2 pts, 9 pts, 2 pts)');
|
|
418
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
419
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
420
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
421
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
422
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
423
|
+
], 2);
|
|
424
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
425
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
426
|
+
}
|
|
276
427
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
277
428
|
/* cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed beside empty responses correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
|
278
429
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -304,6 +455,30 @@ describe('Create Item page - Charts - Bar: Partial different weights scoring wit
|
|
|
304
455
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
|
305
456
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
306
457
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
|
458
|
+
if (alternativeAnswerCheck === 'true') {
|
|
459
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 7 pts, 5 pts, 4 pts, 8 pts, 4 pts)');
|
|
460
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
461
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
462
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
463
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
464
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
465
|
+
], 1);
|
|
466
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
467
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
468
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
469
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
470
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
471
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
472
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 6 pts, 3 pts, 2 pts, 9 pts, 2 pts)');
|
|
473
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
474
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
475
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
476
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
477
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
478
|
+
], 2);
|
|
479
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
480
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
481
|
+
}
|
|
307
482
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
308
483
|
/* cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed beside empty responses correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
|
309
484
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -335,6 +510,30 @@ describe('Create Item page - Charts - Bar: Partial different weights scoring wit
|
|
|
335
510
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
|
336
511
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
337
512
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
|
513
|
+
if (alternativeAnswerCheck === 'true') {
|
|
514
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 7 pts, 5 pts, 4 pts, 8 pts, 4 pts)');
|
|
515
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
516
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
517
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
518
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
519
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
520
|
+
], 1);
|
|
521
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
522
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
523
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
524
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
525
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
526
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
527
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 6 pts, 3 pts, 2 pts, 9 pts, 2 pts)');
|
|
528
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
529
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
530
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
531
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
532
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
533
|
+
], 2);
|
|
534
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
535
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
536
|
+
}
|
|
338
537
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
339
538
|
/* cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icons should be displayed on the incorrect bars, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
|
340
539
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -373,6 +572,30 @@ describe('Create Item page - Charts - Bar: Partial different weights scoring wit
|
|
|
373
572
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
374
573
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
|
375
574
|
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
575
|
+
if (alternativeAnswerCheck === 'true') {
|
|
576
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 15 pts, 1 pt, 2 pts, 3 pts, 4 pts)');
|
|
577
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
578
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
579
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
580
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
581
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
582
|
+
], 1);
|
|
583
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
584
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
585
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
586
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
587
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
588
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
589
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 12 pts, 1 pt, 2 pts, 3 pts, 4 pts)');
|
|
590
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
591
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
592
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
593
|
+
{ barIndex: 3, barValue: 8, range: 10 },
|
|
594
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
595
|
+
], 2);
|
|
596
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
597
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
598
|
+
}
|
|
376
599
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
377
600
|
/* cy.log('Overachiever case: When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion and clicks on \'Check answer\' button, correct icons should be displayed for the correct accordion response, incorrect icon should be displayed for the alternative accordion responses, correct/incorrect status message and correct answer section should not be displayed')
|
|
378
601
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { chartsBarPage } from "../../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
3
4
|
|
|
4
5
|
describe('Create item page - Charts - Bar: Partial equal weights scoring with alternative answer - When alternative answer points are more than correct answer points', () => {
|
|
5
6
|
before(() => {
|
|
@@ -48,6 +49,30 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
|
|
|
48
49
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 0, range: 10 });
|
|
49
50
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
50
51
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 6, range: 10 });
|
|
52
|
+
if (alternativeAnswerCheck === 'true') {
|
|
53
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response - 4 pts)');
|
|
54
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
55
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
56
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
57
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
58
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
59
|
+
], 1);
|
|
60
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
61
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
62
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
63
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
64
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
65
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
66
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response - 2 pts)');
|
|
67
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
68
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
69
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
70
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
71
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
72
|
+
], 2);
|
|
73
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
74
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
75
|
+
}
|
|
51
76
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
52
77
|
/* cy.log('When the user selects check answer without attempting the question, then correct/incorrect status message should not be displayed, incorrect icons should be displayed on the unattempted bars and correct icons should be displayed on the bar which is correct by default')
|
|
53
78
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -78,6 +103,30 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
|
|
|
78
103
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 0, range: 10 });
|
|
79
104
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
80
105
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 6, range: 10 });
|
|
106
|
+
if (alternativeAnswerCheck === 'true') {
|
|
107
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response - 4 pts)');
|
|
108
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
109
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
110
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
111
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
112
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
113
|
+
], 1);
|
|
114
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
115
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
116
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
117
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
118
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
119
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
120
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response - 2 pts)');
|
|
121
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
122
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
123
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
124
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
125
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
126
|
+
], 2);
|
|
127
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
128
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
129
|
+
}
|
|
81
130
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
82
131
|
/* cy.log('When the user selects check answer after incorrectly attempting the question, then correct/incorrect status message should not be displayed, incorrect icons should be displayed on the incorrectly attempted bars')
|
|
83
132
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -103,6 +152,9 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
|
|
|
103
152
|
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
|
104
153
|
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
105
154
|
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
|
|
155
|
+
if (alternativeAnswerCheck === 'true') {
|
|
156
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
157
|
+
}
|
|
106
158
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
107
159
|
/* cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
|
108
160
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -129,6 +181,9 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
|
|
|
129
181
|
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
|
130
182
|
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
131
183
|
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
|
|
184
|
+
if (alternativeAnswerCheck === 'true') {
|
|
185
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
186
|
+
}
|
|
132
187
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
133
188
|
/* cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
|
134
189
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -159,6 +214,30 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
|
|
|
159
214
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 0, range: 10 });
|
|
160
215
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
161
216
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 6, range: 10 });
|
|
217
|
+
if (alternativeAnswerCheck === 'true') {
|
|
218
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response - 4 pts)');
|
|
219
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
220
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
221
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
222
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
223
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
224
|
+
], 1);
|
|
225
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
226
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
227
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
228
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
229
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
230
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
231
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response - 2 pts)');
|
|
232
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
233
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
234
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
235
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
236
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
237
|
+
], 2);
|
|
238
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
239
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
240
|
+
}
|
|
162
241
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
163
242
|
/* cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
|
164
243
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -188,6 +267,30 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
|
|
|
188
267
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 0, range: 10 });
|
|
189
268
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
190
269
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 6, range: 10 });
|
|
270
|
+
if (alternativeAnswerCheck === 'true') {
|
|
271
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response - 4 pts)');
|
|
272
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
273
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
274
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
275
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
276
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
277
|
+
], 1);
|
|
278
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
279
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
280
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
281
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
282
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
283
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
284
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response - 2 pts)');
|
|
285
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
286
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
287
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
288
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
289
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
290
|
+
], 2);
|
|
291
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
292
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
293
|
+
}
|
|
191
294
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
192
295
|
/* cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icons should be displayed on the incorrect bars correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
|
193
296
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -217,6 +320,30 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
|
|
|
217
320
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 0, range: 10 });
|
|
218
321
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
219
322
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 6, range: 10 });
|
|
323
|
+
if (alternativeAnswerCheck === 'true') {
|
|
324
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response - 4 pts)');
|
|
325
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
326
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
327
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
328
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
329
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
330
|
+
], 1);
|
|
331
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
332
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
333
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
334
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
335
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
336
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
337
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response - 2 pts)');
|
|
338
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
339
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
340
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
341
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
342
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
343
|
+
], 2);
|
|
344
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
345
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
346
|
+
}
|
|
220
347
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
221
348
|
/* cy.log('When the user attempts the question with more answers from the correct accordion than the alternate accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the alternate accordion responses, incorrect icons should be displayed on the correct accordion responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
|
222
349
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -245,6 +372,30 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
|
|
|
245
372
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 0, range: 10 });
|
|
246
373
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
247
374
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 6, range: 10 });
|
|
375
|
+
if (alternativeAnswerCheck === 'true') {
|
|
376
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response - 4 pts)');
|
|
377
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
378
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
379
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
380
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
381
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
382
|
+
], 1);
|
|
383
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
384
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
385
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
386
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
387
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
388
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
389
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response - 2 pts)');
|
|
390
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
391
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
392
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
393
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
394
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
395
|
+
], 2);
|
|
396
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
397
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
398
|
+
}
|
|
248
399
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
249
400
|
/* cy.log('When the user attempts the question with more answers from the alternate accordion than the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the alternate accordion responses, incorrect icons should be displayed on the correct accordion responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
|
250
401
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -275,6 +426,30 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
|
|
|
275
426
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 0, range: 10 });
|
|
276
427
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
277
428
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 6, range: 10 });
|
|
429
|
+
if (alternativeAnswerCheck === 'true') {
|
|
430
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response - 4 pts)');
|
|
431
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
432
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
433
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
434
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
435
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
436
|
+
], 1);
|
|
437
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
438
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
439
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
440
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
441
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
442
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
443
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response - 2 pts)');
|
|
444
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
445
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
446
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
447
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
448
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
449
|
+
], 2);
|
|
450
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
451
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
452
|
+
}
|
|
278
453
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
279
454
|
/* cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the alternate accordion responses, incorrect icons should be displayed on the correct accordion responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
|
280
455
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -306,6 +481,30 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
|
|
|
306
481
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 0, range: 10 });
|
|
307
482
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
308
483
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 6, range: 10 });
|
|
484
|
+
if (alternativeAnswerCheck === 'true') {
|
|
485
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response - 4 pts)');
|
|
486
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
487
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
488
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
489
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
490
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
491
|
+
], 1);
|
|
492
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
493
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
494
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
495
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
496
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
497
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
498
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response - 2 pts)');
|
|
499
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
500
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
501
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
502
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
503
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
504
|
+
], 2);
|
|
505
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
506
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
507
|
+
}
|
|
309
508
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
310
509
|
/* cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icons should be displayed on the incorrect bars, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
|
311
510
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -343,6 +542,30 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
|
|
|
343
542
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 8, range: 10 });
|
|
344
543
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 6, range: 10 });
|
|
345
544
|
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
545
|
+
if (alternativeAnswerCheck === 'true') {
|
|
546
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response - 10 pts)');
|
|
547
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
548
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
549
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
550
|
+
{ barIndex: 3, barValue: 8, range: 10 },
|
|
551
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
552
|
+
], 1);
|
|
553
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
554
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
555
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
556
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
557
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
558
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
559
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response - 2 pts)');
|
|
560
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
561
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
562
|
+
{ barIndex: 1, barValue: 2, range: 10 },
|
|
563
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
564
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
565
|
+
], 2);
|
|
566
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
567
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
568
|
+
}
|
|
346
569
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
347
570
|
/* cy.log('Overachiever case: When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion and clicks on \'Check answer\' button, correct icons should be displayed for the alternate accordion response, incorrect icon should be displayed for the correct accordion responses, correct/incorrect status message and correct answer section should not be displayed')
|
|
348
571
|
chartsBarPage.steps.checkAnswer();
|