itemengine-cypress-automation 1.0.600 → 1.0.602-IEI-7279-fe9422d.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.
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +100 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +100 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +104 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +115 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +115 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +115 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +102 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +88 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +106 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +382 -2
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +24 -1
- package/cypress/pages/matchingPage.js +2 -2
- package/package.json +1 -1
|
@@ -6,7 +6,12 @@ const optionsForDropdown2 = ['Leaf', 'Leaves', 'Stem', 'Seed'];
|
|
|
6
6
|
const optionsForDropdown3 = ['Flower', 'Leaf', 'Stem', 'Roots']; //Common answer
|
|
7
7
|
const correctAnswerArray = ['Flower', 'Leaf', 'Stem'];
|
|
8
8
|
const alternateAnswerArray = ['Petal', 'Leaves', 'Stem'];
|
|
9
|
+
const overachieverAnswerArray = ['Flower', 'Leaf', 'Roots'];
|
|
9
10
|
const incorrectAnswerArray = ['Branch', 'Seed', 'Roots'];
|
|
11
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
12
|
+
const pointsPerResponse = 'Points per response in order of appearance';
|
|
13
|
+
const correctAnswerLabel = 'Correct answer';
|
|
14
|
+
const alternativeAnswerLabel = 'Alternative answer';
|
|
10
15
|
|
|
11
16
|
describe('Create item page - Fill in the gaps over image with dropdown: Partial different weights', () => {
|
|
12
17
|
before(() => {
|
|
@@ -44,6 +49,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
44
49
|
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
|
45
50
|
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
46
51
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
|
52
|
+
if (alternativeAnswerCheck === 'true') {
|
|
53
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 4 pts, 5 pts)`, 0);
|
|
54
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
55
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
56
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
57
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
58
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
59
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
60
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 7 pts, 1 pt, 5 pts)`, 1);
|
|
61
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
|
|
62
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
63
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
64
|
+
}
|
|
47
65
|
});
|
|
48
66
|
|
|
49
67
|
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, status message and correct answer section should not be displayed', () => {
|
|
@@ -56,6 +74,9 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
56
74
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
57
75
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
58
76
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
77
|
+
if (alternativeAnswerCheck === 'true') {
|
|
78
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
79
|
+
}
|
|
59
80
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
60
81
|
/*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, status message and correct answer section should not be displayed')
|
|
61
82
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -76,6 +97,9 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
76
97
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
77
98
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
78
99
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
100
|
+
if (alternativeAnswerCheck === 'true') {
|
|
101
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
102
|
+
}
|
|
79
103
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
80
104
|
/*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, status message and correct answer section should not be displayed')
|
|
81
105
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -96,6 +120,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
96
120
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
97
121
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
98
122
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
|
123
|
+
if (alternativeAnswerCheck === 'true') {
|
|
124
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 4 pts, 5 pts)`, 0);
|
|
125
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
126
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
127
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
128
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
129
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
130
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
131
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 7 pts, 1 pt, 5 pts)`, 1);
|
|
132
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
|
|
133
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
134
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
135
|
+
}
|
|
99
136
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
100
137
|
/*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, status message and correct answer section should not be displayed')
|
|
101
138
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -116,6 +153,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
116
153
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
117
154
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
118
155
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
|
156
|
+
if (alternativeAnswerCheck === 'true') {
|
|
157
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 4 pts, 5 pts)`, 0);
|
|
158
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
159
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
160
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
161
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
162
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
163
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
164
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 7 pts, 1 pt, 5 pts)`, 1);
|
|
165
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
|
|
166
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
167
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
168
|
+
}
|
|
119
169
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
120
170
|
/*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, status message and correct answer section should not be displayed')
|
|
121
171
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -136,6 +186,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
136
186
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
137
187
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
138
188
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
|
189
|
+
if (alternativeAnswerCheck === 'true') {
|
|
190
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 4 pts, 5 pts)`, 0);
|
|
191
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
192
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
193
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
194
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
195
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
196
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
197
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 7 pts, 1 pt, 5 pts)`, 1);
|
|
198
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
|
|
199
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
200
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
201
|
+
}
|
|
139
202
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
140
203
|
/*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 dropdown with alternative answer responses, incorrect icon should be displayed beside dropdown with correct accordion response, status message and correct answer section should not be displayed')
|
|
141
204
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -156,6 +219,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
156
219
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
157
220
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
158
221
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
|
222
|
+
if (alternativeAnswerCheck === 'true') {
|
|
223
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 4 pts, 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} - 7 pts, 1 pt, 5 pts)`, 1);
|
|
231
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
|
|
232
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
233
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
234
|
+
}
|
|
159
235
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
160
236
|
/*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 icon should be displayed besides the correct dropdowns, incorrect icon should be displayed beside dropdown with alternative accordion response, status message and correct answer section should not be displayed')
|
|
161
237
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -176,6 +252,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
176
252
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
177
253
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
178
254
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
|
255
|
+
if (alternativeAnswerCheck === 'true') {
|
|
256
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 4 pts, 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} - 7 pts, 1 pt, 5 pts)`, 1);
|
|
264
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
|
|
265
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
266
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
267
|
+
}
|
|
179
268
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
180
269
|
/*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 dropdown, no icon should be displayed beside unattempted dropdown, status message and correct answer section should not be displayed')
|
|
181
270
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -196,6 +285,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
196
285
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
197
286
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
198
287
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
|
288
|
+
if (alternativeAnswerCheck === 'true') {
|
|
289
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 4 pts, 5 pts)`, 0);
|
|
290
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
291
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
292
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
293
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
294
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
295
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
296
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 7 pts, 1 pt, 5 pts)`, 1);
|
|
297
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
|
|
298
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
299
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
300
|
+
}
|
|
199
301
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
200
302
|
/*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icon should be displayed besides all incorrect dropdowns, no icon should be displayed beside unattempted dropdown, status message and correct answer section should not be displayed')
|
|
201
303
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -222,6 +324,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
222
324
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
223
325
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
224
326
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
|
327
|
+
if (alternativeAnswerCheck === 'true') {
|
|
328
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 10.4 pts, 1.2 pts, 11.4 pts)`, 0);
|
|
329
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
330
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
331
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
332
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
333
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
334
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
335
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 1.2 pts, 2.2 pts, 1.6 pts)`, 1);
|
|
336
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(overachieverAnswerArray, 1);
|
|
337
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
338
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
339
|
+
}
|
|
225
340
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
226
341
|
/*cy.log('When the user attempts 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 icon icons should be displayed beside the correct dropdowns from the correct accordion, incorrect icons should be displayed beside the incorrectly answered dropdowns, correct/incorrect answer status message, correct answer container should not be displayed')
|
|
227
342
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -8,6 +8,11 @@ const optionsForDropdown3 = ['Flower', 'Leaf', 'Stem', 'Roots']; //Common answe
|
|
|
8
8
|
const correctAnswerArray = ['Flower', 'Leaf', 'Stem'];
|
|
9
9
|
const alternateAnswerArray = ['Petal', 'Leaves', 'Stem'];
|
|
10
10
|
const incorrectAnswerArray = ['Branch', 'Seed', 'Roots'];
|
|
11
|
+
const overachieverAnswerArray = ['Petal', 'Leaves', 'Roots'];
|
|
12
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
13
|
+
const pointsPerResponse = 'Points per response in order of appearance';
|
|
14
|
+
const correctAnswerLabel = 'Correct answer';
|
|
15
|
+
const alternativeAnswerLabel = 'Alternative answer';
|
|
11
16
|
|
|
12
17
|
describe('Create item page - Fill in the gaps over image with dropdown: Partial different weights', () => {
|
|
13
18
|
before(() => {
|
|
@@ -45,6 +50,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
45
50
|
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
|
46
51
|
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
47
52
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
53
|
+
if (alternativeAnswerCheck === 'true') {
|
|
54
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 5 pts, 4 pts)`, 0);
|
|
55
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
56
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
57
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
58
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
59
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
60
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
61
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 7 pts, 5 pts, 3 pts)`, 1);
|
|
62
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
63
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
64
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
65
|
+
}
|
|
48
66
|
});
|
|
49
67
|
|
|
50
68
|
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', () => {
|
|
@@ -57,6 +75,9 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
57
75
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
58
76
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
59
77
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
78
|
+
if (alternativeAnswerCheck === 'true') {
|
|
79
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
80
|
+
}
|
|
60
81
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
61
82
|
/*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')
|
|
62
83
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -77,6 +98,9 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
77
98
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
78
99
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
79
100
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
101
|
+
if (alternativeAnswerCheck === 'true') {
|
|
102
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
103
|
+
}
|
|
80
104
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
81
105
|
/*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')
|
|
82
106
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -97,6 +121,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
97
121
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
98
122
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
99
123
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
124
|
+
if (alternativeAnswerCheck === 'true') {
|
|
125
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 5 pts, 4 pts)`, 0);
|
|
126
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
127
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
128
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
129
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
130
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
131
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
132
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 7 pts, 5 pts, 3 pts)`, 1);
|
|
133
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
134
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
135
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
136
|
+
}
|
|
100
137
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
101
138
|
/*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')
|
|
102
139
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -117,6 +154,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
117
154
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
118
155
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
119
156
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
157
|
+
if (alternativeAnswerCheck === 'true') {
|
|
158
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 5 pts, 4 pts)`, 0);
|
|
159
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
160
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
161
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
162
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
163
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
164
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
165
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 7 pts, 5 pts, 3 pts)`, 1);
|
|
166
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
167
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
168
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
169
|
+
}
|
|
120
170
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
121
171
|
/*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')
|
|
122
172
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -137,6 +187,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
137
187
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
138
188
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
139
189
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
190
|
+
if (alternativeAnswerCheck === 'true') {
|
|
191
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 5 pts, 4 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} - 7 pts, 5 pts, 3 pts)`, 1);
|
|
199
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
200
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
201
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
202
|
+
}
|
|
140
203
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
141
204
|
/*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 dropdowns, incorrect icon should be displayed beside responses from the alternative accordion, correct/incorrect status message and correct answer section should not be displayed')
|
|
142
205
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -157,6 +220,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
157
220
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
158
221
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
159
222
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
223
|
+
if (alternativeAnswerCheck === 'true') {
|
|
224
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 5 pts, 4 pts)`, 0);
|
|
225
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
226
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
227
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
228
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
229
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
230
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
231
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 7 pts, 5 pts, 3 pts)`, 1);
|
|
232
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
233
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
234
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
235
|
+
}
|
|
160
236
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
161
237
|
/*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 alternative responses, incorrect icon should be displayed beside correct accordion responses, correct/incorrect status message and correct answer section should not be displayed')
|
|
162
238
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -177,6 +253,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
177
253
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
178
254
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
179
255
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
256
|
+
if (alternativeAnswerCheck === 'true') {
|
|
257
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 5 pts, 4 pts)`, 0);
|
|
258
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
259
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
260
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
261
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
262
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
263
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
264
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 7 pts, 5 pts, 3 pts)`, 1);
|
|
265
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
266
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
267
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
268
|
+
}
|
|
180
269
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
181
270
|
/*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 and correct answer section should not be displayed')
|
|
182
271
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -197,6 +286,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
197
286
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
198
287
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
199
288
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
289
|
+
if (alternativeAnswerCheck === 'true') {
|
|
290
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 5 pts, 4 pts)`, 0);
|
|
291
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
292
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
293
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
294
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
295
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
296
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
297
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 7 pts, 5 pts, 3 pts)`, 1);
|
|
298
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
299
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
300
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
301
|
+
}
|
|
200
302
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
201
303
|
/*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icon 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')
|
|
202
304
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -223,6 +325,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
223
325
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
224
326
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
225
327
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
328
|
+
if (alternativeAnswerCheck === 'true') {
|
|
329
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 1.2 pts, 1.2 pts, 12.6 pts)`, 0);
|
|
330
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
331
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
332
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
333
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
334
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
335
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
336
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 4.1 pts, 5.4 pts, 5.5 pts)`, 1);
|
|
337
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(overachieverAnswerArray, 1);
|
|
338
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
339
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
340
|
+
}
|
|
226
341
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
227
342
|
/*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 selected from the correct accordion overpowers the combined score of the alternative accordion answers and clicks on \'Check answer\' button, then correct icons should be displayed for the correct accordion response, incorrect icon should be displayed for the alternative accordion responses, correct/incorrect status message and correct answer section should not be displayed')
|
|
228
343
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -7,6 +7,11 @@ const optionsForDropdown3 = ['Flower', 'Leaf', 'Stem', 'Roots']; //Common answe
|
|
|
7
7
|
const correctAnswerArray = ['Flower', 'Leaf', 'Stem'];
|
|
8
8
|
const alternateAnswerArray = ['Petal', 'Leaves', 'Stem'];
|
|
9
9
|
const incorrectAnswerArray = ['Branch', 'Seed', 'Roots'];
|
|
10
|
+
const overachieverAnswerArray = ['Petal', 'Leaves', 'Roots'];
|
|
11
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
12
|
+
const pointsPerResponse = 'Points per response in order of appearance';
|
|
13
|
+
const correctAnswerLabel = 'Correct answer';
|
|
14
|
+
const alternativeAnswerLabel = 'Alternative answer';
|
|
10
15
|
|
|
11
16
|
describe('Create item page - Fill in the gaps over image with dropdown: Partial different weights', () => {
|
|
12
17
|
before(() => {
|
|
@@ -44,6 +49,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
44
49
|
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
|
45
50
|
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
46
51
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
52
|
+
if (alternativeAnswerCheck === 'true') {
|
|
53
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 4 pts, 5 pts)`, 0);
|
|
54
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
55
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
56
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
57
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
58
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
59
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
60
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 7 pts, 1 pt, 5 pts)`, 1);
|
|
61
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
62
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
63
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
64
|
+
}
|
|
47
65
|
});
|
|
48
66
|
|
|
49
67
|
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', () => {
|
|
@@ -56,6 +74,9 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
56
74
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
57
75
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
58
76
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
77
|
+
if (alternativeAnswerCheck === 'true') {
|
|
78
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
79
|
+
}
|
|
59
80
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
60
81
|
/*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')
|
|
61
82
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -76,6 +97,9 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
76
97
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
77
98
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
78
99
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
100
|
+
if (alternativeAnswerCheck === 'true') {
|
|
101
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
102
|
+
}
|
|
79
103
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
80
104
|
/*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')
|
|
81
105
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -96,6 +120,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
96
120
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
97
121
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
98
122
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
123
|
+
if (alternativeAnswerCheck === 'true') {
|
|
124
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 4 pts, 5 pts)`, 0);
|
|
125
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
126
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
127
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
128
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
129
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
130
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
131
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 7 pts, 1 pt, 5 pts)`, 1);
|
|
132
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
133
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
134
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
135
|
+
}
|
|
99
136
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
100
137
|
/*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')
|
|
101
138
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -116,6 +153,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
116
153
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
117
154
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
118
155
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
156
|
+
if (alternativeAnswerCheck === 'true') {
|
|
157
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 4 pts, 5 pts)`, 0);
|
|
158
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
159
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
160
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
161
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
162
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
163
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
164
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 7 pts, 1 pt, 5 pts)`, 1);
|
|
165
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
166
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
167
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
168
|
+
}
|
|
119
169
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
120
170
|
/*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')
|
|
121
171
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -136,6 +186,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
136
186
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
137
187
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
138
188
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
189
|
+
if (alternativeAnswerCheck === 'true') {
|
|
190
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 4 pts, 5 pts)`, 0);
|
|
191
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
192
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
193
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
194
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
195
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
196
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
197
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 7 pts, 1 pt, 5 pts)`, 1);
|
|
198
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
199
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
200
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
201
|
+
}
|
|
139
202
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
140
203
|
/*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 icon should be displayed besides dropdown with alternative answer responses, incorrect icon should be displayed beside responses from the correct accordion, correct/incorrect status message and correct answer section should not be displayed')
|
|
141
204
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -156,6 +219,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
156
219
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
157
220
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
158
221
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
222
|
+
if (alternativeAnswerCheck === 'true') {
|
|
223
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 4 pts, 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} - 7 pts, 1 pt, 5 pts)`, 1);
|
|
231
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
232
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
233
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
234
|
+
}
|
|
159
235
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
160
236
|
/*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 icon should be displayed besides dropdown with correct accordion response, incorrect icon should be displayed beside responses from the alternative accordion, correct/incorrect status message and correct answer section should not be displayed')
|
|
161
237
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -176,6 +252,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
176
252
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
177
253
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
178
254
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
255
|
+
if (alternativeAnswerCheck === 'true') {
|
|
256
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 4 pts, 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} - 7 pts, 1 pt, 5 pts)`, 1);
|
|
264
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
265
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
266
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
267
|
+
}
|
|
179
268
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
180
269
|
/*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 and correct answer section should not be displayed')
|
|
181
270
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -196,6 +285,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
196
285
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
197
286
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
198
287
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
288
|
+
if (alternativeAnswerCheck === 'true') {
|
|
289
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 6 pts, 4 pts, 5 pts)`, 0);
|
|
290
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
291
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
292
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
293
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
294
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
295
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
296
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 7 pts, 1 pt, 5 pts)`, 1);
|
|
297
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
298
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
299
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
300
|
+
}
|
|
199
301
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
200
302
|
/*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icon 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')
|
|
201
303
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -222,6 +324,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
222
324
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
223
325
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
224
326
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
327
|
+
if (alternativeAnswerCheck === 'true') {
|
|
328
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, `(${pointsPerResponse} - 11.4 pts, 1.2 pts, 10.4 pts)`, 0);
|
|
329
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
330
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
331
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
332
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
333
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
334
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
335
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, `(${pointsPerResponse} - 1.2 pts, 2.2 pts, 1.6 pts)`, 1);
|
|
336
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(overachieverAnswerArray, 1);
|
|
337
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
338
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
339
|
+
}
|
|
225
340
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
226
341
|
/*cy.log('When user attempts the question correctly and clicks on the \'Check answer\' button, correct icon icons should be displayed beside the correct responses from the correct accordion, incorrect icons should be displayed beside the incorrectly answered dropdowns, correct/incorrect status message and correct answer section should not be displayed')
|
|
227
342
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|