itemengine-cypress-automation 1.0.602-IEI-7053-f14f91b.0 → 1.0.603-IEI-7053-9616741.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/e2e/ILC/ThinkSphere/gradingViewPlanTabSection.js +1 -0
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +24 -1
- package/cypress/pages/matchingPage.js +2 -2
- package/package.json +1 -1
|
@@ -7,6 +7,9 @@ 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 alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
11
|
+
const correctAnswerLabel = 'Correct answer';
|
|
12
|
+
const alternativeAnswerLabel = 'Alternative answer';
|
|
10
13
|
|
|
11
14
|
describe('Create item page - Fill in the gaps over image with dropdown: All or nothing with alternative answers', () => {
|
|
12
15
|
before(() => {
|
|
@@ -44,6 +47,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
44
47
|
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
45
48
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
46
49
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
|
50
|
+
if (alternativeAnswerCheck === 'true') {
|
|
51
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
52
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
53
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
54
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
55
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
56
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
57
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
58
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(10 points)', 1);
|
|
59
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
|
|
60
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
61
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
62
|
+
}
|
|
47
63
|
});
|
|
48
64
|
|
|
49
65
|
it('When the user attempts the question with responses from the correct accordion, then the user should be awarded with points specified for correct accordion (less than overall points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct dropdowns, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
|
@@ -56,6 +72,9 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
56
72
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
57
73
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
58
74
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
75
|
+
if (alternativeAnswerCheck === 'true') {
|
|
76
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
77
|
+
}
|
|
59
78
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
60
79
|
/*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 correctly answered dropdowns, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
|
61
80
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -76,6 +95,9 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
76
95
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
77
96
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
78
97
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
98
|
+
if (alternativeAnswerCheck === 'true') {
|
|
99
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
100
|
+
}
|
|
79
101
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
80
102
|
/*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 correctly answered dropdowns, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
|
81
103
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -96,6 +118,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
96
118
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
97
119
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
98
120
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
|
121
|
+
if (alternativeAnswerCheck === 'true') {
|
|
122
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
123
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
124
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
125
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
126
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
127
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
128
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
129
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(10 points)', 1);
|
|
130
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
|
|
131
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
132
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
133
|
+
}
|
|
99
134
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
100
135
|
/*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 correctly answered dropdowns, no icon should be displayed for unattempted dropdown, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
101
136
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -116,6 +151,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
116
151
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
117
152
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
118
153
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
|
154
|
+
if (alternativeAnswerCheck === 'true') {
|
|
155
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
156
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
157
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
158
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
159
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
160
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
161
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
162
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(10 points)', 1);
|
|
163
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
|
|
164
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
165
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
166
|
+
}
|
|
119
167
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
120
168
|
/*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 correctly answered dropdowns, no icon should be displayed for unattempted dropdown, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
121
169
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -136,6 +184,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
136
184
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
137
185
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
138
186
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
|
187
|
+
if (alternativeAnswerCheck === 'true') {
|
|
188
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
189
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
190
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
191
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
192
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
193
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
194
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
195
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(10 points)', 1);
|
|
196
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
|
|
197
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
198
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
199
|
+
}
|
|
139
200
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
140
201
|
/*cy.log('When the user has attempted the question with partially correct with all the response correct as per the alternative accordion but one incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the response from the correct accordion and no icon should be displayed for unattempted dropdown, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
141
202
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -156,6 +217,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
156
217
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
157
218
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
158
219
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
|
220
|
+
if (alternativeAnswerCheck === 'true') {
|
|
221
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
222
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
223
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
224
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
225
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
226
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
227
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
228
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(10 points)', 1);
|
|
229
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
|
|
230
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
231
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
232
|
+
}
|
|
159
233
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
160
234
|
/*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 alternative accordion responses, incorrect icon should be displayed besides correct accordion responses a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
161
235
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -176,6 +250,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
176
250
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
177
251
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
178
252
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
|
253
|
+
if (alternativeAnswerCheck === 'true') {
|
|
254
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
255
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
256
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
257
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
258
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
259
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
260
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
261
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(10 points)', 1);
|
|
262
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
|
|
263
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
264
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
265
|
+
}
|
|
179
266
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
180
267
|
/*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 dropdowns, no icon should be displayed for unattempted dropdown, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
181
268
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -196,6 +283,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
196
283
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
197
284
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
198
285
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
|
286
|
+
if (alternativeAnswerCheck === 'true') {
|
|
287
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
288
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
289
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
290
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
291
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
292
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
293
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
294
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(10 points)', 1);
|
|
295
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray, 1);
|
|
296
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
297
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
298
|
+
}
|
|
199
299
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
200
300
|
/*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 for unattempted dropdown, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
201
301
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -7,6 +7,9 @@ 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 alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
11
|
+
const correctAnswerLabel = 'Correct answer';
|
|
12
|
+
const alternativeAnswerLabel = 'Alternative answer';
|
|
10
13
|
|
|
11
14
|
describe('Create item page - Fill in the gaps over image with dropdown: All or nothing with alternative answers', () => {
|
|
12
15
|
before(() => {
|
|
@@ -44,6 +47,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
44
47
|
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
45
48
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
46
49
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
50
|
+
if (alternativeAnswerCheck === 'true') {
|
|
51
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
52
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
53
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
54
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
55
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
56
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
57
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
58
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(20 points)', 1);
|
|
59
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
60
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
61
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
62
|
+
}
|
|
47
63
|
});
|
|
48
64
|
|
|
49
65
|
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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
|
@@ -56,6 +72,9 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
56
72
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
57
73
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
58
74
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
75
|
+
if (alternativeAnswerCheck === 'true') {
|
|
76
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
77
|
+
}
|
|
59
78
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
60
79
|
/*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 correctly answered dropdowns, a status message with text \'Your answer is correct\' and correct answer section should not be displayed');
|
|
61
80
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -76,6 +95,9 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
76
95
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
77
96
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
78
97
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
98
|
+
if (alternativeAnswerCheck === 'true') {
|
|
99
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
100
|
+
}
|
|
79
101
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
80
102
|
/*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 correctly answered dropdowns, a status message with text \'Your answer is correct\' and correct answer section should not be displayed');
|
|
81
103
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -96,6 +118,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
96
118
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
97
119
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
98
120
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
121
|
+
if (alternativeAnswerCheck === 'true') {
|
|
122
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
123
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
124
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
125
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
126
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
127
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
128
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
129
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(20 points)', 1);
|
|
130
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
131
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
132
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
133
|
+
}
|
|
99
134
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
100
135
|
/*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 correctly answered dropdowns, no icon should be displayed beside unattempted dropdown, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed');
|
|
101
136
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -116,6 +151,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
116
151
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
117
152
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
118
153
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
154
|
+
if (alternativeAnswerCheck === 'true') {
|
|
155
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
156
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
157
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
158
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
159
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
160
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
161
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
162
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(20 points)', 1);
|
|
163
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
164
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
165
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
166
|
+
}
|
|
119
167
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
120
168
|
/*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 correctly answered dropdowns, no icon should be displayed beside unattempted dropdown, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed');
|
|
121
169
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -136,6 +184,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
136
184
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
137
185
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
138
186
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
187
|
+
if (alternativeAnswerCheck === 'true') {
|
|
188
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
189
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
190
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
191
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
192
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
193
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
194
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
195
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(20 points)', 1);
|
|
196
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
197
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
198
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
199
|
+
}
|
|
139
200
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
140
201
|
/*cy.log('When the user has attempted the question with partially correct with all the response correct as per the alternative accordion but one response incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the response from the alternative accordion, incorrect icon should be displayed besides the empty response, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed');
|
|
141
202
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -156,6 +217,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
156
217
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
157
218
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
158
219
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
220
|
+
if (alternativeAnswerCheck === 'true') {
|
|
221
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
222
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
223
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
224
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
225
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
226
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
227
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
228
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(20 points)', 1);
|
|
229
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
230
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
231
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
232
|
+
}
|
|
159
233
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
160
234
|
/*cy.log('When the user has attempted the question with equal number of correct dropdowns from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correctly answered dropdowns, incorrect icon should be displayed beside option from the alternative accordion a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed');
|
|
161
235
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -176,6 +250,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
176
250
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
177
251
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
178
252
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
253
|
+
if (alternativeAnswerCheck === 'true') {
|
|
254
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
255
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
256
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
257
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
258
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
259
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
260
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
261
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(20 points)', 1);
|
|
262
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
263
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
264
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
265
|
+
}
|
|
179
266
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
180
267
|
/*cy.log('When the user has attempted the question with equal number of correct dropdowns from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correctly answered dropdowns, no icon should be displayed beside unattempted dropdown, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed');
|
|
181
268
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -196,6 +283,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
196
283
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
197
284
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
198
285
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
286
|
+
if (alternativeAnswerCheck === 'true') {
|
|
287
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
288
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
289
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
290
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
291
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
292
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
293
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
294
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(20 points)', 1);
|
|
295
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
296
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
297
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
298
|
+
}
|
|
199
299
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
200
300
|
/*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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed');
|
|
201
301
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -10,6 +10,9 @@ 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 correctAnswerLabel = 'Correct answer';
|
|
15
|
+
const alternativeAnswerLabel = 'Alternative answer';
|
|
13
16
|
|
|
14
17
|
describe('Create item page - Fill in the gaps over image with dropdown: All or nothing with alternative answers', () => {
|
|
15
18
|
before(() => {
|
|
@@ -46,8 +49,23 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
46
49
|
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
|
47
50
|
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
48
51
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
if (alternativeAnswerCheck === 'true') {
|
|
53
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
54
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
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, '(10 points)', 1);
|
|
62
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
63
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
64
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
65
|
+
} else {
|
|
66
|
+
utilities.verifyInnerText(fillInTheGapsOverImageDropdownPage.correctAnswersLabel(), 'Correct answers');
|
|
67
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
68
|
+
}
|
|
51
69
|
});
|
|
52
70
|
|
|
53
71
|
it('CSS of correct answer section and dropdown numeration', { tags: 'css' }, () => {
|
|
@@ -82,6 +100,9 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
82
100
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
83
101
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
84
102
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
103
|
+
if (alternativeAnswerCheck === 'true') {
|
|
104
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
105
|
+
}
|
|
85
106
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
86
107
|
/*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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed');
|
|
87
108
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -129,6 +150,9 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
129
150
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
130
151
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
131
152
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
153
|
+
if (alternativeAnswerCheck === 'true') {
|
|
154
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
155
|
+
}
|
|
132
156
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
133
157
|
/*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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed');
|
|
134
158
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -149,6 +173,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
149
173
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
150
174
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
151
175
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
176
|
+
if (alternativeAnswerCheck === 'true') {
|
|
177
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
178
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
179
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
180
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
181
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
182
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
183
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
184
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(10 points)', 1);
|
|
185
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
186
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
187
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
188
|
+
}
|
|
152
189
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
153
190
|
/*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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed');
|
|
154
191
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -169,6 +206,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
169
206
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
170
207
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
171
208
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
209
|
+
if (alternativeAnswerCheck === 'true') {
|
|
210
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
211
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
212
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
213
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
214
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
215
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
216
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
217
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(10 points)', 1);
|
|
218
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
219
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
220
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
221
|
+
}
|
|
172
222
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
173
223
|
/*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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed');
|
|
174
224
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -189,6 +239,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
189
239
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
190
240
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
191
241
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
242
|
+
if (alternativeAnswerCheck === 'true') {
|
|
243
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
244
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
245
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
246
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
247
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
248
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
249
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
250
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(10 points)', 1);
|
|
251
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
252
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
253
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
254
|
+
}
|
|
192
255
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
193
256
|
/*cy.log('When the user has attempted the question with partially correct with all the response correct as per the alternative accordion but one response incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct accordion response, incorrect icon should be displayed besides the alternative accordion response and no icon should be displayed beside unattempted dropdown, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed');
|
|
194
257
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -209,6 +272,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
209
272
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
210
273
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
211
274
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
275
|
+
if (alternativeAnswerCheck === 'true') {
|
|
276
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
277
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
278
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
279
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
280
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
281
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
282
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
283
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(10 points)', 1);
|
|
284
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
285
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
286
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
287
|
+
}
|
|
212
288
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
213
289
|
/*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 correctly answered dropdowns, incorrect icon should be displayed beside alternative accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed');
|
|
214
290
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -229,6 +305,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
229
305
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
230
306
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
231
307
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
308
|
+
if (alternativeAnswerCheck === 'true') {
|
|
309
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
310
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
311
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
312
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
313
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
314
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
315
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
316
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(10 points)', 1);
|
|
317
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
318
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
319
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
320
|
+
}
|
|
232
321
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
233
322
|
/*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 correctly answered dropdowns, no icon should be displayed beside unattempted dropdown, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed');
|
|
234
323
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -249,6 +338,19 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
249
338
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
250
339
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
251
340
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
341
|
+
if (alternativeAnswerCheck === 'true') {
|
|
342
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
343
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
344
|
+
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
345
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
346
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
347
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
348
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
349
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(10 points)', 1);
|
|
350
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
351
|
+
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
352
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
353
|
+
}
|
|
252
354
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
253
355
|
/*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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed');
|
|
254
356
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|