itemengine-cypress-automation 1.0.602-IEI-7053-f14f91b.0 → 1.0.602-IEI-7260-20e3fb8.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 (18) hide show
  1. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +7 -108
  2. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAddEvaluation.js +5 -58
  3. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAlternateAnswer.js +2 -25
  4. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +7 -108
  5. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +7 -108
  6. package/cypress/e2e/ILC/TextEntryMath/Scoring/blankResponseScoring.js +10 -93
  7. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +8 -123
  8. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +7 -108
  9. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -123
  10. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +4 -47
  11. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +8 -123
  12. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +7 -108
  13. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -123
  14. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +0 -234
  15. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +0 -235
  16. package/cypress/e2e/ILC/ThinkSphere/gradingViewPlanTabSection.js +1 -0
  17. package/cypress/pages/textEntryMathPage.js +3 -41
  18. package/package.json +1 -1
@@ -2,9 +2,6 @@ import { textEntryMathPage } from "../../../../pages";
2
2
  import { equationEditorFlyout } from "../../../../pages/components";
3
3
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
4
4
  import utilities from "../../../../support/helpers/utilities";
5
- import { showAlternativeAnswersComponent } from "../../../../pages/components";
6
-
7
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
8
5
  const css = Cypress.env('css');
9
6
 
10
7
  describe('Create Item page - Text entry math: Preview scoring', () => {
@@ -56,21 +53,7 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
56
53
  it('When the user selects \'Grading\' view without attempting the question, response numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers from the correct accordion and respective response numeration', () => {
57
54
  textEntryMathPage.steps.switchToGradingView();
58
55
  textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
59
- if (alternativeAnswerCheck) {
60
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
61
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
62
- {
63
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
64
- points: ['(20 points)']
65
- },
66
- {
67
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
68
- points: ['(10 points)']
69
- },
70
- ]);
71
- } else {
72
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
73
- }
56
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
74
57
  textEntryMathPage.steps.switchToGradingView();
75
58
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
76
59
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
@@ -163,21 +146,7 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
163
146
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
164
147
  textEntryMathPage.steps.verifyCorrectResponseIcon(2);
165
148
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
166
- if (alternativeAnswerCheck) {
167
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
168
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
169
- {
170
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
171
- points: ['(20 points)']
172
- },
173
- {
174
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
175
- points: ['(10 points)']
176
- },
177
- ]);
178
- } else {
179
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
180
- }
149
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
181
150
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
182
151
  });
183
152
 
@@ -194,21 +163,7 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
194
163
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
195
164
  textEntryMathPage.steps.verifyCorrectResponseIcon(2);
196
165
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
197
- if (alternativeAnswerCheck) {
198
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
199
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
200
- {
201
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
202
- points: ['(20 points)']
203
- },
204
- {
205
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
206
- points: ['(10 points)']
207
- },
208
- ]);
209
- } else {
210
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
211
- }
166
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
212
167
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
213
168
  });
214
169
 
@@ -225,21 +180,7 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
225
180
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
226
181
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
227
182
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
228
- if (alternativeAnswerCheck) {
229
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
230
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
231
- {
232
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
233
- points: ['(20 points)']
234
- },
235
- {
236
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
237
- points: ['(10 points)']
238
- },
239
- ]);
240
- } else {
241
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
242
- }
183
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
243
184
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
244
185
  });
245
186
 
@@ -259,21 +200,7 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
259
200
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
260
201
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
261
202
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
262
- if (alternativeAnswerCheck) {
263
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
264
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
265
- {
266
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
267
- points: ['(20 points)']
268
- },
269
- {
270
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
271
- points: ['(10 points)']
272
- },
273
- ]);
274
- } else {
275
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
276
- }
203
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
277
204
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
278
205
  });
279
206
 
