itemengine-cypress-automation 1.0.579-IEI-7046-a317a6b.0 → 1.0.580-IEI-7040-1e744fc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/cypress/config-files/ilprod.json +2 -1
  2. package/cypress/config-files/ilqa.json +2 -1
  3. package/cypress/config-files/ilstage.json +2 -1
  4. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +8 -123
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +8 -123
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +14 -131
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +9 -138
  8. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +9 -138
  9. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsGreaterThanAlternativePoints.js +10 -153
  10. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +9 -138
  11. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +7 -108
  12. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +9 -138
  13. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +135 -7
  14. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +135 -7
  15. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +136 -9
  16. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +7 -2
  17. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +154 -8
  18. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +154 -8
  19. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +154 -8
  20. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +135 -7
  21. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +116 -7
  22. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +136 -8
  23. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +21 -2
  24. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +190 -2
  25. package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +17 -0
  26. package/cypress/e2e/ILC/MultipleSelection/previewContentsForAllViews.smoke.js +18 -0
  27. package/cypress/e2e/ILC/MultipleSelectionGridNew/previewContentsForAllViews.smoke.js +19 -0
  28. package/cypress/e2e/ILC/NumberLineLabel/editTabBasicSection.js +18 -0
  29. package/cypress/e2e/ILC/SingleSelection/previewContents.smoke.js +18 -0
  30. package/cypress/e2e/ILC/SingleSelectionGridNew/previewContentsForAllViews.smoke.js +19 -0
  31. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +17 -0
  32. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +16 -0
  33. package/cypress/pages/components/ckEditorToolbar.js +20 -0
  34. package/cypress/pages/components/draggableOptionContainer.js +14 -0
  35. package/cypress/pages/components/gridQuestionCommonComponent.js +17 -1
  36. package/cypress/pages/components/optionsWrapperComponent.js +33 -2
  37. package/cypress/pages/components/questionInputFieldComponent.js +18 -2
  38. package/cypress/pages/dragAndDropIntoCategoriesPage.js +0 -38
  39. package/cypress/pages/fillInTheGapsDropdownPage.js +47 -2
  40. package/cypress/pages/matchingPage.js +18 -0
  41. package/cypress/pages/numberLineLabelPage.js +1 -0
  42. package/cypress/pages/textSelectionPage.js +17 -1
  43. package/package.json +1 -1
@@ -1,8 +1,5 @@
1
1
  import { dragAndDropIntoCategoriesPage } from "../../../../pages";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
- import { showAlternativeAnswersComponent } from "../../../../pages/components";
4
-
5
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
6
3
 
7
4
  describe('Create item page - Drag and drop into categories: Per dropzone with alternative answers', () => {
8
5
  before(() => {
@@ -36,21 +33,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
36
33
  //Failing due to https://redmine.zeuslearning.com/issues/574339
37
34
  // dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'incorrect': 0, 'incorrect': 1, 'correct': 2, 'incorrect': 3, 'incorrect': 4, 'incorrect': 5 });
38
35
  dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(0, 30);
39
- if (alternativeAnswerCheck) {
40
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
41
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
42
- {
43
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
44
- pointsText: '(Points per correct option - 5 points)',
45
- },
46
- {
47
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
48
- pointsText: '(Points per correct option - 3 points)',
49
- }
50
- ]);
51
- } else {
52
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []], ['1', '2', '3', '4', '5', '6']);
53
- }
36
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([[], [], [], [], ['Flying squirrel'], ['Eagle', 'Peacock'], [], [], ['Ostrich'], [], ['Platypus'], ['Octopus']], ['1', '2', '3', '4', '1', '2', '7', '3', '4', '10', '5', '6']);
54
37
  });
55
38
 
56
39
  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 and proper icon should display beside empty dropzones, correct icons should be displayed for all correct dropzones, correct/incorrect answer status message should not be displayed and correct answer section should not be displayed', () => {
