itemengine-cypress-automation 1.0.145-equationAndCheckAnswerSeelctorUpdate-b61f46e.0 → 1.0.145
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingPenaltyScoring.js +0 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +0 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToCorrectPoints.js +0 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -1
- package/cypress/e2e/ILC/Graphing/Scoring/manuallyAndNonScoredScoring.js +0 -2
- package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +0 -12
- package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +0 -2
- package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +1 -0
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/Graphing/specifyCorrectAnswerSection.js +0 -1
- package/cypress/e2e/ILC/Graphing/studentViewSettings.js +0 -1
- package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +8 -8
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +256 -0
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +252 -0
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +335 -0
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingPenaltyScoring.js +60 -0
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +157 -0
- package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +2 -2
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +497 -0
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +0 -0
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +200 -0
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +280 -0
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +281 -0
- package/cypress/e2e/ILC/Matching/checkAnswerFunctionalityForAllViews.smoke.js +142 -0
- package/cypress/e2e/ILC/Matching/previewTabContentsForAllViews.smoke.js +146 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingPenaltyScoring.js +55 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsBasic.js +116 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +307 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +163 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +2 -3
- package/cypress/e2e/ILC/MultipleSelectionGridNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +3 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
- package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +2 -5
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +11 -10
- package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +6 -9
- package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +12 -5
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +1 -2
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -0
- package/cypress/pages/components/desmosToolComponent.js +1 -1
- package/cypress/pages/components/gridQuestionCommonComponent.js +28 -4
- package/cypress/pages/components/index.js +1 -0
- package/cypress/pages/components/specifyRowsAndColumnsComponent.js +132 -0
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +3 -113
- package/cypress/pages/geoGebraToolsPage.js +1 -1
- package/cypress/pages/graphingPage.js +6 -0
- package/cypress/pages/gridFillPage.js +67 -12
- package/cypress/pages/index.js +2 -1
- package/cypress/pages/matchingPage.js +433 -0
- package/cypress/pages/multipleSelectionGridPage.js +11 -3
- package/cypress/pages/singleSelectionGridPage.js +2 -1
- package/cypress/pages/textEntryMathPage.js +5 -0
- package/cypress/pages/textEntryMathWithImagePage.js +6 -1
- package/package.json +2 -2
@@ -0,0 +1,252 @@
|
|
1
|
+
import { gridFillPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Create item page - Grid fill: All or nothing with alternative answers', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Correct answer\' points are equal to \'Alternative answer\' points', () => {
|
10
|
+
abortEarlySetup();
|
11
|
+
before(() => {
|
12
|
+
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
13
|
+
cy.barsPreLoaderWait();
|
14
|
+
gridFillPage.steps.allotPoints(20);
|
15
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 0);
|
16
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 1);
|
17
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 2);
|
18
|
+
gridFillPage.steps.addAlternativeAnswerAccordion(1);
|
19
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 2);
|
20
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 3);
|
21
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 4);
|
22
|
+
gridFillPage.steps.allotPoints(20);
|
23
|
+
gridFillPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
24
|
+
gridFillPage.steps.switchToPreviewTab();
|
25
|
+
});
|
26
|
+
|
27
|
+
it('When the user selects \'Grading\' view without attempting the question, correct answer tick should be displayed in correct answer cell', () => {
|
28
|
+
gridFillPage.steps.switchToGradingView();
|
29
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
30
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
|
31
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 0);
|
32
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
33
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
34
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
|
35
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
36
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
|
37
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
|
38
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
39
|
+
});
|
40
|
+
|
41
|
+
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 icon, border, background should be displayed in all the responses from correct accordion and a status message with text \'Your answer is correct\' should be displayed', () => {
|
42
|
+
gridFillPage.steps.resetQuestionPreview();
|
43
|
+
gridFillPage.steps.selectCellPreviewTab(0, 0);
|
44
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 0);
|
45
|
+
gridFillPage.steps.selectCellPreviewTab(0, 1);
|
46
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
|
47
|
+
gridFillPage.steps.selectCellPreviewTab(0, 2);
|
48
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 2);
|
49
|
+
gridFillPage.steps.verifyPreviewScore(20, 20);
|
50
|
+
gridFillPage.steps.switchToGradingView();
|
51
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
52
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
53
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
54
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
|
55
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
|
56
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
|
57
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
58
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
59
|
+
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 in the responses from correct accordion and a status message with text \'Your answer is correct\' should be displayed')
|
60
|
+
gridFillPage.steps.checkAnswer();
|
61
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
62
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
63
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
64
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
|
65
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
|
66
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
|
67
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
68
|
+
});
|
69
|
+
|
70
|
+
it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with points specified for alternative accordion and on switching to \'Grading\' view, correct icon, border, background should be displayed in all the responses from alternative accordion, a status message with text \'Your answer is correct\' should be displayed', () => {
|
71
|
+
gridFillPage.steps.resetQuestionPreview();
|
72
|
+
gridFillPage.steps.selectCellPreviewTab(0, 2);
|
73
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 2);
|
74
|
+
gridFillPage.steps.selectCellPreviewTab(0, 3);
|
75
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 3);
|
76
|
+
gridFillPage.steps.selectCellPreviewTab(0, 4);
|
77
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
|
78
|
+
gridFillPage.steps.verifyPreviewScore(20, 20);
|
79
|
+
gridFillPage.steps.switchToGradingView();
|
80
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
|
81
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
|
82
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
83
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
|
84
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 4);
|
85
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
|
86
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
87
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
88
|
+
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 in the responses from alternative accordion and a status message with text \'Your answer is correct\' should be displayed')
|
89
|
+
gridFillPage.steps.checkAnswer();
|
90
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
|
91
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
|
92
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
93
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
|
94
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 4);
|
95
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
|
96
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
97
|
+
});
|
98
|
+
|
99
|
+
it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon, border, background should be displayed in the responses from correct accordion, correct background should not be displayed in unselected response and a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
100
|
+
gridFillPage.steps.resetQuestionPreview();
|
101
|
+
gridFillPage.steps.selectCellPreviewTab(0, 0);
|
102
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 0);
|
103
|
+
gridFillPage.steps.selectCellPreviewTab(0, 1);
|
104
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
|
105
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
106
|
+
gridFillPage.steps.switchToGradingView();
|
107
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
108
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
109
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
|
110
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
|
111
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
112
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0,2);
|
113
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
|
114
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
115
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
116
|
+
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 in the response from correct accordion, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
117
|
+
gridFillPage.steps.checkAnswer();
|
118
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
119
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
120
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
|
121
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
|
122
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
123
|
+
});
|
124
|
+
|
125
|
+
it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon, border, background should be displayed in the response from alternative accordion, correct icon and border should be displayed in the response from correct accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
126
|
+
gridFillPage.steps.resetQuestionPreview();
|
127
|
+
gridFillPage.steps.selectCellPreviewTab(0, 3);
|
128
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 3);
|
129
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
130
|
+
gridFillPage.steps.switchToGradingView();
|
131
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
|
132
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
|
133
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
134
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
|
135
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
|
136
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 4);
|
137
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0,2);
|
138
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0,4);
|
139
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
140
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
141
|
+
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 incorrect icon should be displayed in the partially selected response from alternative accordion, a status message with text \'Your answer is incorrect\' should be displayed')
|
142
|
+
gridFillPage.steps.checkAnswer();
|
143
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
|
144
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
|
145
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
146
|
+
});
|
147
|
+
|
148
|
+
it('When the user attempts the question partially correct with all the responses correct as per the alternative accordion but one response incomplete, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon, border, background should be displayed in the selected response from alternative accordion, correct icon and border should be displayed in the unselected response from alternative accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
149
|
+
gridFillPage.steps.resetQuestionPreview();
|
150
|
+
gridFillPage.steps.selectCellPreviewTab(0, 3);
|
151
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 3);
|
152
|
+
gridFillPage.steps.selectCellPreviewTab(0, 4);
|
153
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
|
154
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
155
|
+
gridFillPage.steps.switchToGradingView();
|
156
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
157
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
|
158
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
|
159
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
|
160
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
|
161
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
|
162
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 4);
|
163
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
164
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
165
|
+
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 in the response from the alternative accordion, incorrect icon should be displayed in the empty response, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
166
|
+
gridFillPage.steps.checkAnswer();
|
167
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
|
168
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
|
169
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
|
170
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 4);
|
171
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
172
|
+
});
|
173
|
+
|
174
|
+
it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, correct icon, border, background should be displayed in correct accordion responses, incorrect icon should be displayed in alternative accordion response, a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
175
|
+
gridFillPage.steps.resetQuestionPreview();
|
176
|
+
gridFillPage.steps.selectCellPreviewTab(0, 0);
|
177
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 0);
|
178
|
+
gridFillPage.steps.selectCellPreviewTab(0, 4);
|
179
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
|
180
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
181
|
+
gridFillPage.steps.switchToGradingView();
|
182
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
183
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
|
184
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
185
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
186
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
|
187
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
188
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
|
189
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
|
190
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(0, 4);
|
191
|
+
gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 4);
|
192
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
193
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
194
|
+
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 in the response from correct accordion, incorrect icon should be displayed in response from alternative accordion and a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
195
|
+
gridFillPage.steps.checkAnswer();
|
196
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
197
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
|
198
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(0, 4);
|
199
|
+
gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 4);
|
200
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
201
|
+
});
|
202
|
+
|
203
|
+
it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, correct icon, border, background should be in the common response, correct icon should be displayed in unselected response, a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
204
|
+
gridFillPage.steps.resetQuestionPreview();
|
205
|
+
gridFillPage.steps.selectCellPreviewTab(0, 2);
|
206
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 2);
|
207
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
208
|
+
gridFillPage.steps.switchToGradingView();
|
209
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
210
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
|
211
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 0);
|
212
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
213
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
214
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
|
215
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
216
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
|
217
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
218
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
219
|
+
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 in the correct answer responses, no icon should be displayed in unselected response area, a status message with text \'Your answer is incorrect\' should be displayed')
|
220
|
+
gridFillPage.steps.checkAnswer();
|
221
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
222
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
|
223
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
224
|
+
});
|
225
|
+
|
226
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed in all incorrect responses, correct icon, border, background should be displayed in unselected responses from correct answer accordion, a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
227
|
+
gridFillPage.steps.resetQuestionPreview();
|
228
|
+
gridFillPage.steps.selectCellPreviewTab(1, 2);
|
229
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(1,2);
|
230
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
231
|
+
gridFillPage.steps.switchToGradingView();
|
232
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
233
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
234
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
235
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
|
236
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
237
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
|
238
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 0);
|
239
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
|
240
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
|
241
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(1, 2);
|
242
|
+
gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(1, 2);
|
243
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
244
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
245
|
+
cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed in all incorrect responses and status message with text \'Your answer is incorrect\' should be displayed')
|
246
|
+
gridFillPage.steps.checkAnswer();
|
247
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(1, 2);
|
248
|
+
gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(1, 2);
|
249
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
250
|
+
});
|
251
|
+
});
|
252
|
+
});
|
package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js
ADDED
@@ -0,0 +1,335 @@
|
|
1
|
+
import { gridFillPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Create item page - grid fill: All or nothing with alternative answers', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Correct answer\' points are more than \'Alternative answer\' points', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
gridFillPage.steps.allotPoints(20);
|
17
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 0);
|
18
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 1);
|
19
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 2);
|
20
|
+
gridFillPage.steps.addAlternativeAnswerAccordion(1);
|
21
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 2);
|
22
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 3);
|
23
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 4);
|
24
|
+
gridFillPage.steps.allotPoints(10);
|
25
|
+
gridFillPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
26
|
+
gridFillPage.steps.switchToPreviewTab();
|
27
|
+
});
|
28
|
+
|
29
|
+
it('When the user selects \'Grading\' view without attempting the question, correct answer tick should be displayed in correct answer cell', () => {
|
30
|
+
gridFillPage.steps.switchToGradingView();
|
31
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
32
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
|
33
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 0);
|
34
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
35
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
36
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
|
37
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
38
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
|
39
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
|
40
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
41
|
+
});
|
42
|
+
|
43
|
+
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 in responses from correct accordion, a status message with text \'Your answer is correct\' should be displayed above the question preview', () => {
|
44
|
+
gridFillPage.steps.resetQuestionPreview();
|
45
|
+
gridFillPage.steps.selectCellPreviewTab(0, 0);
|
46
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 0);
|
47
|
+
gridFillPage.steps.selectCellPreviewTab(0, 1);
|
48
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
|
49
|
+
gridFillPage.steps.selectCellPreviewTab(0, 2);
|
50
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 2);
|
51
|
+
gridFillPage.steps.verifyPreviewScore(20, 20);
|
52
|
+
gridFillPage.steps.switchToGradingView();
|
53
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
54
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
55
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
56
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
|
57
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
|
58
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
|
59
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
60
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
61
|
+
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 in responses from correct accordion, a status message with text \'Your answer is correct\' should be displayed above the question preview')
|
62
|
+
gridFillPage.steps.checkAnswer();
|
63
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
64
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
65
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
66
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
|
67
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
|
68
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
|
69
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
70
|
+
});
|
71
|
+
|
72
|
+
it('CSS of Correct answer state', { tags: 'css' }, () => {
|
73
|
+
utilities.verifyCSS(gridFillPage.previewScoreText(), {
|
74
|
+
'color': css.color.whiteText,
|
75
|
+
'background-color': css.color.correctAnswer
|
76
|
+
});
|
77
|
+
gridFillPage.correctIcon()
|
78
|
+
.verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
|
79
|
+
utilities.verifyCSS(gridFillPage.correctIncorrectAnswerBlock(), {
|
80
|
+
'background-color': css.color.correctAnswerLabelBg,
|
81
|
+
'border': `1px solid ${css.color.correctAnswer}`
|
82
|
+
});
|
83
|
+
utilities.verifyCSS(gridFillPage.correctIncorrectStatusMessageText(), {
|
84
|
+
'color': css.color.text,
|
85
|
+
'font-size': css.fontSize.default,
|
86
|
+
'font-weight': css.fontWeight.regular
|
87
|
+
});
|
88
|
+
utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInPreviewTab(), 0), {
|
89
|
+
'border-color': css.color.correctAnswer,
|
90
|
+
'background-color': css.color.gridCellCorrectAnswerBg
|
91
|
+
});
|
92
|
+
});
|
93
|
+
|
94
|
+
it('Accessibility of correct answer state', { tags: 'a11y' }, () => {
|
95
|
+
cy.checkAccessibility(gridFillPage.previewTabQuestionWrapper());
|
96
|
+
});
|
97
|
+
|
98
|
+
it('When the user attempts the question with alternative accordion response, then the user should be awarded with points specified for alternative accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed in responses from alternative accordion, a status message with text \'Your answer is correct\' should be displayed', () => {
|
99
|
+
gridFillPage.steps.resetQuestionPreview();
|
100
|
+
gridFillPage.steps.selectCellPreviewTab(0, 2);
|
101
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 2);
|
102
|
+
gridFillPage.steps.selectCellPreviewTab(0, 3);
|
103
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 3);
|
104
|
+
gridFillPage.steps.selectCellPreviewTab(0, 4);
|
105
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
|
106
|
+
gridFillPage.steps.verifyPreviewScore(10, 20);
|
107
|
+
gridFillPage.steps.switchToGradingView();
|
108
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
|
109
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
|
110
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
111
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
|
112
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 4);
|
113
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
|
114
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
115
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
116
|
+
cy.log('When the user has attempted the question with alternative accordion response and clicks on \'Check answer\' button, then correct icon should be displayed in responses from alternative accordion, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
117
|
+
gridFillPage.steps.checkAnswer();
|
118
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
119
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
|
120
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
|
121
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
|
122
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
|
123
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 4);
|
124
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
125
|
+
});
|
126
|
+
|
127
|
+
it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon, background and border should be displayed in the selected responses from correct accordion, correct icon and border should be displayed for unselected responses from correct accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
128
|
+
gridFillPage.steps.resetQuestionPreview();
|
129
|
+
gridFillPage.steps.selectCellPreviewTab(0, 0);
|
130
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 0);
|
131
|
+
gridFillPage.steps.selectCellPreviewTab(0, 1);
|
132
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
|
133
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
134
|
+
gridFillPage.steps.switchToGradingView();
|
135
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
136
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
137
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
|
138
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
|
139
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
140
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
|
141
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
|
142
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
143
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
144
|
+
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 in the responses from correct accordion, no icon/border should be displayed for unselected responses from correct accordion and a status message with text \'Your answer is incorrect\' should be displayed')
|
145
|
+
gridFillPage.steps.checkAnswer();
|
146
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
147
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
148
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
|
149
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
|
150
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
151
|
+
});
|
152
|
+
|
153
|
+
it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon and border should be displayed in response from correct accordion and incorrect icon should be displayed in selected response from alternative accordion, a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
154
|
+
gridFillPage.steps.resetQuestionPreview();
|
155
|
+
gridFillPage.steps.selectCellPreviewTab(0, 3);
|
156
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 3);
|
157
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
158
|
+
gridFillPage.steps.switchToGradingView();
|
159
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
160
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
161
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
162
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
|
163
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
164
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
|
165
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 0);
|
166
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
|
167
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
|
168
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(0, 3);
|
169
|
+
gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 3);
|
170
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
171
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
172
|
+
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 incorrect icon should be displayed in the partially selected response from alternative accordion, a status message with text \'Your answer is incorrect\' should be displayed')
|
173
|
+
gridFillPage.steps.checkAnswer();
|
174
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(0, 3);
|
175
|
+
gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 3);
|
176
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
177
|
+
});
|
178
|
+
|
179
|
+
it('When the user attempts the question partially correct with all the responses correct as per the alternative accordion but one response incomplete, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed in response from alternative accordion, correct icon should be displayed in unselected response from correct accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
180
|
+
gridFillPage.steps.resetQuestionPreview();
|
181
|
+
gridFillPage.steps.selectCellPreviewTab(0, 3);
|
182
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 3);
|
183
|
+
gridFillPage.steps.selectCellPreviewTab(0, 4);
|
184
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
|
185
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
186
|
+
gridFillPage.steps.switchToGradingView();
|
187
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
188
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
189
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
190
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
|
191
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
192
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
|
193
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 0);
|
194
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
|
195
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
|
196
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(0, 3);
|
197
|
+
gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 3);
|
198
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(0, 4);
|
199
|
+
gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 4);
|
200
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
201
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
202
|
+
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 unselected and clicks on \'Check answer\' button, then incorrect icon should be displayed in the partially selected responses from alternative accordion a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed');
|
203
|
+
gridFillPage.steps.checkAnswer();
|
204
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(0, 3);
|
205
|
+
gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 3);
|
206
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(0, 4);
|
207
|
+
gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 4);
|
208
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
209
|
+
});
|
210
|
+
|
211
|
+
it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, correct icon should be displayed in the response from correct accordion, incorrect icon should be displayed in the response from alternative accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
212
|
+
gridFillPage.steps.resetQuestionPreview();
|
213
|
+
gridFillPage.steps.selectCellPreviewTab(0, 0);
|
214
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 0);
|
215
|
+
gridFillPage.steps.selectCellPreviewTab(0, 4);
|
216
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
|
217
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
218
|
+
gridFillPage.steps.switchToGradingView();
|
219
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
220
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
221
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
|
222
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
|
223
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
224
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
|
225
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
226
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
|
227
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(0, 4);
|
228
|
+
gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 4);
|
229
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
230
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
231
|
+
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 in the response from correct answer accordion, incorrect icon should be displayed in the response from alternative answer accordion and a status message with text \'Your answer is incorrect\' should be displayed')
|
232
|
+
gridFillPage.steps.checkAnswer();
|
233
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
234
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
|
235
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(0, 4);
|
236
|
+
gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 4);
|
237
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
238
|
+
});
|
239
|
+
|
240
|
+
it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, correct icon, background and border should be in the common response, correct icon should be displayed in responses from unselected correct accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
241
|
+
gridFillPage.steps.resetQuestionPreview();
|
242
|
+
gridFillPage.steps.selectCellPreviewTab(0, 2);
|
243
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 2);
|
244
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
245
|
+
gridFillPage.steps.switchToGradingView();
|
246
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
247
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 0);
|
248
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
|
249
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
250
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
|
251
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
252
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
253
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
|
254
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
255
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
256
|
+
cy.log('When the user has attempted the question with common response between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed in the correct answer responses, no icon should be displayed for unselected response area and a status message with text \'Your answer is incorrect\' should be displayed')
|
257
|
+
gridFillPage.steps.checkAnswer();
|
258
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
259
|
+
gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
|
260
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
261
|
+
});
|
262
|
+
|
263
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon, background and border should be displayed in incorrect response and correct icon in response from correct accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
264
|
+
gridFillPage.steps.resetQuestionPreview();
|
265
|
+
gridFillPage.steps.selectCellPreviewTab(1, 1);
|
266
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(1, 1);
|
267
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
268
|
+
gridFillPage.steps.switchToGradingView();
|
269
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
270
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
271
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
|
272
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
|
273
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
274
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
|
275
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 0);
|
276
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 1);
|
277
|
+
gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
|
278
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(1, 1);
|
279
|
+
gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(1, 1);
|
280
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
281
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
282
|
+
cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed in incorrect responses and status message with text \'Your answer is incorrect\' should be displayed')
|
283
|
+
gridFillPage.steps.checkAnswer();
|
284
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(1, 1);
|
285
|
+
gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(1, 1);
|
286
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
287
|
+
});
|
288
|
+
|
289
|
+
it('CSS of incorrect answer state', { tags: 'css' }, () => {
|
290
|
+
gridFillPage.incorrectIcon()
|
291
|
+
.verifyPseudoClassBeforeProperty('color', css.color.incorrectAnswer);
|
292
|
+
utilities.verifyCSS(gridFillPage.correctIncorrectAnswerBlock(), {
|
293
|
+
'background-color': css.color.incorrectAnswerLabelBg,
|
294
|
+
'border': `1px solid ${css.color.incorrectAnswer}`
|
295
|
+
});
|
296
|
+
utilities.verifyCSS(gridFillPage.correctIncorrectStatusMessageText(), {
|
297
|
+
'color': css.color.text,
|
298
|
+
'font-size': css.fontSize.default,
|
299
|
+
'font-weight': css.fontWeight.regular
|
300
|
+
});
|
301
|
+
});
|
302
|
+
|
303
|
+
it('Accessibility of incorrect answer state', { tags: 'a11y' }, () => {
|
304
|
+
cy.checkAccessibility(gridFillPage.previewTabQuestionWrapper());
|
305
|
+
});
|
306
|
+
|
307
|
+
it('When the user sets \'Award minimum score only if attempted\' in minimum scoring dropdown and allots minimum points such that minimum points are less than alternative answer points, then attempts the question with responses from the alternative accordion, the user should be awarded with alternative answer points', () => {
|
308
|
+
gridFillPage.steps.switchToEditTab();
|
309
|
+
gridFillPage.steps.expandMinimumScoringDropdown();
|
310
|
+
gridFillPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
311
|
+
gridFillPage.steps.allotMinimumPoints(3);
|
312
|
+
gridFillPage.steps.switchToPreviewTab();
|
313
|
+
gridFillPage.steps.selectCellPreviewTab(0, 2);
|
314
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 2);
|
315
|
+
gridFillPage.steps.selectCellPreviewTab(0, 3);
|
316
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 3);
|
317
|
+
gridFillPage.steps.selectCellPreviewTab(0, 4);
|
318
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
|
319
|
+
gridFillPage.steps.verifyPreviewScore(10, 20);
|
320
|
+
});
|
321
|
+
|
322
|
+
it('When the user sets minimum points such that minimum points are greater than alternative answer points, then attempts the question with responses from the alternative accordion, the user should be awarded with minimum points', () => {
|
323
|
+
gridFillPage.steps.switchToEditTab();
|
324
|
+
gridFillPage.steps.allotMinimumPoints(13);
|
325
|
+
gridFillPage.steps.switchToPreviewTab();
|
326
|
+
gridFillPage.steps.selectCellPreviewTab(0, 2);
|
327
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 2);
|
328
|
+
gridFillPage.steps.selectCellPreviewTab(0, 3);
|
329
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 3);
|
330
|
+
gridFillPage.steps.selectCellPreviewTab(0, 4);
|
331
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
|
332
|
+
gridFillPage.steps.verifyPreviewScore(13, 20);
|
333
|
+
});
|
334
|
+
});
|
335
|
+
});
|