@@ -288,21 +215,7 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
288
215
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
289
216
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
290
217
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
291
- if (alternativeAnswerCheck) {
292
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
293
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
294
- {
295
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
296
- points: ['(20 points)']
297
- },
298
- {
299
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
300
- points: ['(10 points)']
301
- },
302
- ]);
303
- } else {
304
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
305
- }
218
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
306
219
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
307
220
  });
308
221
 
@@ -323,21 +236,7 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
323
236
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
324
237
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
325
238
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
326
- if (alternativeAnswerCheck) {
327
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
328
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
329
- {
330
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
331
- points: ['(20 points)']
332
- },
333
- {
334
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
335
- points: ['(10 points)']
336
- },
337
- ]);
338
- } else {
339
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
340
- }
239
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
341
240
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
342
241
  });
343
242
 
@@ -2,9 +2,6 @@ import { dialogBoxBase, gradingViewPage, itemPreviewPage, studentViewPage, textE
2
2
  import { equationEditorFlyout } from "../../../../pages/components";
3
3
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
4
4
  import utilities from "../../../../support/helpers/utilities";
5
- import { showAlternativeAnswersComponent } from "../../../../pages/components";
6
-
7
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
8
5
  var itemReferenceID = "";
9
6
 
10
7
  describe('Create item page - Text entry math: Partial equal weights for blank responses', () => {
@@ -65,19 +62,9 @@ describe('Create item page - Text entry math: Partial equal weights for blank re
65
62
  textEntryMathPage.steps.switchToGradingView();
66
63
  textEntryMathPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
67
64
  textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
65
+ utilities.verifyInnerText(textEntryMathPage.correctAnswersLabel(), 'Correct answers');
68
66
  textEntryMathPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
69
- if (alternativeAnswerCheck) {
70
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
71
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
72
- {
73
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π'],
74
- points: ['(24 points)']
75
- },
76
- ]);
77
- } else {
78
- utilities.verifyInnerText(textEntryMathPage.correctAnswersLabel(), 'Correct answers');
79
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
80
- }
67
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
81
68
  });
82
69
 
83
70
  it('When the user has set an 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 correct responses and incorrect icon beside the incorrect responses, points should be allocated for the correct answers and correct answer section should be displayed', () => {
@@ -90,17 +77,7 @@ describe('Create item page - Text entry math: Partial equal weights for blank re
90
77
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
91
78
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
92
79
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
93
- if (alternativeAnswerCheck) {
94
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
95
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
96
- {
97
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π'],
98
- points: ['(24 points)']
99
- },
100
- ]);
101
- } else {
102
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
103
- }
80
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
104
81
  });
105
82
 
106
83
  it('When the user has set an answer in the \'Specify correct answer\' section and enters responses in the preview tab then correct icons should be displayed beside all the correct responses and incorrect icon beside the incorrect responses, points should be allocated for the correct answers and correct answer section should be displayed', () => {
@@ -114,17 +91,7 @@ describe('Create item page - Text entry math: Partial equal weights for blank re
114
91
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
115
92
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
116
93
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
117
- if (alternativeAnswerCheck) {
118
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
119
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
120
- {
121
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π'],
122
- points: ['(24 points)']
123
- },
124
- ]);
125
- } else {
126
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
127
- }
94
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
128
95
  });
129
96
 
130
97
  it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
@@ -144,17 +111,7 @@ describe('Create item page - Text entry math: Partial equal weights for blank re
144
111
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
145
112
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
146
113
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
147
- if (alternativeAnswerCheck) {
148
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
149
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
150
- {
151
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π'],
152
- points: ['(24 points)']
153
- },
154
- ]);
155
- } else {
156
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
157
- }
114
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
158
115
  });
159
116
 
160
117
  it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
@@ -228,19 +185,9 @@ describe('Create item page - Text entry math: Partial equal weights for blank re
228
185
  textEntryMathPage.steps.switchToGradingView();
229
186
  textEntryMathPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
230
187
  textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
188
+ utilities.verifyInnerText(textEntryMathPage.correctAnswersLabel(), 'Correct answers');
231
189
  textEntryMathPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
232
- if (alternativeAnswerCheck) {
233
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
234
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
235
- {
236
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π'],
237
- points: ['(24 points)']
238
- },
239
- ]);
240
- } else {
241
- utilities.verifyInnerText(textEntryMathPage.correctAnswersLabel(), 'Correct answers');
242
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
243
- }
190
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
244
191
  });
