itemengine-cypress-automation 1.0.584-IEI-7041-1da58ac.0 → 1.0.585-IEI-7048-5c19852.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 (89) hide show
  1. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +1 -4
  2. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +8 -109
  3. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +8 -109
  4. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +8 -109
  5. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/blankResponseScoring.js +2 -7
  6. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +10 -139
  7. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +1 -4
  8. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +9 -124
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +10 -139
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +1 -4
  11. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +9 -124
  12. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +8 -109
  13. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +9 -124
  14. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +2 -243
  15. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +77 -0
  16. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +78 -1
  17. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +78 -1
  18. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +104 -9
  19. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsBasic.js +4 -0
  20. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +95 -0
  21. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +95 -0
  22. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +84 -0
  23. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsBasic.js +4 -0
  24. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +73 -0
  25. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +84 -0
  26. package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +187 -2
  27. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +79 -1
  28. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +79 -0
  29. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +79 -0
  30. package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +4 -0
  31. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +103 -0
  32. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +4 -0
  33. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +103 -0
  34. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +103 -0
  35. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +91 -0
  36. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +4 -0
  37. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +79 -0
  38. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +91 -0
  39. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +209 -5
  40. package/cypress/e2e/ILC/ListOrderingNew/horizontalOrientationAllOrNothingForAllViews.smoke.js +195 -1
  41. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +103 -0
  42. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +85 -0
  43. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +82 -0
  44. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +85 -0
  45. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +109 -6
  46. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsBasic.js +4 -0
  47. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +103 -0
  48. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +103 -0
  49. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +91 -0
  50. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsBasic.js +4 -0
  51. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +79 -0
  52. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +91 -0
  53. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/allOrNothingForAllViews.smoke.js +207 -3
  54. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingGroupedScoring.js +9 -1
  55. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +102 -2
  56. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +102 -2
  57. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +107 -2
  58. package/cypress/e2e/ILC/Matching/Scoring/blankResponseScoring.js +36 -2
  59. package/cypress/e2e/ILC/Matching/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +5 -0
  60. package/cypress/e2e/ILC/Matching/Scoring/manuallyAndNonScored.js +1 -0
  61. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +10 -1
  62. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +128 -2
  63. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +115 -2
  64. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +128 -2
  65. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsBasic.js +9 -1
  66. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +115 -2
  67. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +102 -2
  68. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +115 -2
  69. package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +226 -2
  70. package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +9 -1
  71. package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +102 -2
  72. package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +102 -2
  73. package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +102 -2
  74. package/cypress/e2e/ILC/MatchingDropdown/Scoring/blankResponseScoring.js +32 -5
  75. package/cypress/e2e/ILC/MatchingDropdown/Scoring/manuallyAndNonScored.js +3 -0
  76. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsScoringBasic.js +10 -1
  77. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +128 -2
  78. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternatePoints.js +115 -2
  79. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternatePoints.js +128 -2
  80. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsBasic.js +9 -1
  81. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +115 -2
  82. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +102 -2
  83. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +115 -2
  84. package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +216 -2
  85. package/cypress/pages/components/correctIncorrectAnswerLabelComponent.js +18 -1
  86. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +1 -25
  87. package/cypress/pages/listOrderingPage.js +60 -1
  88. package/cypress/pages/matchingPage.js +23 -1
  89. package/package.json +1 -1
@@ -8,6 +8,7 @@ const views = utilities.getViews(correctAnswerViews);
8
8
  var itemReferenceID = "";
9
9
  const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
10
10
  const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle'];
11
+ const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
11
12
 
12
13
  describe('Create item page - Matching: All or nothing ', () => {
13
14
  before(() => {
@@ -120,7 +121,11 @@ describe('Create item page - Matching: All or nothing ', () => {
120
121
  matchingPage.steps.verifyDropzoneNumeration();
121
122
  matchingPage.steps.verifyCorrectIncorrectIconsNotExist();
122
123
  matchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
123
- utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
124
+ if(alternativeAnswerCheck === 'true') {
125
+ matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
126
+ } else {
127
+ utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
128
+ }
124
129
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
125
130
  });
126
131
 
@@ -208,11 +213,223 @@ describe('Create item page - Matching: All or nothing ', () => {
208
213
  matchingPage.steps.verifyCorrectOptionIcon(2);
209
214
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
210
215
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
216
+ if (alternativeAnswerCheck === 'true') {
217
+ matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
218
+ }
211
219
  cy.eyesCheckWindow(`Matching ${view} - Attempting the question correctly`);
212
220
  });
213
221
  });
214
222
  });
