itemengine-cypress-automation 1.0.583-IEI-7048-71a8251.0 → 1.0.583

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 (100) hide show
  1. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +123 -8
  2. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +123 -8
  3. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +131 -14
  4. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +138 -9
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +138 -9
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsGreaterThanAlternativePoints.js +153 -10
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +138 -9
  8. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +108 -7
  9. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +138 -9
  10. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +272 -1
  11. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +4 -1
  12. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +109 -8
  13. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +109 -8
  14. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +109 -8
  15. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/blankResponseScoring.js +7 -2
  16. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +139 -10
  17. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +4 -1
  18. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +124 -9
  19. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +139 -10
  20. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +4 -1
  21. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +124 -9
  22. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +109 -8
  23. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +124 -9
  24. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +243 -2
  25. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -77
  26. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +1 -78
  27. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -78
  28. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +9 -104
  29. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsBasic.js +0 -4
  30. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -95
  31. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -95
  32. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -84
  33. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsBasic.js +0 -4
  34. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -73
  35. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -84
  36. package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +2 -187
  37. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +1 -79
  38. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -79
  39. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -79
  40. package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +0 -4
  41. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -103
  42. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +0 -4
  43. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -103
  44. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -103
  45. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -91
  46. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +0 -4
  47. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -79
  48. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -91
  49. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +5 -209
  50. package/cypress/e2e/ILC/ListOrderingNew/horizontalOrientationAllOrNothingForAllViews.smoke.js +1 -195
  51. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -103
  52. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -85
  53. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -82
  54. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -85
  55. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +6 -109
  56. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsBasic.js +0 -4
  57. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -103
  58. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -103
  59. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -91
  60. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsBasic.js +0 -4
  61. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -79
  62. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -91
  63. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/allOrNothingForAllViews.smoke.js +3 -203
  64. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingGroupedScoring.js +1 -9
  65. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -102
  66. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +2 -102
  67. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -107
  68. package/cypress/e2e/ILC/Matching/Scoring/blankResponseScoring.js +2 -36
  69. package/cypress/e2e/ILC/Matching/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +0 -5
  70. package/cypress/e2e/ILC/Matching/Scoring/manuallyAndNonScored.js +0 -1
  71. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +1 -10
  72. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -128
  73. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +2 -115
  74. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -128
  75. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsBasic.js +1 -9
  76. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -115
  77. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +2 -102
  78. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -115
  79. package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +2 -226
  80. package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +1 -9
  81. package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -102
  82. package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +2 -102
  83. package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -102
  84. package/cypress/e2e/ILC/MatchingDropdown/Scoring/blankResponseScoring.js +5 -32
  85. package/cypress/e2e/ILC/MatchingDropdown/Scoring/manuallyAndNonScored.js +0 -3
  86. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsScoringBasic.js +1 -10
  87. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -128
  88. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternatePoints.js +2 -115
  89. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternatePoints.js +2 -128
  90. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsBasic.js +1 -9
  91. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -115
  92. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +2 -102
  93. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -115
  94. package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +2 -216
  95. package/cypress/pages/components/correctIncorrectAnswerLabelComponent.js +1 -18
  96. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +25 -1
  97. package/cypress/pages/dragAndDropIntoCategoriesPage.js +38 -0
  98. package/cypress/pages/listOrderingPage.js +1 -60
  99. package/cypress/pages/matchingPage.js +1 -23
  100. package/package.json +1 -1
@@ -2,7 +2,6 @@ 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');
6
5
  const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
7
6
  const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle', 'Penguin'];
8
7
 
@@ -33,23 +32,8 @@ describe('Create item page - Matching: All or nothing with alternative answers',
33
32
  matchingPage.steps.switchToGradingView();
34
33
  matchingPage.steps.verifyDropzoneNumeration();
35
34
  utilities.verifyElementVisibilityState(matchingPage.correctIncorrectAnswerLabel(), 'notExist');
36
- if (alternativeAnswerCheck === 'true') {
37
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
38
- matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
39
- matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
40
- matchingPage.steps.disableShowAlternativeAnswersToggle();
41
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
42
- matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
43
- matchingPage.steps.clickShowAlternativeAnswersToggle();
44
- matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
45
- matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
46
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
47
- matchingPage.steps.clickShowAlternativeAnswersToggle();
48
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
49
- } else {
50
- utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
51
- matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
52
- }
35
+ utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
36
+ matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
53
37
  });