245
192
 
246
193
  it('When the user has set an 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 correct responses and incorrect icon beside the incorrect responses, points should be allocated for the correct answers and correct answer section should be displayed', () => {
@@ -252,17 +199,7 @@ describe('Create item page - Text entry math: Partial equal weights for blank re
252
199
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
253
200
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
254
201
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
255
- if (alternativeAnswerCheck) {
256
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
257
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
258
- {
259
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π'],
260
- points: ['(24 points)']
261
- },
262
- ]);
263
- } else {
264
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
265
- }
202
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
266
203
  });
267
204
 
268
205
  it('When the user has set an answer in the \'Specify correct answer\' section and enters responses in the preview tab then correct icons should be displayed beside all the correct responses and incorrect icon beside the incorrect responses, points should be allocated for the correct answers and correct answer section should be displayed', () => {
@@ -275,17 +212,7 @@ describe('Create item page - Text entry math: Partial equal weights for blank re
275
212
  textEntryMathPage.steps.verifyCorrectResponseIcon(0);
276
213
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
277
214
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
278
- if (alternativeAnswerCheck) {
279
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
280
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
281
- {
282
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π'],
283
- points: ['(24 points)']
284
- },
285
- ]);
286
- } else {
287
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
288
- }
215
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
289
216
  });
290
217
 
291
218
  it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
@@ -304,17 +231,7 @@ describe('Create item page - Text entry math: Partial equal weights for blank re
304
231
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
305
232
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
306
233
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
307
- if (alternativeAnswerCheck) {
308
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
309
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
310
- {
311
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π'],
312
- points: ['(24 points)']
313
- },
314
- ]);
315
- } else {
316
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
317
- }
234
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
318
235
  });
319
236
 
320
237
  it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
@@ -2,9 +2,6 @@ import { textEntryMathPage } from "../../../../pages";
2
2
  import { equationEditorFlyout } from "../../../../pages/components";
3
3
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
4
4
  import utilities from "../../../../support/helpers/utilities";
5
- import { showAlternativeAnswersComponent } from "../../../../pages/components";
6
-
7
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
8
5
 
9
6
  describe('Create Item page - Text entry math: Preview scoring', () => {
10
7
  before(() => {
@@ -56,21 +53,7 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
56
53
  it('When the user selects \'Grading\' view without attempting the question, response numeration should be displayed, correct answers section should be displayed with correct answers from the alternative accordion and respective response numeration, no status message should be displayed', () => {
57
54
  textEntryMathPage.steps.switchToGradingView();
58
55
  textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
59
- if (alternativeAnswerCheck) {
60
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
61
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
62
- {
63
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
64
- points: ['(18 points)', '(4 points)', '(9 points)', '(5 points)']
65
- },
66
- {
67
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
68
- points: ['(12 points)', '(2 points)', '(4 points)', '(6 points)']
69
- },
70
- ]);
71
- } else {
72
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
73
- }
56
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
74
57
  textEntryMathPage.steps.switchToGradingView();
75
58
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
76
59
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
@@ -128,21 +111,7 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
128
111
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
129
112
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
130
113
  textEntryMathPage.steps.verifyCorrectResponseIcon(2);
131
- if (alternativeAnswerCheck) {
132
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
133
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
134
- {
135
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
136
- points: ['(18 points)', '(4 points)', '(9 points)', '(5 points)']
137
- },
138
- {
139
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
140
- points: ['(12 points)', '(2 points)', '(4 points)', '(6 points)']
141
- },
142
- ]);
143
- } else {
144
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
145
- }
114
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
146
115
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
147
116
  });
148
117
 
