itemengine-cypress-automation 1.0.581-IEI-7046-ec54625.0 → 1.0.581

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (18) hide show
  1. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +8 -123
  2. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +8 -123
  3. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +14 -131
  4. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +9 -138
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +9 -138
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsGreaterThanAlternativePoints.js +10 -153
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +9 -138
  8. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +7 -108
  9. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +9 -138
  10. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +1 -272
  11. package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +30 -2
  12. package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +30 -2
  13. package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +30 -2
  14. package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingWeightsBasic.js +7 -7
  15. package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +130 -3
  16. package/cypress/pages/dragAndDropIntoCategoriesPage.js +0 -38
  17. package/cypress/pages/shortTextResponsePage.js +20 -6
  18. package/package.json +1 -1
@@ -1,9 +1,6 @@
1
1
  import { dragAndDropIntoCategoriesPage } from "../../../../pages";
2
- import { showAlternativeAnswersComponent } from "../../../../pages/components";
3
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
4
3
 
5
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
6
-
7
4
  describe('Create item page - Drag and drop into categories: All or nothing with alternative answers', () => {
8
5
  before(() => {
9
6
  cy.loginAs('admin');
@@ -32,21 +29,7 @@ describe('Create item page - Drag and drop into categories: All or nothing with
32
29
  dragAndDropIntoCategoriesPage.steps.switchToGradingView();
33
30
  dragAndDropIntoCategoriesPage.steps.verifyDropzoneCellNumeration(['1', '2', '3', '4', '5', '6']);
34
31
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
35
- if (alternativeAnswerCheck) {
36
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
37
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
38
- {
39
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
40
- pointsText: '(20 points)',
41
- },
42
- {
43
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
44
- pointsText: '(10 points)',
45
- }
46
- ])
47
- } else {
48
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
49
- }
32
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
50
33
  });
51
34
 
52
35
  it('When the user attempts the question with responses from the correct accordion, then the user should be awarded with points specified for correct accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses and and proper icon should display beside empty container, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
@@ -113,21 +96,7 @@ describe('Create item page - Drag and drop into categories: All or nothing with
113
96
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
114
97
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
115
98
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
116
- if (alternativeAnswerCheck) {
117
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
118
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
119
- {
120
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
121
- pointsText: '(20 points)',
122
- },
123
- {
124
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
125
- pointsText: '(10 points)',
126
- }
127
- ])
128
- } else {
129
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
130
- }
99
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
131
100
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
132
101
  /*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')
133
102
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -149,21 +118,7 @@ describe('Create item page - Drag and drop into categories: All or nothing with
149
118
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
150
119
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
151
120
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
152
- if (alternativeAnswerCheck) {
153
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
154
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
155
- {
156
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
157
- pointsText: '(20 points)',
158
- },
159
- {
160
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
161
- pointsText: '(10 points)',
162
- }
163
- ])
164
- } else {
165
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
166
- }
121
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
167
122
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
168
123
  /*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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
169
124
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -186,21 +141,7 @@ describe('Create item page - Drag and drop into categories: All or nothing with
186
141
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
187
142
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
188
143
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
189
- if (alternativeAnswerCheck) {
190
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
191
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
192
- {
193
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
194
- pointsText: '(20 points)',
195
- },
196
- {
197
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
198
- pointsText: '(10 points)',
199
- }
200
- ])
201
- } else {
202
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
203
- }
144
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
204
145
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
205
146
  /*cy.log('When the user has attempted the question partially correct with all the cells correct as per the correct accordion but one cell incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the responses common across both accordions, incorrect icons should be displayed besides correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
206
147
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -224,21 +165,7 @@ describe('Create item page - Drag and drop into categories: All or nothing with
224
165
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
225
166
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
226
167
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
227
- if (alternativeAnswerCheck) {
228
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
229
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
230
- {
231
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
232
- pointsText: '(20 points)',
233
- },
234
- {
235
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
236
- pointsText: '(10 points)',
237
- }
238
- ])
239
- } else {
240
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
241
- }
168
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
242
169
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
243
170
  /*cy.log('When the user has attempted the question partially correct with more number of options exclusively from the correct accordion but with one option common across both accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the responses common across both accordions, incorrect icons should be displayed besides correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
244
171
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -262,21 +189,7 @@ describe('Create item page - Drag and drop into categories: All or nothing with
262
189
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(5);
263
190
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(6);
264
191
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
265
- if (alternativeAnswerCheck) {
266
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
267
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
268
- {
269
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
270
- pointsText: '(20 points)',
271
- },
272
- {
273
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
274
- pointsText: '(10 points)',
275
- }
276
- ])
277
- } else {
278
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
279
- }
192
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
280
193
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
281
194
  /*cy.log('When the user has attempted the question partially correct with all the cells correctly attempted as per the correct accordion but with an extra incorrect option and clicks on \'Check answer\' button, then correct icon should be displayed besides the responses common across both accordions, incorrect icons should be displayed besides correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
282
195
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -304,21 +217,7 @@ describe('Create item page - Drag and drop into categories: All or nothing with
304
217
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
305
218
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
306
219
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
307
- if (alternativeAnswerCheck) {
308
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
309
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
310
- {
311
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
312
- pointsText: '(20 points)',
313
- },
314
- {
315
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
316
- pointsText: '(10 points)',
317
- }
318
- ])
319
- } else {
320
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
321
- }
220
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
322
221
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
323
222
  /*cy.log('When the user has attempted the question partially correct such that more number of correct options are exclusively from the correct accordion but with one option exclusively from the alternative accordion in the same cell and clicks on \'Check answer\' button, then correct icon should be displayed besides the responses common across both accordions, incorrect icons should be displayed besides correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
324
223
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -342,21 +241,7 @@ describe('Create item page - Drag and drop into categories: All or nothing with
342
241
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
343
242
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
344
243
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
345
- if (alternativeAnswerCheck) {
346
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
347
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
348
- {
349
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
350
- pointsText: '(20 points)',
351
- },
352
- {
353
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
354
- pointsText: '(10 points)',
355
- }
356
- ])
357
- } else {
358
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
359
- }
244
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
360
245
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
361
246
  /*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
362
247
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -1,9 +1,6 @@
1
1
  import { dragAndDropIntoCategoriesPage } from "../../../../pages";
2
- import { showAlternativeAnswersComponent } from "../../../../pages/components";
3
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
4
3
 
5
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
6
-
7
4
  describe('Create item page - Drag and drop into categories: All or nothing with alternative answers', () => {
8
5
  before(() => {
9
6
  cy.loginAs('admin');
@@ -33,21 +30,7 @@ describe('Create item page - Drag and drop into categories: All or nothing with
33
30
  dragAndDropIntoCategoriesPage.steps.switchToGradingView();
34
31
  dragAndDropIntoCategoriesPage.steps.verifyDropzoneCellNumeration(['1', '2', '3', '4', '5', '6']);
35
32
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
36
- if (alternativeAnswerCheck) {
37
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
38
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
39
- {
40
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
41
- pointsText: '(20 points)',
42
- },
43
- {
44
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
45
- pointsText: '(20 points)',
46
- }
47
- ])
48
- } else {
49
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
50
- }
33
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
51
34
  });
52
35
 
53
36
  it('When the user attempts the question with responses from the correct accordion, then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses and proper icon should display beside empty container, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
@@ -115,21 +98,7 @@ describe('Create item page - Drag and drop into categories: All or nothing with
115
98
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
116
99
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
117
100
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
118
- if (alternativeAnswerCheck) {
119
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
120
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
121
- {
122
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
123
- pointsText: '(20 points)',
124
- },
125
- {
126
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
127
- pointsText: '(20 points)',
128
- }
129
- ])
130
- } else {
131
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
132
- }
101
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
133
102
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
134
103
  /*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')
135
104
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -152,21 +121,7 @@ describe('Create item page - Drag and drop into categories: All or nothing with
152
121
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
153
122
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
154
123
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
155
- if (alternativeAnswerCheck) {
156
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
157
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
158
- {
159
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
160
- pointsText: '(20 points)',
161
- },
162
- {
163
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
164
- pointsText: '(20 points)',
165
- }
166
- ])
167
- } else {
168
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
169
- }
124
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
170
125
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
171
126
  /*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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
172
127
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -188,21 +143,7 @@ describe('Create item page - Drag and drop into categories: All or nothing with
188
143
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(3);
189
144
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
190
145
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
191
- if (alternativeAnswerCheck) {
192
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
193
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
194
- {
195
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
196
- pointsText: '(20 points)',
197
- },
198
- {
199
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
200
- pointsText: '(20 points)',
201
- }
202
- ])
203
- } else {
204
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
205
- }
146
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
206
147
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
207
148
  /*cy.log('When the user has attempted the question with partially correct with all the cells correct as per the alternative accordion but one cell incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the response from the correct accordion, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
208
149
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -226,21 +167,7 @@ describe('Create item page - Drag and drop into categories: All or nothing with
226
167
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(2);
227
168
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
228
169
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
229
- if (alternativeAnswerCheck) {
230
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
231
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
232
- {
233
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
234
- pointsText: '(20 points)',
235
- },
236
- {
237
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
238
- pointsText: '(20 points)',
239
- }
240
- ])
241
- } else {
242
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
243
- }
170
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
244
171
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
245
172
  /*cy.log('When the user has attempted the question with partially correct with more number of options exclusively from the alternative accordion but with one option common across both accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the responses from the alternative accordion response as well as common response, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
246
173
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -264,21 +191,7 @@ describe('Create item page - Drag and drop into categories: All or nothing with
264
191
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(4);
265
192
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(5);
266
193
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
267
- if (alternativeAnswerCheck) {
268
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
269
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
270
- {
271
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
272
- pointsText: '(20 points)',
273
- },
274
- {
275
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
276
- pointsText: '(20 points)',
277
- }
278
- ])
279
- } else {
280
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
281
- }
194
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
282
195
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
283
196
  /*cy.log('When the user has attempted the question with partially correct with all the cells correctly attempted as per the alternative accordion but with an extra incorrect option and clicks on \'Check answer\' button, then correct icon should be displayed besides the responses from the alternative accordion response as well as common response, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
284
197
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -305,21 +218,7 @@ describe('Create item page - Drag and drop into categories: All or nothing with
305
218
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(3);
306
219
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
307
220
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
308
- if (alternativeAnswerCheck) {
309
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
310
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
311
- {
312
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
313
- pointsText: '(20 points)',
314
- },
315
- {
316
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
317
- pointsText: '(20 points)',
318
- }
319
- ])
320
- } else {
321
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
322
- }
221
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
323
222
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
324
223
  /*cy.log('When the user has attempted the question with partially correct such that more number of correct options are exclusively from the alternative accordion but with one option exclusively from the correct accordion in the same cell and clicks on \'Check answer\' button, then correct icon should be displayed besides the responses from the alternative accordions, incorrect icon should be displayed besides the responses from the correct accordion, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
325
224
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -343,21 +242,7 @@ describe('Create item page - Drag and drop into categories: All or nothing with
343
242
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
344
243
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
345
244
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
346
- if (alternativeAnswerCheck) {
347
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
348
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
349
- {
350
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
351
- pointsText: '(20 points)',
352
- },
353
- {
354
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
355
- pointsText: '(20 points)',
356
- }
357
- ])
358
- } else {
359
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
360
- }
245
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
361
246
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
362
247
  /*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
363
248
  dragAndDropIntoCategoriesPage.steps.checkAnswer();