itemengine-cypress-automation 1.0.602-IEI-7279-fe9422d.0 → 1.0.602-IEI-7053-f14f91b.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 (29) hide show
  1. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -100
  2. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -100
  3. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +2 -104
  4. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -115
  5. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -115
  6. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -115
  7. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -102
  8. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -88
  9. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -106
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +2 -382
  11. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +108 -7
  12. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAddEvaluation.js +58 -5
  13. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAlternateAnswer.js +25 -2
  14. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +108 -7
  15. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +108 -7
  16. package/cypress/e2e/ILC/TextEntryMath/Scoring/blankResponseScoring.js +93 -10
  17. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +123 -8
  18. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +108 -7
  19. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +123 -8
  20. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +47 -4
  21. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +123 -8
  22. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +108 -7
  23. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +123 -8
  24. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +234 -0
  25. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +235 -0
  26. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +1 -24
  27. package/cypress/pages/matchingPage.js +2 -2
  28. package/cypress/pages/textEntryMathPage.js +41 -3
  29. package/package.json +1 -1
@@ -2,6 +2,9 @@ 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';
5
8
  var itemReferenceID = "";
6
9
 
7
10
  describe('Create item page - Text entry math: Partial equal weights for blank responses', () => {
@@ -62,9 +65,19 @@ describe('Create item page - Text entry math: Partial equal weights for blank re
62
65
  textEntryMathPage.steps.switchToGradingView();
63
66
  textEntryMathPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
64
67
  textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
65
- utilities.verifyInnerText(textEntryMathPage.correctAnswersLabel(), 'Correct answers');
66
68
  textEntryMathPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
67
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
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
+ }
68
81
  });
69
82
 
70
83
  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', () => {
@@ -77,7 +90,17 @@ describe('Create item page - Text entry math: Partial equal weights for blank re
77
90
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
78
91
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
79
92
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
80
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
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
+ }
81
104
  });
82
105
 
83
106
  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', () => {
@@ -91,7 +114,17 @@ describe('Create item page - Text entry math: Partial equal weights for blank re
91
114
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
92
115
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
93
116
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
94
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
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
+ }
95
128
  });
96
129
 
97
130
  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', () => {
@@ -111,7 +144,17 @@ describe('Create item page - Text entry math: Partial equal weights for blank re
111
144
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
112
145
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
113
146
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
114
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
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
+ }
115
158
  });
116
159
 
117
160
  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', () => {
@@ -185,9 +228,19 @@ describe('Create item page - Text entry math: Partial equal weights for blank re
185
228
  textEntryMathPage.steps.switchToGradingView();
186
229
  textEntryMathPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
187
230
  textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
188
- utilities.verifyInnerText(textEntryMathPage.correctAnswersLabel(), 'Correct answers');
189
231
  textEntryMathPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
190
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
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
+ }
191
244
  });
192
245
 
193
246
  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', () => {
@@ -199,7 +252,17 @@ describe('Create item page - Text entry math: Partial equal weights for blank re
199
252
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
200
253
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
201
254
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
202
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
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
+ }
203
266
  });
204
267
 
205
268
  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', () => {
@@ -212,7 +275,17 @@ describe('Create item page - Text entry math: Partial equal weights for blank re
212
275
  textEntryMathPage.steps.verifyCorrectResponseIcon(0);
213
276
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
214
277
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
215
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
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
+ }
216
289
  });
217
290
 
218
291
  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', () => {
@@ -231,7 +304,17 @@ describe('Create item page - Text entry math: Partial equal weights for blank re
231
304
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
232
305
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
233
306
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
234
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
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
+ }
235
318
  });
236
319
 
237
320
  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,6 +2,9 @@ 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';
5
8
 
6
9
  describe('Create Item page - Text entry math: Preview scoring', () => {
7
10
  before(() => {
@@ -53,7 +56,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
53
56
  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', () => {
54
57
  textEntryMathPage.steps.switchToGradingView();
55
58
  textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
56
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
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
+ }
57
74
  textEntryMathPage.steps.switchToGradingView();
58
75
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
59
76
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
@@ -111,7 +128,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
111
128
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
112
129
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
113
130
  textEntryMathPage.steps.verifyCorrectResponseIcon(2);
114
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
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
+ }
115
146
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
116
147
  });
117
148
 
@@ -127,7 +158,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
127
158
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
128
159
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
129
160
  textEntryMathPage.steps.verifyCorrectResponseIcon(2);
130
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
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
+ }
131
176
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
132
177
  });
133
178
 
@@ -143,7 +188,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
143
188
  textEntryMathPage.steps.verifyCorrectResponseIcon(0);
144
189
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
145
190
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
146
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
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
+ }
147
206
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
148
207
  });
149
208
 
@@ -162,7 +221,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
162
221
  textEntryMathPage.steps.verifyCorrectResponseIcon(0);
163
222
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
164
223
  textEntryMathPage.steps.verifyCorrectResponseIcon(2);
165
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
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
+ }
166
239
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
167
240
  });
168
241
 
