itemengine-cypress-automation 1.0.601-IEI-2701-stage-env-update-cf2b686.0 → 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
|
@@ -9,6 +9,11 @@ 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';
|
|
12
17
|
|
|
13
18
|
describe('Create item page - Fill in the gaps over image with dropdown: Partial equal weights with alternative answers', () => {
|
|
14
19
|
before(() => {
|
|
@@ -46,6 +51,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
46
51
|
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
|
47
52
|
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
48
53
|
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
|
+
}
|
|
49
67
|
});
|
|
50
68
|
|
|
51
69
|
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', () => {
|
|
@@ -58,6 +76,9 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
58
76
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
59
77
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
60
78
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
79
|
+
if (alternativeAnswerCheck === 'true') {
|
|
80
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
81
|
+
}
|
|
61
82
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
62
83
|
/*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')
|
|
63
84
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -78,6 +99,9 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
78
99
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
79
100
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
80
101
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
102
|
+
if (alternativeAnswerCheck === 'true') {
|
|
103
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
104
|
+
}
|
|
81
105
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
82
106
|
/*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')
|
|
83
107
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -98,6 +122,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
98
122
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
99
123
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
100
124
|
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
|
+
}
|
|
101
138
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
102
139
|
/*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')
|
|
103
140
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -118,6 +155,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
118
155
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
119
156
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
120
157
|
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
|
+
}
|
|
121
171
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
122
172
|
/*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')
|
|
123
173
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -138,6 +188,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
138
188
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
139
189
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
140
190
|
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
|
+
}
|
|
141
204
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
142
205
|
/*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')
|
|
143
206
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -158,6 +221,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
158
221
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
159
222
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
160
223
|
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
|
+
}
|
|
161
237
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
162
238
|
/*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')
|
|
163
239
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -178,6 +254,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
178
254
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
179
255
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
180
256
|
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
|
+
}
|
|
181
270
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
182
271
|
/*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')
|
|
183
272
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -204,6 +293,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
204
293
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
205
294
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
206
295
|
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
|
+
}
|
|
207
309
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
208
310
|
/*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')
|
|
209
311
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -10,6 +10,10 @@ 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';
|
|
13
17
|
|
|
14
18
|
describe('Create item page - Fill in the gaps over image with dropdown: Partial equal with alternative answers', () => {
|
|
15
19
|
before(() => {
|
|
@@ -47,6 +51,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
47
51
|
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
|
48
52
|
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
49
53
|
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
|
+
}
|
|
50
67
|
});
|
|
51
68
|
|
|
52
69
|
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', () => {
|
|
@@ -59,6 +76,9 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
59
76
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
60
77
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
61
78
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
79
|
+
if (alternativeAnswerCheck === 'true') {
|
|
80
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
81
|
+
}
|
|
62
82
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
63
83
|
/*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')
|
|
64
84
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -79,6 +99,9 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
79
99
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
80
100
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
81
101
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
102
|
+
if (alternativeAnswerCheck === 'true') {
|
|
103
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
104
|
+
}
|
|
82
105
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
83
106
|
/*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')
|
|
84
107
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -99,6 +122,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
99
122
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
100
123
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
101
124
|
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
|
+
}
|
|
102
138
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
103
139
|
/*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')
|
|
104
140
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -119,6 +155,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
119
155
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
120
156
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
121
157
|
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
|
+
}
|
|
122
171
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
123
172
|
/*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')
|
|
124
173
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -138,6 +187,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
138
187
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
|
139
188
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
140
189
|
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
|
+
}
|
|
141
203
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
142
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 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')
|
|
143
205
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -157,6 +219,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
157
219
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
158
220
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
159
221
|
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
|
+
}
|
|
160
235
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
161
236
|
/*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')
|
|
162
237
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -177,6 +252,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
177
252
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
178
253
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
179
254
|
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
|
+
}
|
|
180
268
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
181
269
|
/*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')
|
|
182
270
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -9,6 +9,11 @@ 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';
|
|
12
17
|
|
|
13
18
|
describe('Create item page - Fill in the gaps over image with dropdown: Partial equal weights with alternative answers', () => {
|
|
14
19
|
before(() => {
|
|
@@ -45,8 +50,23 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
45
50
|
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', () => {
|
|
46
51
|
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
|
47
52
|
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
48
|
-
|
|
49
|
-
|
|
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
|
+
}
|
|
50
70
|
});
|
|
51
71
|
|
|
52
72
|
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', () => {
|
|
@@ -59,6 +79,9 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
59
79
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
60
80
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
61
81
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
82
|
+
if (alternativeAnswerCheck === 'true') {
|
|
83
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
84
|
+
}
|
|
62
85
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
63
86
|
/*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');
|
|
64
87
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -79,6 +102,9 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
79
102
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
80
103
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
81
104
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
105
|
+
if (alternativeAnswerCheck === 'true') {
|
|
106
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
107
|
+
}
|
|
82
108
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
83
109
|
/*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');
|
|
84
110
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -99,6 +125,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
99
125
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
100
126
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
101
127
|
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
|
+
}
|
|
102
141
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
103
142
|
/*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');
|
|
104
143
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -119,6 +158,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
119
158
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
120
159
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
121
160
|
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
|
+
}
|
|
122
174
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
123
175
|
/*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');
|
|
124
176
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -139,6 +191,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
139
191
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
140
192
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
141
193
|
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
|
+
}
|
|
142
207
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
143
208
|
/*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')
|
|
144
209
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -159,6 +224,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
159
224
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
160
225
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
161
226
|
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
|
+
}
|
|
162
240
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
163
241
|
/*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')
|
|
164
242
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -179,6 +257,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
179
257
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
180
258
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
181
259
|
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
|
+
}
|
|
182
273
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
183
274
|
/*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')
|
|
184
275
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -205,6 +296,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
|
205
296
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
206
297
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
207
298
|
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
|
+
}
|
|
208
312
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
209
313
|
/*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')
|
|
210
314
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|