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