itemengine-cypress-automation 1.0.583-IEI-7048-71a8251.0 → 1.0.583
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/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +4 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +109 -8
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +109 -8
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +109 -8
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/blankResponseScoring.js +7 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +139 -10
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +4 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +124 -9
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +139 -10
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +4 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +124 -9
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +109 -8
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +124 -9
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +243 -2
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -77
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +1 -78
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -78
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +9 -104
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsBasic.js +0 -4
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -95
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -95
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -84
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsBasic.js +0 -4
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -73
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -84
- package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +2 -187
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +1 -79
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -79
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -79
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +0 -4
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -103
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +0 -4
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -103
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -103
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -91
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +0 -4
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -79
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -91
- package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +5 -209
- package/cypress/e2e/ILC/ListOrderingNew/horizontalOrientationAllOrNothingForAllViews.smoke.js +1 -195
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -103
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -85
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -82
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -85
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +6 -109
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsBasic.js +0 -4
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -103
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -103
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -91
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsBasic.js +0 -4
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -79
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -91
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/allOrNothingForAllViews.smoke.js +3 -203
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingGroupedScoring.js +1 -9
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -102
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +2 -102
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -107
- package/cypress/e2e/ILC/Matching/Scoring/blankResponseScoring.js +2 -36
- package/cypress/e2e/ILC/Matching/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +0 -5
- package/cypress/e2e/ILC/Matching/Scoring/manuallyAndNonScored.js +0 -1
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +1 -10
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -128
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +2 -115
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -128
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsBasic.js +1 -9
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -115
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +2 -102
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -115
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +2 -226
- package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +1 -9
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -102
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +2 -102
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -102
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/blankResponseScoring.js +5 -32
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/manuallyAndNonScored.js +0 -3
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsScoringBasic.js +1 -10
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -128
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternatePoints.js +2 -115
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternatePoints.js +2 -128
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsBasic.js +1 -9
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -115
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +2 -102
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -115
- package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +2 -216
- package/cypress/pages/components/correctIncorrectAnswerLabelComponent.js +1 -18
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +25 -1
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +38 -0
- package/cypress/pages/listOrderingPage.js +1 -60
- package/cypress/pages/matchingPage.js +1 -23
- package/package.json +1 -1
|
@@ -4,7 +4,6 @@ import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
|
4
4
|
let options = ['sprout', 'plant', 'flower', 'seed'];
|
|
5
5
|
let correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
|
|
6
6
|
let alternateCorrectAnswerArray = ['seed', 'flower', 'sprout', 'plant'];
|
|
7
|
-
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
8
7
|
|
|
9
8
|
describe('Create Item page - List ordering: Partial equal weights scoring with alternative answer - When alternative answer points are equal to correct answer points', () => {
|
|
10
9
|
before(() => {
|
|
@@ -38,17 +37,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
|
|
|
38
37
|
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(3);
|
|
39
38
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
40
39
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
41
|
-
if (alternativeAnswerCheck === 'true') {
|
|
42
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 5 pts)', 0);
|
|
43
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
44
|
-
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
45
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
46
|
-
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
47
|
-
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
48
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
49
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 5 pts)', 1);
|
|
50
|
-
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
51
|
-
}
|
|
52
40
|
});
|
|
53
41
|
|
|
54
42
|
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, correct/incorrect status message and correct answer section should not be displayed', () => {
|
|
@@ -62,9 +50,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
|
|
|
62
50
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
63
51
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
64
52
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
65
|
-
if (alternativeAnswerCheck === 'true') {
|
|
66
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
67
|
-
}
|
|
68
53
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
69
54
|
/*cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
|
|
70
55
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -87,9 +72,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
|
|
|
87
72
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
88
73
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
89
74
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
90
|
-
if (alternativeAnswerCheck === 'true') {
|
|
91
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
92
|
-
}
|
|
93
75
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
94
76
|
/*cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
|
|
95
77
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -112,17 +94,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
|
|
|
112
94
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
113
95
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
114
96
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
115
|
-
if (alternativeAnswerCheck === 'true') {
|
|
116
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 5 pts)', 0);
|
|
117
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
118
|
-
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
119
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
120
|
-
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
121
|
-
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
122
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
123
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 5 pts)', 1);
|
|
124
|
-
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
125
|
-
}
|
|
126
97
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
127
98
|
/*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 status message and correct answer section should not be displayed')
|
|
128
99
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -145,17 +116,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
|
|
|
145
116
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
146
117
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
147
118
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
148
|
-
if (alternativeAnswerCheck === 'true') {
|
|
149
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 5 pts)', 0);
|
|
150
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
151
|
-
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
152
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
153
|
-
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
154
|
-
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
155
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
156
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 5 pts)', 1);
|
|
157
|
-
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
158
|
-
}
|
|
159
119
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
160
120
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
|
|
161
121
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -178,17 +138,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
|
|
|
178
138
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
179
139
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
180
140
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
181
|
-
if (alternativeAnswerCheck === 'true') {
|
|
182
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 5 pts)', 0);
|
|
183
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
184
|
-
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
185
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
186
|
-
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
187
|
-
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
188
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
189
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 5 pts)', 1);
|
|
190
|
-
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
191
|
-
}
|
|
192
141
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
193
142
|
/*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed beside incorrect responses correct/incorrect status message and correct answer section should not be displayed')
|
|
194
143
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -211,17 +160,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
|
|
|
211
160
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
212
161
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
213
162
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
214
|
-
if (alternativeAnswerCheck === 'true') {
|
|
215
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 5 pts)', 0);
|
|
216
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
217
|
-
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
218
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
219
|
-
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
220
|
-
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
221
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
222
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 5 pts)', 1);
|
|
223
|
-
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
224
|
-
}
|
|
225
163
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
226
164
|
/*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
|
|
227
165
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -244,17 +182,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
|
|
|
244
182
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
245
183
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
246
184
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
247
|
-
if (alternativeAnswerCheck === 'true') {
|
|
248
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 5 pts)', 0);
|
|
249
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
250
|
-
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
251
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
252
|
-
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
253
|
-
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
254
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
255
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 5 pts)', 1);
|
|
256
|
-
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
257
|
-
}
|
|
258
185
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
259
186
|
/*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 status message and correct answer section should not be displayed')
|
|
260
187
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -2,7 +2,6 @@ import { listOrderingPage } from "../../../../pages/listOrderingPage";
|
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
|
|
4
4
|
let options = ['sprout', 'plant', 'flower', 'seed'];
|
|
5
|
-
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
6
5
|
|
|
7
6
|
describe('Create Item page - List ordering: Partial equal weights scoring with alternative answer - When correct answer points are more than alternative answer points', () => {
|
|
8
7
|
before(() => {
|
|
@@ -37,17 +36,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
|
|
|
37
36
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
38
37
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
39
38
|
listOrderingPage.steps.verifyCorrectOptionIconsDropdownLayoutCorrectAnswersSection();
|
|
40
|
-
if (alternativeAnswerCheck === 'true') {
|
|
41
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 5 pts)', 0);
|
|
42
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
43
|
-
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
44
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
45
|
-
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
46
|
-
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
47
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
48
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 3 pts)', 1);
|
|
49
|
-
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
50
|
-
}
|
|
51
39
|
});
|
|
52
40
|
|
|
53
41
|
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, correct/incorrect status message and correct answer section should not be displayed', () => {
|
|
@@ -61,9 +49,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
|
|
|
61
49
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
62
50
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
63
51
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
64
|
-
if (alternativeAnswerCheck === 'true') {
|
|
65
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
66
|
-
}
|
|
67
52
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
68
53
|
/*cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
|
|
69
54
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -86,9 +71,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
|
|
|
86
71
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
87
72
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
88
73
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
89
|
-
if (alternativeAnswerCheck === 'true') {
|
|
90
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
91
|
-
}
|
|
92
74
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
93
75
|
/*cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
|
|
94
76
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -112,17 +94,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
|
|
|
112
94
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
113
95
|
listOrderingPage.steps.verifyCorrectOptionIconsDropdownLayoutCorrectAnswersSection();
|
|
114
96
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
115
|
-
if (alternativeAnswerCheck === 'true') {
|
|
116
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 5 pts)', 0);
|
|
117
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
118
|
-
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
119
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
120
|
-
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
121
|
-
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
122
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
123
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 3 pts)', 1);
|
|
124
|
-
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
125
|
-
}
|
|
126
97
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
127
98
|
/*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 status message and correct answer section should not be displayed')
|
|
128
99
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -145,17 +116,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
|
|
|
145
116
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
146
117
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
147
118
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
148
|
-
if (alternativeAnswerCheck === 'true') {
|
|
149
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 5 pts)', 0);
|
|
150
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
151
|
-
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
152
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
153
|
-
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
154
|
-
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
155
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
156
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 3 pts)', 1);
|
|
157
|
-
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
158
|
-
}
|
|
159
119
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
160
120
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
|
|
161
121
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -178,17 +138,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
|
|
|
178
138
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
179
139
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
180
140
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
181
|
-
if (alternativeAnswerCheck === 'true') {
|
|
182
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 5 pts)', 0);
|
|
183
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
184
|
-
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
185
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
186
|
-
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
187
|
-
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
188
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
189
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 3 pts)', 1);
|
|
190
|
-
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
191
|
-
}
|
|
192
141
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
193
142
|
/*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed beside incorrect responses correct/incorrect status message and correct answer section should not be displayed')
|
|
194
143
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -211,17 +160,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
|
|
|
211
160
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
212
161
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
213
162
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
214
|
-
if (alternativeAnswerCheck === 'true') {
|
|
215
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 5 pts)', 0);
|
|
216
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
217
|
-
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
218
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
219
|
-
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
220
|
-
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
221
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
222
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 3 pts)', 1);
|
|
223
|
-
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
224
|
-
}
|
|
225
163
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
226
164
|
/*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
|
|
227
165
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -244,17 +182,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
|
|
|
244
182
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
245
183
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
246
184
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
247
|
-
if (alternativeAnswerCheck === 'true') {
|
|
248
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 5 pts)', 0);
|
|
249
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
250
|
-
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
251
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
252
|
-
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
253
|
-
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
254
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
255
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 3 pts)', 1);
|
|
256
|
-
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
257
|
-
}
|
|
258
185
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
259
186
|
/*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 status message and correct answer section should not be displayed')
|
|
260
187
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -285,17 +212,6 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
|
|
|
285
212
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
286
213
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
287
214
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
288
|
-
if (alternativeAnswerCheck === 'true') {
|
|
289
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 12.5 pts)', 0);
|
|
290
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
291
|
-
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
292
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
293
|
-
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
294
|
-
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
295
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
296
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 2.5 pts)', 1);
|
|
297
|
-
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '1', '2', '4']);
|
|
298
|
-
}
|
|
299
215
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
300
216
|
/*cy.log('Overachiever case: When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion and clicks on \'Check answer\' button, correct icons should be displayed for the correct accordion response, incorrect icon should be displayed for the alternative accordion responses, correct/incorrect status message and correct answer section should not be displayed')
|
|
301
217
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -3,7 +3,6 @@ import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
5
|
const grepTags = Cypress.env('grepTags');
|
|
6
|
-
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
7
6
|
let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
|
|
8
7
|
const views = utilities.getViews(correctAnswerViews);
|
|
9
8
|
var itemReferenceID = "";
|
|
@@ -107,11 +106,7 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
107
106
|
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(2);
|
|
108
107
|
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(3);
|
|
109
108
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
|
110
|
-
|
|
111
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
112
|
-
} else {
|
|
113
|
-
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
114
|
-
}
|
|
109
|
+
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
115
110
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
116
111
|
};
|
|
117
112
|
});
|
|
@@ -181,184 +176,10 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
181
176
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
182
177
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
183
178
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
184
|
-
if (alternativeAnswerCheck === 'true') {
|
|
185
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
186
|
-
}
|
|
187
179
|
});
|
|
188
180
|
});
|
|
189
181
|
});
|
|
190
182
|
|
|
191
|
-
// alternative answer
|
|
192
|
-
if (alternativeAnswerCheck === 'true') {
|
|
193
|
-
views.forEach((view) => {
|
|
194
|
-
describe(`${view}: Auto scored - All or nothing scoring with alternative answer`, { tags: 'smoke' }, () => {
|
|
195
|
-
abortEarlySetup();
|
|
196
|
-
before(() => {
|
|
197
|
-
switch (view) {
|
|
198
|
-
case 'Question preview':
|
|
199
|
-
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
|
200
|
-
cy.barsPreLoaderWait();
|
|
201
|
-
listOrderingPage.steps.selectOrderingLayoutOption('Dropdown menu');
|
|
202
|
-
listOrderingPage.steps.addInputToOptionsInputField(options);
|
|
203
|
-
listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
|
|
204
|
-
listOrderingPage.steps.allotPoints(20);
|
|
205
|
-
listOrderingPage.steps.selectPositionForAllOptionsSpecifyCorrectAnswerSection([{ optionIndex: 0, position: '2' }, { optionIndex: 1, position: '3' }, { optionIndex: 2, position: '4' }, { optionIndex: 3, position: '1' }])
|
|
206
|
-
listOrderingPage.steps.addAlternativeAnswerAccordion(1);
|
|
207
|
-
listOrderingPage.steps.selectPositionForAllOptionsSpecifyCorrectAnswerSection([{ optionIndex: 0, position: '3' }, { optionIndex: 1, position: '4' }, { optionIndex: 2, position: '2' }, { optionIndex: 3, position: '1' }]);
|
|
208
|
-
listOrderingPage.steps.allotPoints(12);
|
|
209
|
-
listOrderingPage.steps.switchToPreviewTab();
|
|
210
|
-
break;
|
|
211
|
-
case 'Item preview':
|
|
212
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
213
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
|
214
|
-
break;
|
|
215
|
-
case 'Grading view':
|
|
216
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
217
|
-
break;
|
|
218
|
-
};
|
|
219
|
-
});
|
|
220
|
-
|
|
221
|
-
beforeEach(() => {
|
|
222
|
-
switch (view) {
|
|
223
|
-
case 'Question preview':
|
|
224
|
-
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
225
|
-
listOrderingPage.steps.resetQuestionPreview();
|
|
226
|
-
break;
|
|
227
|
-
case 'Item preview':
|
|
228
|
-
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
229
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
|
230
|
-
break;
|
|
231
|
-
case 'Grading view':
|
|
232
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
233
|
-
break;
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
|
|
237
|
-
if (view === 'Question preview') {
|
|
238
|
-
after(() => {
|
|
239
|
-
listOrderingPage.steps.clickOnSaveQuestionButton();
|
|
240
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
241
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
242
|
-
});
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
it('When the user selects \'Grading\' view without attempting the question, then correct/incorrect icons should not be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
|
246
|
-
if (view === 'Grading view') {
|
|
247
|
-
utilities.verifyElementDisabledClass(studentViewPage.submitButton());
|
|
248
|
-
};
|
|
249
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
|
250
|
-
listOrderingPage.steps.verifyPreviewScore(0, 20);
|
|
251
|
-
listOrderingPage.steps.switchToGradingView();
|
|
252
|
-
listOrderingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
|
253
|
-
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(0);
|
|
254
|
-
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(1);
|
|
255
|
-
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(2);
|
|
256
|
-
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(3);
|
|
257
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
|
258
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
259
|
-
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
260
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
261
|
-
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
262
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
263
|
-
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
264
|
-
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
265
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
266
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
|
|
267
|
-
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
268
|
-
};
|
|
269
|
-
});
|
|
270
|
-
|
|
271
|
-
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
|
272
|
-
listOrderingPage.steps.selectPositionForAllOptionsPreviewTab([{ optionIndex: 0, position: '1' }, { optionIndex: 1, position: '2' }, { optionIndex: 2, position: '3' }, { optionIndex: 3, position: '4' }]);
|
|
273
|
-
if (view === 'Grading view') {
|
|
274
|
-
studentViewPage.steps.submitResponse();
|
|
275
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
276
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
277
|
-
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
278
|
-
};
|
|
279
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
|
280
|
-
listOrderingPage.steps.verifyPreviewScore(0, 20);
|
|
281
|
-
listOrderingPage.steps.switchToGradingView();
|
|
282
|
-
};
|
|
283
|
-
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(0);
|
|
284
|
-
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(1);
|
|
285
|
-
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(2);
|
|
286
|
-
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
287
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
288
|
-
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
289
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
290
|
-
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
291
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
292
|
-
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
293
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
294
|
-
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
295
|
-
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
296
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
297
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
|
|
298
|
-
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
299
|
-
});
|
|
300
|
-
|
|
301
|
-
it('When the user attempts the question partially correct, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
|
302
|
-
if (view === 'Grading view') {
|
|
303
|
-
studentViewPage.steps.clearResponses();
|
|
304
|
-
};
|
|
305
|
-
listOrderingPage.steps.selectPositionForAllOptionsPreviewTab([{ optionIndex: 0, position: '2' }, { optionIndex: 1, position: '1' }, { optionIndex: 2, position: '4' }, { optionIndex: 3, position: '3' }]);
|
|
306
|
-
if (view === 'Grading view') {
|
|
307
|
-
studentViewPage.steps.submitResponse();
|
|
308
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
309
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
310
|
-
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
311
|
-
};
|
|
312
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
|
313
|
-
listOrderingPage.steps.verifyPreviewScore(0, 20);
|
|
314
|
-
listOrderingPage.steps.switchToGradingView();
|
|
315
|
-
};
|
|
316
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(0);
|
|
317
|
-
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(1);
|
|
318
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(2);
|
|
319
|
-
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
320
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
321
|
-
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
322
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
323
|
-
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
324
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
325
|
-
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
326
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
327
|
-
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
328
|
-
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
329
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
330
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
|
|
331
|
-
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
332
|
-
});
|
|
333
|
-
|
|
334
|
-
it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
|
335
|
-
if (view === 'Grading view') {
|
|
336
|
-
studentViewPage.steps.clearResponses();
|
|
337
|
-
};
|
|
338
|
-
listOrderingPage.steps.selectPositionForAllOptionsPreviewTab([{ optionIndex: 0, position: '2' }, { optionIndex: 1, position: '3' }, { optionIndex: 2, position: '4' }, { optionIndex: 3, position: '1' }]);
|
|
339
|
-
if (view === 'Grading view') {
|
|
340
|
-
studentViewPage.steps.submitResponse();
|
|
341
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
342
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
343
|
-
gradingViewPage.steps.verifyGradingViewScore(20, 20);
|
|
344
|
-
};
|
|
345
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
|
346
|
-
listOrderingPage.steps.verifyPreviewScore(20, 20);
|
|
347
|
-
listOrderingPage.steps.switchToGradingView();
|
|
348
|
-
listOrderingPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
|
349
|
-
};
|
|
350
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(0);
|
|
351
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(1);
|
|
352
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(2);
|
|
353
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
354
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
355
|
-
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
356
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
357
|
-
});
|
|
358
|
-
});
|
|
359
|
-
});
|
|
360
|
-
};
|
|
361
|
-
|
|
362
183
|
views.forEach((view) => {
|
|
363
184
|
describe(`${view}: List ordering (Dropdown) - Manually scored`, { tags: 'smoke' }, () => {
|
|
364
185
|
abortEarlySetup();
|
|
@@ -432,9 +253,6 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
432
253
|
};
|
|
433
254
|
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(0);
|
|
434
255
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
435
|
-
if (alternativeAnswerCheck === 'true') {
|
|
436
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
437
|
-
}
|
|
438
256
|
});
|
|
439
257
|
});
|
|
440
258
|
});
|
|
@@ -506,7 +324,7 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
506
324
|
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(2);
|
|
507
325
|
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(3);
|
|
508
326
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
|
509
|
-
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct
|
|
327
|
+
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
510
328
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(['sprout', 'plant', 'flower', 'seed'], ['2', '3', '4', '1']);
|
|
511
329
|
};
|
|
512
330
|
});
|
|
@@ -593,9 +411,6 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
593
411
|
}
|
|
594
412
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
595
413
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
596
|
-
if (alternativeAnswerCheck === 'true') {
|
|
597
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
598
|
-
}
|
|
599
414
|
});
|
|
600
415
|
});
|
|
601
416
|
});
|