215
223
 
224
+ // alternative answer enhancement test
225
+ if(alternativeAnswerCheck === 'true') {
226
+ views.forEach((view) => {
227
+ describe(`${view}: Auto scored - All or nothing scoring with alternative answer`, { tags: 'smoke' }, () => {
228
+ abortEarlySetup();
229
+ before(() => {
230
+ switch (view) {
231
+ case 'Question preview':
232
+ matchingPage.steps.navigateToCreateQuestion('matching');
233
+ cy.barsPreLoaderWait();
234
+ matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
235
+ matchingPage.steps.allotPoints(20);
236
+ matchingPage.steps.addMultipleOptionFields(2);
237
+ matchingPage.steps.enterTextInPromptInputField(promptTextArray);
238
+ matchingPage.steps.enterTextInOptionInputField(optionsArray);
239
+ matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
240
+ matchingPage.steps.addAlternativeAnswerAccordion(1);
241
+ matchingPage.steps.allotPoints(10);
242
+ matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Eagle', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
243
+ matchingPage.steps.switchToPreviewTab();
244
+ break;
245
+ case 'Item preview':
246
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
247
+ itemPreviewPage.steps.switchToPreviewTab();
248
+ break;
249
+ case 'Grading view':
250
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
251
+ break;
252
+ };
253
+ });
254
+
255
+ beforeEach(() => {
256
+ switch (view) {
257
+ case 'Question preview':
258
+ matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
259
+ matchingPage.steps.resetQuestionPreview();
260
+ break;
261
+ case 'Item preview':
262
+ matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
263
+ itemPreviewPage.steps.resetQuestionPreview();
264
+ break;
265
+ case 'Grading view':
266
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
267
+ break;
268
+ }
269
+ });
270
+
271
+ if (view === 'Question preview') {
272
+ after(() => {
273
+ matchingPage.steps.clickOnSaveQuestionButton();
274
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
275
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
276
+ });
277
+ };
278
+
279
+ it('When the user selects \'Grading\' view without attempting the question, dropzone numeration should be displayed, then correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
280
+ if (view === 'Grading view') {
281
+ studentViewPage.steps.submitResponse();
282
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
283
+ studentViewPage.steps.clickOnGoToGradingViewButton();
284
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
285
+ };
286
+ if (view === 'Question preview' || view === 'Item preview') {
287
+ matchingPage.steps.verifyPreviewScore(0, 20);
288
+ matchingPage.steps.switchToGradingView();
289
+ matchingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
290
+ };
291
+ matchingPage.steps.verifyDropzoneNumeration();
292
+ matchingPage.steps.verifyCorrectIncorrectIconsNotExist();
293
+ matchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
294
+ matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
295
+ matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
296
+ matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
297
+ matchingPage.steps.disableShowAlternativeAnswersToggle();
298
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
299
+ matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
300
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
301
+ matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
302
+ matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
303
+ matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Eagle'], ['Cat']], 1);
304
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
305
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
306
+ });
307
+
308
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
309
+ matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Eagle', dropzoneIndex: 0 }, { optionText: 'Bear', dropzoneIndex: 1 }, { optionText: 'Fish', dropzoneIndex: 2 }]);
310
+ if (view === 'Grading view') {
311
+ studentViewPage.steps.submitResponse();
312
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
313
+ studentViewPage.steps.clickOnGoToGradingViewButton();
314
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
315
+ };
316
+ if (view === 'Question preview' || view === 'Item preview') {
317
+ matchingPage.steps.verifyPreviewScore(0, 20);
318
+ matchingPage.steps.switchToGradingView();
319
+ };
320
+ matchingPage.steps.verifyIncorrectOptionIcon(0);
321
+ matchingPage.steps.verifyIncorrectOptionIcon(1);
322
+ matchingPage.steps.verifyIncorrectOptionIcon(2);
323
+ matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
324
+ // all check correct
325
+ matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
326
+ matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
327
+ matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
328
+ matchingPage.steps.disableShowAlternativeAnswersToggle();
329
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
330
+ matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
331
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
332
+ matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
333
+ matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
334
+ matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Eagle'], ['Cat']], 1);
335
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
336
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
337
+ });
338
+
339
+ it('When the user attempts the question partially correct with some correct, some incomplete, some incorrect options then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
340
+ if (view === 'Grading view') {
341
+ studentViewPage.steps.clearResponses();
342
+ };
343
+ matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Bear', dropzoneIndex: 2 }]);
344
+ if (view === 'Grading view') {
345
+ studentViewPage.steps.submitResponse();
346
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
347
+ studentViewPage.steps.clickOnGoToGradingViewButton();
348
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
349
+ };
350
+ if (view === 'Question preview' || view === 'Item preview') {
351
+ matchingPage.steps.verifyPreviewScore(0, 20);
352
+ matchingPage.steps.switchToGradingView();
353
+ };
354
+ matchingPage.steps.verifyCorrectOptionIcon(0);
355
+ matchingPage.steps.verifyIncorrectOptionIconForEmptyOption(1);
356
+ matchingPage.steps.verifyIncorrectOptionIcon(2);
357
+ matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
358
+ matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
359
+ matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
360
+ matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
361
+ matchingPage.steps.disableShowAlternativeAnswersToggle();
362
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
363
+ matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
364
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
365
+ matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
366
+ matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
367
+ matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Eagle'], ['Cat']], 1);
368
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
369
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
370
+ });
371
+
372
+ it('When the user attempts the question partially correct with all the dropzone correctly attempted but one dropzone incomplete then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
373
+ if (view === 'Grading view') {
374
+ studentViewPage.steps.clearResponses();
375
+ };
376
+ matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
377
+ if (view === 'Grading view') {
378
+ studentViewPage.steps.submitResponse();
379
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
380
+ studentViewPage.steps.clickOnGoToGradingViewButton();
381
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
382
+ };
383
+ if (view === 'Question preview' || view === 'Item preview') {
384
+ matchingPage.steps.verifyPreviewScore(0, 20);
385
+ matchingPage.steps.switchToGradingView();
386
+ };
387
+ matchingPage.steps.verifyIncorrectOptionIconForEmptyOption(0);
388
+ matchingPage.steps.verifyCorrectOptionIcon(1);
389
+ matchingPage.steps.verifyCorrectOptionIcon(2);
390
+ matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
391
+ matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
392
+ matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
393
+ matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
394
+ matchingPage.steps.disableShowAlternativeAnswersToggle();
395
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
396
+ matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
397
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
398
+ matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
399
+ matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
400
+ matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Eagle'], ['Cat']], 1);
401
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
402
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
403
+ });
404
+
405
+ it(`${view}: Matching - When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed`, () => {
406
+ if (view === 'Grading view') {
407
+ studentViewPage.steps.clearResponses();
408
+ };
409
+ matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
410
+ if (view === 'Grading view') {
411
+ studentViewPage.steps.submitResponse();
412
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
413
+ studentViewPage.steps.clickOnGoToGradingViewButton();
414
+ gradingViewPage.steps.verifyGradingViewScore(20, 20);
415
+ };
416
+ if (view === 'Question preview' || view === 'Item preview') {
417
+ matchingPage.steps.verifyPreviewScore(20, 20);
418
+ matchingPage.steps.switchToGradingView();
419
+ matchingPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
420
+ };
421
+ matchingPage.steps.verifyCorrectOptionIcon(0);
422
+ matchingPage.steps.verifyCorrectOptionIcon(1);
423
+ matchingPage.steps.verifyCorrectOptionIcon(2);
424
+ matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
425
+ matchingPage.steps.verifyCorrectAnswerSectionNotExists();
426
+ matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
427
+ cy.eyesCheckWindow(`Matching ${view} - Attempting the question correctly`);
428
+ });
429
+ });
430
+ });
431
+ }
432
+
216
433
  views.forEach((view) => {
217
434
  describe(`${view}: Matching drag and drop - Manually scored`, { tags: 'smoke' }, () => {
218
435
  abortEarlySetup();
@@ -354,7 +571,11 @@ describe('Create item page - Matching: All or nothing ', () => {
354
571
  matchingPage.steps.verifyDropzoneNumeration();
355
572
  matchingPage.steps.verifyCorrectIncorrectIconsNotExist();
356
573
  matchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
357
- utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
574
+ if (alternativeAnswerCheck === 'true') {
575
+ matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '', 0);
576
+ } else {
577
+ utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
578
+ }
358
579
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
359
580
  });
360
581
 
@@ -419,6 +640,9 @@ describe('Create item page - Matching: All or nothing ', () => {
419
640
  matchingPage.steps.verifyCorrectOptionIcon(2);
420
641
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
421
642
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
643
+ if (alternativeAnswerCheck === 'true') {
644
+ matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
645
+ }
422
646
  });
423
647
  });
424
648
  });
