itemengine-cypress-automation 1.0.602-IEI-7279-fe9422d.0 → 1.0.602-IEI-7053-f14f91b.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -100
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -100
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +2 -104
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -115
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -115
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -115
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -102
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -88
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -106
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +2 -382
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +108 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAddEvaluation.js +58 -5
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAlternateAnswer.js +25 -2
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +108 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +108 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/blankResponseScoring.js +93 -10
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +123 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +108 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +123 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +47 -4
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +123 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +108 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +123 -8
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +234 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +235 -0
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +1 -24
- package/cypress/pages/matchingPage.js +2 -2
- package/cypress/pages/textEntryMathPage.js +41 -3
- package/package.json +1 -1
|
@@ -7,9 +7,6 @@ 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';
|
|
13
10
|
|
|
14
11
|
describe('Create item page - Fill in the gaps over image with dropdown: All or nothing with alternative answers', () => {
|
|
15
12
|
before(() => {
|
|
@@ -47,19 +44,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
47
44
|
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
48
45
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
49
46
|
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
|
-
}
|
|
63
47
|
});
|
|
64
48
|
|
|
65
49
|
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', () => {
|
|
@@ -72,9 +56,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
72
56
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
73
57
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
74
58
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
75
|
-
if (alternativeAnswerCheck === 'true') {
|
|
76
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
77
|
-
}
|
|
78
59
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
79
60
|
/*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')
|
|
80
61
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -95,9 +76,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
95
76
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
96
77
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
97
78
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
98
|
-
if (alternativeAnswerCheck === 'true') {
|
|
99
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
100
|
-
}
|
|
101
79
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
102
80
|
/*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')
|
|
103
81
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -118,19 +96,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
118
96
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
119
97
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
120
98
|
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
|
-
}
|
|
134
99
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
135
100
|
/*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')
|
|
136
101
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -151,19 +116,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
151
116
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
152
117
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
153
118
|
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
|
-
}
|
|
167
119
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
168
120
|
/*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')
|
|
169
121
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -184,19 +136,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
184
136
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
185
137
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
186
138
|
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
|
-
}
|
|
200
139
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
201
140
|
/*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')
|
|
202
141
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -217,19 +156,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
217
156
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
218
157
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
219
158
|
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
|
-
}
|
|
233
159
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
234
160
|
/*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')
|
|
235
161
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -250,19 +176,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
250
176
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
251
177
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
252
178
|
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
|
-
}
|
|
266
179
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
267
180
|
/*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')
|
|
268
181
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -283,19 +196,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
283
196
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
284
197
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
285
198
|
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
|
-
}
|
|
299
199
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
300
200
|
/*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')
|
|
301
201
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -7,9 +7,6 @@ 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';
|
|
13
10
|
|
|
14
11
|
describe('Create item page - Fill in the gaps over image with dropdown: All or nothing with alternative answers', () => {
|
|
15
12
|
before(() => {
|
|
@@ -47,19 +44,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
47
44
|
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
48
45
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
49
46
|
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
|
-
}
|
|
63
47
|
});
|
|
64
48
|
|
|
65
49
|
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', () => {
|
|
@@ -72,9 +56,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
72
56
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
73
57
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
74
58
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
75
|
-
if (alternativeAnswerCheck === 'true') {
|
|
76
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
77
|
-
}
|
|
78
59
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
79
60
|
/*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');
|
|
80
61
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -95,9 +76,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
95
76
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
96
77
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
97
78
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
98
|
-
if (alternativeAnswerCheck === 'true') {
|
|
99
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
100
|
-
}
|
|
101
79
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
102
80
|
/*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');
|
|
103
81
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -118,19 +96,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
118
96
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
119
97
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
120
98
|
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
|
-
}
|
|
134
99
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
135
100
|
/*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');
|
|
136
101
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -151,19 +116,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
151
116
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
152
117
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
153
118
|
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
|
-
}
|
|
167
119
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
168
120
|
/*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');
|
|
169
121
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -184,19 +136,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
184
136
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
185
137
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
186
138
|
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
|
-
}
|
|
200
139
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
201
140
|
/*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');
|
|
202
141
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -217,19 +156,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
217
156
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
218
157
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
219
158
|
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
|
-
}
|
|
233
159
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
234
160
|
/*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');
|
|
235
161
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -250,19 +176,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
250
176
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
251
177
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
252
178
|
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
|
-
}
|
|
266
179
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
267
180
|
/*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');
|
|
268
181
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -283,19 +196,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
283
196
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
284
197
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
285
198
|
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
|
-
}
|
|
299
199
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
300
200
|
/*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');
|
|
301
201
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -10,9 +10,6 @@ const optionsForDropdown3 = ['Flower', 'Leaf', 'Stem', 'Roots']; //Common answe
|
|
|
10
10
|
const correctAnswerArray = ['Flower', 'Leaf', 'Stem'];
|
|
11
11
|
const alternateAnswerArray = ['Petal', 'Leaves', 'Stem'];
|
|
12
12
|
const incorrectAnswerArray = ['Branch', 'Seed', 'Roots'];
|
|
13
|
-
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
14
|
-
const correctAnswerLabel = 'Correct answer';
|
|
15
|
-
const alternativeAnswerLabel = 'Alternative answer';
|
|
16
13
|
|
|
17
14
|
describe('Create item page - Fill in the gaps over image with dropdown: All or nothing with alternative answers', () => {
|
|
18
15
|
before(() => {
|
|
@@ -49,23 +46,8 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
49
46
|
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
|
50
47
|
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
51
48
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
}
|
|
49
|
+
utilities.verifyInnerText(fillInTheGapsOverImageDropdownPage.correctAnswersLabel(), 'Correct answers');
|
|
50
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
69
51
|
});
|
|
70
52
|
|
|
71
53
|
it('CSS of correct answer section and dropdown numeration', { tags: 'css' }, () => {
|
|
@@ -100,9 +82,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
100
82
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
101
83
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
102
84
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
103
|
-
if (alternativeAnswerCheck === 'true') {
|
|
104
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
105
|
-
}
|
|
106
85
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
107
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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed');
|
|
108
87
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -150,9 +129,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
150
129
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
151
130
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
152
131
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
153
|
-
if (alternativeAnswerCheck === 'true') {
|
|
154
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
155
|
-
}
|
|
156
132
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
157
133
|
/*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');
|
|
158
134
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -173,19 +149,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
173
149
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
174
150
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
175
151
|
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
|
-
}
|
|
189
152
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
190
153
|
/*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');
|
|
191
154
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -206,19 +169,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
206
169
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
207
170
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
208
171
|
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
|
-
}
|
|
222
172
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
223
173
|
/*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');
|
|
224
174
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -239,19 +189,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
239
189
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
240
190
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
241
191
|
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
|
-
}
|
|
255
192
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
256
193
|
/*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');
|
|
257
194
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -272,19 +209,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
272
209
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
273
210
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
274
211
|
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
|
-
}
|
|
288
212
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
289
213
|
/*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');
|
|
290
214
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -305,19 +229,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
305
229
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
306
230
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
307
231
|
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
|
-
}
|
|
321
232
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
322
233
|
/*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');
|
|
323
234
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
|
@@ -338,19 +249,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
|
338
249
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
339
250
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
340
251
|
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
|
-
}
|
|
354
252
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
355
253
|
/*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');
|
|
356
254
|
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|