@@ -176,7 +249,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
176
249
  textEntryMathPage.steps.verifyCorrectResponseIcon(0);
177
250
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
178
251
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
179
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
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
+ }
180
267
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
181
268
  });
182
269
 
@@ -196,7 +283,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
196
283
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
197
284
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
198
285
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
199
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
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
+ }
200
301
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
201
302
  });
202
303
 
@@ -239,7 +340,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
239
340
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
240
341
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
241
342
  textEntryMathPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
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']);
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
+ }
243
358
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
244
359
  });
245
360
  });
@@ -2,6 +2,9 @@ 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';
5
8
  const css = Cypress.env('css');
6
9
 
7
10
  describe('Create Item page - Text entry math: Preview scoring', () => {
@@ -55,7 +58,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
55
58
  textEntryMathPage.steps.switchToGradingView();
56
59
  textEntryMathPage.steps.verifyPreviewScore(0, 18);
57
60
  textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
58
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
61
+ if (alternativeAnswerCheck) {
62
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
63
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
64
+ {
65
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
66
+ points: ['(18 points)', '(8 points)', '(4 points)', '(6 points)']
67
+ },
68
+ {
69
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
70
+ points: ['(18 points)', '(4 points)', '(9 points)', '(5 points)']
71
+ },
72
+ ]);
73
+ } else {
74
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
75
+ }
59
76
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
60
77
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
61
78
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(2);
@@ -111,7 +128,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
111
128
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
112
129
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
113
130
  textEntryMathPage.steps.verifyCorrectResponseIcon(2);
114
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
131
+ if (alternativeAnswerCheck) {
132
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
133
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
134
+ {
135
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
136
+ points: ['(18 points)', '(8 points)', '(4 points)', '(6 points)']
137
+ },
138
+ {
139
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
140
+ points: ['(18 points)', '(4 points)', '(9 points)', '(5 points)']
141
+ },
142
+ ]);
143
+ } else {
144
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
145
+ }
115
146
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
116
147
  });
117
148
 
@@ -127,7 +158,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
127
158
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
128
159
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
129
160
  textEntryMathPage.steps.verifyCorrectResponseIcon(2);
130
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
161
+ if (alternativeAnswerCheck) {
162
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
163
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
164
+ {
165
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
166
+ points: ['(18 points)', '(8 points)', '(4 points)', '(6 points)']
167
+ },
168
+ {
169
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
170
+ points: ['(18 points)', '(4 points)', '(9 points)', '(5 points)']
171
+ },
172
+ ]);
173
+ } else {
174
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
175
+ }
131
176
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
132
177
  });
133
178
 
@@ -143,7 +188,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
143
188
  textEntryMathPage.steps.verifyCorrectResponseIcon(0);
144
189
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
145
190
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
146
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
191
+ if (alternativeAnswerCheck) {
192
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
193
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
194
+ {
195
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
196
+ points: ['(18 points)', '(8 points)', '(4 points)', '(6 points)']
197
+ },
198
+ {
199
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
200
+ points: ['(18 points)', '(4 points)', '(9 points)', '(5 points)']
201
+ },
202
+ ]);
203
+ } else {
204
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
205
+ }
147
206
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
148
207
  });
149
208
 
@@ -162,7 +221,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
162
221
  textEntryMathPage.steps.verifyCorrectResponseIcon(0);
163
222
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
164
223
  textEntryMathPage.steps.verifyCorrectResponseIcon(2);
165
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
224
+ if (alternativeAnswerCheck) {
225
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
226
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
227
+ {
228
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
229
+ points: ['(18 points)', '(8 points)', '(4 points)', '(6 points)']
230
+ },
231
+ {
232
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
233
+ points: ['(18 points)', '(4 points)', '(9 points)', '(5 points)']
234
+ },
235
+ ]);
236
+ } else {
237
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
238
+ }
166
239
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
167
240
  });
168
241
 
@@ -176,7 +249,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
176
249
  textEntryMathPage.steps.verifyCorrectResponseIcon(0);
177
250
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
178
251
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
179
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
252
+ if (alternativeAnswerCheck) {
253
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
254
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
255
+ {
256
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
257
+ points: ['(18 points)', '(8 points)', '(4 points)', '(6 points)']
258
+ },
259
+ {
260
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
261
+ points: ['(18 points)', '(4 points)', '(9 points)', '(5 points)']
262
+ },
263
+ ]);
264
+ } else {
265
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
266
+ }
180
267
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
181
268
  });
182
269
 
@@ -196,7 +283,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
196
283
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
197
284
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
198
285
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
199
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
286
+ if (alternativeAnswerCheck) {
287
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
288
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
289
+ {
290
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
291
+ points: ['(18 points)', '(8 points)', '(4 points)', '(6 points)']
292
+ },
293
+ {
294
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
295
+ points: ['(18 points)', '(4 points)', '(9 points)', '(5 points)']
296
+ },
297
+ ]);
298
+ } else {
299
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
300
+ }
200
301
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
201
302
  });
202
303
  });