itemengine-cypress-automation 1.0.584-IEI-7041-1da58ac.0 → 1.0.584-IEI-7048-098328c.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +1 -4
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +8 -109
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +8 -109
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +8 -109
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/blankResponseScoring.js +2 -7
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +10 -139
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +1 -4
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +9 -124
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +10 -139
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +1 -4
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +9 -124
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +8 -109
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +9 -124
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +2 -243
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +77 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +78 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +78 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +104 -9
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsBasic.js +4 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +95 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +95 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +84 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsBasic.js +4 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +73 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +84 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +187 -2
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +79 -1
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +79 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +79 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +4 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +103 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +4 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +103 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +103 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +91 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +4 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +79 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +91 -0
- package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +209 -5
- package/cypress/e2e/ILC/ListOrderingNew/horizontalOrientationAllOrNothingForAllViews.smoke.js +195 -1
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +103 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +85 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +82 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +85 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +109 -6
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsBasic.js +4 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +103 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +103 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +91 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsBasic.js +4 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +79 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +91 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/allOrNothingForAllViews.smoke.js +207 -3
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingGroupedScoring.js +9 -1
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +102 -2
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +102 -2
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +107 -2
- package/cypress/e2e/ILC/Matching/Scoring/blankResponseScoring.js +36 -2
- package/cypress/e2e/ILC/Matching/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +5 -0
- package/cypress/e2e/ILC/Matching/Scoring/manuallyAndNonScored.js +1 -0
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +10 -1
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +128 -2
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +115 -2
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +128 -2
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsBasic.js +9 -1
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +115 -2
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +102 -2
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +115 -2
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +226 -2
- package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +9 -1
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +102 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +102 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +102 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/blankResponseScoring.js +32 -5
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/manuallyAndNonScored.js +3 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsScoringBasic.js +10 -1
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +128 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternatePoints.js +115 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternatePoints.js +128 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsBasic.js +9 -1
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +115 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +102 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +115 -2
- package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +216 -2
- package/cypress/pages/components/correctIncorrectAnswerLabelComponent.js +18 -1
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +1 -25
- package/cypress/pages/listOrderingPage.js +60 -1
- package/cypress/pages/matchingPage.js +23 -1
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { listOrderingPage } from "../../../../pages/listOrderingPage";
|
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../../support/helpers/utilities";
|
|
4
4
|
|
|
5
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
5
6
|
let options = ['sprout', 'plant', 'flower', 'seed'];
|
|
6
7
|
|
|
7
8
|
describe('Create Item page - List ordering: All or nothing scoring with alternative answer - When Correct answer points are equal to the alternative answer points', () => {
|
|
@@ -32,9 +33,21 @@ describe('Create Item page - List ordering: All or nothing scoring with alternat
|
|
|
32
33
|
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(1);
|
|
33
34
|
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(2);
|
|
34
35
|
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(3);
|
|
35
|
-
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
36
36
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
|
37
37
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
38
|
+
if (alternativeAnswerCheck === 'true') {
|
|
39
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
40
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
41
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
42
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
43
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
44
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
45
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
46
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
|
|
47
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
48
|
+
} else {
|
|
49
|
+
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
50
|
+
}
|
|
38
51
|
});
|
|
39
52
|
|
|
40
53
|
it('When the user attempts the question with responses from the correct accordion, then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
|
@@ -48,6 +61,9 @@ describe('Create Item page - List ordering: All or nothing scoring with alternat
|
|
|
48
61
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
49
62
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
50
63
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
64
|
+
if (alternativeAnswerCheck === 'true') {
|
|
65
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
66
|
+
}
|
|
51
67
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
52
68
|
/*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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
|
53
69
|
listOrderingPage.steps.checkAnswer()
|
|
@@ -70,6 +86,9 @@ describe('Create Item page - List ordering: All or nothing scoring with alternat
|
|
|
70
86
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
71
87
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
72
88
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
89
|
+
if (alternativeAnswerCheck === 'true') {
|
|
90
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
91
|
+
}
|
|
73
92
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
74
93
|
/*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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
|
75
94
|
listOrderingPage.steps.checkAnswer()
|
|
@@ -92,6 +111,17 @@ describe('Create Item page - List ordering: All or nothing scoring with alternat
|
|
|
92
111
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
93
112
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
94
113
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
114
|
+
if (alternativeAnswerCheck === 'true') {
|
|
115
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
116
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
117
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
118
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
119
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
120
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
121
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
122
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
|
|
123
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
124
|
+
}
|
|
95
125
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
96
126
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
97
127
|
listOrderingPage.steps.checkAnswer()
|
|
@@ -114,6 +144,17 @@ describe('Create Item page - List ordering: All or nothing scoring with alternat
|
|
|
114
144
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
115
145
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
116
146
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
147
|
+
if (alternativeAnswerCheck === 'true') {
|
|
148
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
149
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
150
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
151
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
152
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
153
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
154
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
155
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
|
|
156
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
157
|
+
}
|
|
117
158
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
118
159
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
119
160
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -136,6 +177,17 @@ describe('Create Item page - List ordering: All or nothing scoring with alternat
|
|
|
136
177
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
137
178
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
138
179
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
180
|
+
if (alternativeAnswerCheck === 'true') {
|
|
181
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
182
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
183
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
184
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
185
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
186
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
187
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
188
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
|
|
189
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
190
|
+
}
|
|
139
191
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
140
192
|
/*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 empty responses a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
141
193
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -158,6 +210,17 @@ describe('Create Item page - List ordering: All or nothing scoring with alternat
|
|
|
158
210
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
159
211
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
160
212
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
213
|
+
if (alternativeAnswerCheck === 'true') {
|
|
214
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
215
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
216
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
217
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
218
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
219
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
220
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
221
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
|
|
222
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
223
|
+
}
|
|
161
224
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
162
225
|
/*cy.log('When the user has attempted the question with the common response between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
163
226
|
listOrderingPage.steps.checkAnswer()
|
|
@@ -180,6 +243,17 @@ describe('Create Item page - List ordering: All or nothing scoring with alternat
|
|
|
180
243
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
181
244
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
182
245
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
246
|
+
if (alternativeAnswerCheck === 'true') {
|
|
247
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
248
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
249
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
250
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
251
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
252
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
253
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
254
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
|
|
255
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
256
|
+
}
|
|
183
257
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
184
258
|
/*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
185
259
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -212,6 +286,9 @@ describe('Create Item page - List ordering: All or nothing scoring with alternat
|
|
|
212
286
|
listOrderingPage.steps.switchToGradingView();
|
|
213
287
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExist();
|
|
214
288
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
289
|
+
if (alternativeAnswerCheck === 'true') {
|
|
290
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
291
|
+
}
|
|
215
292
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
216
293
|
});
|
|
217
294
|
});
|
|
@@ -2,6 +2,7 @@ import { listOrderingPage } from "../../../../pages/listOrderingPage";
|
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../../support/helpers/utilities";
|
|
4
4
|
let options = ['sprout', 'plant', 'flower', 'seed'];
|
|
5
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
5
6
|
const css = Cypress.env('css');
|
|
6
7
|
|
|
7
8
|
|
|
@@ -34,10 +35,22 @@ describe('Create Item page - List ordering: All or nothing scoring with alternat
|
|
|
34
35
|
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(1);
|
|
35
36
|
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(2);
|
|
36
37
|
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(3);
|
|
37
|
-
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
38
38
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
|
39
39
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
40
40
|
listOrderingPage.steps.verifyCorrectOptionIconsDropdownLayoutCorrectAnswersSection();
|
|
41
|
+
if (alternativeAnswerCheck === 'true') {
|
|
42
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 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', '(12 points)', 1);
|
|
50
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
51
|
+
} else {
|
|
52
|
+
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
53
|
+
}
|
|
41
54
|
});
|
|
42
55
|
|
|
43
56
|
it('CSS of correct answer section', { tags: 'css' }, () => {
|
|
@@ -71,6 +84,9 @@ describe('Create Item page - List ordering: All or nothing scoring with alternat
|
|
|
71
84
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
72
85
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
73
86
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
87
|
+
if (alternativeAnswerCheck === 'true') {
|
|
88
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
89
|
+
}
|
|
74
90
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
75
91
|
/*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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
|
76
92
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -123,6 +139,9 @@ describe('Create Item page - List ordering: All or nothing scoring with alternat
|
|
|
123
139
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
124
140
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
125
141
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
142
|
+
if (alternativeAnswerCheck === 'true') {
|
|
143
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
144
|
+
}
|
|
126
145
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
127
146
|
/*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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
|
128
147
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -146,6 +165,17 @@ describe('Create Item page - List ordering: All or nothing scoring with alternat
|
|
|
146
165
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
147
166
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
148
167
|
listOrderingPage.steps.verifyCorrectOptionIconsDropdownLayoutCorrectAnswersSection();
|
|
168
|
+
if (alternativeAnswerCheck === 'true') {
|
|
169
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
170
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
171
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
172
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
173
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
174
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
175
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
176
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
|
|
177
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
178
|
+
}
|
|
149
179
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
150
180
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
151
181
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -168,6 +198,17 @@ describe('Create Item page - List ordering: All or nothing scoring with alternat
|
|
|
168
198
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
169
199
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
170
200
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
201
|
+
if (alternativeAnswerCheck === 'true') {
|
|
202
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
203
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
204
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
205
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
206
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
207
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
208
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
209
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
|
|
210
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
211
|
+
}
|
|
171
212
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
172
213
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
173
214
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -190,6 +231,17 @@ describe('Create Item page - List ordering: All or nothing scoring with alternat
|
|
|
190
231
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
191
232
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
192
233
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
234
|
+
if (alternativeAnswerCheck === 'true') {
|
|
235
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
236
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
237
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
238
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
239
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
240
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
241
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
242
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
|
|
243
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
244
|
+
}
|
|
193
245
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
194
246
|
/*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 empty responses a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
195
247
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -212,6 +264,17 @@ describe('Create Item page - List ordering: All or nothing scoring with alternat
|
|
|
212
264
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
213
265
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
214
266
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
267
|
+
if (alternativeAnswerCheck === 'true') {
|
|
268
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
269
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
270
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
271
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
272
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
273
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
274
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
275
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
|
|
276
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
277
|
+
}
|
|
215
278
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
216
279
|
/*cy.log('When the user has attempted the question with the common response between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
217
280
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -234,6 +297,17 @@ describe('Create Item page - List ordering: All or nothing scoring with alternat
|
|
|
234
297
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
235
298
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
236
299
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
|
|
300
|
+
if (alternativeAnswerCheck === 'true') {
|
|
301
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
302
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
303
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
304
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
305
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
306
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
307
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
308
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(12 points)', 1);
|
|
309
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
|
|
310
|
+
}
|
|
237
311
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
238
312
|
/*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
239
313
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -292,6 +366,9 @@ describe('Create Item page - List ordering: All or nothing scoring with alternat
|
|
|
292
366
|
listOrderingPage.steps.switchToGradingView();
|
|
293
367
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExist();
|
|
294
368
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
369
|
+
if (alternativeAnswerCheck === 'true') {
|
|
370
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
371
|
+
}
|
|
295
372
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
296
373
|
});
|
|
297
374
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { listOrderingPage } from "../../../../pages/listOrderingPage";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
|
|
4
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
4
5
|
let options = ['sprout', 'plant', 'flower', 'seed'];
|
|
5
6
|
|
|
6
7
|
describe('Create Item page - List ordering: Partial different weights scoring with alternative answer - When alternative answer points are more than correct answer points', () => {
|
|
@@ -35,6 +36,17 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
|
|
|
35
36
|
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(3);
|
|
36
37
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists()
|
|
37
38
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
|
|
39
|
+
if (alternativeAnswerCheck === 'true') {
|
|
40
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 10 pts, 6 pts, 9 pts, 4 pts)', 0);
|
|
41
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
42
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
43
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
44
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
45
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
46
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
47
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 1);
|
|
48
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
|
|
49
|
+
}
|
|
38
50
|
});
|
|
39
51
|
|
|
40
52
|
it('When the user attempts the question with responses from the correct accordion, then the user should be awarded with points specified for correct accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed', () => {
|
|
@@ -47,7 +59,10 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
|
|
|
47
59
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(2);
|
|
48
60
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
49
61
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
50
|
-
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists()
|
|
62
|
+
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
63
|
+
if (alternativeAnswerCheck === 'true') {
|
|
64
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
65
|
+
}
|
|
51
66
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
52
67
|
/*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')
|
|
53
68
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -69,7 +84,10 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
|
|
|
69
84
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(2);
|
|
70
85
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
71
86
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
72
|
-
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists()
|
|
87
|
+
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
88
|
+
if (alternativeAnswerCheck === 'true') {
|
|
89
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
90
|
+
}
|
|
73
91
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
74
92
|
/*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')
|
|
75
93
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -91,7 +109,18 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
|
|
|
91
109
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(2);
|
|
92
110
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
93
111
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
|
|
94
|
-
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists()
|
|
112
|
+
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
113
|
+
if (alternativeAnswerCheck === 'true') {
|
|
114
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 10 pts, 6 pts, 9 pts, 4 pts)', 0);
|
|
115
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
116
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
117
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
118
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
119
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
120
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
121
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 1);
|
|
122
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
|
|
123
|
+
}
|
|
95
124
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
96
125
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message should not be displayed and correct answer section should not be displayed')
|
|
97
126
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -113,7 +142,18 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
|
|
|
113
142
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(2);
|
|
114
143
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
115
144
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
|
|
116
|
-
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists()
|
|
145
|
+
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
146
|
+
if (alternativeAnswerCheck === 'true') {
|
|
147
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 10 pts, 6 pts, 9 pts, 4 pts)', 0);
|
|
148
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
149
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
150
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
151
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
152
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
153
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
154
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 1);
|
|
155
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
|
|
156
|
+
}
|
|
117
157
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
118
158
|
/*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, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section should not be displayed')
|
|
119
159
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -135,7 +175,18 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
|
|
|
135
175
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(2);
|
|
136
176
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
137
177
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
|
|
138
|
-
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists()
|
|
178
|
+
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
179
|
+
if (alternativeAnswerCheck === 'true') {
|
|
180
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 10 pts, 6 pts, 9 pts, 4 pts)', 0);
|
|
181
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
182
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
183
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
184
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
185
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
186
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
187
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 1);
|
|
188
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
|
|
189
|
+
}
|
|
139
190
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
140
191
|
/*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')
|
|
141
192
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -157,7 +208,18 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
|
|
|
157
208
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(2);
|
|
158
209
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
159
210
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
|
|
160
|
-
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists()
|
|
211
|
+
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
212
|
+
if (alternativeAnswerCheck === 'true') {
|
|
213
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 10 pts, 6 pts, 9 pts, 4 pts)', 0);
|
|
214
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
215
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
216
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
217
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
218
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
219
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
220
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 1);
|
|
221
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
|
|
222
|
+
}
|
|
161
223
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
162
224
|
/*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')
|
|
163
225
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -179,7 +241,18 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
|
|
|
179
241
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(2);
|
|
180
242
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
181
243
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
|
|
182
|
-
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists()
|
|
244
|
+
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
245
|
+
if (alternativeAnswerCheck === 'true') {
|
|
246
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 10 pts, 6 pts, 9 pts, 4 pts)', 0);
|
|
247
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
248
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
249
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
250
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
251
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
252
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
253
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 1);
|
|
254
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
|
|
255
|
+
}
|
|
183
256
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
184
257
|
/*cy.log('Race condition: When the user attempts the question with the common option between correct accordion and alternative accordion then on selecting the \'Check answer\' button the correct icon should be displayed beside the common option and red cross-marks should be displayed beside the incorrectly responses, correct/incorrect status message and correct answer section should not be displayed')
|
|
185
258
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -201,7 +274,18 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
|
|
|
201
274
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(2);
|
|
202
275
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
203
276
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
|
|
204
|
-
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists()
|
|
277
|
+
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
278
|
+
if (alternativeAnswerCheck === 'true') {
|
|
279
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 10 pts, 6 pts, 9 pts, 4 pts)', 0);
|
|
280
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
281
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
282
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
283
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
284
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
285
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
286
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 1);
|
|
287
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
|
|
288
|
+
}
|
|
205
289
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
206
290
|
/*cy.log('When user attempts the question incorrectly and clicks on the \'Check Answer\' button, then incorrect icons should be displayed beside all the options, incorrect icon should be displayed beside incorrect responses correct/incorrect status message and correct answer section should not be displayed')
|
|
207
291
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -235,7 +319,18 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
|
|
|
235
319
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
236
320
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(4);
|
|
237
321
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(['sprout', 'plant', 'flower', 'seed', 'fruit'], ['1', '2', '3', '5', '4']);
|
|
238
|
-
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists()
|
|
322
|
+
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
323
|
+
if (alternativeAnswerCheck === 'true') {
|
|
324
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 24.5 pts, 1.5 pts, 4.5 pts, 1.5 pts, 3.5 pts)', 0);
|
|
325
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
326
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
327
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
328
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
329
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
330
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
331
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 14.5 pts, 2.5 pts, 1.5 pts, 2.5 pts, 3.5 pts)', 1);
|
|
332
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
|
|
333
|
+
}
|
|
239
334
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
240
335
|
/*cy.log('Overachiever case: When the user has attempted the question with more number of correct options from the alternative accordion than the correct accordion, correct icons should be displayed for the correct accordion response, incorrect icon should be displayed for the alternative accordion options, correct/incorrect status message and correct answer section should not be displayed')
|
|
241
336
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { listOrderingPage } from "../../../../pages/listOrderingPage";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
3
4
|
let options = ['sprout', 'plant', 'flower', 'seed'];
|
|
4
5
|
|
|
5
6
|
describe('Create Item page - List ordering: Preview tab scoring', () => {
|
|
@@ -87,6 +88,9 @@ describe('Create Item page - List ordering: Preview tab scoring', () => {
|
|
|
87
88
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(2);
|
|
88
89
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
89
90
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
91
|
+
if (alternativeAnswerCheck === 'true') {
|
|
92
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
93
|
+
}
|
|
90
94
|
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
91
95
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
92
96
|
/*cy.log('When user attempts the question correctly and clicks on the \'Check Answer\' button, then correct icons should be displayed beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed')
|