@@ -2,6 +2,7 @@ import { matchingPage } from "../../../pages";
2
2
  import abortEarlySetup from "../../../support/helpers/abortEarly";
3
3
  import utilities from "../../../support/helpers/utilities";
4
4
  const css = Cypress.env('css');
5
+ const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
5
6
 
6
7
  const defaultListOptions = ['No limit', '1', '2', '3']
7
8
  const options = ['Petals', 'Leaves', 'Roots', 'Stem', 'Seeds', 'Flower', 'Branch'];
@@ -138,7 +139,11 @@ describe('Create Item page - Matching : Maximum capacity per dropzone section',
138
139
  matchingPage.steps.switchToPreviewTab();
139
140
  matchingPage.steps.switchToGradingView();
140
141
  matchingPage.steps.verifyDropzoneNumeration();
141
- utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
142
+ if(alternativeAnswerCheck === 'true') {
143
+ matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(5 points)', 0);
144
+ } else {
145
+ utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
146
+ }
142
147
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionForMultipleOptions([['Petals', 'Leaves'], ['Roots'], ['Stem', 'Seeds']]);
143
148
  });
144
149
 
@@ -244,6 +249,9 @@ describe('Create Item page - Matching : Maximum capacity per dropzone section',
244
249
  matchingPage.steps.verifyCorrectOptionIcon(2, 1);
245
250
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
246
251
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
252
+ if (alternativeAnswerCheck === 'true') {
253
+ matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
254
+ }
247
255
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
248
256
  /* cy.log('When the user attempts the question correctly and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
249
257
  matchingPage.steps.checkAnswer();
@@ -1,6 +1,7 @@
1
1
  import { matchingPage } from "../../../../pages";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
3
  import utilities from "../../../../support/helpers/utilities";
4
+ const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
4
5
  const css = Cypress.env('css');
5
6
  const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
6
7
  const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle', 'Penguin'];
@@ -33,8 +34,23 @@ describe('Create item page - Matching: All or nothing with alternative answers',
33
34
  matchingPage.steps.verifyDropdownNumeration(0);
34
35
  matchingPage.steps.verifyDropdownNumeration(1);
35
36
  matchingPage.steps.verifyDropdownNumeration(2);
36
- utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
37
- matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
37
+ if (alternativeAnswerCheck === 'true') {
38
+ matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
39
+ matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
40
+ matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
41
+ matchingPage.steps.disableShowAlternativeAnswersToggle();
42
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
43
+ matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
44
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
45
+ matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
46
+ matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
47
+ matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']], 1);
48
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
49
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
50
+ } else {
51
+ utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
52
+ matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
53
+ }
38
54
  });
39
55
 
40
56
  it('When the user attempts the question with responses from the correct accordion, then the user should be awarded points of the correct tab and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
@@ -47,6 +63,9 @@ describe('Create item page - Matching: All or nothing with alternative answers',
47
63
  matchingPage.steps.verifyCorrectOptionIconDropdown(2);
48
64
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
49
65
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
66
+ if (alternativeAnswerCheck === 'true') {
67
+ matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
68
+ }
50
69
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
51
70
  });
52
71
 
@@ -60,6 +79,9 @@ describe('Create item page - Matching: All or nothing with alternative answers',
60
79
  matchingPage.steps.verifyCorrectOptionIconDropdown(2);
61
80
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
62
81
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
82
+ if (alternativeAnswerCheck === 'true') {
83
+ matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
84
+ }
63
85
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
64
86
  });
65
87
 
@@ -73,6 +95,19 @@ describe('Create item page - Matching: All or nothing with alternative answers',
73
95
  matchingPage.steps.verifyIncorrectOptionIconDropdown(2);
74
96
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
75
97
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
98
+ if (alternativeAnswerCheck === 'true') {
99
+ matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
100
+ matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
101
+ matchingPage.steps.disableShowAlternativeAnswersToggle();
102
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
103
+ matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
104
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
105
+ matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
106
+ matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
107
+ matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']], 1);
108
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
109
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
110
+ }
76
111
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
77
112
  });
78
113
 
@@ -86,6 +121,19 @@ describe('Create item page - Matching: All or nothing with alternative answers',
86
121
  matchingPage.steps.verifyIncorrectOptionIconDropdown(2);
87
122
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
88
123
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
124
+ if (alternativeAnswerCheck === 'true') {
125
+ matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
126
+ matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
127
+ matchingPage.steps.disableShowAlternativeAnswersToggle();
128
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
129
+ matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
130
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
131
+ matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
132
+ matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
133
+ matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']], 1);
134
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
135
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
136
+ }
89
137
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
90
138
  });
91
139
 
@@ -99,6 +147,19 @@ describe('Create item page - Matching: All or nothing with alternative answers',
99
147
  matchingPage.steps.verifyCorrectOptionIconDropdown(2);
100
148
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
101
149
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
150
+ if (alternativeAnswerCheck === 'true') {
151
+ matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
152
+ matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
153
+ matchingPage.steps.disableShowAlternativeAnswersToggle();
154
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
155
+ matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
156
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
157
+ matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
158
+ matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
159
+ matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']], 1);
160
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
161
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
162
+ }
102
163
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
103
164
  });
104
165
 
@@ -112,6 +173,19 @@ describe('Create item page - Matching: All or nothing with alternative answers',
112
173
  matchingPage.steps.verifyCorrectOptionIconDropdown(2);
113
174
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
114
175
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
176
+ if (alternativeAnswerCheck === 'true') {
177
+ matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
178
+ matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
179
+ matchingPage.steps.disableShowAlternativeAnswersToggle();
180
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
181
+ matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
182
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
183
+ matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
184
+ matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
185
+ matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']], 1);
186
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
187
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
188
+ }
115
189
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
116
190
  });
117
191
 
@@ -125,6 +199,19 @@ describe('Create item page - Matching: All or nothing with alternative answers',
125
199
  matchingPage.steps.verifyCorrectOptionIconDropdown(2);
126
200
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
127
201
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
202
+ if (alternativeAnswerCheck === 'true') {
203
+ matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
204
+ matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
205
+ matchingPage.steps.disableShowAlternativeAnswersToggle();
206
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
207
+ matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
208
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
209
+ matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
210
+ matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
211
+ matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']], 1);
212
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
213
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
214
+ }
128
215
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
129
216
  });
130
217
 
@@ -138,6 +225,19 @@ describe('Create item page - Matching: All or nothing with alternative answers',
138
225
  matchingPage.steps.verifyIncorrectOptionIconDropdown(2);
139
226
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
140
227
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
228
+ if (alternativeAnswerCheck === 'true') {
229
+ matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
230
+ matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
231
+ matchingPage.steps.disableShowAlternativeAnswersToggle();
232
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
233
+ matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
234
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
235
+ matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
236
+ matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
237
+ matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']], 1);
238
+ matchingPage.steps.clickShowAlternativeAnswersToggle();
239
+ matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
240
+ }
141
241
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
142
242
  });
143
243
  });