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 { 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(() => {
@@ -40,7 +43,17 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
40
43
  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', () => {
41
44
  textEntryMathPage.steps.switchToGradingView();
42
45
  textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
43
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['2⁢x+3⁢x', '(a+b)2']);
46
+ if (alternativeAnswerCheck) {
47
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
48
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
49
+ {
50
+ correctAnswers: ['2⁢x+3⁢x', '(a+b)2'],
51
+ points: ['(10 points)']
52
+ }
53
+ ]);
54
+ } else {
55
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['2⁢x+3⁢x', '(a+b)2']);
56
+ }
44
57
  textEntryMathPage.steps.switchToGradingView();
45
58
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
46
59
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
@@ -77,7 +90,17 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
77
90
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
78
91
  textEntryMathPage.steps.verifyCorrectResponseIcon(0);
79
92
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
80
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['2⁢x+3⁢x', '(a+b)2']);
93
+ if (alternativeAnswerCheck) {
94
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
95
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
96
+ {
97
+ correctAnswers: ['2⁢x+3⁢x', '(a+b)2'],
98
+ points: ['(10 points)']
99
+ }
100
+ ]);
101
+ } else {
102
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['2⁢x+3⁢x', '(a+b)2']);
103
+ }
81
104
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
82
105
  });
83
106
 
@@ -94,7 +117,17 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
94
117
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
95
118
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
96
119
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
97
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['2⁢x+3⁢x', '(a+b)2']);
120
+ if (alternativeAnswerCheck) {
121
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
122
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
123
+ {
124
+ correctAnswers: ['2⁢x+3⁢x', '(a+b)2'],
125
+ points: ['(10 points)']
126
+ }
127
+ ]);
128
+ } else {
129
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['2⁢x+3⁢x', '(a+b)2']);
130
+ }
98
131
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
99
132
  });
100
133
 
@@ -111,7 +144,17 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
111
144
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
112
145
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
113
146
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
114
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['2⁢x+3⁢x', '(a+b)2']);
147
+ if (alternativeAnswerCheck) {
148
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
149
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
150
+ {
151
+ correctAnswers: ['2⁢x+3⁢x', '(a+b)2'],
152
+ points: ['(10 points)']
153
+ }
154
+ ]);
155
+ } else {
156
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['2⁢x+3⁢x', '(a+b)2']);
157
+ }
115
158
  });
116
159
 
117
160
  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, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with dropzone cell numeration should be displayed', () => {
@@ -127,7 +170,17 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
127
170
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
128
171
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
129
172
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
130
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['2⁢x+3⁢x', '(a+b)2']);
173
+ if (alternativeAnswerCheck) {
174
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
175
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
176
+ {
177
+ correctAnswers: ['2⁢x+3⁢x', '(a+b)2'],
178
+ points: ['(10 points)']
179
+ }
180
+ ]);
181
+ } else {
182
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['2⁢x+3⁢x', '(a+b)2']);
183
+ }
131
184
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
132
185
  });
133
186
  });
@@ -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(() => {
@@ -40,7 +43,17 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
40
43
  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', () => {
41
44
  textEntryMathPage.steps.switchToGradingView();
42
45
  textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
43
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['c⁢a⁢r', 'c⁢a⁢t']);
46
+ if (alternativeAnswerCheck) {
47
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
48
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
49
+ {
50
+ correctAnswers: ['c⁢a⁢r', 'c⁢a⁢t'],
51
+ points: ['(20 points)']
52
+ }
53
+ ]);
54
+ } else {
55
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['c⁢a⁢r', 'c⁢a⁢t']);
56
+ }
44
57
  textEntryMathPage.steps.switchToGradingView();
45
58
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
46
59
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
@@ -111,7 +124,17 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
111
124
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
112
125
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
113
126
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
114
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['c⁢a⁢r', 'c⁢a⁢t']);
127
+ if (alternativeAnswerCheck) {
128
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
129
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
130
+ {
131
+ correctAnswers: ['c⁢a⁢r', 'c⁢a⁢t'],
132
+ points: ['(20 points)']
133
+ }
134
+ ]);
135
+ } else {
136
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['c⁢a⁢r', 'c⁢a⁢t']);
137
+ }
115
138
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
116
139
  });
117
140
 
@@ -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(() => {
@@ -52,7 +55,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
52
55
  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', () => {
53
56
  textEntryMathPage.steps.switchToGradingView();
54
57
  textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
55
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
58
+ if (alternativeAnswerCheck) {
59
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
60
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
61
+ {
62
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
63
+ points: ['(20 points)']
64
+ },
65
+ {
66
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
67
+ points: ['(20 points)']
68
+ },
69
+ ]);
70
+ } else {
71
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
72
+ }
56
73
  textEntryMathPage.steps.switchToGradingView();
