itemengine-cypress-automation 1.0.574-IEI-7071-main-96a7dd4.0 → 1.0.574-IEI-7065-Improve-test-coverage-for-essay-response-1a8de95.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 (41) hide show
  1. package/cypress/e2e/ILC/EssayResponse/additionalSettings.js +8 -2
  2. package/cypress/e2e/ILC/EssayResponse/additionalSettingsBasic.js +15 -0
  3. package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +13 -0
  4. package/cypress/e2e/ILC/EssayResponse/editTabBasicSections.js +155 -5
  5. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +117 -4
  6. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +101 -4
  7. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions4.js +114 -0
  8. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +12 -2
  9. package/cypress/e2e/ILC/EssayResponse/previewAddTable.js +38 -3
  10. package/cypress/e2e/ILC/EssayResponse/previewContentsForAllViews.smoke.js +41 -23
  11. package/cypress/e2e/ILC/EssayResponse/previewEditTable.js +78 -3
  12. package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +15 -0
  13. package/cypress/e2e/ILC/EssayResponse/studentViewSettings.js +71 -0
  14. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +7 -108
  15. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +7 -108
  16. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +7 -108
  17. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +8 -123
  18. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +8 -123
  19. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +8 -123
  20. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +7 -108
  21. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +6 -93
  22. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +7 -108
  23. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +2 -23
  24. package/cypress/e2e/ILC/ShortTextResponseNew/additionalSettings.js +2 -99
  25. package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingWithAlternativeAnswer.js +245 -0
  26. package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +1 -55
  27. package/cypress/e2e/ILC/ShortTextResponseNew/{Scoring/manuallyAndNonScoredScoring.js → manuallyAndNonScoredScoring.js} +18 -6
  28. package/cypress/e2e/ILC/ShortTextResponseNew/responseAnswersAndAcceptedStudentInput.js +1 -151
  29. package/cypress/e2e/ILC/ShortTextResponseNew/specialCharactersSection.js +3 -3
  30. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -129
  31. package/cypress/pages/components/equationEditorSectionCommonComponent.js +20 -0
  32. package/cypress/pages/components/essayResponseCommonComponents.js +29 -1
  33. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +0 -36
  34. package/cypress/pages/components/printPreviewComponent.js +1 -8
  35. package/cypress/pages/essayResponsePage.js +3 -1
  36. package/cypress/pages/shortTextResponsePage.js +6 -195
  37. package/package.json +1 -1
  38. package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -63
  39. package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -63
  40. package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -87
  41. package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingWeightsBasic.js +0 -163
@@ -1,9 +1,6 @@
1
1
  import { fillInTheGapsTextPage } from "../../../../pages";
2
- import { showAlternativeAnswersComponent } from "../../../../pages/components";
3
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
4
3
 
