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
package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js
CHANGED
|
@@ -2,6 +2,7 @@ import { matchingPage } from "../../../../pages";
|
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../../support/helpers/utilities";
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
5
6
|
const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
|
|
6
7
|
const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle', 'Penguin'];
|
|
7
8
|
|
|
@@ -32,8 +33,23 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
|
32
33
|
matchingPage.steps.switchToGradingView();
|
|
33
34
|
matchingPage.steps.verifyDropzoneNumeration();
|
|
34
35
|
utilities.verifyElementVisibilityState(matchingPage.correctIncorrectAnswerLabel(), 'notExist');
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
if (alternativeAnswerCheck === 'true') {
|
|
37
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
38
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
39
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
40
|
+
matchingPage.steps.disableShowAlternativeAnswersToggle();
|
|
41
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
42
|
+
matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
43
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
44
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
45
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
|
|
46
|
+
matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
|
|
47
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
48
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
49
|
+
} else {
|
|
50
|
+
utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
|
|
51
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
52
|
+
}
|
|
37
53
|
});
|
|
38
54
|
|
|
39
55
|
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', () => {
|
|
@@ -46,6 +62,9 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
|
46
62
|
matchingPage.steps.verifyCorrectOptionIcon(2);
|
|
47
63
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
48
64
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
65
|
+
if (alternativeAnswerCheck === 'true') {
|
|
66
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
67
|
+
}
|
|
49
68
|
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
50
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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
|
51
70
|
matchingPage.steps.checkAnswer();
|
|
@@ -66,6 +85,9 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
|
66
85
|
matchingPage.steps.verifyCorrectOptionIcon(2);
|
|
67
86
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
68
87
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
88
|
+
if (alternativeAnswerCheck === 'true') {
|
|
89
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
90
|
+
}
|
|
69
91
|
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
70
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')
|
|
71
93
|
matchingPage.steps.checkAnswer();
|
|
@@ -86,6 +108,19 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
|
86
108
|
matchingPage.steps.verifyIncorrectOptionIconForEmptyOption(2);
|
|
87
109
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
88
110
|
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
111
|
+
if (alternativeAnswerCheck === 'true') {
|
|
112
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
113
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
114
|
+
matchingPage.steps.disableShowAlternativeAnswersToggle();
|
|
115
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
116
|
+
matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
117
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
118
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
119
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
|
|
120
|
+
matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
|
|
121
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
122
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
123
|
+
}
|
|
89
124
|
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
90
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')
|
|
91
126
|
matchingPage.steps.checkAnswer();
|
|
@@ -106,6 +141,19 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
|
106
141
|
matchingPage.steps.verifyIncorrectOptionIconForEmptyOption(2);
|
|
107
142
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
108
143
|
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
144
|
+
if (alternativeAnswerCheck === 'true') {
|
|
145
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
146
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
147
|
+
matchingPage.steps.disableShowAlternativeAnswersToggle();
|
|
148
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
149
|
+
matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
150
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
151
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
152
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
|
|
153
|
+
matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
|
|
154
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
155
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
156
|
+
}
|
|
109
157
|
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
110
158
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
111
159
|
matchingPage.steps.checkAnswer();
|
|
@@ -127,6 +175,19 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
|
127
175
|
matchingPage.steps.verifyCorrectOptionIcon(2);
|
|
128
176
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
129
177
|
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
178
|
+
if (alternativeAnswerCheck === 'true') {
|
|
179
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
180
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
181
|
+
matchingPage.steps.disableShowAlternativeAnswersToggle();
|
|
182
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
183
|
+
matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
184
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
185
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
186
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
|
|
187
|
+
matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
|
|
188
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
189
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
190
|
+
}
|
|
130
191
|
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
131
192
|
/*cy.log('When the user has attempted the question with partially correct with all the response correct as per the alternative accordion but one response incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the response from the correct accordion and alternative accordion and no icon should be displayed beside unattempted response, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
132
193
|
matchingPage.steps.checkAnswer();
|
|
@@ -147,6 +208,19 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
|
147
208
|
matchingPage.steps.verifyCorrectOptionIcon(2);
|
|
148
209
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
149
210
|
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
211
|
+
if (alternativeAnswerCheck === 'true') {
|
|
212
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
213
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
214
|
+
matchingPage.steps.disableShowAlternativeAnswersToggle();
|
|
215
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
216
|
+
matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
217
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
218
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
219
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
|
|
220
|
+
matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
|
|
221
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
222
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
223
|
+
}
|
|
150
224
|
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
151
225
|
/*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')
|
|
152
226
|
matchingPage.steps.checkAnswer();
|
|
@@ -167,6 +241,19 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
|
167
241
|
matchingPage.steps.verifyCorrectOptionIcon(2);
|
|
168
242
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
169
243
|
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
244
|
+
if (alternativeAnswerCheck === 'true') {
|
|
245
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
246
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
247
|
+
matchingPage.steps.disableShowAlternativeAnswersToggle();
|
|
248
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
249
|
+
matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
250
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
251
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
252
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
|
|
253
|
+
matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
|
|
254
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
255
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
256
|
+
}
|
|
170
257
|
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
171
258
|
/*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, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
172
259
|
matchingPage.steps.checkAnswer();
|
|
@@ -187,6 +274,19 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
|
187
274
|
matchingPage.steps.verifyIncorrectOptionIconForEmptyOption(2);
|
|
188
275
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
189
276
|
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
277
|
+
if (alternativeAnswerCheck === 'true') {
|
|
278
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
279
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
280
|
+
matchingPage.steps.disableShowAlternativeAnswersToggle();
|
|
281
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
282
|
+
matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
283
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
284
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
285
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(20 points)', 1);
|
|
286
|
+
matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
|
|
287
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
288
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
289
|
+
}
|
|
190
290
|
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
191
291
|
/*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, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
192
292
|
matchingPage.steps.checkAnswer();
|
|
@@ -2,6 +2,7 @@ import { matchingPage } from "../../../../pages";
|
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../../support/helpers/utilities";
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
5
6
|
const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
|
|
6
7
|
const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle', 'Penguin'];
|
|
7
8
|
|
|
@@ -32,8 +33,23 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
|
32
33
|
matchingPage.steps.switchToGradingView();
|
|
33
34
|
matchingPage.steps.verifyDropzoneNumeration();
|
|
34
35
|
utilities.verifyElementVisibilityState(matchingPage.correctIncorrectAnswerLabel(), 'notExist');
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
if (alternativeAnswerCheck === 'true') {
|
|
37
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
38
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
39
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
40
|
+
matchingPage.steps.disableShowAlternativeAnswersToggle();
|
|
41
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
42
|
+
matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
43
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
44
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
45
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
|
|
46
|
+
matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
|
|
47
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
48
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
49
|
+
} else {
|
|
50
|
+
utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
|
|
51
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
52
|
+
}
|
|
37
53
|
});
|
|
38
54
|
|
|
39
55
|
it('CSS of correct answer section and dropzone numeration', { tags: 'css' }, () => {
|
|
@@ -76,6 +92,9 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
|
76
92
|
matchingPage.steps.verifyCorrectOptionIcon(2);
|
|
77
93
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
78
94
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
95
|
+
if (alternativeAnswerCheck === 'true') {
|
|
96
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
97
|
+
}
|
|
79
98
|
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
80
99
|
/*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')
|
|
81
100
|
matchingPage.steps.checkAnswer();
|
|
@@ -118,6 +137,9 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
|
118
137
|
matchingPage.steps.verifyCorrectOptionIcon(2);
|
|
119
138
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
120
139
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
140
|
+
if (alternativeAnswerCheck === 'true') {
|
|
141
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
142
|
+
}
|
|
121
143
|
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
122
144
|
/*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')
|
|
123
145
|
matchingPage.steps.checkAnswer();
|
|
@@ -138,6 +160,19 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
|
138
160
|
matchingPage.steps.verifyIncorrectOptionIconForEmptyOption(2);
|
|
139
161
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
140
162
|
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
163
|
+
if (alternativeAnswerCheck === 'true') {
|
|
164
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
165
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
166
|
+
matchingPage.steps.disableShowAlternativeAnswersToggle();
|
|
167
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
168
|
+
matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
169
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
170
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
171
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
|
|
172
|
+
matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
|
|
173
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
174
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
175
|
+
}
|
|
141
176
|
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
142
177
|
/*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')
|
|
143
178
|
matchingPage.steps.checkAnswer();
|
|
@@ -158,6 +193,20 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
|
158
193
|
matchingPage.steps.verifyIncorrectOptionIconForEmptyOption(2);
|
|
159
194
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
160
195
|
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
196
|
+
if (alternativeAnswerCheck === 'true') {
|
|
197
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
198
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
199
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
200
|
+
matchingPage.steps.disableShowAlternativeAnswersToggle();
|
|
201
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
202
|
+
matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
203
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
204
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
205
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
|
|
206
|
+
matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
|
|
207
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
208
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
209
|
+
}
|
|
161
210
|
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
162
211
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
163
212
|
matchingPage.steps.checkAnswer();
|
|
@@ -178,6 +227,20 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
|
178
227
|
matchingPage.steps.verifyCorrectOptionIcon(2);
|
|
179
228
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
180
229
|
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
230
|
+
if (alternativeAnswerCheck === 'true') {
|
|
231
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
232
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
233
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
234
|
+
matchingPage.steps.disableShowAlternativeAnswersToggle();
|
|
235
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
236
|
+
matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
237
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
238
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
239
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
|
|
240
|
+
matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
|
|
241
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
242
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
243
|
+
}
|
|
181
244
|
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
182
245
|
/*cy.log('When the user has attempted the question with partially correct with all the response correct as per the alternative accordion but one response incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the response from the correct accordion, incorrect icon should be displayed besides the responses from the alternative accordion and no icon should be displayed beside unattempted response, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
183
246
|
matchingPage.steps.checkAnswer();
|
|
@@ -198,6 +261,20 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
|
198
261
|
matchingPage.steps.verifyCorrectOptionIcon(2);
|
|
199
262
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
200
263
|
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
264
|
+
if (alternativeAnswerCheck === 'true') {
|
|
265
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
266
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
267
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
268
|
+
matchingPage.steps.disableShowAlternativeAnswersToggle();
|
|
269
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
270
|
+
matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
271
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
272
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
273
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
|
|
274
|
+
matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
|
|
275
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
276
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
277
|
+
}
|
|
201
278
|
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
202
279
|
/*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')
|
|
203
280
|
matchingPage.steps.checkAnswer();
|
|
@@ -218,6 +295,20 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
|
218
295
|
matchingPage.steps.verifyCorrectOptionIcon(2);
|
|
219
296
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
220
297
|
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
298
|
+
if (alternativeAnswerCheck === 'true') {
|
|
299
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
300
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
301
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
302
|
+
matchingPage.steps.disableShowAlternativeAnswersToggle();
|
|
303
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
304
|
+
matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
305
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
306
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
307
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
|
|
308
|
+
matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
|
|
309
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
310
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
311
|
+
}
|
|
221
312
|
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
222
313
|
/*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, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
223
314
|
matchingPage.steps.checkAnswer();
|
|
@@ -238,6 +329,20 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
|
238
329
|
matchingPage.steps.verifyIncorrectOptionIconForEmptyOption(2);
|
|
239
330
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
240
331
|
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
332
|
+
if (alternativeAnswerCheck === 'true') {
|
|
333
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
334
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
335
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
336
|
+
matchingPage.steps.disableShowAlternativeAnswersToggle();
|
|
337
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
338
|
+
matchingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
339
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
340
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
341
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(10 points)', 1);
|
|
342
|
+
matchingPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']], 1);
|
|
343
|
+
matchingPage.steps.clickShowAlternativeAnswersToggle();
|
|
344
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
345
|
+
}
|
|
241
346
|
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
242
347
|
/*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, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
243
348
|
matchingPage.steps.checkAnswer();
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { dialogBoxBase, matchingPage, studentViewPage, itemPreviewPage, gradingViewPage } from "../../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../../support/helpers/utilities";
|
|
4
|
+
|
|
5
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
4
6
|
const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
|
|
5
7
|
const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle', 'Penguin'];
|
|
6
8
|
|
|
@@ -32,6 +34,9 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
|
|
|
32
34
|
matchingPage.steps.verifyDropzoneNumeration();
|
|
33
35
|
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
34
36
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
37
|
+
if (alternativeAnswerCheck === 'true') {
|
|
38
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
39
|
+
}
|
|
35
40
|
});
|
|
36
41
|
|
|
37
42
|
it('When the user has not set any answer in the \'Specify correct answer\' section and interacts with the question in the preview tab then correct icons should be displayed beside all the responses, full points should be allocated and correct answer section should not be displayed', () => {
|
|
@@ -44,6 +49,9 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
|
|
|
44
49
|
matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
|
45
50
|
matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
|
46
51
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
52
|
+
if (alternativeAnswerCheck === 'true') {
|
|
53
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
54
|
+
}
|
|
47
55
|
});
|
|
48
56
|
|
|
49
57
|
it('When the user has not set any answer in the \'Specify correct answer\' section and enters incorrect response in any response in the preview tab then correct icons should be displayed beside the empty responses, incorrect icons should be displayed beside incorrect responses, no points should be allocated and correct answer section should be displayed', () => {
|
|
@@ -55,6 +63,9 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
|
|
|
55
63
|
matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
|
56
64
|
matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
|
57
65
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
66
|
+
if (alternativeAnswerCheck === 'true') {
|
|
67
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
68
|
+
}
|
|
58
69
|
});
|
|
59
70
|
|
|
60
71
|
it('When the user sets an partial blank answer in the \'Specify correct answer\' section then on switching to \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
|
|
@@ -67,7 +78,11 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
|
|
|
67
78
|
matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
|
68
79
|
matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
|
69
80
|
matchingPage.steps.verifyDropzoneNumeration();
|
|
70
|
-
|
|
81
|
+
if (alternativeAnswerCheck === 'true') {
|
|
82
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(10 points)', 0);
|
|
83
|
+
} else {
|
|
84
|
+
matchingPage.steps.verifyCorrectAnswerSectionLabel();
|
|
85
|
+
}
|
|
71
86
|
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
72
87
|
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], [''], ['Cat']]);
|
|
73
88
|
});
|
|
@@ -120,6 +135,9 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
|
|
|
120
135
|
matchingPage.steps.verifyCorrectOptionIcon(2);
|
|
121
136
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
122
137
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
138
|
+
if (alternativeAnswerCheck === 'true') {
|
|
139
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
140
|
+
}
|
|
123
141
|
});
|
|
124
142
|
});
|
|
125
143
|
|
|
@@ -146,6 +164,9 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
|
|
|
146
164
|
matchingPage.steps.verifyDropzoneNumeration();
|
|
147
165
|
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
148
166
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
167
|
+
if (alternativeAnswerCheck === 'true') {
|
|
168
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
169
|
+
}
|
|
149
170
|
});
|
|
150
171
|
|
|
151
172
|
it('When the user has not set any answer in the \'Specify correct answer\' section and interacts with the question in the preview tab then correct icons should be displayed beside all the responses, full points should be allocated and correct answer section should not be displayed', () => {
|
|
@@ -158,6 +179,9 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
|
|
|
158
179
|
matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
|
159
180
|
matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
|
160
181
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
182
|
+
if (alternativeAnswerCheck === 'true') {
|
|
183
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
184
|
+
}
|
|
161
185
|
});
|
|
162
186
|
|
|
163
187
|
it('When the user has not set any answer in the \'Specify correct answer\' section and enters incorrect response in any response in the preview tab then correct icons should be displayed beside the empty responses, incorrect icons should be displayed beside incorrect responses, points for the correct answers should be allocated and correct answer section should be displayed', () => {
|
|
@@ -170,6 +194,9 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
|
|
|
170
194
|
matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
|
171
195
|
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
172
196
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
197
|
+
if (alternativeAnswerCheck === 'true') {
|
|
198
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
199
|
+
}
|
|
173
200
|
});
|
|
174
201
|
|
|
175
202
|
it('When the user sets an partial blank answer in the \'Specify correct answer\' section then on switching to \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
|
|
@@ -182,7 +209,11 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
|
|
|
182
209
|
matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
|
183
210
|
matchingPage.steps.switchToGradingView();
|
|
184
211
|
matchingPage.steps.verifyDropzoneNumeration();
|
|
185
|
-
|
|
212
|
+
if (alternativeAnswerCheck === 'true') {
|
|
213
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 8 pts)', 0);
|
|
214
|
+
} else {
|
|
215
|
+
matchingPage.steps.verifyCorrectAnswerSectionLabel();
|
|
216
|
+
}
|
|
186
217
|
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
187
218
|
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], [''], ['Cat']]);
|
|
188
219
|
});
|
|
@@ -231,6 +262,9 @@ describe('Create item page - Matching: Scoring for blank responses', () => {
|
|
|
231
262
|
matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
|
232
263
|
matchingPage.steps.verifyCorrectOptionIcon(2);
|
|
233
264
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
265
|
+
if (alternativeAnswerCheck === 'true') {
|
|
266
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
267
|
+
}
|
|
234
268
|
});
|
|
235
269
|
});
|
|
236
270
|
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { matchingPage } from "../../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
|
|
4
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
5
|
+
|
|
4
6
|
describe('Create Item page - Matching', () => {
|
|
5
7
|
before(() => {
|
|
6
8
|
cy.loginAs('admin');
|
|
@@ -69,6 +71,9 @@ describe('Create Item page - Matching', () => {
|
|
|
69
71
|
matchingPage.steps.switchToGradingView();
|
|
70
72
|
matchingPage.steps.verifyAnswerStatusBannerExist();
|
|
71
73
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
74
|
+
if (alternativeAnswerCheck === 'true') {
|
|
75
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
76
|
+
}
|
|
72
77
|
});
|
|
73
78
|
});
|
|
74
79
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { matchingPage } from "../../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../../support/helpers/utilities";
|
|
4
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
4
5
|
const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
|
|
5
6
|
const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle', 'Penguin'];
|
|
6
7
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { matchingPage } from "../../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../../support/helpers/utilities";
|
|
4
|
+
|
|
5
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
4
6
|
const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
|
|
5
7
|
const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle', 'Penguin'];
|
|
6
8
|
|
|
@@ -30,7 +32,11 @@ describe('Create item page - Matching: Partial different weights', () => {
|
|
|
30
32
|
matchingPage.steps.switchToGradingView();
|
|
31
33
|
matchingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
|
32
34
|
matchingPage.steps.verifyDropzoneNumeration();
|
|
33
|
-
|
|
35
|
+
if(alternativeAnswerCheck === 'true') {
|
|
36
|
+
matchingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 9 pts, 6 pts, 5 pts)', 0);
|
|
37
|
+
} else {
|
|
38
|
+
utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
|
|
39
|
+
}
|
|
34
40
|
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
|
35
41
|
});
|
|
36
42
|
|
|
@@ -104,6 +110,9 @@ describe('Create item page - Matching: Partial different weights', () => {
|
|
|
104
110
|
matchingPage.steps.verifyCorrectOptionIcon(2);
|
|
105
111
|
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
106
112
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
113
|
+
if (alternativeAnswerCheck === 'true') {
|
|
114
|
+
matchingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
115
|
+
}
|
|
107
116
|
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
108
117
|
/*cy.log('When the user attempts the question with all the responses correctly attempted and clicks on \'Check answer\' green check-mark should be displayed besides the correct answer responses, a status message should not be displayed and correct answer section should not be displayed')
|
|
109
118
|
matchingPage.steps.checkAnswer();
|