itemengine-cypress-automation 1.0.583-IEI-7048-71a8251.0 → 1.0.584-IEI-7041-1da58ac.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 (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
@@ -4,7 +4,6 @@ import abortEarlySetup from "../../../../support/helpers/abortEarly";
4
4
  let options = ['sprout', 'plant', 'flower', 'seed'];
5
5
  let correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
6
6
  let alternateCorrectAnswerArray = ['seed', 'flower', 'sprout', 'plant'];
7
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
8
7
 
9
8
  describe('Create Item page - List ordering: Partial equal weights scoring with alternative answer - When correct answer points are more than alternative answer points', () => {
10
9
  before(() => {
@@ -42,18 +41,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
42
41
  listOrderingPage.steps.switchToGradingView();
43
42
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
44
43
  listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
45
- if (alternativeAnswerCheck === 'true') {
46
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 5 pts)', 0);
47
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(0, ['seed', 'sprout', 'plant', 'flower']);
48
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
49
- listOrderingPage.steps.disableShowAlternativeAnswersToggle();
50
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
51
- listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
52
- listOrderingPage.steps.clickShowAlternativeAnswersToggle();
53
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
54
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 3 pts)', 1);
55
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(1, ['seed', 'flower', 'sprout', 'plant']);
56
- }
57
44
  });
58
45
 
59
46
  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, correct/incorrect status message and correct answer section should not be displayed', () => {
@@ -71,9 +58,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
71
58
  listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
72
59
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
73
60
  listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
74
- if (alternativeAnswerCheck === 'true') {
75
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
76
- }
77
61
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
78
62
  });
79
63
 
@@ -92,9 +76,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
92
76
  listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
93
77
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
94
78
  listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
95
- if (alternativeAnswerCheck === 'true') {
96
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
97
- }
98
79
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
99
80
  });
100
81
 
@@ -113,18 +94,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
113
94
  listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
114
95
  listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
115
96
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
116
- if (alternativeAnswerCheck === 'true') {
117
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 5 pts)', 0);
118
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(0, ['seed', 'sprout', 'plant', 'flower']);
119
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
120
- listOrderingPage.steps.disableShowAlternativeAnswersToggle();
121
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
122
- listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
123
- listOrderingPage.steps.clickShowAlternativeAnswersToggle();
124
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
125
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 3 pts)', 1);
126
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(1, ['seed', 'flower', 'sprout', 'plant']);
127
- }
128
97
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
129
98
  });
130
99
 
@@ -143,18 +112,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
143
112
  listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
144
113
  listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
145
114
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
146
- if (alternativeAnswerCheck === 'true') {
147
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 5 pts)', 0);
148
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(0, ['seed', 'sprout', 'plant', 'flower']);
149
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
150
- listOrderingPage.steps.disableShowAlternativeAnswersToggle();
151
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
152
- listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
153
- listOrderingPage.steps.clickShowAlternativeAnswersToggle();
154
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
155
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 3 pts)', 1);
156
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(1, ['seed', 'flower', 'sprout', 'plant']);
157
- }
158
115
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
159
116
  });
160
117
 
@@ -173,18 +130,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
173
130
  listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
174
131
  listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
175
132
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
176
- if (alternativeAnswerCheck === 'true') {
177
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 5 pts)', 0);
178
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(0, ['seed', 'sprout', 'plant', 'flower']);
179
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
180
- listOrderingPage.steps.disableShowAlternativeAnswersToggle();
181
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
182
- listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
183
- listOrderingPage.steps.clickShowAlternativeAnswersToggle();
184
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
185
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 3 pts)', 1);
186
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(1, ['seed', 'flower', 'sprout', 'plant']);
187
- }
188
133
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
189
134
  });
190
135
 
@@ -203,18 +148,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
203
148
  listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('sprout');
204
149
  listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
205
150
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
206
- if (alternativeAnswerCheck === 'true') {
207
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 5 pts)', 0);
208
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(0, ['seed', 'sprout', 'plant', 'flower']);
209
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
210
- listOrderingPage.steps.disableShowAlternativeAnswersToggle();
211
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
212
- listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
213
- listOrderingPage.steps.clickShowAlternativeAnswersToggle();
214
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
215
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 3 pts)', 1);
216
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(1, ['seed', 'flower', 'sprout', 'plant']);
217
- }
218
151
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
219
152
  });
220
153
 
@@ -233,18 +166,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
233
166
  listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('sprout');
234
167
  listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
