itemengine-cypress-automation 1.0.42 → 1.0.46
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsAllOrNothingAlternatePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsAllOrNothingCorrectPointsEqualToAlternatePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsTotalScoreDividedBetweenResponsesAlternatePointsGreaterThanCorrectPoints.js +114 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsTotalScoreDividedBetweenResponsesCorrectPointsEqualToAlternatePoints.js +168 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsTotalScoreDividedBetweenResponsesCorrectPointsGreaterThanAlternatePoints.js +112 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesStandardAllOrNothing.js → dragAndDropIntoCategoriesScoringFiles/standardAllOrNothing.js} +3 -29
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardAllOrNothingAlternatePointsGreaterThanCorrectPoints.js +33 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardAllOrNothingCorrectPointsEqualToAlternatePoints.js +35 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardAllOrNothingCorrectPointsGreaterThanAlternatePoints.js +33 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardPartialScoreForEachCell.js +39 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardPartialScoreForEachCellAlternatePointsGreaterThanCorrectPoints.js +42 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardPartialScoreForEachCellCorrectPointsEqualToAlternatePoints.js +49 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardPartialScoreForEachCellCorrectPointsGreaterThanAlternatePoints.js +42 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardPartialScoreForEachResponse.js +38 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardPartialScoreForEachResponseAlternatePointsGreaterThanCorrectPoints.js +41 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardPartialScoreForEachResponseCorrectPointsEqualToAlternatePoints.js +47 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardPartialScoreForEachResponseCorrectPointsGreaterThanAlternatePoints.js +41 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardTotalScoreDividedBetweenCell.js +57 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardTotalScoreDividedBetweenCellAlternatePointsGreaterThanCorrectPoints.js +43 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardTotalScoreDividedBetweenCellCorrectPointsEqualToAlternatePoints.js +49 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardTotalScoreDividedBetweenCellCorrectPointsGreaterThanAlternatePoints.js +43 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardTotalScoreDividedBetweenResponse.js +57 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardTotalScoreDividedBetweenResponseAlternatePointsGreaterThanCorrectPoints.js +114 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardTotalScoreDividedBetweenResponseCorrectPointsEqualToAlternatePoints.js +167 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardTotalScoreDividedBetweenResponseCorrectPointsGreaterThanAlternatePoints.js +112 -0
- package/cypress/pages/dragAndDropIntoCategoriesAllOrNothingScoring.js +5 -11
- package/package.json +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardPartialScoreForEachCell.js +0 -145
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardPartialScoreForEachResponse.js +0 -140
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardTotalScoreDividedBetweenCell.js +0 -165
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardTotalScoreDividedBetweenResponse.js +0 -420
@@ -0,0 +1,114 @@
|
|
1
|
+
import { dragAndDropIntoCategoriesCorrectResponseScoring } from "../../../../pages";
|
2
|
+
import { dragAndDropIntoCategoriesPage } from "../../../../pages/dragAndDropIntoCategoriesPage";
|
3
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
4
|
+
const cellNumerationArray = ['1', '2', '3', '4'];
|
5
|
+
|
6
|
+
describe('Create Item page - drag and drop into categories: Preview tab Scoring Section', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Question preview: AutoScored - Total score divided between each correct response with alternate answer: When \'Alternate answer\' points are more than \'Correct answer\' points', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
cy.log('Navigating to drag and drop into categories question type');
|
15
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
18
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(8);
|
19
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
20
|
+
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
21
|
+
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Total score divided between each correct response');
|
22
|
+
dragAndDropIntoCategoriesPage.steps.uncheckRoundDownScoreCheckbox();
|
23
|
+
dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
|
24
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
|
25
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
|
26
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
|
27
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
|
28
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
|
29
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
30
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
31
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
32
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
33
|
+
});
|
34
|
+
|
35
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(10);
|
36
|
+
|
37
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithCorrectTabAnswerOptions(8, 10);
|
38
|
+
|
39
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithAlternateTabAnswerOptions(10, 10);
|
40
|
+
|
41
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseWithAlternateAnswerPointsMoreThanCorrectAnswerPoints('Total score divided between each correct response');
|
42
|
+
|
43
|
+
it('Pre-step: Switching to Edit tab, setting more number of correct answer options in alternate tab than correct tab and allotting points to correct and alternate tab such that points achieved from attempting the question partially correct with correct tab mapping is more than the alternate tab mapping', () => {
|
44
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
45
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCorrectTab();
|
46
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfSetCorrectAnswerSection('Platypus');
|
47
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(11);
|
48
|
+
dragAndDropIntoCategoriesPage.steps.navigateToAlternateTab(1);
|
49
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 3)
|
50
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(12);
|
51
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
52
|
+
});
|
53
|
+
|
54
|
+
it('Overachiever case: When the user attempts the question partially correct with equal number of options from both the tabs in different cells and points achieved from the correct tab mapping is more than the alternate tab mapping then on selecting the \'Show correct answer\' checkbox, the points achieved should be according to the correct tab mapping, green check-mark icon should be displayed besides the correct answer responses from the correct tab, red cross-mark should be displayed besides the incorrect answer responses from the alternate tab and the correct answer section should display the incorrect/not attempted options from the correct tab along with category cell numeration', () => {
|
55
|
+
dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
|
56
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
|
57
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 3);
|
58
|
+
cy.log('User should be total score obtained by each correct response')
|
59
|
+
dragAndDropIntoCategoriesPage.previewScoreText()
|
60
|
+
.verifyInnerText('2.2/12');
|
61
|
+
dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
|
62
|
+
dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
|
63
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
64
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
65
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle', 'Parrot'], ['Whale'], ['Ostrich']], [2, 3, 4]);
|
66
|
+
cy.log('Correct/Incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
|
67
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
68
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
|
69
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
70
|
+
|
71
|
+
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
72
|
+
|
73
|
+
cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses from the correct tab, red cross-mark should be displayed besides the incorrect answer responses from the alternate tab and no correct answer section should be displayed')
|
74
|
+
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
75
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
76
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
77
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
|
78
|
+
cy.log('Correct/Incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
|
79
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
80
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
|
81
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
82
|
+
});
|
83
|
+
|
84
|
+
it('Overachiever case: When the user attempts the question partially correct with equal number of options from both the tabs in the same cell and points achieved from the correct tab mapping is more than the alternate tab mapping then on selecting the \'Show correct answer\' checkbox, the points achieved should be according to the correct tab mapping, green check-mark icon should be displayed besides the correct answer responses from the correct tab, red cross-mark should be displayed besides the incorrect answer responses from the alternate tab and the correct answer section should display the incorrect/not attempted options from the correct tab along with category cell numeration', () => {
|
85
|
+
dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
|
86
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
|
87
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
|
88
|
+
cy.log('User should be total score obtained by each correct response')
|
89
|
+
dragAndDropIntoCategoriesPage.previewScoreText()
|
90
|
+
.verifyInnerText('2.2/12');
|
91
|
+
dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
|
92
|
+
dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
|
93
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
94
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
95
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle', 'Parrot'], ['Whale'], ['Ostrich']], [2, 3, 4]);
|
96
|
+
cy.log('Correct/Incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
|
97
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
98
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
|
99
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
100
|
+
|
101
|
+
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
102
|
+
|
103
|
+
cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses from the correct tab, red cross-mark should be displayed besides the incorrect answer responses from the alternate tab and no correct answer section should be displayed')
|
104
|
+
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
105
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
106
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
107
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
|
108
|
+
cy.log('Correct/Incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
|
109
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
110
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
|
111
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
112
|
+
});
|
113
|
+
});
|
114
|
+
});
|
@@ -0,0 +1,167 @@
|
|
1
|
+
import { dragAndDropIntoCategoriesCorrectResponseScoring } from "../../../../pages";
|
2
|
+
import { dragAndDropIntoCategoriesPage } from "../../../../pages/dragAndDropIntoCategoriesPage";
|
3
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
4
|
+
const cellNumerationArray = ['1', '2', '3', '4'];
|
5
|
+
|
6
|
+
describe('Create Item page - drag and drop into categories: Preview tab Scoring Section', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Question preview: AutoScored - Total score divided between each correct response with alternate answer: When \'Alternate answer\' points is equal to \'Correct answer\' points', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
cy.log('Navigating to drag and drop into categories question type');
|
15
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
18
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
19
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
20
|
+
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
21
|
+
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Total score divided between each correct response');
|
22
|
+
dragAndDropIntoCategoriesPage.steps.uncheckRoundDownScoreCheckbox();
|
23
|
+
dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
|
24
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
|
25
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
|
26
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
|
27
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
|
28
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
|
29
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
30
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
31
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
32
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
33
|
+
});
|
34
|
+
|
35
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(10);
|
36
|
+
|
37
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithCorrectTabAnswerOptions(10, 10);
|
38
|
+
|
39
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithAlternateTabAnswerOptions(10, 10);
|
40
|
+
|
41
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseWithAlternateAnswerPointsEqualToCorrectAnswerPoints('Total score divided between each correct response');
|
42
|
+
|
43
|
+
it('Resetting the alternate correct answer options according to original mapping', () => {
|
44
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
45
|
+
dragAndDropIntoCategoriesPage.steps.navigateToAlternateTab(1);
|
46
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfSetCorrectAnswerSection('Platypus');
|
47
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
48
|
+
});
|
49
|
+
|
50
|
+
it('When the user attempts the question partially correct with equal number of correct options exclusively from the alternate tab and correct tab in the different cell then on selecting the \'Show correct answer\' checkbox, the points provided should be of the total points obtained by each correct response from the alternate tab mapping, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer response from the correct tab and the correct answer section should display the incorrect/not attempted options from the alternate tab along with category cell numeration', () => {
|
51
|
+
dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
|
52
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
|
53
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
|
54
|
+
cy.log('User should be total score obtained by each correct response')
|
55
|
+
dragAndDropIntoCategoriesPage.previewScoreText()
|
56
|
+
.verifyInnerText('2/10');
|
57
|
+
dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
|
58
|
+
dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
|
59
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
60
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
61
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle'], ['Whale', 'Parrot'], ['Ostrich']], [2, 3, 4]);
|
62
|
+
cy.log('correct/incorrect border and icon for cell should not be displayed, correct answer border for the question and label should not be displayed below the question preview')
|
63
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
64
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
|
65
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
66
|
+
|
67
|
+
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
68
|
+
|
69
|
+
cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses and no correct answer section should be displayed')
|
70
|
+
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
71
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
72
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
73
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
|
74
|
+
cy.log('correct/incorrect border and icon for cell should not be displayed, correct answer border for the question and label should not be displayed below the question preview')
|
75
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
76
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
|
77
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
78
|
+
});
|
79
|
+
|
80
|
+
it('When the user attempts the question partially correct with equal number of correct options exclusively from the alternate tab and correct tab in the same cell then on selecting the \'Show correct answer\' checkbox, the points provided should be of the total points obtained by each correct response from the alternate tab mapping, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer response from the correct tab and the correct answer section should display the incorrect/not attempted options from the alternate tab along with category cell numeration', () => {
|
81
|
+
dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
|
82
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
|
83
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
|
84
|
+
cy.log('User should be total score obtained by each correct response')
|
85
|
+
dragAndDropIntoCategoriesPage.previewScoreText()
|
86
|
+
.verifyInnerText('2/10');
|
87
|
+
dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
|
88
|
+
dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
|
89
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
90
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
91
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle'], ['Whale', 'Parrot'], ['Ostrich']], [2, 3, 4]);
|
92
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
93
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
|
94
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
95
|
+
|
96
|
+
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
97
|
+
|
98
|
+
cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer response from the correct tab and no correct answer section should be displayed')
|
99
|
+
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
100
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
101
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
102
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
|
103
|
+
cy.log('correct/incorrect border and icon for cell should not be displayed, correct answer border for the question and label should not be displayed below the question preview')
|
104
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
105
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
|
106
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
107
|
+
});
|
108
|
+
|
109
|
+
it('Pre-step: Switching to Edit tab, setting only one correct answer option in alternate tab such that points achieved from attempting the question partially correct with alternate tab mapping is more than the correct tab mapping', () => {
|
110
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
111
|
+
dragAndDropIntoCategoriesPage.steps.navigateToAlternateTab(1);
|
112
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfSetCorrectAnswerSection('Eagle');
|
113
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfSetCorrectAnswerSection('Parrot');
|
114
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfSetCorrectAnswerSection('Whale');
|
115
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfSetCorrectAnswerSection('Ostrich');
|
116
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
117
|
+
});
|
118
|
+
|
119
|
+
it('Overachiever case: When the user attempts the question partially correct with more number of options from the the correct tab but one option exclusively from the alternate tab and points achieved from the alternate tab mapping is more than the correct tab mapping then on selecting the \'Show correct answer\' checkbox, the points achieved should be according to the alternate tab mapping, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses from the correct tab and no correct answer section should be displayed', () => {
|
120
|
+
dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
|
121
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
|
122
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
|
123
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 1);
|
124
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
|
125
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
|
126
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
|
127
|
+
cy.log('User should be awarded full points')
|
128
|
+
dragAndDropIntoCategoriesPage.previewScoreText()
|
129
|
+
.verifyInnerText('10/10');
|
130
|
+
dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
|
131
|
+
dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
|
132
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
133
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
134
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
|
135
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(3);
|
136
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(4);
|
137
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(5);
|
138
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
|
139
|
+
cy.log('correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
|
140
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
141
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
|
142
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
143
|
+
|
144
|
+
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
145
|
+
|
146
|
+
cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses from the correct tab and no correct answer section should be displayed')
|
147
|
+
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
148
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
149
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
150
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
|
151
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(3);
|
152
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(4);
|
153
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(5);
|
154
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
|
155
|
+
cy.log('correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
|
156
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
157
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
|
158
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
159
|
+
});
|
160
|
+
|
161
|
+
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(10);
|
162
|
+
|
163
|
+
dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsFunctionalityForIncorrectAnswer(3.67, 10);
|
164
|
+
|
165
|
+
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedAndPenaltyPointsFunctionalityForIncorrectAnswer([1, 3.67, 6], 6, 10);
|
166
|
+
});
|
167
|
+
});
|
@@ -0,0 +1,112 @@
|
|
1
|
+
import { dragAndDropIntoCategoriesCorrectResponseScoring } from "../../../../pages";
|
2
|
+
import { dragAndDropIntoCategoriesPage } from "../../../../pages/dragAndDropIntoCategoriesPage";
|
3
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
4
|
+
const cellNumerationArray = ['1', '2', '3', '4'];
|
5
|
+
|
6
|
+
describe('Create Item page - drag and drop into categories: Preview tab Scoring Section', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Question preview: AutoScored - Total score divided between each correct response with alternate answer: When \'Correct answer\' points are more than \'Alternate answer\' points', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
cy.log('Navigating to drag and drop into categories question type');
|
15
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
18
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
19
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
20
|
+
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
21
|
+
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Total score divided between each correct response');
|
22
|
+
dragAndDropIntoCategoriesPage.steps.uncheckRoundDownScoreCheckbox();
|
23
|
+
dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
|
24
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
|
25
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
|
26
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
|
27
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
|
28
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
|
29
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(6);
|
30
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
31
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
32
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
33
|
+
});
|
34
|
+
|
35
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(10);
|
36
|
+
|
37
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithCorrectTabAnswerOptions(10, 10);
|
38
|
+
|
39
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithAlternateTabAnswerOptions(6, 10);
|
40
|
+
|
41
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseWithCorrectAnswerPointsMoreThanAlternateAnswerPoints('Total score divided between each correct response');
|
42
|
+
|
43
|
+
it('Pre-step: Switching to Edit tab and allotting points to correct and alternate tab such points achieved from the alternate tab mapping is more than the correct tab mapping', () => {
|
44
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
45
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCorrectTab();
|
46
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(12);
|
47
|
+
dragAndDropIntoCategoriesPage.steps.navigateToAlternateTab(1);
|
48
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(11);
|
49
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
50
|
+
});
|
51
|
+
|
52
|
+
it('Overachiever case: When the user attempts the question partially correct with equal number of options from both the tabs in different cells and points achieved from the alternate tab mapping is more than the correct tab mapping then on selecting the \'Show correct answer\' checkbox, the points achieved should be according to the alternate tab mapping, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses from the correct tab and the correct answer section should display the incorrect/not attempted options from the correct tab along with category cell numeration', () => {
|
53
|
+
dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
|
54
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
|
55
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
|
56
|
+
cy.log('User should be total score obtained by each correct response')
|
57
|
+
dragAndDropIntoCategoriesPage.previewScoreText()
|
58
|
+
.verifyInnerText('2.2/12');
|
59
|
+
dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
|
60
|
+
dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
|
61
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
62
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
63
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle'], ['Whale', 'Parrot'], ['Ostrich']], [2, 3, 4]);
|
64
|
+
cy.log('Correct/Incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
|
65
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
66
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
|
67
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
68
|
+
|
69
|
+
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
70
|
+
|
71
|
+
cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses from the correct tab and no correct answer section should be displayed')
|
72
|
+
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
73
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
74
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
75
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
|
76
|
+
cy.log('Correct/Incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
|
77
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
78
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
|
79
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
80
|
+
});
|
81
|
+
|
82
|
+
it('Overachiever case: When the user attempts the question partially correct with equal number of options from both the tabs in the same cell and points achieved from the alternate tab mapping is more than the correct tab mapping then on selecting the \'Show correct answer\' checkbox, the points achieved should be according to the alternate tab mapping, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses from the correct tab and the correct answer section should display the incorrect/not attempted options from the correct tab along with category cell numeration', () => {
|
83
|
+
dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
|
84
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
|
85
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
|
86
|
+
cy.log('User should be total score obtained by each correct response')
|
87
|
+
dragAndDropIntoCategoriesPage.previewScoreText()
|
88
|
+
.verifyInnerText('2.2/12');
|
89
|
+
dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
|
90
|
+
dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
|
91
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
92
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
93
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle'], ['Whale', 'Parrot'], ['Ostrich']], [2, 3, 4]);
|
94
|
+
cy.log('Correct/Incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
|
95
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
96
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
|
97
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
98
|
+
|
99
|
+
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
100
|
+
|
101
|
+
cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses from the correct tab and no correct answer section should be displayed')
|
102
|
+
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
103
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
104
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
105
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
|
106
|
+
cy.log('Correct/Incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
|
107
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
108
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
|
109
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
110
|
+
});
|
111
|
+
});
|
112
|
+
});
|
@@ -306,7 +306,7 @@ const tests = {
|
|
306
306
|
|
307
307
|
},
|
308
308
|
|
309
|
-
|
309
|
+
verifyAutoScoredAllOrNothingWithAlternateAnswerWhenCorrectPointsAreGreaterThanAlternatePoints: () => {
|
310
310
|
it('Alternate answer case: When \'Correct answer\' points are more than \'Alternate answer\' points', () => {
|
311
311
|
cy.log('Total points displayed besides Show correct answer checkbox should be of Correct answer points')
|
312
312
|
previewScoringAndShowCorrectAnswerComponent.previewScoreText()
|
@@ -584,13 +584,10 @@ const tests = {
|
|
584
584
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
585
585
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
|
586
586
|
});
|
587
|
+
},
|
587
588
|
|
589
|
+
verifyAutoScoredAllOrNothingWithAlternateAnswerWhenCorrectPointsAreLessThanAlternatePoints: () => {
|
588
590
|
it('Alternate answer case: When \'Alternate answer\' points are more than \'Correct answer\' points', () => {
|
589
|
-
cy.log('Pre step: Switching to edit tab and allotting more points to alternate tab')
|
590
|
-
createQuestionBasePage.steps.switchToEditTab();
|
591
|
-
scoringSectionBase.steps.allotPoints(15);
|
592
|
-
createQuestionBasePage.steps.switchToPreviewTab();
|
593
|
-
|
594
591
|
cy.log('Total points displayed besides Show correct answer checkbox should be of Correct Answer points')
|
595
592
|
previewScoringAndShowCorrectAnswerComponent.previewScoreText()
|
596
593
|
.verifyInnerText('0/15');
|
@@ -870,13 +867,10 @@ const tests = {
|
|
870
867
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
871
868
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
|
872
869
|
});
|
870
|
+
},
|
873
871
|
|
872
|
+
verifyAutoScoredAllOrNothingWithAlternateAnswerWhenCorrectPointsAreEqualToAlternatePoints: () => {
|
874
873
|
it('Alternate answer case: When \'Alternate answer\' points and \'Correct answer\' points both are equal', () => {
|
875
|
-
cy.log('Pre step: Switching to edit tab and allotting more points to alternate tab')
|
876
|
-
createQuestionBasePage.steps.switchToEditTab();
|
877
|
-
scoringSectionBase.steps.allotPoints(10);
|
878
|
-
createQuestionBasePage.steps.switchToPreviewTab();
|
879
|
-
|
880
874
|
cy.log('Total points displayed besides Show correct answer checkbox should be of Correct Answer points')
|
881
875
|
previewScoringAndShowCorrectAnswerComponent.previewScoreText()
|
882
876
|
.verifyInnerText('0/10');
|
package/package.json
CHANGED
@@ -1,145 +0,0 @@
|
|
1
|
-
import { dragAndDropIntoCategoriesCellsScoring } from "../../../pages/dragAndDropIntoCategoriesCellsScoring";
|
2
|
-
import { dragAndDropIntoCategoriesPage } from "../../../pages/dragAndDropIntoCategoriesPage";
|
3
|
-
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
-
|
5
|
-
describe('Create Item page - drag and drop into categories: Preview tab Scoring Section', () => {
|
6
|
-
before(() => {
|
7
|
-
cy.loginAs('admin');
|
8
|
-
});
|
9
|
-
|
10
|
-
describe('Question preview: AutoScored: Partial - score for each cell', () => {
|
11
|
-
abortEarlySetup();
|
12
|
-
before(() => {
|
13
|
-
cy.log('Navigating to drag and drop into categories question type');
|
14
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
15
|
-
cy.barsPreLoaderWait();
|
16
|
-
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
17
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
18
|
-
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
19
|
-
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
20
|
-
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each cell');
|
21
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
22
|
-
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
23
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
24
|
-
});
|
25
|
-
|
26
|
-
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(40);
|
27
|
-
|
28
|
-
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnClickingCheckAnswerWithoutAttempting();
|
29
|
-
|
30
|
-
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCell('Partial - score for each cell');
|
31
|
-
|
32
|
-
//https://redmine.zeuslearning.com/issues/536492
|
33
|
-
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(40);
|
34
|
-
|
35
|
-
dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsFunctionalityForIncorrectAnswer(14, 40);
|
36
|
-
|
37
|
-
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedAndPenaltyPointsFunctionalityForIncorrectAnswer([1, 14, 12], 12, 10);
|
38
|
-
});
|
39
|
-
|
40
|
-
describe('Question preview: AutoScored - Partial - score for each cell with alternate answer: When \'Correct answer\' points are more than \'Alternate answer\' points', () => {
|
41
|
-
abortEarlySetup();
|
42
|
-
before(() => {
|
43
|
-
cy.log('Navigating to drag and drop into categories question type');
|
44
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
45
|
-
cy.barsPreLoaderWait();
|
46
|
-
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
47
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
48
|
-
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
49
|
-
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
50
|
-
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each cell');
|
51
|
-
dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
|
52
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
|
53
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Peacock', 1);
|
54
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Falcon', 1);
|
55
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 2);
|
56
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
|
57
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
|
58
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints(8);
|
59
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
60
|
-
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
61
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
62
|
-
});
|
63
|
-
|
64
|
-
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(40);
|
65
|
-
|
66
|
-
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithCorrectTabAnswerOptions(40, 40);
|
67
|
-
|
68
|
-
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithAlternateTabAnswerOptions(32, 40);
|
69
|
-
|
70
|
-
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellWithCorrectAnswerPointsMoreThanAlternateAnswerPoints('Partial - score for each cell');
|
71
|
-
});
|
72
|
-
|
73
|
-
describe('Question preview: AutoScored - Partial - score for each cell with alternate answer: When \'Alternate answer\' points are more than \'Correct answer\' points', () => {
|
74
|
-
abortEarlySetup();
|
75
|
-
before(() => {
|
76
|
-
cy.log('Navigating to drag and drop into categories question type');
|
77
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
78
|
-
cy.barsPreLoaderWait();
|
79
|
-
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
80
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints(8);
|
81
|
-
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
82
|
-
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
83
|
-
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each cell');
|
84
|
-
dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
|
85
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
|
86
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Peacock', 1);
|
87
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Falcon', 1);
|
88
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 2);
|
89
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
|
90
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
|
91
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
92
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
93
|
-
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
94
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
95
|
-
});
|
96
|
-
|
97
|
-
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(40);
|
98
|
-
|
99
|
-
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithCorrectTabAnswerOptions(32, 40);
|
100
|
-
|
101
|
-
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithAlternateTabAnswerOptions(40, 40);
|
102
|
-
|
103
|
-
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellWithAlternateAnswerPointsMoreThanCorrectAnswerPoints('Partial - score for each cell');
|
104
|
-
});
|
105
|
-
|
106
|
-
describe('Question preview: AutoScored - Partial - score for each cell with alternate answer: When \'Alternate answer\' points is equal to \'Correct answer\' points', () => {
|
107
|
-
abortEarlySetup();
|
108
|
-
before(() => {
|
109
|
-
cy.log('Navigating to drag and drop into categories question type');
|
110
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
111
|
-
cy.barsPreLoaderWait();
|
112
|
-
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
113
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
114
|
-
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
115
|
-
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
116
|
-
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each cell');
|
117
|
-
dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
|
118
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
|
119
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Peacock', 1);
|
120
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Falcon', 1);
|
121
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 2);
|
122
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
|
123
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
|
124
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
125
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
126
|
-
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
127
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
128
|
-
});
|
129
|
-
|
130
|
-
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(40);
|
131
|
-
|
132
|
-
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithCorrectTabAnswerOptions(40, 40);
|
133
|
-
|
134
|
-
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithAlternateTabAnswerOptions(40, 40);
|
135
|
-
|
136
|
-
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellWithAlternateAnswerPointsEqualToCorrectAnswerPoints('Partial - score for each cell');
|
137
|
-
|
138
|
-
//https://redmine.zeuslearning.com/issues/536492
|
139
|
-
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(40);
|
140
|
-
|
141
|
-
dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsFunctionalityForIncorrectAnswer(14, 40);
|
142
|
-
|
143
|
-
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedAndPenaltyPointsFunctionalityForIncorrectAnswer([1, 14, 12], 12, 40);
|
144
|
-
});
|
145
|
-
});
|