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
@@ -9,11 +9,6 @@ const optionsForDropdown3 = ['Flower', 'Leaf', 'Stem', 'Roots']; //Common answe
9
9
  const correctAnswerArray = ['Flower', 'Leaf', 'Stem'];
10
10
  const alternateAnswerArray = ['Petal', 'Leaves', 'Stem'];
11
11
  const incorrectAnswerArray = ['Branch', 'Seed', 'Roots'];
12
- const overachieverAnswerArray = ['Flower', 'Leaf', 'Roots'];
13
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
14
- const pointsPerResponse = 'Points per response';
15
- const correctAnswerLabel = 'Correct answer';
16
- const alternativeAnswerLabel = 'Alternative answer';
17
12
 
18
13
  describe('Create item page - Fill in the gaps over image with dropdown: Partial equal weights with alternative answers', () => {
19
14
  before(() => {
@@ -51,19 +46,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
51
46
  fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
52
47
  fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
53
48
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
54
- if (alternativeAnswerCheck === 'true') {
55
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 0);
56
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
57
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
58
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
59
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
60
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
61
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
62
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 3 pts)`, 1);
63
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
64
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
65
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
66
- }
67
49
  });
68
50
 
69
51
  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 dropdowns, correct/incorrect status message and correct answer section should not be displayed', () => {
@@ -76,9 +58,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
76
58
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
77
59
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
78
60
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
79
- if (alternativeAnswerCheck === 'true') {
80
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
81
- }
82
61
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
83
62
  /*cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct dropdowns, correct/incorrect status message and correct answer section should not be displayed')
84
63
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -99,9 +78,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
99
78
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
100
79
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
101
80
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
102
- if (alternativeAnswerCheck === 'true') {
103
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
104
- }
105
81
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
106
82
  /*cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct dropdowns, correct/incorrect status message and correct answer section should not be displayed')
107
83
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -122,19 +98,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
122
98
  fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
123
99
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
124
100
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
125
- if (alternativeAnswerCheck === 'true') {
126
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 0);
127
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
128
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
129
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
130
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
131
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
132
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
133
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 3 pts)`, 1);
134
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
135
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
136
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
137
- }
138
101
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
139
102
  /*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 dropdowns, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
140
103
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -155,19 +118,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
155
118
  fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
156
119
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
157
120
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
158
- if (alternativeAnswerCheck === 'true') {
159
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 0);
160
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
161
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
162
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
163
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
164
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
165
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
166
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 3 pts)`, 1);
167
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
168
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
169
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
170
- }
171
121
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
172
122
  /*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 dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
173
123
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -188,19 +138,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
188
138
  fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
189
139
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
190
140
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
191
- if (alternativeAnswerCheck === 'true') {
192
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 0);
193
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
194
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
195
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
196
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
197
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
198
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
199
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 3 pts)`, 1);
200
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
201
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
202
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
203
- }
204
141
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
205
142
  /*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 alternate accordion responses, incorrect icon should be displayed beside correct accordion responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
206
143
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -221,19 +158,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
221
158
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
222
159
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
223
160
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
224
- if (alternativeAnswerCheck === 'true') {
225
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 0);
226
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
227
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
228
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
229
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
230
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
231
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
232
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 3 pts)`, 1);
233
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
234
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
235
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
236
- }
237
161
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
238
162
  /*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 dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
239
163
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -254,19 +178,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
254
178
  fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
255
179
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
256
180
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
257
- if (alternativeAnswerCheck === 'true') {
258
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 0);
259
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
260
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
261
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
262
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
263
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
264
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
265
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 3 pts)`, 1);
266
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
267
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
268
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
269
- }
270
181
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
271
182
  /*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 dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
272
183
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -293,19 +204,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
293
204
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
294
205
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
295
206
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
296
- if (alternativeAnswerCheck === 'true') {
297
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 7.67 pts)`, 0);
298
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
299
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
300
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
301
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
302
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
303
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
304
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 1.67 pts)`, 1);
305
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(overachieverAnswerArray, 1);
306
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
307
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
308
- }
309
207
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
310
208
  /*cy.log('When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion and clicks on the \'Check answer\' button, correct icons should be displayed for the dropdown with alternative accordion response, incorrect icon should be displayed for the dropdown with correct accordion responses, correct/incorrect answer status message, correct answer container should not be displayed')
311
209
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -10,10 +10,6 @@ const optionsForDropdown3 = ['Flower', 'Leaf', 'Stem', 'Roots']; //Common answe
10
10
  const correctAnswerArray = ['Flower', 'Leaf', 'Stem'];
11
11
  const alternateAnswerArray = ['Petal', 'Leaves', 'Stem'];
12
12
  const incorrectAnswerArray = ['Branch', 'Seed', 'Roots'];
13
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
14
- const pointsPerResponse = 'Points per response';
15
- const correctAnswerLabel = 'Correct answer';
16
- const alternativeAnswerLabel = 'Alternative answer';
17
13
 
18
14
  describe('Create item page - Fill in the gaps over image with dropdown: Partial equal with alternative answers', () => {
19
15
  before(() => {
@@ -51,19 +47,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
51
47
  fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
52
48
  fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
53
49
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
54
- if (alternativeAnswerCheck === 'true') {
55
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 0);
56
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
57
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
58
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
59
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
60
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
61
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
62
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 1);
63
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
64
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
65
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
66
- }
67
50
  });
68
51
 
69
52
  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 dropdowns, correct/incorrect status message and correct answer section should not be displayed', () => {
@@ -76,9 +59,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
76
59
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
77
60
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
78
61
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
79
- if (alternativeAnswerCheck === 'true') {
80
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
81
- }
82
62
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
83
63
  /*cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct dropdowns, correct/incorrect status message and correct answer section should not be displayed')
84
64
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -99,9 +79,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
99
79
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
100
80
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
101
81
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
102
- if (alternativeAnswerCheck === 'true') {
103
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
104
- }
105
82
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
106
83
  /*cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct dropdowns, correct/incorrect status message and correct answer section should not be displayed')
107
84
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -122,19 +99,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
122
99
  fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
123
100
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
124
101
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
125
- if (alternativeAnswerCheck === 'true') {
126
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 0);
127
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
128
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
129
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
130
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
131
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
132
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
133
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 1);
134
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
135
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
136
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
137
- }
138
102
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
139
103
  /*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 dropdowns, correct/incorrect status message and correct answer section should not be displayed')
140
104
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -155,19 +119,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
155
119
  fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
156
120
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
157
121
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
158
- if (alternativeAnswerCheck === 'true') {
159
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 0);
160
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
161
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
162
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
163
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
164
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
165
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
166
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 1);
167
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
168
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
169
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
170
- }
171
122
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
172
123
  /*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 dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message and correct answer section should not be displayed')
173
124
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -187,19 +138,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
187
138
  fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
188
139
  fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
189
140
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
190
- if (alternativeAnswerCheck === 'true') {
191
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 0);
192
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
193
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
194
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
195
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
196
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
197
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
198
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 1);
199
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
200
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
201
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
202
- }
203
141
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
204
142
  /*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 dropdown with correct accordion response, incorrect icon should be displayed beside dropdown with the alternative accordion response, correct/incorrect status message and correct answer section should not be displayed')
205
143
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -219,19 +157,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
219
157
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
220
158
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
221
159
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
222
- if (alternativeAnswerCheck === 'true') {
223
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 0);
224
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
225
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
226
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
227
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
228
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
229
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
230
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 1);
231
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
232
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
233
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
234
- }
235
160
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
236
161
  /*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 dropdown, no icon should be displayed beside unattempted dropdown, correct/incorrect status message and correct answer section should not be displayed')
237
162
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -252,19 +177,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
252
177
  fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
253
178
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
254
179
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
255
- if (alternativeAnswerCheck === 'true') {
256
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 0);
257
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
258
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
259
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
260
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
261
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
262
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
263
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 1);
264
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
265
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
266
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
267
- }
268
180
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
269
181
  /*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 dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message and correct answer section should not be displayed')
270
182
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -9,11 +9,6 @@ const optionsForDropdown3 = ['Flower', 'Leaf', 'Stem', 'Roots']; //Common answe
9
9
  const correctAnswerArray = ['Flower', 'Leaf', 'Stem'];
10
10
  const alternateAnswerArray = ['Petal', 'Leaves', 'Stem'];
11
11
  const incorrectAnswerArray = ['Branch', 'Seed', 'Roots'];
12
- const overachieverAnswerArray = ['Petal', 'Leaves', 'Roots'];
13
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
14
- const pointsPerResponse = 'Points per response';
15
- const correctAnswerLabel = 'Correct answer';
16
- const alternativeAnswerLabel = 'Alternative answer';
17
12
 
18
13
  describe('Create item page - Fill in the gaps over image with dropdown: Partial equal weights with alternative answers', () => {
19
14
  before(() => {
@@ -50,23 +45,8 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
50
45
  it('When the user selects \'Grading\' view without attempting the question, dropdown numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers from the correct accordion and respective dropdown numeration', () => {
51
46
  fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
52
47
  fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
53
- if (alternativeAnswerCheck === 'true') {
54
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 0);
55
- fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
56
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
57
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
58
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
59
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
60
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
61
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
62
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 3 pts)`, 1);
63
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
64
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
65
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
66
- } else {
67
- utilities.verifyInnerText(fillInTheGapsOverImageDropdownPage.correctAnswersLabel(), 'Correct answers');
68
- fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
69
- }
48
+ utilities.verifyInnerText(fillInTheGapsOverImageDropdownPage.correctAnswersLabel(), 'Correct answers');
49
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
70
50
  });
71
51
 
72
52
  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 dropdowns, correct/incorrect status message should not be displayed and correct answer section should not be displayed', () => {
@@ -79,9 +59,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
79
59
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
80
60
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
81
61
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
82
- if (alternativeAnswerCheck === 'true') {
83
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
84
- }
85
62
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
86
63
  /*cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct dropdowns, correct/incorrect status message should not be displayed and correct answer section should not be displayed');
87
64
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -102,9 +79,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
102
79
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
103
80
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
104
81
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
105
- if (alternativeAnswerCheck === 'true') {
106
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
107
- }
108
82
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
109
83
  /*cy.log('When the user has attempted the question with alternative accordion response and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer dropdowns, correct/incorrect status message should not be displayed and correct answer section should not be displayed');
110
84
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -125,19 +99,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
125
99
  fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
126
100
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
127
101
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
128
- if (alternativeAnswerCheck === 'true') {
129
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 0);
130
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
131
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
132
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
133
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
134
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
135
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
136
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 3 pts)`, 1);
137
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
138
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
139
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
140
- }
141
102
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
142
103
  /*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 dropdowns, correct/incorrect status message should not be displayed and correct answer section should not be displayed');
143
104
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -158,19 +119,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
158
119
  fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
159
120
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
160
121
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
161
- if (alternativeAnswerCheck === 'true') {
162
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 0);
163
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
164
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
165
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
166
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
167
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
168
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
169
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 3 pts)`, 1);
170
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
171
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
172
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
173
- }
174
122
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
175
123
  /*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 dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section should not be displayed');
176
124
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -191,19 +139,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
191
139
  fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
192
140
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
193
141
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
194
- if (alternativeAnswerCheck === 'true') {
195
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 0);
196
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
197
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
198
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
199
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
200
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
201
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
202
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 3 pts)`, 1);
203
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
204
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
205
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
206
- }
207
142
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
208
143
  /*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, correct icon should be displayed besides the correctly answered dropdowns, incorrect icon should be displayed beside alternative accordion responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
209
144
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -224,19 +159,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
224
159
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
225
160
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
226
161
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
227
- if (alternativeAnswerCheck === 'true') {
228
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 0);
229
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
230
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
231
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
232
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
233
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
234
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
235
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 3 pts)`, 1);
236
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
237
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
238
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
239
- }
240
162
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
241
163
  /*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 correctly answered dropdown, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
242
164
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -257,19 +179,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
257
179
  fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
258
180
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
259
181
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
260
- if (alternativeAnswerCheck === 'true') {
261
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 5 pts)`, 0);
262
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
263
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
264
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
265
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
266
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
267
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
268
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 3 pts)`, 1);
269
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
270
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
271
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
272
- }
273
182
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
274
183
  /*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 dropdowns, no icon should be displayed beside unattempted dropdowns, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
275
184
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
@@ -296,19 +205,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
296
205
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
297
206
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
298
207
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
299
- if (alternativeAnswerCheck === 'true') {
300
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 7.67 pts)`, 0);
301
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
302
- fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
303
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
304
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
305
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
306
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
307
- fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 1.67 pts)`, 1);
308
- fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(overachieverAnswerArray, 1);
309
- fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
310
- fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
311
- }
312
208
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
313
209
  /*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 beside alternative accordion responses, correct/incorrect answer label, correct answer container should not be displayed')
314
210
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();