235
168
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
236
- if (alternativeAnswerCheck === 'true') {
237
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 5 pts)', 0);
238
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(0, ['seed', 'sprout', 'plant', 'flower']);
239
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
240
- listOrderingPage.steps.disableShowAlternativeAnswersToggle();
241
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
242
- listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
243
- listOrderingPage.steps.clickShowAlternativeAnswersToggle();
244
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
245
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 3 pts)', 1);
246
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(1, ['seed', 'flower', 'sprout', 'plant']);
247
- }
248
169
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
249
170
  });
250
171
 
@@ -276,18 +197,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
276
197
  listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
277
198
  listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
278
199
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
279
- if (alternativeAnswerCheck === 'true') {
280
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 12.5 pts)', 0);
281
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(0, ['seed', 'sprout', 'plant', 'flower']);
282
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
283
- listOrderingPage.steps.disableShowAlternativeAnswersToggle();
284
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
285
- listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
286
- listOrderingPage.steps.clickShowAlternativeAnswersToggle();
287
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
288
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 2.5 pts)', 1);
289
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(1, ['plant', 'flower', 'sprout', 'seed']);
290
- }
291
200
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
292
201
  });
293
202
  });
@@ -8,8 +8,6 @@ const views = utilities.getViews(correctAnswerViews);
8
8
  var itemReferenceID = "";
9
9
  const options = ['sprout', 'plant', 'flower', 'seed'];
10
10
  const correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
11
- const alternateCorrectAnswerArray = ['seed', 'flower', 'sprout', 'plant'];
12
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
13
11
 
14
12
  describe('Create item page - List ordering: All or nothing ', () => {
15
13
  before(() => {
@@ -118,11 +116,7 @@ describe('Create item page - List ordering: All or nothing ', () => {
118
116
  listOrderingPage.steps.switchToGradingView();
119
117
  listOrderingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
120
118
  listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
121
- if (alternativeAnswerCheck === 'true') {
122
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
123
- } else {
124
- utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
125
- }
119
+ utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
126
120
  listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
127
121
  });
128
122
  };
@@ -200,198 +194,11 @@ describe('Create item page - List ordering: All or nothing ', () => {
200
194
  listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
201
195
  listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
202
196
  listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
203
- if (alternativeAnswerCheck === 'true') {
204
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
205
- }
206
197
  listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
207
198
  });
208
199
  });
209
200
  });
210
201
 