5
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
6
-
7
4
  describe('Create item page - Fill in the gaps with text: Partial equal weights with alternative answers', () => {
8
5
  before(() => {
9
6
  cy.loginAs('admin');
@@ -28,21 +25,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal weights w
28
25
  it('When the user selects \'Grading\' view without attempting the question, response area numeration should be displayed, correct answers section should be displayed with correct answers from the alternative accordion and respective response area numeration', () => {
29
26
  fillInTheGapsTextPage.steps.switchToGradingView();
30
27
  fillInTheGapsTextPage.steps.verifyResponseAreaNumeration();
31
- if (alternativeAnswerCheck) {
32
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
33
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
34
- {
35
- correctAnswers: [['Petals'],['Leaves'],['Stem']],
36
- points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
37
- },
38
- {
39
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
40
- points: ['(9 points)', '(3 points)', '(3 point)', '(3 points)'],
41
- }
42
- ]);
43
- } else {
44
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
45
- }
28
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
46
29
  });
47
30
 
48
31
  it('When the user attempts the question with responses from the correct accordion, then the user should be awarded points of the correct accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed', () => {
@@ -94,21 +77,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal weights w
94
77
  fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
95
78
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
96
79
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
97
- if (alternativeAnswerCheck) {
98
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
99
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
100
- {
101
- correctAnswers: [['Petals'],['Leaves'],['Stem']],
102
- points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
103
- },
104
- {
105
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
106
- points: ['(9 points)', '(3 points)', '(3 point)', '(3 points)'],
107
- }
108
- ]);
109
- } else {
110
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
111
- }
80
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
112
81
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
113
82
  /*cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
114
83
  fillInTheGapsTextPage.steps.checkAnswer();
@@ -128,21 +97,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal weights w
128
97
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
129
98
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
130
99
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
131
- if (alternativeAnswerCheck) {
132
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
133
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
134
- {
135
- correctAnswers: [['Petals'],['Leaves'],['Stem']],
136
- points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
137
- },
138
- {
139
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
140
- points: ['(9 points)', '(3 points)', '(3 point)', '(3 points)'],
141
- }
142
- ]);
143
- } else {
144
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
145
- }
100
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
146
101
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
147
102
  /*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
148
103
  fillInTheGapsTextPage.steps.checkAnswer();
@@ -162,21 +117,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal weights w
162
117
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
163
118
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
164
119
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
165
- if (alternativeAnswerCheck) {
166
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
167
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
168
- {
169
- correctAnswers: [['Petals'],['Leaves'],['Stem']],
170
- points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
171
- },
172
- {
173
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
174
- points: ['(9 points)', '(3 points)', '(3 point)', '(3 points)'],
175
- }
176
- ]);
177
- } else {
178
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
179
- }
120
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
180
121
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
181
122
  /*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed beside empty responses correct/incorrect status message should not be displayed and correct answer section should not be displayed')
182
123
  fillInTheGapsTextPage.steps.checkAnswer();
@@ -196,21 +137,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal weights w
196
137
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
197
138
  fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
198
139
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
199
- if (alternativeAnswerCheck) {
200
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
201
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
202
- {
203
- correctAnswers: [['Petals'],['Leaves'],['Stem']],
204
- points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
205
- },
206
- {
207
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
208
- points: ['(9 points)', '(3 points)', '(3 point)', '(3 points)'],
209
- }
210
- ]);
211
- } else {
212
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
213
- }
140
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
214
141
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
215
142
  /*cy.log('When the user has attempted the question with common response between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
216
143
  fillInTheGapsTextPage.steps.checkAnswer();
@@ -230,21 +157,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal weights w
230
157
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
231
158
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
232
159
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
233
- if (alternativeAnswerCheck) {
234
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
235
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
236
- {
237
- correctAnswers: [['Petals'],['Leaves'],['Stem']],
238
- points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
239
- },
240
- {
241
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
242
- points: ['(9 points)', '(3 points)', '(3 point)', '(3 points)'],
243
- }
244
- ]);
245
- } else {
246
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
247
- }
160
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
248
161
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
249
162
  /*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, no icon should be displayed beside unattempted response, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
250
163
  fillInTheGapsTextPage.steps.checkAnswer();
@@ -270,21 +183,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal weights w
270
183
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
271
184
  fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
272
185
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
273
- if (alternativeAnswerCheck) {
274
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
275
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
276
- {
277
- correctAnswers: [['Petals'],['Leaves'],['Branch']],
278
- points: ['(23 points)', '(7.67 points)', '(7.67 points)', '(7.67 points)'],
279
- },
280
- {
281
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
282
- points: ['(5 points)', '(1.67 points)', '(1.67 point)', '(1.67 points)'],
283
- }
284
- ]);
285
- } else {
286
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Branch']);
287
- }
186
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Branch']);
288
187
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
289
188
  /*cy.log('When the user has attempted the question with more number of correct responses from the correct accordion than the alternative accordion but the score of the individual response selected from the alternative accordion overpowers the combined score of the correct accordion answers and clicks on the \'Check answer\' button, correct icons should be displayed for the alternative accordion response, incorrect icon should be displayed for the correct accordion responses, correct/incorrect answer status message and correct answer section should not be displayed')
290
189
  fillInTheGapsTextPage.steps.checkAnswer();
@@ -1,9 +1,6 @@
1
1
  import { fillInTheGapsTextPage } from "../../../../pages";
2
- import { showAlternativeAnswersComponent } from "../../../../pages/components";
3
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
4
3
 
5
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
6
-
7
4
  describe('Create item page - Fill in the gaps with text: Partial equal with alternative answers', () => {
8
5
  before(() => {
9
6
  cy.loginAs('admin');
@@ -28,21 +25,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal with alte
28
25
  it('When the user selects \'Grading\' view without attempting the question, response area numeration should be displayed, correct answers section should be displayed with correct answers from the correct accordion and respective response area numeration', () => {
29
26
  fillInTheGapsTextPage.steps.switchToGradingView();
30
27
  fillInTheGapsTextPage.steps.verifyResponseAreaNumeration();
31
- if (alternativeAnswerCheck) {
32
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
33
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
34
- {
35
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
36
- points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
37
- },
38
- {
39
- correctAnswers: [['Petals'],['Leaves'],['Stem']],
40
- points: ['(15 points)', '(5 points)', '(5 point)', '(5 points)'],
41
- }
42
- ]);
43
- } else {
44
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
45
- }
28
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
46
29
  });
47
30
 
48
31
  it('When the user attempts the question with responses from the correct accordion, then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed', () => {
@@ -94,21 +77,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal with alte
94
77
  fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
95
78
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
96
79
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
97
- if (alternativeAnswerCheck) {
98
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
99
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
100
- {
101
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
102
- points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
103
- },
104
- {
105
- correctAnswers: [['Petals'],['Leaves'],['Stem']],
106
- points: ['(15 points)', '(5 points)', '(5 point)', '(5 points)'],
107
- }
108
- ]);
109
- } else {
110
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
111
- }
80
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
112
81
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
113
82
  /*cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
114
83
  fillInTheGapsTextPage.steps.checkAnswer();
@@ -128,21 +97,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal with alte
128
97
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
129
98
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
130
99
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
131
- if (alternativeAnswerCheck) {
132
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
133
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
134
- {
135
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
136
- points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
137
- },
138
- {
139
- correctAnswers: [['Petals'],['Leaves'],['Stem']],
140
- points: ['(15 points)', '(5 points)', '(5 point)', '(5 points)'],
141
- }
142
- ]);
143
- } else {
144
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
145
- }
100
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
146
101
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
147
102
  /*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response, correct/incorrect status message and correct answer section should not be displayed')
148
103
  fillInTheGapsTextPage.steps.checkAnswer();
@@ -161,21 +116,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal with alte
161
116
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(0);
162
117
  fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
163
118
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
164
- if (alternativeAnswerCheck) {
165
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
166
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
167
- {
168
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
169
- points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
170
- },
171
- {
172
- correctAnswers: [['Petals'],['Leaves'],['Stem']],
173
- points: ['(15 points)', '(5 points)', '(5 point)', '(5 points)'],
174
- }
175
- ]);
176
- } else {
177
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
178
- }
119
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
179
120
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
180
121
  /*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed beside empty responses, correct/incorrect status message and correct answer section should not be displayed')
181
122
  fillInTheGapsTextPage.steps.checkAnswer();
@@ -194,21 +135,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal with alte
194
135
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
195
136
  fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
196
137
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
197
- if (alternativeAnswerCheck) {
198
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
199
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
200
- {
201
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
202
- points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
203
- },
204
- {
205
- correctAnswers: [['Petals'],['Leaves'],['Stem']],
206
- points: ['(15 points)', '(5 points)', '(5 point)', '(5 points)'],
207
- }
208
- ]);
209
- } else {
210
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
211
- }
138
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
212
139
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
213
140
  /*cy.log('When the user has attempted the question with the common response between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response, correct/incorrect status message and correct answer section should not be displayed')
214
141
  fillInTheGapsTextPage.steps.checkAnswer();
@@ -228,21 +155,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal with alte
228
155
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
229
156
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
230
157
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
231
- if (alternativeAnswerCheck) {
232
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
233
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
234
- {
235
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
236
- points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
237
- },
238
- {
239
- correctAnswers: [['Petals'],['Leaves'],['Stem']],
240
- points: ['(15 points)', '(5 points)', '(5 point)', '(5 points)'],
241
- }
242
- ]);
243
- } else {
244
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
245
- }
158
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
246
159
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
247
160
  /*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, no icon should be displayed beside unattempted response, correct/incorrect status message and correct answer section should not be displayed')
248
161
  fillInTheGapsTextPage.steps.checkAnswer();
@@ -1,9 +1,6 @@
1
1
  import { fillInTheGapsTextPage } from "../../../../pages";
2
- import { showAlternativeAnswersComponent } from "../../../../pages/components";
3
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
4
3
 
5
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
6
-
7
4
  describe('Create item page - Fill in the gaps with text: Partial equal weights with alternative answers', () => {
8
5
  before(() => {
9
6
  cy.loginAs('admin');
@@ -28,21 +25,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal weights w
28
25
  it('When the user selects \'Grading\' view without attempting the question, correct answers section should be displayed with correct answers from the correct accordion and respective response area numeration', () => {
29
26
  fillInTheGapsTextPage.steps.switchToGradingView();
30
27
  fillInTheGapsTextPage.steps.verifyResponseAreaNumeration();
31
- if (alternativeAnswerCheck) {
32
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
33
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
34
- {
35
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
36
- points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
37
- },
38
- {
39
- correctAnswers: [['Petals'],['Leaves'],['Stem']],
40
- points: ['(9 points)', '(3 points)', '(3 point)', '(3 points)'],
41
- }
42
- ]);
43
- } else {
44
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
45
- }
28
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
46
29
  });
47
30
 
48
31
  it('When the user attempts the question with responses from the correct accordion, then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect and correct answer section should not be displayed', () => {
@@ -94,21 +77,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal weights w
94
77
  fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
95
78
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
96
79
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
97
- if (alternativeAnswerCheck) {
98
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
99
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
100
- {
101
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
102
- points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
103
- },
104
- {
105
- correctAnswers: [['Petals'],['Leaves'],['Stem']],
106
- points: ['(9 points)', '(3 points)', '(3 point)', '(3 points)'],
107
- }
108
- ]);
109
- } else {
110
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
111
- }
80
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
112
81
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
113
82
  /*cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
114
83
  fillInTheGapsTextPage.steps.checkAnswer();
@@ -128,21 +97,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal weights w
128
97
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
129
98
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
130
99
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
131
- if (alternativeAnswerCheck) {
132
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
133
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
134
- {
135
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
136
- points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
137
- },
138
- {
139
- correctAnswers: [['Petals'],['Leaves'],['Stem']],
140
- points: ['(9 points)', '(3 points)', '(3 point)', '(3 points)'],
141
- }
142
- ]);
143
- } else {
144
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
145
- }
100
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
146
101
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
147
102
  /*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response correct/incorrect status message should not be displayed and correct answer section should not be displayed')
148
103
  fillInTheGapsTextPage.steps.checkAnswer();
@@ -162,21 +117,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal weights w
162
117
  fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
163
118
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
164
119
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
165
- if (alternativeAnswerCheck) {
166
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
167
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
168
- {
169
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
170
- points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
171
- },
172
- {
173
- correctAnswers: [['Petals'],['Leaves'],['Stem']],
174
- points: ['(9 points)', '(3 points)', '(3 point)', '(3 points)'],
175
- }
176
- ]);
177
- } else {
178
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
179
- }
120
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
180
121
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
181
122
  /*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed beside empty responses correct/incorrect status message should not be displayed and correct answer section should not be displayed')
182
123
  fillInTheGapsTextPage.steps.checkAnswer();
@@ -196,21 +137,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal weights w
196
137
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
197
138
  fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
198
139
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
199
- if (alternativeAnswerCheck) {
200
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
201
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
202
- {
203
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
204
- points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
205
- },
206
- {
207
- correctAnswers: [['Petals'],['Leaves'],['Stem']],
208
- points: ['(9 points)', '(3 points)', '(3 point)', '(3 points)'],
209
- }
210
- ]);
211
- } else {
212
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
213
- }
140
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
214
141
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
215
142
  /*cy.log('When the user has attempted the question with common response between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response correct/incorrect status message should not be displayed and correct answer section should not be displayed')
216
143
  fillInTheGapsTextPage.steps.checkAnswer();
@@ -230,21 +157,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal weights w
230
157
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
231
158
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
232
159
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
233
- if (alternativeAnswerCheck) {
234
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
235
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
236
- {
237
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
238
- points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
239
- },
240
- {
241
- correctAnswers: [['Petals'],['Leaves'],['Stem']],
242
- points: ['(9 points)', '(3 points)', '(3 point)', '(3 points)'],
243
- }
244
- ]);
245
- } else {
246
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
247
- }
160
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
248
161
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
249
162
  /*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, no icon should be displayed beside unattempted response correct/incorrect status message should not be displayed and correct answer section should not be displayed')
250
163
  fillInTheGapsTextPage.steps.checkAnswer();
@@ -270,21 +183,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal weights w
270
183
  fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
271
184
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
272
185
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
273
- if (alternativeAnswerCheck) {
274
- showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
275
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
276
- {
277
- correctAnswers: [['Flower'],['Leaf'],['Stem']],
278
- points: ['(23 points)', '(7.67 points)', '(7.67 points)', '(7.67 points)'],
279
- },
280
- {
281
- correctAnswers: [['Petals'],['Leaves'],['Branch']],
282
- points: ['(5 points)', '(1.67 points)', '(1.67 point)', '(1.67 points)'],
283
- }
284
- ]);
285
- } else {
286
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
287
- }
186
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
288
187
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
289
188
  /*cy.log('When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion but the score of the individual response from the correct accordion overpowers the combined score of the alternative accordion answers and clicks on the \'Check answer\' button, correct icons should be displayed beside correct accordion responses, incorrect icons should be displayed for the alternative accordion responses, correct/incorrect answer status message and correct answer section should not be displayed')
290
189
  fillInTheGapsTextPage.steps.checkAnswer();
@@ -1,10 +1,7 @@
1
1
  import { fillInTheGapsTextPage } from "../../../../pages";
2
- import { showAlternativeAnswersComponent } from "../../../../pages/components";
3
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
4
3
  import utilities from "../../../../support/helpers/utilities";
5
4
 
6
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
7
-
8
5
  describe('Create item page - Fill in the gaps with text: Response level alternate answer basic scoring', () => {
9
6
  before(() => {
10
7
  cy.loginAs('admin');
@@ -30,16 +27,7 @@ describe('Create item page - Fill in the gaps with text: Response level alternat
30
27
  fillInTheGapsTextPage.steps.switchToGradingView();
31
28
  fillInTheGapsTextPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
32
29
  fillInTheGapsTextPage.steps.verifyResponseAreaNumeration();
33
- if (alternativeAnswerCheck) {
34
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
35
- {
36
- correctAnswers: [['Flower', 'Fruit']],
37
- points: ['(15 points)'],
38
- },
39
- ]);
40
- } else {
41
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower']);
42
- }
30
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower']);
43
31
  });
44
32
 
45
33
  it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed besides the incorrect response, a status message with text \'Your answer is incorrect\' and correct answer section with the first correct answer set in the response accordion should be displayed', () => {
@@ -48,16 +36,7 @@ describe('Create item page - Fill in the gaps with text: Response level alternat
48
36
  fillInTheGapsTextPage.steps.switchToGradingView();
49
37
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(0);
50
38
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
51
- if (alternativeAnswerCheck) {
52
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
53
- {
54
- correctAnswers: [['Flower', 'Fruit']],
55
- points: ['(15 points)'],
56
- },
57
- ]);
58
- } else {
59
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower']);
60
- }
39
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower']);
61
40
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
62
41
  /*cy.log('When the user attempts the question incorrectly and clicks on \'Check answer\' button, incorrect icon should be displayed besides the incorrect response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
63
42
  fillInTheGapsTextPage.steps.checkAnswer();