itemengine-cypress-automation 1.0.581 → 1.0.583-IEI-7046-3e4646d.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/DragAndDropIntoCategoriesNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +123 -8
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +123 -8
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +131 -14
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +138 -9
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +138 -9
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsGreaterThanAlternativePoints.js +153 -10
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +138 -9
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +108 -7
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +138 -9
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +272 -1
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +38 -0
- package/package.json +1 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { dragAndDropIntoCategoriesPage } from "../../../../pages";
|
|
2
|
+
import { showAlternativeAnswersComponent } from "../../../../pages/components";
|
|
2
3
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
4
|
|
|
5
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
6
|
+
|
|
4
7
|
describe('Create item page - Drag and drop into categories: All or nothing with alternative answers', () => {
|
|
5
8
|
before(() => {
|
|
6
9
|
cy.loginAs('admin');
|
|
@@ -29,7 +32,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
29
32
|
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
|
30
33
|
dragAndDropIntoCategoriesPage.steps.verifyDropzoneCellNumeration(['1', '2', '3', '4', '5', '6']);
|
|
31
34
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
32
|
-
|
|
35
|
+
if (alternativeAnswerCheck) {
|
|
36
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
37
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
38
|
+
{
|
|
39
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
40
|
+
pointsText: '(20 points)',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
44
|
+
pointsText: '(10 points)',
|
|
45
|
+
}
|
|
46
|
+
])
|
|
47
|
+
} else {
|
|
48
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
|
|
49
|
+
}
|
|
33
50
|
});
|
|
34
51
|
|
|
35
52
|
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 full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses and and proper icon should display beside empty container, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
|
@@ -96,7 +113,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
96
113
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
97
114
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
98
115
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
99
|
-
|
|
116
|
+
if (alternativeAnswerCheck) {
|
|
117
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
118
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
119
|
+
{
|
|
120
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
121
|
+
pointsText: '(20 points)',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
125
|
+
pointsText: '(10 points)',
|
|
126
|
+
}
|
|
127
|
+
])
|
|
128
|
+
} else {
|
|
129
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
|
|
130
|
+
}
|
|
100
131
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
101
132
|
/*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 answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
102
133
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -118,7 +149,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
118
149
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
119
150
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
120
151
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
121
|
-
|
|
152
|
+
if (alternativeAnswerCheck) {
|
|
153
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
154
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
155
|
+
{
|
|
156
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
157
|
+
pointsText: '(20 points)',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
161
|
+
pointsText: '(10 points)',
|
|
162
|
+
}
|
|
163
|
+
])
|
|
164
|
+
} else {
|
|
165
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
|
|
166
|
+
}
|
|
122
167
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
123
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 correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
124
169
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -141,7 +186,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
141
186
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
142
187
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
143
188
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
144
|
-
|
|
189
|
+
if (alternativeAnswerCheck) {
|
|
190
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
191
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
192
|
+
{
|
|
193
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
194
|
+
pointsText: '(20 points)',
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
198
|
+
pointsText: '(10 points)',
|
|
199
|
+
}
|
|
200
|
+
])
|
|
201
|
+
} else {
|
|
202
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
|
|
203
|
+
}
|
|
145
204
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
146
205
|
/*cy.log('When the user has attempted the question partially correct with all the cells correct as per the correct accordion but one cell incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the responses common across both accordions, incorrect icons should be displayed besides correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
147
206
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -165,7 +224,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
165
224
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
166
225
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
167
226
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
168
|
-
|
|
227
|
+
if (alternativeAnswerCheck) {
|
|
228
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
229
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
230
|
+
{
|
|
231
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
232
|
+
pointsText: '(20 points)',
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
236
|
+
pointsText: '(10 points)',
|
|
237
|
+
}
|
|
238
|
+
])
|
|
239
|
+
} else {
|
|
240
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
|
|
241
|
+
}
|
|
169
242
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
170
243
|
/*cy.log('When the user has attempted the question partially correct with more number of options exclusively from the correct accordion but with one option common across both accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the responses common across both accordions, incorrect icons should be displayed besides correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
171
244
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -189,7 +262,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
189
262
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(5);
|
|
190
263
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(6);
|
|
191
264
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
192
|
-
|
|
265
|
+
if (alternativeAnswerCheck) {
|
|
266
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
267
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
268
|
+
{
|
|
269
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
270
|
+
pointsText: '(20 points)',
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
274
|
+
pointsText: '(10 points)',
|
|
275
|
+
}
|
|
276
|
+
])
|
|
277
|
+
} else {
|
|
278
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
|
|
279
|
+
}
|
|
193
280
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
194
281
|
/*cy.log('When the user has attempted the question partially correct with all the cells correctly attempted as per the correct accordion but with an extra incorrect option and clicks on \'Check answer\' button, then correct icon should be displayed besides the responses common across both accordions, incorrect icons should be displayed besides correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
195
282
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -217,7 +304,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
217
304
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
218
305
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
219
306
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
220
|
-
|
|
307
|
+
if (alternativeAnswerCheck) {
|
|
308
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
309
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
310
|
+
{
|
|
311
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
312
|
+
pointsText: '(20 points)',
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
316
|
+
pointsText: '(10 points)',
|
|
317
|
+
}
|
|
318
|
+
])
|
|
319
|
+
} else {
|
|
320
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
|
|
321
|
+
}
|
|
221
322
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
222
323
|
/*cy.log('When the user has attempted the question partially correct such that more number of correct options are exclusively from the correct accordion but with one option exclusively from the alternative accordion in the same cell and clicks on \'Check answer\' button, then correct icon should be displayed besides the responses common across both accordions, incorrect icons should be displayed besides correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
223
324
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -241,7 +342,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
241
342
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
242
343
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
243
344
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
244
|
-
|
|
345
|
+
if (alternativeAnswerCheck) {
|
|
346
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
347
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
348
|
+
{
|
|
349
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
350
|
+
pointsText: '(20 points)',
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
354
|
+
pointsText: '(10 points)',
|
|
355
|
+
}
|
|
356
|
+
])
|
|
357
|
+
} else {
|
|
358
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
|
|
359
|
+
}
|
|
245
360
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
246
361
|
/*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 responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
247
362
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { dragAndDropIntoCategoriesPage } from "../../../../pages";
|
|
2
|
+
import { showAlternativeAnswersComponent } from "../../../../pages/components";
|
|
2
3
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
4
|
|
|
5
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
6
|
+
|
|
4
7
|
describe('Create item page - Drag and drop into categories: All or nothing with alternative answers', () => {
|
|
5
8
|
before(() => {
|
|
6
9
|
cy.loginAs('admin');
|
|
@@ -30,7 +33,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
30
33
|
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
|
31
34
|
dragAndDropIntoCategoriesPage.steps.verifyDropzoneCellNumeration(['1', '2', '3', '4', '5', '6']);
|
|
32
35
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
33
|
-
|
|
36
|
+
if (alternativeAnswerCheck) {
|
|
37
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
38
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
39
|
+
{
|
|
40
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
41
|
+
pointsText: '(20 points)',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
45
|
+
pointsText: '(20 points)',
|
|
46
|
+
}
|
|
47
|
+
])
|
|
48
|
+
} else {
|
|
49
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
|
|
50
|
+
}
|
|
34
51
|
});
|
|
35
52
|
|
|
36
53
|
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 responses and proper icon should display beside empty container, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
|
@@ -98,7 +115,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
98
115
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
99
116
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
100
117
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
101
|
-
|
|
118
|
+
if (alternativeAnswerCheck) {
|
|
119
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
120
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
121
|
+
{
|
|
122
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
123
|
+
pointsText: '(20 points)',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
127
|
+
pointsText: '(20 points)',
|
|
128
|
+
}
|
|
129
|
+
])
|
|
130
|
+
} else {
|
|
131
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
|
|
132
|
+
}
|
|
102
133
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
103
134
|
/*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 answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
104
135
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -121,7 +152,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
121
152
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
122
153
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
123
154
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
124
|
-
|
|
155
|
+
if (alternativeAnswerCheck) {
|
|
156
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
157
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
158
|
+
{
|
|
159
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
160
|
+
pointsText: '(20 points)',
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
164
|
+
pointsText: '(20 points)',
|
|
165
|
+
}
|
|
166
|
+
])
|
|
167
|
+
} else {
|
|
168
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []], ['1', '2', '4', '5', '3', '6']);
|
|
169
|
+
}
|
|
125
170
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
126
171
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
127
172
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -143,7 +188,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
143
188
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(3);
|
|
144
189
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
145
190
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
146
|
-
|
|
191
|
+
if (alternativeAnswerCheck) {
|
|
192
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
193
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
194
|
+
{
|
|
195
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
196
|
+
pointsText: '(20 points)',
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
200
|
+
pointsText: '(20 points)',
|
|
201
|
+
}
|
|
202
|
+
])
|
|
203
|
+
} else {
|
|
204
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
|
|
205
|
+
}
|
|
147
206
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
148
207
|
/*cy.log('When the user has attempted the question with partially correct with all the cells correct as per the alternative accordion but one cell incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the response from the correct accordion, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
149
208
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -167,7 +226,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
167
226
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(2);
|
|
168
227
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
169
228
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
170
|
-
|
|
229
|
+
if (alternativeAnswerCheck) {
|
|
230
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
231
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
232
|
+
{
|
|
233
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
234
|
+
pointsText: '(20 points)',
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
238
|
+
pointsText: '(20 points)',
|
|
239
|
+
}
|
|
240
|
+
])
|
|
241
|
+
} else {
|
|
242
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
|
|
243
|
+
}
|
|
171
244
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
172
245
|
/*cy.log('When the user has attempted the question with partially correct with more number of options exclusively from the alternative accordion but with one option common across both accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the responses from the alternative accordion response as well as common response, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
173
246
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -191,7 +264,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
191
264
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(4);
|
|
192
265
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(5);
|
|
193
266
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
194
|
-
|
|
267
|
+
if (alternativeAnswerCheck) {
|
|
268
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
269
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
270
|
+
{
|
|
271
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
272
|
+
pointsText: '(20 points)',
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
276
|
+
pointsText: '(20 points)',
|
|
277
|
+
}
|
|
278
|
+
])
|
|
279
|
+
} else {
|
|
280
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
|
|
281
|
+
}
|
|
195
282
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
196
283
|
/*cy.log('When the user has attempted the question with partially correct with all the cells correctly attempted as per the alternative accordion but with an extra incorrect option and clicks on \'Check answer\' button, then correct icon should be displayed besides the responses from the alternative accordion response as well as common response, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
197
284
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -218,7 +305,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
218
305
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(3);
|
|
219
306
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
220
307
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
221
|
-
|
|
308
|
+
if (alternativeAnswerCheck) {
|
|
309
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
310
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
311
|
+
{
|
|
312
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
313
|
+
pointsText: '(20 points)',
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
317
|
+
pointsText: '(20 points)',
|
|
318
|
+
}
|
|
319
|
+
])
|
|
320
|
+
} else {
|
|
321
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
|
|
322
|
+
}
|
|
222
323
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
223
324
|
/*cy.log('When the user has attempted the question with partially correct such that more number of correct options are exclusively from the alternative accordion but with one option exclusively from the correct accordion in the same cell and clicks on \'Check answer\' button, then correct icon should be displayed besides the responses from the alternative accordions, incorrect icon should be displayed besides the responses from the correct accordion, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
224
325
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -242,7 +343,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
242
343
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
243
344
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
244
345
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
245
|
-
|
|
346
|
+
if (alternativeAnswerCheck) {
|
|
347
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
348
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
349
|
+
{
|
|
350
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
351
|
+
pointsText: '(20 points)',
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
355
|
+
pointsText: '(20 points)',
|
|
356
|
+
}
|
|
357
|
+
])
|
|
358
|
+
} else {
|
|
359
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
|
|
360
|
+
}
|
|
246
361
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
247
362
|
/*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 responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
248
363
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|