@@ -123,21 +106,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
123
106
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
124
107
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
125
108
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'correct': 0, 'incorrect': 1, 'incorrect': 2, 'incorrect': 3, 'incorrect': 4, 'correct': 5 });
126
- if (alternativeAnswerCheck) {
127
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
128
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
129
- {
130
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
131
- pointsText: '(Points per correct option - 5 points)',
132
- },
133
- {
134
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
135
- pointsText: '(Points per correct option - 3 points)',
136
- }
137
- ]);
138
- } else {
139
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []], ['1', '2', '3', '4', '5', '6']);
140
- }
109
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([[], [], [], [], ['Flying squirrel'], ['Eagle', 'Peacock'], [], [], ['Ostrich'], [], ['Platypus'], ['Octopus']], ['1', '2', '3', '4', '1', '2', '7', '3', '4', '10', '5', '6']);
141
110
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
142
111
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
143
112
  /*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 icons should be displayed for all correct dropzones, incorrect icon should be displayed for incorrect dropzones, correct/incorrect answer status message and correct answer section should not be displayed')
@@ -162,21 +131,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
162
131
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(5);
163
132
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'correct': 0, 'incorrect': 1, 'correct': 2, 'incorrect': 3, 'incorrect': 4, 'incorrect': 5 });
164
133
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
165
- if (alternativeAnswerCheck) {
166
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
167
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
168
- {
169
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
170
- pointsText: '(Points per correct option - 5 points)',
171
- },
172
- {
173
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
174
- pointsText: '(Points per correct option - 3 points)',
175
- }
176
- ]);
177
- } else {
178
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []], ['1', '2', '3', '4', '5', '6']);
179
- }
134
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([[], [], [], [], ['Flying squirrel'], ['Eagle', 'Peacock'], [], [], ['Ostrich'], [], ['Platypus'], ['Octopus']], ['1', '2', '3', '4', '1', '2', '7', '3', '4', '10', '5', '6']);
180
135
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
181
136
  /*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, correct icons should be displayed for all correct dropzones, incorrect icon should be displayed for incorrect dropzones, correct/incorrect answer status message and correct answer section should not be displayed')
182
137
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -200,21 +155,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
200
155
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(5);
201
156
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'incorrect': 0, 'incorrect': 1, 'correct': 2, 'incorrect': 3, 'incorrect': 4, 'incorrect': 5 });
202
157
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
203
- if (alternativeAnswerCheck) {
204
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
205
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
206
- {
207
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
208
- pointsText: '(Points per correct option - 5 points)',
209
- },
210
- {
211
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
212
- pointsText: '(Points per correct option - 3 points)',
213
- }
214
- ]);
215
- } else {
216
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []], ['1', '2', '3', '4', '5', '6']);
217
- }
158
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([[], [], [], [], ['Flying squirrel'], ['Eagle', 'Peacock'], [], [], ['Ostrich'], [], ['Platypus'], ['Octopus']], ['1', '2', '3', '4', '1', '2', '7', '3', '4', '10', '5', '6']);
218
159
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
219
160
  /*cy.log('When the user has attempted the question with partially correct such that a dropzone is correctly attempted with both the correct and alternative answer options and clicks on \'Check answer\' button, then correct icon should be displayed besides alternative accordion responses, incorrect icon should be displayed besides the correct accordion responses, incorrect icon should be displayed for the dropzone containing options of alternative accordion and correct accordion in the same dropzone, correct/incorrect answer status message and correct answer section should not be displayed')
220
161
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -237,21 +178,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
237
178
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
238
179
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'incorrect': 0, 'incorrect': 1, 'incorrect': 2, 'incorrect': 3, 'incorrect': 4, 'correct': 5 });
239
180
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
240
- if (alternativeAnswerCheck) {
241
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
242
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
243
- {
244
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
245
- pointsText: '(Points per correct option - 5 points)',
246
- },
247
- {
248
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
249
- pointsText: '(Points per correct option - 3 points)',
250
- }
251
- ]);
252
- } else {
253
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []], ['1', '2', '3', '4', '5', '6']);
254
- }
181
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([[], [], [], [], ['Flying squirrel'], ['Eagle', 'Peacock'], [], [], ['Ostrich'], [], ['Platypus'], ['Octopus']], ['1', '2', '3', '4', '1', '2', '7', '3', '4', '10', '5', '6']);
255
182
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
256
183
  /*cy.log('When the user has attempted the question partially correct such that one dropzone is correctly attempted as per the correct accordion and another dropzone is correctly attempted as per the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides alternative accordion responses, incorrect icon should be displayed besides the correct accordion responses, correct icon should be displayed for correct dropzone, incorrect icon should be displayed for incorrect dropzone, correct/incorrect answer status message and correct answer section should not be displayed')
257
184
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -274,21 +201,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
274
201
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(5);
275
202
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'incorrect': 0, 'incorrect': 1, 'correct': 2, 'correct': 3, 'incorrect': 4, 'incorrect': 5 });
276
203
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
277
- if (alternativeAnswerCheck) {
278
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
279
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
280
- {
281
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
282
- pointsText: '(Points per correct option - 5 points)',
283
- },
284
- {
285
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
286
- pointsText: '(Points per correct option - 3 points)',
287
- }
288
- ]);
289
- } else {
290
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []], ['1', '2', '3', '4', '5', '6']);
291
- }
204
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([[], [], [], [], ['Flying squirrel'], ['Eagle', 'Peacock'], [], [], ['Ostrich'], [], ['Platypus'], ['Octopus']], ['1', '2', '3', '4', '1', '2', '7', '3', '4', '10', '5', '6']);
292
205
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
293
206
  /*cy.log('When the user has attempted the question partially correct with only common options across both accordions and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct icon should be displayed for correct dropzone, incorrect icon should be displayed for incorrect dropzone. correct/incorrect answer status message and correct answer section should not be displayed')
294
207
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -312,21 +225,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
312
225
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(5);
313
226
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'correct': 0, 'incorrect': 1, 'correct': 2, 'correct': 3, 'incorrect': 4, 'incorrect': 5 });
314
227
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
315
- if (alternativeAnswerCheck) {
316
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
317
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
318
- {
319
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
320
- pointsText: '(Points per correct option - 5 points)',
321
- },
322
- {
323
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
324
- pointsText: '(Points per correct option - 3 points)',
325
- }
326
- ]);
327
- } else {
328
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []], ['1', '2', '3', '4', '5', '6']);
329
- }
228
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([[], [], [], [], ['Flying squirrel'], ['Eagle', 'Peacock'], [], [], ['Ostrich'], [], ['Platypus'], ['Octopus']], ['1', '2', '3', '4', '1', '2', '7', '3', '4', '10', '5', '6']);
330
229
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
331
230
  /*cy.log('When the user has attempted the question partially correct such that equal number of dropzones are correct according to correct accordion and alternative accordion mappings and clicks on \'Check answer\' button, then correct icon should be displayed besides alternative accordion responses, incorrect icon should be displayed besides correct accordion responses, correct icon should be displayed for correct dropzone, incorrect icon should be displayed for incorrect dropzone. correct/incorrect answer status message and correct answer section should not be displayed')
332
231
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -353,21 +252,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
353
252
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(3);
354
253
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'correct': 0, 'correct': 1, 'correct': 2, 'incorrect': 3, 'correct': 4, 'incorrect': 5 });
355
254
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
356
- if (alternativeAnswerCheck) {
357
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
358
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
359
- {
360
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
361
- pointsText: '(Points per correct option - 5 points)',
362
- },
363
- {
364
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
365
- pointsText: '(Points per correct option - 3 points)',
366
- }
367
- ]);
368
- } else {
369
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []], ['1', '2', '3', '4', '5', '6']);
370
- }
255
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([[], [], [], [], ['Flying squirrel'], ['Eagle', 'Peacock'], [], [], ['Ostrich'], [], ['Platypus'], ['Octopus']], ['1', '2', '3', '4', '1', '2', '7', '3', '4', '10', '5', '6']);
371
256
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
372
257
  /*cy.log('When the user has attempted the question such that more number of dropzones are correct as per the correct accordion mapping (3 dropzones- one exclusively correct as per the correct accordion, one correct for both the accordions and one containing correct options from both the accordions) than the alternative accordion mapping (2 dropzones- one correct for both the accordions and one containing correct options from both the accordions) and clicks on \'Check answer\' button, then correct icon should be displayed besides correct accordion responses, incorrect icon should be displayed besides the alternative accordion responses, correct icon should be displayed for correct dropzone, incorrect icon should be displayed for incorrect dropzone. correct/incorrect answer status message and correct answer section should not be displayed')
373
258
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -400,21 +285,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
400
285
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(5);
401
286
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'incorrect': 0, 'incorrect': 1, 'correct': 2, 'correct': 3, 'incorrect': 4, 'incorrect': 5 });
402
287
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
403
- if (alternativeAnswerCheck) {
404
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
405
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
406
- {
407
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
408
- pointsText: '(Points per correct option - 5 points)',
409
- },
410
- {
411
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
412
- pointsText: '(Points per correct option - 3 points)',
413
- }
414
- ]);
415
- } else {
416
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []], ['1', '2', '3', '4', '5', '6']);
417
- }
288
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([[], [], [], [], ['Flying squirrel'], ['Eagle', 'Peacock'], [], [], ['Ostrich'], [], ['Platypus'], ['Octopus']], ['1', '2', '3', '4', '1', '2', '7', '3', '4', '10', '5', '6']);
418
289
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
419
290
  /*cy.log('When the user has attempted the question such that more number of dropzones are correct according to the correct accordion mapping and points achieved from the correct accordion mapping is equal to the points achieved from alternative accordion mapping and clicks on \'Check answer\' button, then correct icon should be displayed besides alternative accordion responses, incorrect icon should be displayed besides the correct accordion responses, correct icon should be displayed for correct dropzone, incorrect icon should be displayed for incorrect dropzone. correct/incorrect answer status message and correct answer section should not be displayed')
420
291
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -1,8 +1,5 @@
1
1
  import { dragAndDropIntoCategoriesPage } from "../../../../pages";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
- import { showAlternativeAnswersComponent } from "../../../../pages/components";
4
-
5
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
6
3
 
7
4
  describe('Create item page - Drag and drop into categories: Per dropzone with alternative answers', () => {
8
5
  before(() => {
@@ -36,21 +33,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
36
33
  //Failing due to https://redmine.zeuslearning.com/issues/574339
37
34
  // dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'incorrect': 0, 'incorrect': 1, 'incorrect': 2, 'incorrect': 3, 'incorrect': 4, 'correct': 5 });
38
35
  dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(0, 30);
39
- if (alternativeAnswerCheck) {
40
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
41
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
42
- {
43
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
44
- pointsText: '(Points per correct option - 5 points)',
45
- },
46
- {
47
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
48
- pointsText: '(Points per correct option - 5 points)',
49
- }
50
- ]);
51
- } else {
52
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
53
- }
36
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([[], [], [], [], ['Bat'], ['Eagle', 'Parrot'], [], ['Platypus'], ['Ostrich'], [], ['Whale'], []], ['1', '2', '3', '4', '1', '2', '7', '3', '4', '10', '5', '6']);
54
37
  });
55
38
 
56
39
  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, correct icons should be displayed for all correct dropzones, correct/incorrect answer status message should not be displayed and correct answer section should not be displayed', () => {
@@ -123,21 +106,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
123
106
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
124
107
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
125
108
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'correct': 0, 'incorrect': 1, 'incorrect': 2, 'incorrect': 3, 'incorrect': 4, 'correct': 5 });
126
- if (alternativeAnswerCheck) {
127
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
128
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
129
- {
130
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
131
- pointsText: '(Points per correct option - 5 points)',
132
- },
133
- {
134
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
135
- pointsText: '(Points per correct option - 5 points)',
136
- }
137
- ]);
138
- } else {
139
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
140
- }
109
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([[], [], [], [], ['Bat'], ['Eagle', 'Parrot'], [], ['Platypus'], ['Ostrich'], [], ['Whale'], []], ['1', '2', '3', '4', '1', '2', '7', '3', '4', '10', '5', '6']);
141
110
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
142
111
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
143
112
  /*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 icons should be displayed for all correct dropzones, incorrect icon should be displayed for incorrect dropzones, correct/incorrect answer status message and correct answer section should not be displayed')
@@ -186,21 +155,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
186
155
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
187
156
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'incorrect': 0, 'incorrect': 1, 'incorrect': 2, 'incorrect': 3, 'incorrect': 4, 'correct': 5 });
188
157
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
189
- if (alternativeAnswerCheck) {
190
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
191
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
192
- {
193
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
194
- pointsText: '(Points per correct option - 5 points)',
195
- },
196
- {
197
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
198
- pointsText: '(Points per correct option - 5 points)',
199
- }
200
- ]);
201
- } else {
202
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
203
- }
158
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([[], [], [], [], ['Bat'], ['Eagle', 'Parrot'], [], ['Platypus'], ['Ostrich'], [], ['Whale'], []], ['1', '2', '3', '4', '1', '2', '7', '3', '4', '10', '5', '6']);
204
159
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
205
160
  /*cy.log('When the user has attempted the question with partially correct such that a dropzone is correctly attempted with both the correct and alternative answer options and clicks on \'Check answer\' button, then correct icon should be displayed besides correct accordion responses, incorrect icon should be displayed besides the alternative accordion responses, incorrect icon should be displayed for the dropzone containing options of alternative accordion and correct accordion in the same dropzone, correct/incorrect answer status message and correct answer section should not be displayed')
206
161
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -224,21 +179,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
224
179
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
225
180
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'incorrect': 0, 'incorrect': 1, 'correct': 2, 'incorrect': 3, 'incorrect': 4, 'correct': 5 });
226
181
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
227
- if (alternativeAnswerCheck) {
228
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
229
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
230
- {
231
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
232
- pointsText: '(Points per correct option - 5 points)',
233
- },
234
- {
235
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
236
- pointsText: '(Points per correct option - 5 points)',
237
- }
238
- ]);
239
- } else {
240
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
241
- }
182
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([[], [], [], [], ['Bat'], ['Eagle', 'Parrot'], [], ['Platypus'], ['Ostrich'], [], ['Whale'], []], ['1', '2', '3', '4', '1', '2', '7', '3', '4', '10', '5', '6']);
242
183
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
243
184
  /*cy.log('When the user has attempted the question partially correct such that one dropzone is correctly attempted as per the correct accordion and another dropzone is correctly attempted as per the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides correct accordion responses, incorrect icon should be displayed besides the alternative accordion responses, correct icon should be displayed for correct dropzone, incorrect icon should be displayed for incorrect dropzone, correct/incorrect answer status message and correct answer section should not be displayed')
244
185
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -262,21 +203,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
262
203
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
263
204
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'incorrect': 0, 'incorrect': 1, 'incorrect': 2, 'correct': 3, 'incorrect': 4, 'correct': 5 });
264
205
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
265
- if (alternativeAnswerCheck) {
266
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
267
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
268
- {
269
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
270
- pointsText: '(Points per correct option - 5 points)',
271
- },
272
- {
273
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
274
- pointsText: '(Points per correct option - 5 points)',
275
- }
276
- ]);
277
- } else {
278
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
279
- }
206
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([[], [], [], [], ['Bat'], ['Eagle', 'Parrot'], [], ['Platypus'], ['Ostrich'], [], ['Whale'], []], ['1', '2', '3', '4', '1', '2', '7', '3', '4', '10', '5', '6']);
280
207
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
281
208
  /*cy.log('When the user has attempted the question partially correct with only common options across both accordions and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct icon should be displayed for correct dropzone, incorrect icon should be displayed for incorrect dropzone. correct/incorrect answer status message and correct answer section should not be displayed')
282
209
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -300,21 +227,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
300
227
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
301
228
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'incorrect': 0, 'correct': 1, 'incorrect': 2, 'correct': 3, 'incorrect': 4, 'correct': 5 });
302
229
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
303
- if (alternativeAnswerCheck) {
304
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
305
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
306
- {
307
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
308
- pointsText: '(Points per correct option - 5 points)',
309
- },
310
- {
311
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
312
- pointsText: '(Points per correct option - 5 points)',
313
- }
314
- ]);
315
- } else {
316
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
317
- }
230
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([[], [], [], [], ['Bat'], ['Eagle', 'Parrot'], [], ['Platypus'], ['Ostrich'], [], ['Whale'], []], ['1', '2', '3', '4', '1', '2', '7', '3', '4', '10', '5', '6']);
318
231
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
319
232
  /*cy.log('When the user has attempted the question partially correct such that equal number of dropzones are correct according to correct accordion and alternative accordion mappings and clicks on \'Check answer\' button, then correct icon should be displayed besides correct accordion responses, incorrect icon should be displayed besides alternative accordion responses, correct icon should be displayed for correct dropzone, incorrect icon should be displayed for incorrect dropzone. correct/incorrect answer status message and correct answer section should not be displayed')
320
233
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -342,21 +255,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
342
255
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(3);
343
256
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'correct': 0, 'incorrect': 1, 'correct': 2, 'incorrect': 3, 'correct': 4, 'correct': 5 });
344
257
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
345
- if (alternativeAnswerCheck) {
346
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
347
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
348
- {
349
- correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
350
- pointsText: '(Points per correct option - 5 points)',
351
- },
352
- {
353
- correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
354
- pointsText: '(Points per correct option - 5 points)',
355
- }
356
- ]);
357
- } else {
358
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
359
- }
258
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([[], [], [], [], ['Flying squirrel'], ['Eagle', 'Peacock'], [], [], ['Ostrich'], [], ['Platypus'], ['Octopus']], ['1', '2', '3', '4', '1', '2', '7', '3', '4', '10', '5', '6']);
360
259
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
361
260
  /*cy.log('When the user has attempted the question such that more number of dropzones are correct as per the alternative accordion mapping than the correct accordion mapping and clicks on \'Check answer\' button, then correct icon should be displayed besides alternative accordion responses, incorrect icon should be displayed besides the correct accordion responses, correct icon should be displayed for correct dropzone, incorrect icon should be displayed for incorrect dropzone. correct/incorrect answer status message and correct answer section should not be displayed')
362
261
  dragAndDropIntoCategoriesPage.steps.checkAnswer();