54
38
 
55
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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
@@ -62,9 +46,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
62
46
  matchingPage.steps.verifyCorrectOptionIcon(2);
63
47
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
64
48
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
65
- if (alternativeAnswerCheck === 'true') {
66
- matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
67
- }
68
49
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
69
50
  /*cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
70
51
  matchingPage.steps.checkAnswer();
@@ -85,9 +66,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
85
66
  matchingPage.steps.verifyCorrectOptionIcon(2);
86
67
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
87
68
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
88
- if (alternativeAnswerCheck === 'true') {
89
- matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
90
- }
91
69
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
92
70
  /*cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
93
71
  matchingPage.steps.checkAnswer();
@@ -108,19 +86,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
108
86
  matchingPage.steps.verifyIncorrectOptionIconForEmptyOption(2);
109
87
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
110
88
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
111
- if (alternativeAnswerCheck === 'true') {
112
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
113
- matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
114
- matchingPage.steps.disableShowAlternativeAnswersToggle();
115
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
116
- matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
117
- matchingPage.steps.clickShowAlternativeAnswersToggle();
118
- matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
119
- matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
120
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
121
- matchingPage.steps.clickShowAlternativeAnswersToggle();
122
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
123
- }
124
89
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
125
90
  /*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')
126
91
  matchingPage.steps.checkAnswer();
@@ -141,19 +106,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
141
106
  matchingPage.steps.verifyIncorrectOptionIconForEmptyOption(2);
142
107
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
143
108
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
144
- if (alternativeAnswerCheck === 'true') {
145
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
146
- matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
147
- matchingPage.steps.disableShowAlternativeAnswersToggle();
148
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
149
- matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
150
- matchingPage.steps.clickShowAlternativeAnswersToggle();
151
- matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
152
- matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
153
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
154
- matchingPage.steps.clickShowAlternativeAnswersToggle();
155
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
156
- }
157
109
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
158
110
  /*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, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
159
111
  matchingPage.steps.checkAnswer();
@@ -175,19 +127,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
175
127
  matchingPage.steps.verifyCorrectOptionIcon(2);
176
128
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
177
129
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
178
- if (alternativeAnswerCheck === 'true') {
179
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
180
- matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
181
- matchingPage.steps.disableShowAlternativeAnswersToggle();
182
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
183
- matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
184
- matchingPage.steps.clickShowAlternativeAnswersToggle();
185
- matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
186
- matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
187
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
188
- matchingPage.steps.clickShowAlternativeAnswersToggle();
189
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
190
- }
191
130
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
192
131
  /*cy.log('When the user has attempted the question with partially correct with all the response correct as per the alternative accordion but one response incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the response from the correct accordion and alternative accordion and no icon should be displayed beside unattempted response, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
193
132
  matchingPage.steps.checkAnswer();
@@ -208,19 +147,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
208
147
  matchingPage.steps.verifyCorrectOptionIcon(2);
209
148
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
210
149
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
211
- if (alternativeAnswerCheck === 'true') {
212
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
213
- matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
214
- matchingPage.steps.disableShowAlternativeAnswersToggle();
215
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
216
- matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
217
- matchingPage.steps.clickShowAlternativeAnswersToggle();
218
- matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
219
- matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
220
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
221
- matchingPage.steps.clickShowAlternativeAnswersToggle();
222
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
223
- }
224
150
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
225
151
  /*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed beside empty responses a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
226
152
  matchingPage.steps.checkAnswer();
@@ -241,19 +167,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
241
167
  matchingPage.steps.verifyCorrectOptionIcon(2);
242
168
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
243
169
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
244
- if (alternativeAnswerCheck === 'true') {
245
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
246
- matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
247
- matchingPage.steps.disableShowAlternativeAnswersToggle();
248
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
249
- matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
250
- matchingPage.steps.clickShowAlternativeAnswersToggle();
251
- matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
252
- matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
253
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
254
- matchingPage.steps.clickShowAlternativeAnswersToggle();
255
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
256
- }
257
170
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
258
171
  /*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
259
172
  matchingPage.steps.checkAnswer();
@@ -274,19 +187,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
274
187
  matchingPage.steps.verifyIncorrectOptionIconForEmptyOption(2);
275
188
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
276
189
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
277
- if (alternativeAnswerCheck === 'true') {
278
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
279
- matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
280
- matchingPage.steps.disableShowAlternativeAnswersToggle();
281
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
282
- matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
283
- matchingPage.steps.clickShowAlternativeAnswersToggle();
284
- matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
285
- matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
286
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
287
- matchingPage.steps.clickShowAlternativeAnswersToggle();
288
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
289
- }
290
190
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
291
191
  /*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, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
292
192
  matchingPage.steps.checkAnswer();
@@ -2,7 +2,6 @@ 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');
6
5
  const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
7
6
  const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle', 'Penguin'];
8
7
 
@@ -33,23 +32,8 @@ describe('Create item page - Matching: All or nothing with alternative answers',
33
32
  matchingPage.steps.switchToGradingView();
34
33
  matchingPage.steps.verifyDropzoneNumeration();
35
34
  utilities.verifyElementVisibilityState(matchingPage.correctIncorrectAnswerLabel(), 'notExist');
36
- if (alternativeAnswerCheck === 'true') {
37
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
38
- matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
39
- matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
40
- matchingPage.steps.disableShowAlternativeAnswersToggle();
41
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
42
- matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
43
- matchingPage.steps.clickShowAlternativeAnswersToggle();
44
- matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
45
- matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
46
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
47
- matchingPage.steps.clickShowAlternativeAnswersToggle();
48
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
49
- } else {
50
- utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
51
- matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
52
- }
35
+ utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
36
+ matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
53
37
  });
54
38
 
55
39
  it('CSS of correct answer section and dropzone numeration', { tags: 'css' }, () => {
@@ -92,9 +76,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
92
76
  matchingPage.steps.verifyCorrectOptionIcon(2);
93
77
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
94
78
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
95
- if (alternativeAnswerCheck === 'true') {
96
- matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
97
- }
98
79
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
99
80
  /*cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
100
81
  matchingPage.steps.checkAnswer();
@@ -137,9 +118,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
137
118
  matchingPage.steps.verifyCorrectOptionIcon(2);
138
119
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
139
120
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
140
- if (alternativeAnswerCheck === 'true') {
141
- matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
142
- }
143
121
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
144
122
  /*cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
145
123
  matchingPage.steps.checkAnswer();
@@ -160,19 +138,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
160
138
  matchingPage.steps.verifyIncorrectOptionIconForEmptyOption(2);
161
139
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
162
140
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
163
- if (alternativeAnswerCheck === 'true') {
164
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
165
- matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
166
- matchingPage.steps.disableShowAlternativeAnswersToggle();
167
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
168
- matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
169
- matchingPage.steps.clickShowAlternativeAnswersToggle();
170
- matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
171
- matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
172
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
173
- matchingPage.steps.clickShowAlternativeAnswersToggle();
174
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
175
- }
176
141
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
177
142
  /*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')
178
143
  matchingPage.steps.checkAnswer();
@@ -193,20 +158,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
193
158
  matchingPage.steps.verifyIncorrectOptionIconForEmptyOption(2);
194
159
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
195
160
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
196
- if (alternativeAnswerCheck === 'true') {
197
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
198
- matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
199
- matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
200
- matchingPage.steps.disableShowAlternativeAnswersToggle();
201
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
202
- matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
203
- matchingPage.steps.clickShowAlternativeAnswersToggle();
204
- matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
205
- matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
206
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
207
- matchingPage.steps.clickShowAlternativeAnswersToggle();
208
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
209
- }
210
161
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
211
162
  /*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, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
212
163
  matchingPage.steps.checkAnswer();
@@ -227,20 +178,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
227
178
  matchingPage.steps.verifyCorrectOptionIcon(2);
228
179
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
229
180
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
230
- if (alternativeAnswerCheck === 'true') {
231
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
232
- matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
233
- matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
234
- matchingPage.steps.disableShowAlternativeAnswersToggle();
235
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
236
- matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
237
- matchingPage.steps.clickShowAlternativeAnswersToggle();
238
- matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
239
- matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
240
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
241
- matchingPage.steps.clickShowAlternativeAnswersToggle();
242
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
243
- }
244
181
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
245
182
  /*cy.log('When the user has attempted the question with partially correct with all the response correct as per the alternative accordion but one response incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the response from the correct accordion, incorrect icon should be displayed besides the responses from the alternative accordion and no icon should be displayed beside unattempted response, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
246
183
  matchingPage.steps.checkAnswer();
@@ -261,20 +198,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
261
198
  matchingPage.steps.verifyCorrectOptionIcon(2);
262
199
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
263
200
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
264
- if (alternativeAnswerCheck === 'true') {
265
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
266
- matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
267
- matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
268
- matchingPage.steps.disableShowAlternativeAnswersToggle();
269
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
270
- matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
271
- matchingPage.steps.clickShowAlternativeAnswersToggle();
272
- matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
273
- matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
274
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
275
- matchingPage.steps.clickShowAlternativeAnswersToggle();
276
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
277
- }
278
201
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
279
202
  /*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed beside empty responses a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
280
203
  matchingPage.steps.checkAnswer();
@@ -295,20 +218,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
295
218
  matchingPage.steps.verifyCorrectOptionIcon(2);
296
219
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
297
220
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
298
- if (alternativeAnswerCheck === 'true') {
299
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
300
- matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
301
- matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
302
- matchingPage.steps.disableShowAlternativeAnswersToggle();
303
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
304
- matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
305
- matchingPage.steps.clickShowAlternativeAnswersToggle();
306
- matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
307
- matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
308
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
309
- matchingPage.steps.clickShowAlternativeAnswersToggle();
310
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
311
- }
312
221
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
313
222
  /*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
314
223
  matchingPage.steps.checkAnswer();
@@ -329,20 +238,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
329
238
  matchingPage.steps.verifyIncorrectOptionIconForEmptyOption(2);
330
239
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
331
240
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
332
- if (alternativeAnswerCheck === 'true') {
333
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
334
- matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
335
- matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
336
- matchingPage.steps.disableShowAlternativeAnswersToggle();
337
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
338
- matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
339
- matchingPage.steps.clickShowAlternativeAnswersToggle();
340
- matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
341
- matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
342
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
343
- matchingPage.steps.clickShowAlternativeAnswersToggle();
344
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
345
- }
346
241
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
347
242
  /*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, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
348
243
  matchingPage.steps.checkAnswer();
@@ -1,8 +1,6 @@
1
1
  import { dialogBoxBase, matchingPage, studentViewPage, itemPreviewPage, gradingViewPage } from "../../../../pages";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
3
  import utilities from "../../../../support/helpers/utilities";
4
-
5
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
6
4
  const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
7
5
  const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle', 'Penguin'];
8
6
 
@@ -34,9 +32,6 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
34
32
  matchingPage.steps.verifyDropzoneNumeration();
35
33
  matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
36
34
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
37
- if (alternativeAnswerCheck === 'true') {
38
- matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
39
- }
40
35
  });
41
36
 
42
37
  it('When the user has not set any answer in the \'Specify correct answer\' section and interacts with the question in the preview tab then correct icons should be displayed beside all the responses, full points should be allocated and correct answer section should not be displayed', () => {
@@ -49,9 +44,6 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
49
44
  matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
50
45
  matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
51
46
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
52
- if (alternativeAnswerCheck === 'true') {
53
- matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
54
- }
55
47
  });
56
48
 
57
49
  it('When the user has not set any answer in the \'Specify correct answer\' section and enters incorrect response in any response in the preview tab then correct icons should be displayed beside the empty responses, incorrect icons should be displayed beside incorrect responses, no points should be allocated and correct answer section should be displayed', () => {
@@ -63,9 +55,6 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
63
55
  matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
64
56
  matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
65
57
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
66
- if (alternativeAnswerCheck === 'true') {
67
- matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
68
- }
69
58
  });
70
59
 
71
60
  it('When the user sets an partial blank answer in the \'Specify correct answer\' section then on switching to \'Grading\' view without attempting the question, dropzone numeration should be displayed, 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', () => {
@@ -78,11 +67,7 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
78
67
  matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
79
68
  matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
80
69
  matchingPage.steps.verifyDropzoneNumeration();
81
- if (alternativeAnswerCheck === 'true') {
82
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(10 points)', 0);
83
- } else {
84
- matchingPage.steps.verifyCorrectAnswerSectionLabel();
85
- }
70
+ matchingPage.steps.verifyCorrectAnswerSectionLabel();
86
71
  matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
87
72
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], [''], ['Cat']]);
88
73
  });
@@ -135,9 +120,6 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
135
120
  matchingPage.steps.verifyCorrectOptionIcon(2);
136
121
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
137
122
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
138
- if (alternativeAnswerCheck === 'true') {
139
- matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
140
- }
141
123
  });
142
124
  });
143
125
 
@@ -164,9 +146,6 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
164
146
  matchingPage.steps.verifyDropzoneNumeration();
165
147
  matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
166
148
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
167
- if (alternativeAnswerCheck === 'true') {
168
- matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
169
- }
170
149
  });
171
150
 
172
151
  it('When the user has not set any answer in the \'Specify correct answer\' section and interacts with the question in the preview tab then correct icons should be displayed beside all the responses, full points should be allocated and correct answer section should not be displayed', () => {
@@ -179,9 +158,6 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
179
158
  matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
180
159
  matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
181
160
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
182
- if (alternativeAnswerCheck === 'true') {
183
- matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
184
- }
185
161
  });
186
162
 
187
163
  it('When the user has not set any answer in the \'Specify correct answer\' section and enters incorrect response in any response in the preview tab then correct icons should be displayed beside the empty responses, incorrect icons should be displayed beside incorrect responses, points for the correct answers should be allocated and correct answer section should be displayed', () => {
@@ -194,9 +170,6 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
194
170
  matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
195
171
  matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
196
172
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
197
- if (alternativeAnswerCheck === 'true') {
198
- matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
199
- }
200
173
  });
201
174
 
202
175
  it('When the user sets an partial blank answer in the \'Specify correct answer\' section then on switching to \'Grading\' view without attempting the question, dropzone numeration should be displayed, 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', () => {
@@ -209,11 +182,7 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
209
182
  matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
210
183
  matchingPage.steps.switchToGradingView();
211
184
  matchingPage.steps.verifyDropzoneNumeration();
212
- if (alternativeAnswerCheck === 'true') {
213
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 8 pts)', 0);
214
- } else {
215
- matchingPage.steps.verifyCorrectAnswerSectionLabel();
216
- }
185
+ matchingPage.steps.verifyCorrectAnswerSectionLabel();
217
186
  matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
218
187
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], [''], ['Cat']]);
219
188
  });
@@ -262,9 +231,6 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
262
231
  matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
263
232
  matchingPage.steps.verifyCorrectOptionIcon(2);
264
233
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
265
- if (alternativeAnswerCheck === 'true') {
266
- matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
267
- }
268
234
  });
269
235
  });
270
236
  });
@@ -1,8 +1,6 @@
1
1
  import { matchingPage } from "../../../../pages";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
3
 
4
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
5
-
6
4
  describe('Create Item page - Matching', () => {
7
5
  before(() => {
8
6
  cy.loginAs('admin');
@@ -71,9 +69,6 @@ describe('Create Item page - Matching', () => {
71
69
  matchingPage.steps.switchToGradingView();
72
70
  matchingPage.steps.verifyAnswerStatusBannerExist();
73
71
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
74
- if (alternativeAnswerCheck === 'true') {
75
- matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
76
- }
77
72
  });
78
73
  });
79
74
 
@@ -1,7 +1,6 @@
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');
5
4
  const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
6
5
  const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle', 'Penguin'];
7
6
 
@@ -1,8 +1,6 @@
1
1
  import { matchingPage } from "../../../../pages";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
3
  import utilities from "../../../../support/helpers/utilities";
4
-
5
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
6
4
  const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
7
5
  const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle', 'Penguin'];
8
6
 
@@ -32,11 +30,7 @@ describe('Create item page - Matching: Partial different weights', () => {
32
30
  matchingPage.steps.switchToGradingView();
33
31
  matchingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
34
32
  matchingPage.steps.verifyDropzoneNumeration();
35
- if(alternativeAnswerCheck === 'true') {
36
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 9 pts, 6 pts, 5 pts)', 0);
37
- } else {
38
- utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
39
- }
33
+ utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
40
34
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
41
35
  });
42
36
 
@@ -110,9 +104,6 @@ describe('Create item page - Matching: Partial different weights', () => {
110
104
  matchingPage.steps.verifyCorrectOptionIcon(2);
111
105
  matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
112
106
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
113
- if (alternativeAnswerCheck === 'true') {
114
- matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
115
- }
116
107
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
117
108
  /*cy.log('When the user attempts the question with all the responses correctly attempted and clicks on \'Check answer\' green check-mark should be displayed besides the correct answer responses, a status message should not be displayed and correct answer section should not be displayed')
118
109
  matchingPage.steps.checkAnswer();