itemengine-cypress-automation 1.0.581-IEI-7178-328dd33.0 → 1.0.581-IEI-7046-ec54625.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/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +2 -30
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +2 -30
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +2 -30
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingWeightsBasic.js +7 -7
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +3 -130
- package/cypress/e2e/ILC/dataApi/fetchQuestion.js +39 -0
- package/cypress/e2e/ILC/dataApi/saveQuestions.js +53 -0
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +38 -0
- package/cypress/pages/shortTextResponsePage.js +6 -20
- package/package.json +1 -1
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { dragAndDropIntoCategoriesPage } from "../../../../pages";
|
|
2
|
+
import { showAlternativeAnswersComponent } from "../../../../pages/components";
|
|
2
3
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
4
|
import utilities from "../../../../support/helpers/utilities";
|
|
4
5
|
const css = Cypress.env('css');
|
|
5
6
|
|
|
7
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
8
|
+
|
|
6
9
|
describe('Create item page - Drag and drop into categories: All or nothing with alternative answers', () => {
|
|
7
10
|
before(() => {
|
|
8
11
|
cy.loginAs('admin');
|
|
@@ -32,16 +35,32 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
32
35
|
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
|
33
36
|
dragAndDropIntoCategoriesPage.steps.verifyDropzoneCellNumeration(['1', '2', '3', '4', '5', '6']);
|
|
34
37
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
if (alternativeAnswerCheck) {
|
|
39
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
40
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
41
|
+
{
|
|
42
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
43
|
+
pointsText: '(20 points)',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
47
|
+
pointsText: '(10 points)',
|
|
48
|
+
}
|
|
49
|
+
]);;
|
|
50
|
+
} else {
|
|
51
|
+
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.correctAnswersLabel(), 'Correct answers');
|
|
52
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
|
|
53
|
+
}
|
|
37
54
|
});
|
|
38
55
|
|
|
39
56
|
it('CSS of correct answer section and dropzone cell numeration', { tags: 'css' }, () => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
57
|
+
if (!alternativeAnswerCheck) {
|
|
58
|
+
utilities.verifyCSS(dragAndDropIntoCategoriesPage.correctAnswersLabel(), {
|
|
59
|
+
'color': css.color.sectionHeading,
|
|
60
|
+
'font-size': css.fontSize.default,
|
|
61
|
+
'font-weight': css.fontWeight.bold
|
|
62
|
+
});
|
|
63
|
+
}
|
|
45
64
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.dropzoneCellNumeration(), {
|
|
46
65
|
'background-color': css.color.liTextSelectedBg,
|
|
47
66
|
'border': `1px solid ${css.color.optionsSelectedText}`
|
|
@@ -162,7 +181,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
162
181
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
163
182
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
164
183
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
165
|
-
|
|
184
|
+
if (alternativeAnswerCheck) {
|
|
185
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
186
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
187
|
+
{
|
|
188
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
189
|
+
pointsText: '(20 points)',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
193
|
+
pointsText: '(10 points)',
|
|
194
|
+
}
|
|
195
|
+
]);
|
|
196
|
+
} else {
|
|
197
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
|
|
198
|
+
}
|
|
166
199
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
167
200
|
/*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')
|
|
168
201
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -184,7 +217,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
184
217
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
185
218
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
186
219
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
187
|
-
|
|
220
|
+
if (alternativeAnswerCheck) {
|
|
221
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
222
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
223
|
+
{
|
|
224
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
225
|
+
pointsText: '(20 points)',
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
229
|
+
pointsText: '(10 points)',
|
|
230
|
+
}
|
|
231
|
+
]);
|
|
232
|
+
} else {
|
|
233
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
|
|
234
|
+
}
|
|
188
235
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
189
236
|
/*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')
|
|
190
237
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -206,7 +253,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
206
253
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(3);
|
|
207
254
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
208
255
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
209
|
-
|
|
256
|
+
if (alternativeAnswerCheck) {
|
|
257
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
258
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
259
|
+
{
|
|
260
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
261
|
+
pointsText: '(20 points)',
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
265
|
+
pointsText: '(10 points)',
|
|
266
|
+
}
|
|
267
|
+
]);
|
|
268
|
+
} else {
|
|
269
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
|
|
270
|
+
}
|
|
210
271
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
211
272
|
/*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, incorrect icon should be displayed besides the responses from the alternative accordion, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
212
273
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -230,7 +291,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
230
291
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(2);
|
|
231
292
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
232
293
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
233
|
-
|
|
294
|
+
if (alternativeAnswerCheck) {
|
|
295
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
296
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
297
|
+
{
|
|
298
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
299
|
+
pointsText: '(20 points)',
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
303
|
+
pointsText: '(10 points)',
|
|
304
|
+
}
|
|
305
|
+
]);
|
|
306
|
+
} else {
|
|
307
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
|
|
308
|
+
}
|
|
234
309
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
235
310
|
/*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 response from the correct accordion, incorrect icon should be displayed besides the responses from the alternative accordion, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
236
311
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -254,7 +329,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
254
329
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(4);
|
|
255
330
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(5);
|
|
256
331
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
257
|
-
|
|
332
|
+
if (alternativeAnswerCheck) {
|
|
333
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
334
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
335
|
+
{
|
|
336
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
337
|
+
pointsText: '(20 points)',
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
341
|
+
pointsText: '(10 points)',
|
|
342
|
+
}
|
|
343
|
+
]);
|
|
344
|
+
} else {
|
|
345
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
|
|
346
|
+
}
|
|
258
347
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
259
348
|
/*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 response from the correct accordion, incorrect icon should be displayed besides the responses from the alternative accordion, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
260
349
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -280,7 +369,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
280
369
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(3);
|
|
281
370
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
282
371
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
283
|
-
|
|
372
|
+
if (alternativeAnswerCheck) {
|
|
373
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
374
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
375
|
+
{
|
|
376
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
377
|
+
pointsText: '(20 points)',
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
381
|
+
pointsText: '(10 points)',
|
|
382
|
+
}
|
|
383
|
+
]);
|
|
384
|
+
} else {
|
|
385
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
|
|
386
|
+
}
|
|
284
387
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
285
388
|
/*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 response from the correct accordion, incorrect icon should be displayed besides the responses from the alternative accordion, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
286
389
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -304,7 +407,21 @@ describe('Create item page - Drag and drop into categories: All or nothing with
|
|
|
304
407
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
305
408
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
306
409
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
307
|
-
|
|
410
|
+
if (alternativeAnswerCheck) {
|
|
411
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
412
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
413
|
+
{
|
|
414
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
415
|
+
pointsText: '(20 points)',
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], [], []],
|
|
419
|
+
pointsText: '(10 points)',
|
|
420
|
+
}
|
|
421
|
+
]);
|
|
422
|
+
} else {
|
|
423
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
|
|
424
|
+
}
|
|
308
425
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
309
426
|
/*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')
|
|
310
427
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { dragAndDropIntoCategoriesPage } from "../../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
|
+
import { showAlternativeAnswersComponent } from "../../../../pages/components";
|
|
4
|
+
|
|
5
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
3
6
|
|
|
4
7
|
describe('Create item page - Drag and drop into categories: Per correct option with alternative answers', () => {
|
|
5
8
|
before(() => {
|
|
@@ -31,7 +34,21 @@ describe('Create item page - Drag and drop into categories: Per correct option w
|
|
|
31
34
|
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
|
32
35
|
dragAndDropIntoCategoriesPage.steps.verifyDropzoneCellNumeration(['1', '2', '3', '4', '5', '6']);
|
|
33
36
|
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(0, 30);
|
|
34
|
-
|
|
37
|
+
if (alternativeAnswerCheck) {
|
|
38
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
39
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
40
|
+
{
|
|
41
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
|
|
42
|
+
pointsText: '(Points per correct option - 5 points)',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
46
|
+
pointsText: '(Points per correct option - 3 points)',
|
|
47
|
+
}
|
|
48
|
+
]);
|
|
49
|
+
} else {
|
|
50
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []], ['1', '2', '4', '5', '6', '3']);
|
|
51
|
+
}
|
|
35
52
|
});
|
|
36
53
|
|
|
37
54
|
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 and proper icon should display beside empty container, correct/incorrect answer status message should not be displayed and correct answer section should not be displayed', () => {
|
|
@@ -99,7 +116,21 @@ describe('Create item page - Drag and drop into categories: Per correct option w
|
|
|
99
116
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(3);
|
|
100
117
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
101
118
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
102
|
-
|
|
119
|
+
if (alternativeAnswerCheck) {
|
|
120
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
121
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
122
|
+
{
|
|
123
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
|
|
124
|
+
pointsText: '(Points per correct option - 5 points)',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
128
|
+
pointsText: '(Points per correct option - 3 points)',
|
|
129
|
+
}
|
|
130
|
+
]);
|
|
131
|
+
} else {
|
|
132
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []], ['1', '2', '4', '5', '6', '3']);
|
|
133
|
+
}
|
|
103
134
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
104
135
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
105
136
|
/*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, correct/incorrect answer status message and correct answer section should not be displayed')
|
|
@@ -122,7 +153,21 @@ describe('Create item page - Drag and drop into categories: Per correct option w
|
|
|
122
153
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
123
154
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(5);
|
|
124
155
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
125
|
-
|
|
156
|
+
if (alternativeAnswerCheck) {
|
|
157
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
158
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
159
|
+
{
|
|
160
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
|
|
161
|
+
pointsText: '(Points per correct option - 5 points)',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
165
|
+
pointsText: '(Points per correct option - 3 points)',
|
|
166
|
+
}
|
|
167
|
+
]);
|
|
168
|
+
} else {
|
|
169
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []], ['1', '2', '4', '5', '6', '3']);
|
|
170
|
+
}
|
|
126
171
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
127
172
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect answer status message and correct answer section should not be displayed')
|
|
128
173
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -144,7 +189,21 @@ describe('Create item page - Drag and drop into categories: Per correct option w
|
|
|
144
189
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
145
190
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
146
191
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
147
|
-
|
|
192
|
+
if (alternativeAnswerCheck) {
|
|
193
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
194
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
195
|
+
{
|
|
196
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
|
|
197
|
+
pointsText: '(Points per correct option - 5 points)',
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
201
|
+
pointsText: '(Points per correct option - 3 points)',
|
|
202
|
+
}
|
|
203
|
+
]);
|
|
204
|
+
} else {
|
|
205
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []], ['1', '2', '4', '5', '6', '3']);
|
|
206
|
+
}
|
|
148
207
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
149
208
|
/*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 correct answer responses, correct/incorrect answer status message and correct answer section should not be displayed')
|
|
150
209
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -169,7 +228,21 @@ describe('Create item page - Drag and drop into categories: Per correct option w
|
|
|
169
228
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
170
229
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
171
230
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
172
|
-
|
|
231
|
+
if (alternativeAnswerCheck) {
|
|
232
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
233
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
234
|
+
{
|
|
235
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
|
|
236
|
+
pointsText: '(Points per correct option - 5 points)',
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
240
|
+
pointsText: '(Points per correct option - 3 points)',
|
|
241
|
+
}
|
|
242
|
+
]);
|
|
243
|
+
} else {
|
|
244
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []], ['1', '2', '4', '5', '6', '3']);
|
|
245
|
+
}
|
|
173
246
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
174
247
|
/*cy.log('When the user has attempted the question with 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 correct answer responses, correct/incorrect answer status message and correct answer section should not be displayed')
|
|
175
248
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -222,7 +295,21 @@ describe('Create item page - Drag and drop into categories: Per correct option w
|
|
|
222
295
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
223
296
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIconForEmptyContainer(5);
|
|
224
297
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
225
|
-
|
|
298
|
+
if (alternativeAnswerCheck) {
|
|
299
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
300
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
301
|
+
{
|
|
302
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
|
|
303
|
+
pointsText: '(Points per correct option - 5 points)',
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
307
|
+
pointsText: '(Points per correct option - 3 points)',
|
|
308
|
+
}
|
|
309
|
+
]);
|
|
310
|
+
} else {
|
|
311
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []], ['1', '2', '4', '5', '6', '3']);
|
|
312
|
+
}
|
|
226
313
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
227
314
|
/*cy.log('When the user has attempted the question with 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 dropzone and clicks on \'Check answer\' button, correct icon should be displayed besides the correct accordion response, incorrect icon should be displayed besides the alternative accordion response, correct/incorrect answer status message and correct answer section should not be displayed')
|
|
228
315
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -246,7 +333,21 @@ describe('Create item page - Drag and drop into categories: Per correct option w
|
|
|
246
333
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
247
334
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(5);
|
|
248
335
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
249
|
-
|
|
336
|
+
if (alternativeAnswerCheck) {
|
|
337
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
338
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
339
|
+
{
|
|
340
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
|
|
341
|
+
pointsText: '(Points per correct option - 5 points)',
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
345
|
+
pointsText: '(Points per correct option - 3 points)',
|
|
346
|
+
}
|
|
347
|
+
]);
|
|
348
|
+
} else {
|
|
349
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []], ['1', '2', '4', '5', '6', '3']);
|
|
350
|
+
}
|
|
250
351
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
251
352
|
/*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, correct/incorrect answer status message and correct answer section should not be displayed')
|
|
252
353
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -273,7 +374,21 @@ describe('Create item page - Drag and drop into categories: Per correct option w
|
|
|
273
374
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
274
375
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(5);
|
|
275
376
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
276
|
-
|
|
377
|
+
if (alternativeAnswerCheck) {
|
|
378
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
379
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
380
|
+
{
|
|
381
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
|
|
382
|
+
pointsText: '(Points per correct option - 5 points)',
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
386
|
+
pointsText: '(Points per correct option - 3 points)',
|
|
387
|
+
}
|
|
388
|
+
]);
|
|
389
|
+
} else {
|
|
390
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []], ['1', '2', '4', '5', '6', '3']);
|
|
391
|
+
}
|
|
277
392
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
278
393
|
/*cy.log('When the user has attempted the question partially correct such that more number of options are exclusively from the correct accordion but with one option common across both the accordions and clicks on \'Check answer\' button, then the correct icon should be displayed besides the common correct answer responses, incorrect icon should be displayed besides correct accordion responses, correct/incorrect answer status message and correct answer section should not be displayed')
|
|
279
394
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
|
@@ -297,7 +412,21 @@ describe('Create item page - Drag and drop into categories: Per correct option w
|
|
|
297
412
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(4);
|
|
298
413
|
dragAndDropIntoCategoriesPage.steps.verifyIncorrectIconForEmptyContainer(5);
|
|
299
414
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
300
|
-
|
|
415
|
+
if (alternativeAnswerCheck) {
|
|
416
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
417
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInAlternateAnswerSection([
|
|
418
|
+
{
|
|
419
|
+
correctAnswers: [['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []],
|
|
420
|
+
pointsText: '(Points per correct option - 5 points)',
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
correctAnswers: [['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []],
|
|
424
|
+
pointsText: '(Points per correct option - 3 points)',
|
|
425
|
+
}
|
|
426
|
+
]);
|
|
427
|
+
} else {
|
|
428
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus'], []], ['1', '2', '4', '5', '6', '3']);
|
|
429
|
+
}
|
|
301
430
|
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
302
431
|
/*cy.log('When the user has attempted the question partially correct such that more number of options are exclusively from the correct accordion but with one option exclusively from the alternative accordion in the same dropzone 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, correct/incorrect answer status message and correct answer section should not be displayed')
|
|
303
432
|
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|