itemengine-cypress-automation 1.0.584-IEI-7041-1da58ac.0 → 1.0.584
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/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/listOrderingPage.js +60 -1
- package/cypress/pages/matchingPage.js +23 -1
- package/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
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');
|
|
5
|
+
|
|
4
6
|
let options = ['sprout', 'plant', 'flower', 'seed'];
|
|
5
7
|
|
|
6
8
|
describe('Create item page - List ordering: All or nothing scoring with alternative answer - When alternative answer points are more than correct answer points', () => {
|
|
@@ -34,6 +36,17 @@ describe('Create item page - List ordering: All or nothing scoring with alternat
|
|
|
34
36
|
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(3);
|
|
35
37
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
|
36
38
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
|
|
39
|
+
if (alternativeAnswerCheck === 'true') {
|
|
40
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(25 points)', 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', '(20 points)', 1);
|
|
48
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
|
|
49
|
+
}
|
|
37
50
|
});
|
|
38
51
|
|
|
39
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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
|
@@ -47,6 +60,9 @@ describe('Create item page - List ordering: All or nothing scoring with alternat
|
|
|
47
60
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
48
61
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
49
62
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
63
|
+
if (alternativeAnswerCheck === 'true') {
|
|
64
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
65
|
+
}
|
|
50
66
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
51
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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
|
52
68
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -69,6 +85,9 @@ describe('Create item page - List ordering: All or nothing scoring with alternat
|
|
|
69
85
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
70
86
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
71
87
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
88
|
+
if (alternativeAnswerCheck === 'true') {
|
|
89
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
90
|
+
}
|
|
72
91
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
73
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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
|
74
93
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -91,6 +110,17 @@ describe('Create item page - List ordering: All or nothing scoring with alternat
|
|
|
91
110
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
92
111
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
93
112
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
|
|
113
|
+
if (alternativeAnswerCheck === 'true') {
|
|
114
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(25 points)', 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', '(20 points)', 1);
|
|
122
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
|
|
123
|
+
}
|
|
94
124
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
95
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 with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
96
126
|
listOrderingPage.steps.checkAnswer()
|
|
@@ -113,6 +143,17 @@ describe('Create item page - List ordering: All or nothing scoring with alternat
|
|
|
113
143
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
114
144
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
115
145
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
|
|
146
|
+
if (alternativeAnswerCheck === 'true') {
|
|
147
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(25 points)', 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', '(20 points)', 1);
|
|
155
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
|
|
156
|
+
}
|
|
116
157
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
117
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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
118
159
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -135,6 +176,17 @@ describe('Create item page - List ordering: All or nothing scoring with alternat
|
|
|
135
176
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
136
177
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
137
178
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
|
|
179
|
+
if (alternativeAnswerCheck === 'true') {
|
|
180
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(25 points)', 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', '(20 points)', 1);
|
|
188
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
|
|
189
|
+
}
|
|
138
190
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
139
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 empty responses a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
140
192
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -157,6 +209,17 @@ describe('Create item page - List ordering: All or nothing scoring with alternat
|
|
|
157
209
|
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
|
158
210
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
159
211
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
|
|
212
|
+
if (alternativeAnswerCheck === 'true') {
|
|
213
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(25 points)', 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', '(20 points)', 1);
|
|
221
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
|
|
222
|
+
}
|
|
160
223
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
161
224
|
/*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')
|
|
162
225
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -178,6 +241,17 @@ describe('Create item page - List ordering: All or nothing scoring with alternat
|
|
|
178
241
|
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
|
179
242
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
|
|
180
243
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
244
|
+
if (alternativeAnswerCheck === 'true') {
|
|
245
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(25 points)', 0);
|
|
246
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
247
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
248
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
249
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
250
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
251
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
252
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
|
|
253
|
+
listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
|
|
254
|
+
}
|
|
181
255
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
182
256
|
/*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')
|
|
183
257
|
listOrderingPage.steps.checkAnswer();
|
|
@@ -210,6 +284,9 @@ describe('Create item page - List ordering: All or nothing scoring with alternat
|
|
|
210
284
|
listOrderingPage.steps.switchToGradingView();
|
|
211
285
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExist();
|
|
212
286
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
287
|
+
if (alternativeAnswerCheck === 'true') {
|
|
288
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
289
|
+
}
|
|
213
290
|
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
214
291
|
});
|
|
215
292
|
});
|
|
@@ -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
|
});
|