57
74
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
58
75
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
@@ -113,7 +130,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
113
130
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
114
131
  textEntryMathPage.steps.verifyCorrectResponseIcon(2);
115
132
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
116
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
133
+ if (alternativeAnswerCheck) {
134
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
135
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
136
+ {
137
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
138
+ points: ['(20 points)']
139
+ },
140
+ {
141
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
142
+ points: ['(20 points)']
143
+ },
144
+ ]);
145
+ } else {
146
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
147
+ }
117
148
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
118
149
  });
119
150
 
@@ -130,7 +161,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
130
161
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
131
162
  textEntryMathPage.steps.verifyCorrectResponseIcon(2);
132
163
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
133
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
164
+ if (alternativeAnswerCheck) {
165
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
166
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
167
+ {
168
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
169
+ points: ['(20 points)']
170
+ },
171
+ {
172
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
173
+ points: ['(20 points)']
174
+ },
175
+ ]);
176
+ } else {
177
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
178
+ }
134
179
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
135
180
  });
136
181
 
@@ -147,7 +192,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
147
192
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
148
193
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
149
194
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
150
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
195
+ if (alternativeAnswerCheck) {
196
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
197
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
198
+ {
199
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
200
+ points: ['(20 points)']
201
+ },
202
+ {
203
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
204
+ points: ['(20 points)']
205
+ },
206
+ ]);
207
+ } else {
208
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
209
+ }
151
210
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
152
211
  });
153
212
 
@@ -167,7 +226,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
167
226
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
168
227
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
169
228
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
170
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
229
+ if (alternativeAnswerCheck) {
230
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
231
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
232
+ {
233
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
234
+ points: ['(20 points)']
235
+ },
236
+ {
237
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
238
+ points: ['(20 points)']
239
+ },
240
+ ]);
241
+ } else {
242
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
243
+ }
171
244
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
172
245
  });
173
246
 
@@ -182,7 +255,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
182
255
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
183
256
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
184
257
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
185
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
258
+ if (alternativeAnswerCheck) {
259
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
260
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
261
+ {
262
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
263
+ points: ['(20 points)']
264
+ },
265
+ {
266
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
267
+ points: ['(20 points)']
268
+ },
269
+ ]);
270
+ } else {
271
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
272
+ }
186
273
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
187
274
  });
188
275
 
@@ -203,7 +290,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
203
290
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
204
291
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
205
292
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
206
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
293
+ if (alternativeAnswerCheck) {
294
+ showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
295
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
296
+ {
297
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%'],
298
+ points: ['(20 points)']
299
+ },
300
+ {
301
+ correctAnswers: ['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e'],
302
+ points: ['(20 points)']
303
+ },
304
+ ]);
305
+ } else {
306
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
307
+ }
207
308
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
208
309
  });
209
310
  });
@@ -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', () => {
@@ -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 with a label \'Correct answers\' should be displayed with correct answers from the correct accordion and respective response numeration', () => {
54
57
  textEntryMathPage.steps.switchToGradingView();
55
58
  textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
56
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
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
+ }
57
74
  textEntryMathPage.steps.switchToGradingView();
58
75
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
59
76
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
@@ -146,7 +163,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
146
163
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
147
164
  textEntryMathPage.steps.verifyCorrectResponseIcon(2);
148
165
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
149
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
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
+ }
150
181
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
151
182
  });
152
183
 
@@ -163,7 +194,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
163
194
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
164
195
  textEntryMathPage.steps.verifyCorrectResponseIcon(2);
165
196
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
166
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
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
+ }
167
212
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
168
213
  });
169
214
 
@@ -180,7 +225,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
180
225
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
181
226
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
182
227
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
183
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
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
+ }
184
243
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
185
244
  });
186
245
 
@@ -200,7 +259,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
200
259
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
201
260
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
202
261
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
203
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
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
+ }
204
277
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
205
278
  });
206
279
 
@@ -215,7 +288,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
215
288
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
216
289
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
217
290
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
218
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
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
+ }
219
306
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
220
307
  });
221
308
 
@@ -236,7 +323,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
236
323
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
237
324
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
238
325
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
239
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '2⁢x2⁢y2+4⁢x⁢y+4', '9000%']);
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
+ }
240
341
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
241
342
  });
242
343