itemengine-cypress-automation 1.0.576-IEI-7071-main-98ffd41.0 → 1.0.576-IEI-7079-0591b8d.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 +24 -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 +25 -15
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +18 -10
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +24 -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
package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js
CHANGED
|
@@ -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: All or nothing scoring with alternative answer - When Alternate answer points are more than correct answer points', () => {
|
|
5
6
|
before(() => {
|
|
@@ -46,6 +47,28 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
46
47
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 0, range: 10 });
|
|
47
48
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
48
49
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 6, range: 10 });
|
|
50
|
+
if (alternativeAnswerCheck === 'true') {
|
|
51
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
52
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
53
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
54
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
55
|
+
{ barIndex: 4, barValue: 6, range: 10 },
|
|
56
|
+
], 1);
|
|
57
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
58
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
59
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
60
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
61
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
62
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
63
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
|
|
64
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
65
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
66
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
67
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
68
|
+
], 2);
|
|
69
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
70
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
71
|
+
}
|
|
49
72
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
50
73
|
/*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')
|
|
51
74
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -76,6 +99,28 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
76
99
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 0, range: 10 });
|
|
77
100
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
78
101
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 6, range: 10 });
|
|
102
|
+
if (alternativeAnswerCheck === 'true') {
|
|
103
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
104
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
105
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
106
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
107
|
+
{ barIndex: 4, barValue: 6, range: 10 },
|
|
108
|
+
], 1);
|
|
109
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
110
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
111
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
112
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
113
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
114
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
115
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
|
|
116
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
117
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
118
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
119
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
120
|
+
], 2);
|
|
121
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
122
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
123
|
+
}
|
|
79
124
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
80
125
|
/*cy.log('When the user selects check answer after incorrectly attempting the question, then \'Your answer is incorrect\' should be displayed, incorrect icons should be displayed on the incorrectly attempted bars')
|
|
81
126
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -101,6 +146,9 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
101
146
|
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
|
102
147
|
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
103
148
|
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
|
|
149
|
+
if (alternativeAnswerCheck === 'true') {
|
|
150
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
151
|
+
}
|
|
104
152
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
105
153
|
/*cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed')
|
|
106
154
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -127,6 +175,9 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
127
175
|
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
|
128
176
|
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
129
177
|
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
|
|
178
|
+
if (alternativeAnswerCheck === 'true') {
|
|
179
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
180
|
+
}
|
|
130
181
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
131
182
|
/*cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed')
|
|
132
183
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -156,6 +207,28 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
156
207
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 0, range: 10 });
|
|
157
208
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
158
209
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 6, range: 10 });
|
|
210
|
+
if (alternativeAnswerCheck === 'true') {
|
|
211
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
212
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
213
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
214
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
215
|
+
{ barIndex: 4, barValue: 6, range: 10 },
|
|
216
|
+
], 1);
|
|
217
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
218
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
219
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
220
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
221
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
222
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
223
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
|
|
224
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
225
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
226
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
227
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
228
|
+
], 2);
|
|
229
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
230
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
231
|
+
}
|
|
159
232
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
160
233
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
161
234
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -185,6 +258,28 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
185
258
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 0, range: 10 });
|
|
186
259
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
187
260
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 6, range: 10 });
|
|
261
|
+
if (alternativeAnswerCheck === 'true') {
|
|
262
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
263
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
264
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
265
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
266
|
+
{ barIndex: 4, barValue: 6, range: 10 },
|
|
267
|
+
], 1);
|
|
268
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
269
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
270
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
271
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
272
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
273
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
274
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
|
|
275
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
276
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
277
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
278
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
279
|
+
], 2);
|
|
280
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
281
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
282
|
+
}
|
|
188
283
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
189
284
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icons should be displayed on the incorrect bars a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
190
285
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -216,6 +311,28 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
216
311
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 0, range: 10 });
|
|
217
312
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
218
313
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 6, range: 10 });
|
|
314
|
+
if (alternativeAnswerCheck === 'true') {
|
|
315
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
316
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
317
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
318
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
319
|
+
{ barIndex: 4, barValue: 6, range: 10 },
|
|
320
|
+
], 1);
|
|
321
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
322
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
323
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
324
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
325
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
326
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
327
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
|
|
328
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
329
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
330
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
331
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
332
|
+
], 2);
|
|
333
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
334
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
335
|
+
}
|
|
219
336
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
220
337
|
/*cy.log('When the user attempts the question with all answers from the correct accordion except one and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
221
338
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -245,6 +362,28 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
245
362
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 0, range: 10 });
|
|
246
363
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
247
364
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 6, range: 10 });
|
|
365
|
+
if (alternativeAnswerCheck === 'true') {
|
|
366
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
367
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
368
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
369
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
370
|
+
{ barIndex: 4, barValue: 6, range: 10 },
|
|
371
|
+
], 1);
|
|
372
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
373
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
374
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
375
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
376
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
377
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
378
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
|
|
379
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
380
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
381
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
382
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
383
|
+
], 2);
|
|
384
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
385
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
386
|
+
}
|
|
248
387
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
249
388
|
/*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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
250
389
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -273,6 +412,28 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
273
412
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 0, range: 10 });
|
|
274
413
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
275
414
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 6, range: 10 });
|
|
415
|
+
if (alternativeAnswerCheck === 'true') {
|
|
416
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
417
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
418
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
419
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
420
|
+
{ barIndex: 4, barValue: 6, range: 10 },
|
|
421
|
+
], 1);
|
|
422
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
423
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
424
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
425
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
426
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
427
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
428
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
|
|
429
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
430
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
431
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
432
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
433
|
+
], 2);
|
|
434
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
435
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
436
|
+
}
|
|
276
437
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
277
438
|
/*cy.log('When the user attempts the question with more answers from the alternate accordion than the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct accordion responses, incorrect icons should be displayed on the alternate accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
278
439
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -303,6 +464,28 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
303
464
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 0, range: 10 });
|
|
304
465
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
305
466
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 6, range: 10 });
|
|
467
|
+
if (alternativeAnswerCheck === 'true') {
|
|
468
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
469
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
470
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
471
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
472
|
+
{ barIndex: 4, barValue: 6, range: 10 },
|
|
473
|
+
], 1);
|
|
474
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
475
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
476
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
477
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
478
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
479
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
480
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
|
|
481
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
482
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
483
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
484
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
485
|
+
], 2);
|
|
486
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
487
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
488
|
+
}
|
|
306
489
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
307
490
|
/*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed beside empty responses a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
308
491
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -334,6 +517,28 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
334
517
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 0, range: 10 });
|
|
335
518
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
336
519
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 6, range: 10 });
|
|
520
|
+
if (alternativeAnswerCheck === 'true') {
|
|
521
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
522
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
523
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
524
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
525
|
+
{ barIndex: 4, barValue: 6, range: 10 },
|
|
526
|
+
], 1);
|
|
527
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
528
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
529
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
530
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
531
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
532
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
533
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
|
|
534
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
535
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
536
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
537
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
538
|
+
], 2);
|
|
539
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
540
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
541
|
+
}
|
|
337
542
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
338
543
|
/*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icons should be displayed on the incorrect bars a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
339
544
|
chartsBarPage.steps.checkAnswer();
|
package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js
CHANGED
|
@@ -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: All or nothing scoring with alternative answer - When Correct answer points are equal to alternative Answer points', () => {
|
|
5
6
|
before(() => {
|
|
@@ -46,6 +47,28 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
46
47
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
|
47
48
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
48
49
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
|
50
|
+
if (alternativeAnswerCheck === 'true') {
|
|
51
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
52
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
53
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
54
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
55
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
56
|
+
], 1);
|
|
57
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
58
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
59
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
60
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
61
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
62
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
63
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(20 points)');
|
|
64
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
65
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
66
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
67
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
68
|
+
], 2);
|
|
69
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
70
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
71
|
+
}
|
|
49
72
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
50
73
|
/*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')
|
|
51
74
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -76,6 +99,28 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
76
99
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
|
77
100
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
78
101
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
|
102
|
+
if (alternativeAnswerCheck === 'true') {
|
|
103
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
104
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
105
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
106
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
107
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
108
|
+
], 1);
|
|
109
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
110
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
111
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
112
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
113
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
114
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
115
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(20 points)');
|
|
116
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
117
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
118
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
119
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
120
|
+
], 2);
|
|
121
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
122
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
123
|
+
}
|
|
79
124
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
80
125
|
/*cy.log('When the user selects check answer after incorrectly attempting the question, then \'Your answer is incorrect\' should be displayed, incorrect icons should be displayed on the incorrectly attempted bars')
|
|
81
126
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -101,6 +146,9 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
101
146
|
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
|
102
147
|
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
103
148
|
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
|
|
149
|
+
if (alternativeAnswerCheck === 'true') {
|
|
150
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
151
|
+
}
|
|
104
152
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
105
153
|
/*cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed')
|
|
106
154
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -127,6 +175,9 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
127
175
|
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
|
128
176
|
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
129
177
|
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
|
|
178
|
+
if (alternativeAnswerCheck === 'true') {
|
|
179
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
180
|
+
}
|
|
130
181
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
131
182
|
/*cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed')
|
|
132
183
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -155,6 +206,28 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
155
206
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
|
156
207
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
157
208
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
|
209
|
+
if (alternativeAnswerCheck === 'true') {
|
|
210
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
211
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
212
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
213
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
214
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
215
|
+
], 1);
|
|
216
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
217
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
218
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
219
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
220
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
221
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
222
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(20 points)');
|
|
223
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
224
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
225
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
226
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
227
|
+
], 2);
|
|
228
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
229
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
230
|
+
}
|
|
158
231
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
159
232
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
160
233
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -184,6 +257,28 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
184
257
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
|
185
258
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
186
259
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
|
260
|
+
if (alternativeAnswerCheck === 'true') {
|
|
261
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
262
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
263
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
264
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
265
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
266
|
+
], 1);
|
|
267
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
268
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
269
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
270
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
271
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
272
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
273
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(20 points)');
|
|
274
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
275
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
276
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
277
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
278
|
+
], 2);
|
|
279
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
280
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
281
|
+
}
|
|
187
282
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
188
283
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icons should be displayed on the incorrect bars a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
189
284
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -214,6 +309,28 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
214
309
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
|
215
310
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
216
311
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
|
312
|
+
if (alternativeAnswerCheck === 'true') {
|
|
313
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
314
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
315
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
316
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
317
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
318
|
+
], 1);
|
|
319
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
320
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
321
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
322
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
323
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
324
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
325
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(20 points)');
|
|
326
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
327
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
328
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
329
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
330
|
+
], 2);
|
|
331
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
332
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
333
|
+
}
|
|
217
334
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
218
335
|
/*cy.log('When the user attempts the question with all answers from the correct accordion except one and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
219
336
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -243,6 +360,28 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
243
360
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
|
244
361
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
245
362
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
|
363
|
+
if (alternativeAnswerCheck === 'true') {
|
|
364
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
365
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
366
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
367
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
368
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
369
|
+
], 1);
|
|
370
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
371
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
372
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
373
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
374
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
375
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
376
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(20 points)');
|
|
377
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
378
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
379
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
380
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
381
|
+
], 2);
|
|
382
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
383
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
384
|
+
}
|
|
246
385
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
247
386
|
/*cy.log('When the user attempts the question with more answers from the correct accordion than the alternate accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct accordion responses, incorrect icons should be displayed on the alternate accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
248
387
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -271,6 +410,28 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
271
410
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
|
272
411
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
273
412
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
|
413
|
+
if (alternativeAnswerCheck === 'true') {
|
|
414
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
415
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
416
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
417
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
418
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
419
|
+
], 1);
|
|
420
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
421
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
422
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
423
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
424
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
425
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
426
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(20 points)');
|
|
427
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
428
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
429
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
430
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
431
|
+
], 2);
|
|
432
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
433
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
434
|
+
}
|
|
274
435
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
275
436
|
/*cy.log('When the user attempts the question with more answers from the alternate accordion than the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct accordion responses, incorrect icons should be displayed on the alternate accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
276
437
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -301,6 +462,28 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
301
462
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
|
302
463
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
303
464
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
|
465
|
+
if (alternativeAnswerCheck === 'true') {
|
|
466
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
467
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
468
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
469
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
470
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
471
|
+
], 1);
|
|
472
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
473
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
474
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
475
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
476
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
477
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
478
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(20 points)');
|
|
479
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
480
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
481
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
482
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
483
|
+
], 2);
|
|
484
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
485
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
486
|
+
}
|
|
304
487
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
305
488
|
/*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed beside empty responses a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
306
489
|
chartsBarPage.steps.checkAnswer();
|
|
@@ -332,6 +515,28 @@ describe('Create item page - Charts - Bar: All or nothing scoring with alternati
|
|
|
332
515
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
|
333
516
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
|
334
517
|
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
|
518
|
+
if (alternativeAnswerCheck === 'true') {
|
|
519
|
+
chartsBarPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
520
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
521
|
+
{ barIndex: 0, barValue: 3, range: 10 },
|
|
522
|
+
{ barIndex: 2, barValue: 5, range: 10 },
|
|
523
|
+
{ barIndex: 3, barValue: 4, range: 10 }
|
|
524
|
+
], 1);
|
|
525
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
526
|
+
chartsBarPage.steps.disableShowAlternativeAnswersToggle();
|
|
527
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
528
|
+
chartsBarPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
529
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
530
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
531
|
+
chartsBarPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(20 points)');
|
|
532
|
+
chartsBarPage.steps.verifyAllBarsValueAndTickIconInSpecificSection([
|
|
533
|
+
{ barIndex: 0, barValue: 4, range: 10 },
|
|
534
|
+
{ barIndex: 3, barValue: 4, range: 10 },
|
|
535
|
+
{ barIndex: 4, barValue: 6, range: 10 }
|
|
536
|
+
], 2);
|
|
537
|
+
chartsBarPage.steps.clickShowAlternativeAnswersToggle();
|
|
538
|
+
chartsBarPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
539
|
+
}
|
|
335
540
|
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
336
541
|
/*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icons should be displayed on the incorrect bars a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
337
542
|
chartsBarPage.steps.checkAnswer();
|