itemengine-cypress-automation 1.0.583-IEI-7048-71a8251.0 → 1.0.583
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +123 -8
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +123 -8
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +131 -14
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +138 -9
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +138 -9
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsGreaterThanAlternativePoints.js +153 -10
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +138 -9
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +108 -7
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +138 -9
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +272 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +4 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +109 -8
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +109 -8
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +109 -8
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/blankResponseScoring.js +7 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +139 -10
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +4 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +124 -9
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +139 -10
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +4 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +124 -9
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +109 -8
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +124 -9
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +243 -2
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -77
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +1 -78
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -78
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +9 -104
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsBasic.js +0 -4
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -95
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -95
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -84
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsBasic.js +0 -4
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -73
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -84
- package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +2 -187
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +1 -79
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -79
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -79
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +0 -4
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -103
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +0 -4
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -103
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -103
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -91
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +0 -4
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -79
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -91
- package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +5 -209
- package/cypress/e2e/ILC/ListOrderingNew/horizontalOrientationAllOrNothingForAllViews.smoke.js +1 -195
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -103
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -85
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -82
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -85
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +6 -109
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsBasic.js +0 -4
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -103
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -103
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -91
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsBasic.js +0 -4
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -79
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -91
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/allOrNothingForAllViews.smoke.js +3 -203
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingGroupedScoring.js +1 -9
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -102
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +2 -102
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -107
- package/cypress/e2e/ILC/Matching/Scoring/blankResponseScoring.js +2 -36
- package/cypress/e2e/ILC/Matching/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +0 -5
- package/cypress/e2e/ILC/Matching/Scoring/manuallyAndNonScored.js +0 -1
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +1 -10
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -128
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +2 -115
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -128
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsBasic.js +1 -9
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -115
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +2 -102
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -115
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +2 -226
- package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +1 -9
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -102
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +2 -102
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -102
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/blankResponseScoring.js +5 -32
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/manuallyAndNonScored.js +0 -3
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsScoringBasic.js +1 -10
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -128
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternatePoints.js +2 -115
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternatePoints.js +2 -128
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsBasic.js +1 -9
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -115
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +2 -102
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -115
- package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +2 -216
- package/cypress/pages/components/correctIncorrectAnswerLabelComponent.js +1 -18
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +25 -1
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +38 -0
- package/cypress/pages/listOrderingPage.js +1 -60
- package/cypress/pages/matchingPage.js +1 -23
- package/package.json +1 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { fillInTheGapsDragAndDropPage } from "../../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../../support/helpers/utilities";
|
|
4
|
+
import { showAlternativeAnswersComponent } from "../../../../pages/components";
|
|
5
|
+
|
|
6
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
4
7
|
const css = Cypress.env('css');
|
|
5
8
|
|
|
6
9
|
describe('Create item page - Fill in the gaps with drag and drop: Partial different weights', () => {
|
|
@@ -30,8 +33,22 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial differ
|
|
|
30
33
|
it('When the user selects \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers from the correct accordion and respective dropzone numeration', () => {
|
|
31
34
|
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
|
32
35
|
fillInTheGapsDragAndDropPage.steps.verifyDropzoneNumeration();
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
if (alternativeAnswerCheck) {
|
|
37
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
38
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
39
|
+
{
|
|
40
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
41
|
+
points: ['(15 points)', '(6 points)', '(4 points)', '(5 points)'],
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
45
|
+
points: ['(13 points)', '(7 points)', '(1 point)', '(5 points)'],
|
|
46
|
+
}
|
|
47
|
+
]);
|
|
48
|
+
} else {
|
|
49
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.correctAnswersLabel(), 'Correct answers');
|
|
50
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
|
51
|
+
}
|
|
35
52
|
});
|
|
36
53
|
|
|
37
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, green check-marks should be displayed beside all the correct responses, a status message and correct answer section should not be displayed', () => {
|
|
@@ -83,7 +100,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial differ
|
|
|
83
100
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
|
84
101
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
|
85
102
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
86
|
-
|
|
103
|
+
if (alternativeAnswerCheck) {
|
|
104
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
105
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
106
|
+
{
|
|
107
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
108
|
+
points: ['(15 points)', '(6 points)', '(4 points)', '(5 points)'],
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
112
|
+
points: ['(13 points)', '(7 points)', '(1 point)', '(5 points)'],
|
|
113
|
+
}
|
|
114
|
+
]);
|
|
115
|
+
} else {
|
|
116
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
|
117
|
+
}
|
|
87
118
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
88
119
|
/*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 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')
|
|
89
120
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -103,7 +134,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial differ
|
|
|
103
134
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
|
104
135
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
|
105
136
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
106
|
-
|
|
137
|
+
if (alternativeAnswerCheck) {
|
|
138
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
139
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
140
|
+
{
|
|
141
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
142
|
+
points: ['(15 points)', '(6 points)', '(4 points)', '(5 points)'],
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
146
|
+
points: ['(13 points)', '(7 points)', '(1 point)', '(5 points)'],
|
|
147
|
+
}
|
|
148
|
+
]);
|
|
149
|
+
} else {
|
|
150
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
|
151
|
+
}
|
|
107
152
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
108
153
|
/*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 green check-mark should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section should not be displayed')
|
|
109
154
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -123,7 +168,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial differ
|
|
|
123
168
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
|
124
169
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
|
125
170
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
126
|
-
|
|
171
|
+
if (alternativeAnswerCheck) {
|
|
172
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
173
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
174
|
+
{
|
|
175
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
176
|
+
points: ['(15 points)', '(6 points)', '(4 points)', '(5 points)'],
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
180
|
+
points: ['(13 points)', '(7 points)', '(1 point)', '(5 points)'],
|
|
181
|
+
}
|
|
182
|
+
]);
|
|
183
|
+
} else {
|
|
184
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
|
185
|
+
}
|
|
127
186
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
128
187
|
/*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 green check-mark should be displayed besides the response from the correct accordion, red cross-mark should be displayed besides the responses from the alternative accordion and no icon should be displayed beside unattempted response, a status message should not be displayed and correct answer section should not be displayed')
|
|
129
188
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -143,7 +202,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial differ
|
|
|
143
202
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
|
144
203
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
|
145
204
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
146
|
-
|
|
205
|
+
if (alternativeAnswerCheck) {
|
|
206
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
207
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
208
|
+
{
|
|
209
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
210
|
+
points: ['(15 points)', '(6 points)', '(4 points)', '(5 points)'],
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
214
|
+
points: ['(13 points)', '(7 points)', '(1 point)', '(5 points)'],
|
|
215
|
+
}
|
|
216
|
+
]);
|
|
217
|
+
} else {
|
|
218
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
|
219
|
+
}
|
|
147
220
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
148
221
|
/*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 green check-mark should be displayed besides the correct answer responses, red cross-mark should be displayed beside empty responses a status message should not be displayed and correct answer section should not be displayed')
|
|
149
222
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -163,7 +236,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial differ
|
|
|
163
236
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
|
164
237
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
|
165
238
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
166
|
-
|
|
239
|
+
if (alternativeAnswerCheck) {
|
|
240
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
241
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
242
|
+
{
|
|
243
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
244
|
+
points: ['(15 points)', '(6 points)', '(4 points)', '(5 points)'],
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
248
|
+
points: ['(13 points)', '(7 points)', '(1 point)', '(5 points)'],
|
|
249
|
+
}
|
|
250
|
+
]);
|
|
251
|
+
} else {
|
|
252
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
|
253
|
+
}
|
|
167
254
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
168
255
|
/*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 green check-mark should be displayed besides the correct answer responses, red cross-mark should be displayed beside empty responses a status message should not be displayed and correct answer section should not be displayed')
|
|
169
256
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -183,7 +270,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial differ
|
|
|
183
270
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
|
184
271
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
|
185
272
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
186
|
-
|
|
273
|
+
if (alternativeAnswerCheck) {
|
|
274
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
275
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
276
|
+
{
|
|
277
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
278
|
+
points: ['(15 points)', '(6 points)', '(4 points)', '(5 points)'],
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
282
|
+
points: ['(13 points)', '(7 points)', '(1 point)', '(5 points)'],
|
|
283
|
+
}
|
|
284
|
+
]);
|
|
285
|
+
} else {
|
|
286
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
|
287
|
+
}
|
|
187
288
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
188
289
|
/*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 green check-mark should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section should not be displayed')
|
|
189
290
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -203,7 +304,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial differ
|
|
|
203
304
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
|
204
305
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
|
205
306
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
206
|
-
|
|
307
|
+
if (alternativeAnswerCheck) {
|
|
308
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
309
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
310
|
+
{
|
|
311
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
312
|
+
points: ['(15 points)', '(6 points)', '(4 points)', '(5 points)'],
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
316
|
+
points: ['(13 points)', '(7 points)', '(1 point)', '(5 points)'],
|
|
317
|
+
}
|
|
318
|
+
]);
|
|
319
|
+
} else {
|
|
320
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
|
321
|
+
}
|
|
207
322
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
208
323
|
/*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then red cross-marks should be displayed besides all incorrect responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section should not be displayed')
|
|
209
324
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -231,7 +346,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial differ
|
|
|
231
346
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
|
232
347
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
|
233
348
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
234
|
-
|
|
349
|
+
if (alternativeAnswerCheck) {
|
|
350
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
351
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
352
|
+
{
|
|
353
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
354
|
+
points: ['(23 points)', '(11.4 points)', '(1.2 points)', '(10.4 points)'],
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
correctAnswers: [['Roots'], ['Stem'], ['Seed']],
|
|
358
|
+
points: ['(5 points)', '(1.2 points)', '(2.2 points)', '(1.6 points)'],
|
|
359
|
+
}
|
|
360
|
+
]);
|
|
361
|
+
} else {
|
|
362
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
|
363
|
+
}
|
|
235
364
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
236
365
|
/*cy.log('When user attempts the question correctly and clicks on the \'Check answer\' button, green check-mark icons should be displayed beside the correct responses from the correct accordion, red cross-mark icons should be displayed beside the incorrectly answered responses, correct/incorrect answer label and its border, correct answer container should not be displayed')
|
|
237
366
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { fillInTheGapsDragAndDropPage } 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') === 'true';
|
|
4
5
|
|
|
5
6
|
describe('Create item page - Fill in the gaps with drag and drop: Partial equal weights', () => {
|
|
6
7
|
before(() => {
|
|
@@ -27,7 +28,9 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial equal
|
|
|
27
28
|
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
|
28
29
|
fillInTheGapsDragAndDropPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
|
29
30
|
fillInTheGapsDragAndDropPage.steps.verifyDropzoneNumeration();
|
|
30
|
-
|
|
31
|
+
if (!alternativeAnswerCheck) {
|
|
32
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.correctAnswersLabel(), 'Correct answers');
|
|
33
|
+
}
|
|
31
34
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
|
32
35
|
});
|
|
33
36
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { fillInTheGapsDragAndDropPage } from "../../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../../support/helpers/utilities";
|
|
4
|
+
import { showAlternativeAnswersComponent } from "../../../../pages/components";
|
|
5
|
+
|
|
6
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
4
7
|
const css = Cypress.env('css');
|
|
5
8
|
|
|
6
9
|
describe('Create item page - Fill in the gaps with drag and drop: Partial equal with alternative answers', () => {
|
|
@@ -29,8 +32,22 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial equal
|
|
|
29
32
|
it('When the user selects \'Grading\' view without attempting the question, cell numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers from the alternative accordion and respective cell numeration', () => {
|
|
30
33
|
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
|
31
34
|
fillInTheGapsDragAndDropPage.steps.verifyDropzoneNumeration();
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
if (alternativeAnswerCheck) {
|
|
36
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
37
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
38
|
+
{
|
|
39
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
40
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
44
|
+
points: ['(9 points)', '(3 points)', '(3 points)', '(3 points)'],
|
|
45
|
+
}
|
|
46
|
+
]);
|
|
47
|
+
} else {
|
|
48
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.correctAnswersLabel(), 'Correct answers');
|
|
49
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Stem'], ['Seed']]);
|
|
50
|
+
}
|
|
34
51
|
});
|
|
35
52
|
|
|
36
53
|
it('When the user attempts the question with responses from the correct accordion, then the user should be awarded points of the correct accordion(less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message and correct answer section should not be displayed', () => {
|
|
@@ -82,7 +99,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial equal
|
|
|
82
99
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
|
83
100
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
|
84
101
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
85
|
-
|
|
102
|
+
if (alternativeAnswerCheck) {
|
|
103
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
104
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
105
|
+
{
|
|
106
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
107
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
111
|
+
points: ['(9 points)', '(3 points)', '(3 points)', '(3 points)'],
|
|
112
|
+
}
|
|
113
|
+
]);
|
|
114
|
+
} else {
|
|
115
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Stem'], ['Seed']]);
|
|
116
|
+
}
|
|
86
117
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
87
118
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message should not be displayed and correct answer section should not be displayed')
|
|
88
119
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -102,7 +133,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial equal
|
|
|
102
133
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
|
103
134
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
|
104
135
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
105
|
-
|
|
136
|
+
if (alternativeAnswerCheck) {
|
|
137
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
138
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
139
|
+
{
|
|
140
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
141
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
145
|
+
points: ['(9 points)', '(3 points)', '(3 points)', '(3 points)'],
|
|
146
|
+
}
|
|
147
|
+
]);
|
|
148
|
+
} else {
|
|
149
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Stem'], ['Seed']]);
|
|
150
|
+
}
|
|
106
151
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
107
152
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section should not be displayed')
|
|
108
153
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -122,7 +167,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial equal
|
|
|
122
167
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
|
123
168
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
|
124
169
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
125
|
-
|
|
170
|
+
if (alternativeAnswerCheck) {
|
|
171
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
172
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
173
|
+
{
|
|
174
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
175
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
179
|
+
points: ['(9 points)', '(3 points)', '(3 points)', '(3 points)'],
|
|
180
|
+
}
|
|
181
|
+
]);
|
|
182
|
+
} else {
|
|
183
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Stem'], ['Seed']]);
|
|
184
|
+
}
|
|
126
185
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
127
186
|
/*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 no icon should be displayed beside unattempted response, a status message should not be displayed and correct answer section should not be displayed')
|
|
128
187
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -142,7 +201,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial equal
|
|
|
142
201
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
|
143
202
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
|
144
203
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
145
|
-
|
|
204
|
+
if (alternativeAnswerCheck) {
|
|
205
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
206
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
207
|
+
{
|
|
208
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
209
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
213
|
+
points: ['(9 points)', '(3 points)', '(3 points)', '(3 points)'],
|
|
214
|
+
}
|
|
215
|
+
]);
|
|
216
|
+
} else {
|
|
217
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Stem'], ['Seed']]);
|
|
218
|
+
}
|
|
146
219
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
147
220
|
/*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 should not be displayed and correct answer section should not be displayed')
|
|
148
221
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -162,7 +235,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial equal
|
|
|
162
235
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
|
163
236
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
|
164
237
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
165
|
-
|
|
238
|
+
if (alternativeAnswerCheck) {
|
|
239
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
240
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
241
|
+
{
|
|
242
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
243
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
247
|
+
points: ['(9 points)', '(3 points)', '(3 points)', '(3 points)'],
|
|
248
|
+
}
|
|
249
|
+
]);
|
|
250
|
+
} else {
|
|
251
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Stem'], ['Seed']]);
|
|
252
|
+
}
|
|
166
253
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
167
254
|
/*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 should not be displayed and correct answer section should not be displayed')
|
|
168
255
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -182,7 +269,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial equal
|
|
|
182
269
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
|
183
270
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
|
184
271
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
185
|
-
|
|
272
|
+
if (alternativeAnswerCheck) {
|
|
273
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
274
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
275
|
+
{
|
|
276
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
277
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
281
|
+
points: ['(9 points)', '(3 points)', '(3 points)', '(3 points)'],
|
|
282
|
+
}
|
|
283
|
+
]);
|
|
284
|
+
} else {
|
|
285
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Stem'], ['Seed']]);
|
|
286
|
+
}
|
|
186
287
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
187
288
|
/*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 should not be displayed and correct answer section should not be displayed')
|
|
188
289
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -210,7 +311,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial equal
|
|
|
210
311
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
|
211
312
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
|
212
313
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
213
|
-
|
|
314
|
+
if (alternativeAnswerCheck) {
|
|
315
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
316
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
317
|
+
{
|
|
318
|
+
correctAnswers: [['Roots'], ['Stem'], ['Seed']],
|
|
319
|
+
points: ['(23 points)', '(7.67 points)', '(7.67 points)', '(7.67 points)'],
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
323
|
+
points: ['(5 points)', '(1.67 points)', '(1.67 points)', '(1.67 points)'],
|
|
324
|
+
}
|
|
325
|
+
]);
|
|
326
|
+
} else {
|
|
327
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Roots'], ['Stem'], ['Seed']]);
|
|
328
|
+
}
|
|
214
329
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
215
330
|
/*cy.log('When user attempts the question correctly and clicks on the \'Check answer\' button, green check-mark icons should be displayed beside the correct responses from the correct accordion, red cross-mark icons should be displayed beside the incorrectly answered responses, correct/incorrect answer label and its border, correct answer container should not be displayed')
|
|
216
331
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { fillInTheGapsDragAndDropPage } from "../../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../../support/helpers/utilities";
|
|
4
|
+
import { showAlternativeAnswersComponent } from "../../../../pages/components";
|
|
5
|
+
|
|
6
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
4
7
|
const css = Cypress.env('css');
|
|
5
8
|
|
|
6
9
|
describe('Create item page - Fill in the gaps with drag and drop: Partial equal with alternative answers', () => {
|
|
@@ -29,8 +32,22 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial equal
|
|
|
29
32
|
it('When the user selects \'Grading\' view without attempting the question, cell numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers from the correct accordion and respective cell numeration', () => {
|
|
30
33
|
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
|
31
34
|
fillInTheGapsDragAndDropPage.steps.verifyDropzoneNumeration();
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
if (alternativeAnswerCheck) {
|
|
36
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
37
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
38
|
+
{
|
|
39
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
40
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
44
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
45
|
+
}
|
|
46
|
+
]);
|
|
47
|
+
} else {
|
|
48
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.correctAnswersLabel(), 'Correct answers');
|
|
49
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
|
50
|
+
}
|
|
34
51
|
});
|
|
35
52
|
|
|
36
53
|
it('When the user attempts the question with responses from the correct accordion, then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
|
@@ -82,7 +99,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial equal
|
|
|
82
99
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
|
83
100
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
|
84
101
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
85
|
-
|
|
102
|
+
if (alternativeAnswerCheck) {
|
|
103
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
104
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
105
|
+
{
|
|
106
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
107
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
111
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
112
|
+
}
|
|
113
|
+
]);
|
|
114
|
+
} else {
|
|
115
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
|
116
|
+
}
|
|
86
117
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
87
118
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message should not be displayed and correct answer section should not be displayed')
|
|
88
119
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -102,7 +133,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial equal
|
|
|
102
133
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
|
103
134
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
|
104
135
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
105
|
-
|
|
136
|
+
if (alternativeAnswerCheck) {
|
|
137
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
138
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
139
|
+
{
|
|
140
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
141
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
145
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
146
|
+
}
|
|
147
|
+
]);
|
|
148
|
+
} else {
|
|
149
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
|
150
|
+
}
|
|
106
151
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
107
152
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section should not be displayed')
|
|
108
153
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -122,7 +167,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial equal
|
|
|
122
167
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
|
123
168
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
|
124
169
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
125
|
-
|
|
170
|
+
if (alternativeAnswerCheck) {
|
|
171
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
172
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
173
|
+
{
|
|
174
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
175
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
179
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
180
|
+
}
|
|
181
|
+
]);
|
|
182
|
+
} else {
|
|
183
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
|
184
|
+
}
|
|
126
185
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
127
186
|
/*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 should not be displayed and correct answer section should not be displayed')
|
|
128
187
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -142,7 +201,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial equal
|
|
|
142
201
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
|
143
202
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
|
144
203
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
145
|
-
|
|
204
|
+
if (alternativeAnswerCheck) {
|
|
205
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
206
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
207
|
+
{
|
|
208
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
209
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
213
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
214
|
+
}
|
|
215
|
+
]);
|
|
216
|
+
} else {
|
|
217
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
|
218
|
+
}
|
|
146
219
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
147
220
|
/*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 should not be displayed and correct answer section should not be displayed')
|
|
148
221
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -162,7 +235,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial equal
|
|
|
162
235
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
|
163
236
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
|
164
237
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
165
|
-
|
|
238
|
+
if (alternativeAnswerCheck) {
|
|
239
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
240
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
241
|
+
{
|
|
242
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
243
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
247
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
248
|
+
}
|
|
249
|
+
]);
|
|
250
|
+
} else {
|
|
251
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
|
252
|
+
}
|
|
166
253
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
167
254
|
/*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 should not be displayed and correct answer section should not be displayed')
|
|
168
255
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
|
@@ -182,7 +269,21 @@ describe('Create item page - Fill in the gaps with drag and drop: Partial equal
|
|
|
182
269
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
|
183
270
|
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
|
184
271
|
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
185
|
-
|
|
272
|
+
if (alternativeAnswerCheck) {
|
|
273
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
274
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionWithAlternateAnswers([
|
|
275
|
+
{
|
|
276
|
+
correctAnswers: [['Petals'], ['Flower'], ['Leaves']],
|
|
277
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
correctAnswers: [['Petals'], ['Stem'], ['Seed']],
|
|
281
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
282
|
+
}
|
|
283
|
+
]);
|
|
284
|
+
} else {
|
|
285
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
|
286
|
+
}
|
|
186
287
|
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
187
288
|
/*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 should not be displayed and correct answer section should not be displayed')
|
|
188
289
|
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|