@@ -158,21 +127,7 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
158
127
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
159
128
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
160
129
  textEntryMathPage.steps.verifyCorrectResponseIcon(2);
161
- if (alternativeAnswerCheck) {
162
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
163
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
164
- {
165
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
166
- points: ['(18 points)', '(4 points)', '(9 points)', '(5 points)']
167
- },
168
- {
169
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
170
- points: ['(12 points)', '(2 points)', '(4 points)', '(6 points)']
171
- },
172
- ]);
173
- } else {
174
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
175
- }
130
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
176
131
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
177
132
  });
178
133
 
@@ -188,21 +143,7 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
188
143
  textEntryMathPage.steps.verifyCorrectResponseIcon(0);
189
144
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
190
145
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
191
- if (alternativeAnswerCheck) {
192
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
193
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
194
- {
195
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
196
- points: ['(18 points)', '(4 points)', '(9 points)', '(5 points)']
197
- },
198
- {
199
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
200
- points: ['(12 points)', '(2 points)', '(4 points)', '(6 points)']
201
- },
202
- ]);
203
- } else {
204
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
205
- }
146
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
206
147
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
207
148
  });
208
149
 
@@ -221,21 +162,7 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
221
162
  textEntryMathPage.steps.verifyCorrectResponseIcon(0);
222
163
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
223
164
  textEntryMathPage.steps.verifyCorrectResponseIcon(2);
224
- if (alternativeAnswerCheck) {
225
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
226
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
227
- {
228
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
229
- points: ['(18 points)', '(4 points)', '(9 points)', '(5 points)']
230
- },
231
- {
232
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
233
- points: ['(12 points)', '(2 points)', '(4 points)', '(6 points)']
234
- },
235
- ]);
236
- } else {
237
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
238
- }
165
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
239
166
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
240
167
  });
241
168
 
@@ -249,21 +176,7 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
249
176
  textEntryMathPage.steps.verifyCorrectResponseIcon(0);
250
177
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
251
178
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
252
- if (alternativeAnswerCheck) {
253
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
254
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
255
- {
256
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
257
- points: ['(18 points)', '(4 points)', '(9 points)', '(5 points)']
258
- },
259
- {
260
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
261
- points: ['(12 points)', '(2 points)', '(4 points)', '(6 points)']
262
- },
263
- ]);
264
- } else {
265
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
266
- }
179
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
267
180
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
268
181
  });
269
182
 
@@ -283,21 +196,7 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
283
196
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
284
197
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
285
198
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
286
- if (alternativeAnswerCheck) {
287
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
288
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
289
- {
290
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
291
- points: ['(18 points)', '(4 points)', '(9 points)', '(5 points)']
292
- },
293
- {
294
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
295
- points: ['(12 points)', '(2 points)', '(4 points)', '(6 points)']
296
- },
297
- ]);
298
- } else {
299
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
300
- }
199
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
301
200
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
302
201
  });
303
202
 
@@ -340,21 +239,7 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
340
239
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
341
240
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
342
241
  textEntryMathPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
343
- if (alternativeAnswerCheck) {
344
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
345
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
346
- {
347
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t⁢A⁢n⁢s⁢w⁢e⁢r', '2⁢x2⁢y2+4⁢x⁢y+4', '7.07⁢e'],
348
- points: ['(23 points)', '(11.4 points)', '(1.2 points)', '(10.4 points)']
349
- },
350
- {
351
- correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
352
- points: ['(16.8 points)', '(13 points)', '(2.2 points)', '(1.6 points)']
353
- },
354
- ]);
355
- } else {
356
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢A⁢n⁢s⁢w⁢e⁢r', '2⁢x2⁢y2+4⁢x⁢y+4', '7.07⁢e']);
357
- }
242
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢A⁢n⁢s⁢w⁢e⁢r', '2⁢x2⁢y2+4⁢x⁢y+4', '7.07⁢e']);
358
243
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
359
244
  });
360
245
  });