211
- if (alternativeAnswerCheck === 'true') {
212
- views.forEach((view) => {
213
- describe(`${view}: Auto scored - All or nothing scoring`, { tags: 'smoke' }, () => {
214
- abortEarlySetup();
215
- before(() => {
216
- switch (view) {
217
- case 'Question preview':
218
- listOrderingPage.steps.navigateToCreateQuestion('list ordering');
219
- cy.barsPreLoaderWait();
220
- listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
221
- listOrderingPage.steps.addInputToOptionsInputField(options);
222
- listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
223
- listOrderingPage.steps.allotPoints(20);
224
- listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
225
- listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
226
- listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
227
- listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
228
- listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(correctAnswerArray);
229
- listOrderingPage.steps.addAlternativeAnswerAccordion(1);
230
- listOrderingPage.steps.allotPoints(12);
231
- listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
232
- listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
233
- listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
234
- listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
235
- listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(alternateCorrectAnswerArray);
236
- listOrderingPage.steps.switchToPreviewTab();
237
- break;
238
- case 'Item preview':
239
- cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
240
- itemPreviewPage.steps.switchToPreviewTab();
241
- break;
242
- case 'Grading view':
243
- cy.wait(5000);
244
- cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
245
- break;
246
- };
247
- });
248
-
249
- beforeEach(() => {
250
- switch (view) {
251
- case 'Question preview':
252
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
253
- listOrderingPage.steps.resetQuestionPreview();
254
- break;
255
- case 'Item preview':
256
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
257
- itemPreviewPage.steps.resetQuestionPreview();
258
- break;
259
- case 'Grading view':
260
- cy.wait(5000);
261
- cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
262
- break;
263
- }
264
- });
265
-
266
- if (view === 'Question preview') {
267
- after(() => {
268
- listOrderingPage.steps.clickOnSaveQuestionButton();
269
- utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
270
- itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
271
- });
272
- };
273
-
274
- if (view === 'Question preview' || view === 'Item preview') {
275
- it('When the user selects \'Grading\' view without attempting the question, then correct/incorrect icons and correct incorrect status message should not be displayed and correct answer section with all correct answers should be displayed', () => {
276
- listOrderingPage.steps.verifyPreviewScore(0, 20);
277
- listOrderingPage.steps.switchToGradingView();
278
- listOrderingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
279
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
280
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
281
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
282
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
283
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(0, ['seed', 'sprout', 'plant', 'flower',]);
284
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
285
- listOrderingPage.steps.disableShowAlternativeAnswersToggle();
286
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
287
- listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
288
- listOrderingPage.steps.clickShowAlternativeAnswersToggle();
289
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
290
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
291
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(1, ['seed', 'flower', 'sprout', 'plant']);
292
- });
293
- };
294
-
295
- 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 should be displayed', () => {
296
- listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
297
- listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
298
- listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
299
- listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
300
- if (view === 'Grading view') {
301
- studentViewPage.steps.submitResponse();
302
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
303
- studentViewPage.steps.clickOnGoToGradingViewButton();
304
- gradingViewPage.steps.verifyGradingViewScore(0, 20);
305
- };
306
- if (view === 'Question preview' || view === 'Item preview') {
307
- listOrderingPage.steps.verifyPreviewScore(0, 20);
308
- listOrderingPage.steps.switchToGradingView();
309
- };
310
- listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('sprout');
311
- listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
312
- listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
313
- listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
314
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
315
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
316
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
317
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(0, ['seed', 'sprout', 'plant', 'flower',]);
318
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
319
- listOrderingPage.steps.disableShowAlternativeAnswersToggle();
320
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
321
- listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
322
- listOrderingPage.steps.clickShowAlternativeAnswersToggle();
323
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
324
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
325
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(1, ['seed', 'flower', 'sprout', 'plant']);
326
- });
327
-
328
- it('When the user attempts the question partially correct, 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 should be displayed', () => {
329
- if (view === 'Grading view') {
330
- studentViewPage.steps.clearResponses();
331
- };
332
- listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
333
- listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
334
- listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
335
- listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
336
- if (view === 'Grading view') {
337
- studentViewPage.steps.submitResponse();
338
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
339
- studentViewPage.steps.clickOnGoToGradingViewButton();
340
- gradingViewPage.steps.verifyGradingViewScore(0, 20);
341
- };
342
- if (view === 'Question preview' || view === 'Item preview') {
343
- listOrderingPage.steps.verifyPreviewScore(0, 20);
344
- listOrderingPage.steps.switchToGradingView();
345
- };
346
- listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
347
- listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
348
- listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
349
- listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('sprout');
350
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
351
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
352
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
353
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(0, ['seed', 'sprout', 'plant', 'flower',]);
354
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
355
- listOrderingPage.steps.disableShowAlternativeAnswersToggle();
356
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
357
- listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
358
- listOrderingPage.steps.clickShowAlternativeAnswersToggle();
359
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
360
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
361
- listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(1, ['seed', 'flower', 'sprout', 'plant']);
362
- });
363
-
364
- it('When the 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', () => {
365
- if (view === 'Grading view') {
366
- studentViewPage.steps.clearResponses();
367
- };
368
- listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
369
- listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
370
- listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
371
- listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
372
- if (view === 'Grading view') {
373
- studentViewPage.steps.submitResponse();
374
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
375
- studentViewPage.steps.clickOnGoToGradingViewButton();
376
- gradingViewPage.steps.verifyGradingViewScore(20, 20);
377
- };
378
- if (view === 'Question preview' || view === 'Item preview') {
379
- listOrderingPage.steps.verifyPreviewScore(20, 20);
380
- listOrderingPage.steps.switchToGradingView();
381
- listOrderingPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
382
- };
383
- listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
384
- listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
385
- listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
386
- listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
387
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
388
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
389
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
390
- });
391
- });
392
- });
393
- }
394
-
395
202
  views.forEach((view) => {
396
203
  describe(`${view}: List ordering (Reorder as a separate list) - Manually scored`, { tags: 'smoke' }, () => {
397
204
  abortEarlySetup();
@@ -531,11 +338,7 @@ describe('Create item page - List ordering: All or nothing ', () => {
531
338
  if (view === 'Question preview' || view === 'Item preview') {
532
339
  listOrderingPage.steps.checkNonScoredScoringLabel();
533
340
  listOrderingPage.steps.switchToGradingView();
534
- if (alternativeAnswerCheck === 'true') {
535
- listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '', 0);
536
- } else {
537
- utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
538
- }
341
+ utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
539
342
  listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(['seed', 'sprout', 'plant', 'flower']);
540
343
  };
541
344
  });
@@ -612,9 +415,6 @@ describe('Create item page - List ordering: All or nothing ', () => {
612
415
  listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
613
416
  listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
614
417
  listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
615
- if (alternativeAnswerCheck === 'true') {
616
- listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
617
- }
618
418
  listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
619
419
  });
620
420
  });
@@ -732,7 +532,7 @@ describe('Create item page - List ordering: All or nothing ', () => {
732
532
  listOrderingPage.steps.switchToGradingView();
733
533
  listOrderingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
734
534
  listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
735
- cypress / e2e / ILC / ListOrderingNew / horizontalOrientationAllOrNothingForAllViews.smoke.js
535
+ utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
736
536
  listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
737
537
  });
738
538
  };
@@ -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
 
6
5
  describe('Create item page - Matching: All or nothing with grouped options layout', () => {
7
6
  before(() => {
@@ -29,11 +28,7 @@ describe('Create item page - Matching: All or nothing with grouped options layou
29
28
  matchingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
30
29
  matchingPage.steps.verifyDropzoneNumeration();
31
30
  utilities.verifyElementVisibilityState(matchingPage.correctIncorrectAnswerLabel(), 'notExist');
32
- if(alternativeAnswerCheck === 'true') {
33
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
34
- } else {
35
- utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
36
- }
31
+ utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
37
32
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
38
33
  });
39
34
 
@@ -148,9 +143,6 @@ describe('Create item page - Matching: All or nothing with grouped options layou
148
143
  matchingPage.steps.verifyCorrectOptionIcon(2);
149
144
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
150
145
  matchingPage.steps.verifyCorrectAnswerSectionNotExists();
151
- if (alternativeAnswerCheck === 'true') {
152
- matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
153
- }
154
146
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
155
147
  /*cy.log('When user attempts the question correctly and clicks on \'Check answer\' button, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed')
156
148
  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([['Bear'], ['Penguin'], ['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([['Elephant'], ['Fish'], ['Cat']], 1);
47
- matchingPage.steps.clickShowAlternativeAnswersToggle();
48
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
49
- } else {
50
- utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
51
- matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
52
- }
35
+ utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
36
+ matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['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 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', () => {
@@ -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([['Bear'], ['Penguin'], ['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', '(10 points)', 1);
120
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['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, no icon should be displayed for unattempted response 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([['Bear'], ['Penguin'], ['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', '(10 points)', 1);
153
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['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 for unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
159
111
  matchingPage.steps.checkAnswer();
@@ -174,19 +126,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
174
126
  matchingPage.steps.verifyCorrectOptionIcon(2);
175
127
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
176
128
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
177
- if (alternativeAnswerCheck === 'true') {
178
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
179
- matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
180
- matchingPage.steps.disableShowAlternativeAnswersToggle();
181
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
182
- matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
183
- matchingPage.steps.clickShowAlternativeAnswersToggle();
184
- matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
185
- matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
186
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']], 1);
187
- matchingPage.steps.clickShowAlternativeAnswersToggle();
188
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
189
- }
190
129
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
191
130
  /*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 for unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
192
131
  matchingPage.steps.checkAnswer();
@@ -207,19 +146,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
207
146
  matchingPage.steps.verifyCorrectOptionIcon(2);
208
147
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
209
148
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
210
- if (alternativeAnswerCheck === 'true') {
211
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
212
- matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
213
- matchingPage.steps.disableShowAlternativeAnswersToggle();
214
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
215
- matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
216
- matchingPage.steps.clickShowAlternativeAnswersToggle();
217
- matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
218
- matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
219
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']], 1);
220
- matchingPage.steps.clickShowAlternativeAnswersToggle();
221
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
222
- }
223
149
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
224
150
  /*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')
225
151
  matchingPage.steps.checkAnswer();
@@ -240,19 +166,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
240
166
  matchingPage.steps.verifyCorrectOptionIcon(2);
241
167
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
242
168
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
243
- if (alternativeAnswerCheck === 'true') {
244
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
245
- matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
246
- matchingPage.steps.disableShowAlternativeAnswersToggle();
247
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
248
- matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
249
- matchingPage.steps.clickShowAlternativeAnswersToggle();
250
- matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
251
- matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
252
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']], 1);
253
- matchingPage.steps.clickShowAlternativeAnswersToggle();
254
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
255
- }
256
169
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
257
170
  /*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 for unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
258
171
  matchingPage.steps.checkAnswer();
@@ -273,19 +186,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
273
186
  matchingPage.steps.verifyIncorrectOptionIconForEmptyOption(2);
274
187
  matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
275
188
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
276
- if (alternativeAnswerCheck === 'true') {
277
- matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
278
- matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
279
- matchingPage.steps.disableShowAlternativeAnswersToggle();
280
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
281
- matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
282
- matchingPage.steps.clickShowAlternativeAnswersToggle();
283
- matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
284
- matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
285
- matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']], 1);
286
- matchingPage.steps.clickShowAlternativeAnswersToggle();
287
- matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
288
- }
289
189
  matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
290
190
  /*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 for unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
291
191
  matchingPage.steps.checkAnswer();