itemengine-cypress-automation 1.0.150-migrationScripts-4f6bd6a.0 → 1.0.150
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +4 -4
- package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +3 -3
- package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +2 -1
- package/cypress/e2e/ILC/ContentBlocks/additionalSection.js +2 -2
- package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +6 -6
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +3 -3
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +2 -2
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +1 -1
- package/cypress/e2e/ILC/GridFill/additionalSettings.js +52 -0
- package/cypress/e2e/ILC/GridFill/headerSection.js +74 -0
- package/cypress/e2e/ILC/GridFill/minimumScoringPenaltyPointsAndRoundingDropdown.js +199 -0
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -15
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +3 -18
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +4 -25
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingPenaltyScoring.js +4 -7
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +1 -14
- package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +1 -1
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +4 -4
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +256 -0
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +213 -0
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +258 -0
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +206 -0
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +198 -0
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +4 -6
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +10 -22
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +421 -0
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +247 -0
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +219 -0
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +247 -0
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsBasic.js +168 -0
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +227 -0
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +199 -0
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +227 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +345 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +340 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +421 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabScoringSection.js +292 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/previewContentsForAllViews.smoke.js +10 -2
- package/cypress/e2e/ILC/MultipleSelectionGridNew/specifyCorrectAnswerSection.js +86 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +189 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingPenaltyScoring.js +55 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsBasic.js +116 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +309 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +163 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabScoringSection.js +292 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/previewContentsForAllViews.smoke.js +10 -2
- package/cypress/e2e/ILC/SingleSelectionGridNew/specifyCorrectAnswerSection.js +86 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +189 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +1 -1
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +1 -1
- package/cypress/fixtures/uploads/sampleVirus.zip +0 -0
- package/cypress/pages/audioResponsePage.js +2 -2
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
- package/cypress/pages/components/commonComponents.js +2 -1
- package/cypress/pages/components/customizeSpecialCharacterComponent.js +5 -5
- package/cypress/pages/components/desmosToolComponent.js +1 -1
- package/cypress/pages/components/gridQuestionCommonComponent.js +388 -35
- package/cypress/pages/components/maximumRecorderLengthComponent.js +4 -4
- package/cypress/pages/components/playbackControlsBaseComponent.js +8 -2
- package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
- package/cypress/pages/contentBlocksPage.js +1 -1
- package/cypress/pages/drawingResponsePage.js +9 -10
- package/cypress/pages/geoGebraActivityPage.js +2 -1
- package/cypress/pages/geoGebraToolsPage.js +1 -1
- package/cypress/pages/gridFillPage.js +108 -13
- package/cypress/pages/matchingPage.js +154 -2
- package/cypress/pages/multipleSelectionGridPage.js +10 -2
- package/cypress/pages/rulerPage.js +2 -5
- package/cypress/pages/singleSelectionGridPage.js +18 -2
- package/package.json +2 -2
@@ -0,0 +1,292 @@
|
|
1
|
+
import { multipleSelectionGridPage } 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 - Multiple selection grid: Scoring section', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Scoring section contents', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
});
|
17
|
+
|
18
|
+
multipleSelectionGridPage.tests.verifyScoringTypeLabelAndDropdown('Auto scored');
|
19
|
+
|
20
|
+
multipleSelectionGridPage.tests.verifyScoringSubtypeContentsForMultipleResponseTypeQuestion();
|
21
|
+
});
|
22
|
+
|
23
|
+
describe('Auto scored: All or nothing scoring - Scoring section', () => {
|
24
|
+
abortEarlySetup();
|
25
|
+
before(() => {
|
26
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
27
|
+
cy.barsPreLoaderWait();
|
28
|
+
});
|
29
|
+
|
30
|
+
it('When the user has selected \'All or nothing\' scoring subtype, minimum scoring dropdown should be displayed in the scoring section', () => {
|
31
|
+
multipleSelectionGridPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
32
|
+
});
|
33
|
+
});
|
34
|
+
|
35
|
+
describe('Auto scored: All or nothing scoring - Specify correct answer section', () => {
|
36
|
+
abortEarlySetup();
|
37
|
+
before(() => {
|
38
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
39
|
+
multipleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
40
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
41
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
42
|
+
cy.barsPreLoaderWait();
|
43
|
+
});
|
44
|
+
|
45
|
+
multipleSelectionGridPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
46
|
+
|
47
|
+
multipleSelectionGridPage.tests.verifyPointsLabelAndInputField();
|
48
|
+
});
|
49
|
+
|
50
|
+
describe('Auto scored: Partial - equal weights scoring - Scoring section', () => {
|
51
|
+
abortEarlySetup();
|
52
|
+
before(() => {
|
53
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
54
|
+
cy.barsPreLoaderWait();
|
55
|
+
});
|
56
|
+
|
57
|
+
it('User should be able to select \'Partial - equal weights\' scoring type', () => {
|
58
|
+
multipleSelectionGridPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
59
|
+
});
|
60
|
+
|
61
|
+
it('When the user has switched to \'Partial - equal weights\' scoring, then \'Penalty scoring\', \'Minimum scoring\' and \'Rounding\' label and dropdown should be displayed in the \'Scoring\' section, \'Round negative scores to zero\' label and checkbox should not be displayed in the \'Scoring\' section', () => {
|
62
|
+
multipleSelectionGridPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
63
|
+
multipleSelectionGridPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
|
64
|
+
multipleSelectionGridPage.steps.verifyRoundingLabelAndDropdownDefaultState();
|
65
|
+
utilities.verifyElementVisibilityState(multipleSelectionGridPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
66
|
+
});
|
67
|
+
});
|
68
|
+
|
69
|
+
describe('Auto scored: Partial - equal weights scoring - Specify correct answer section', () => {
|
70
|
+
abortEarlySetup();
|
71
|
+
before(() => {
|
72
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
73
|
+
cy.barsPreLoaderWait();
|
74
|
+
multipleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
75
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
76
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
77
|
+
multipleSelectionGridPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
78
|
+
});
|
79
|
+
|
80
|
+
multipleSelectionGridPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
81
|
+
|
82
|
+
it('When the user selects \'Partial - equal weights\' scoring type then in the specify correct answer section, \'Point per row -\' label and empty input field along with \'Total points\' label should be displayed', () => {
|
83
|
+
utilities.verifyInnerText(multipleSelectionGridPage.pointsLabel(), 'Points');
|
84
|
+
multipleSelectionGridPage.steps.verifyPointsFieldValue('');
|
85
|
+
utilities.verifyElementVisibilityState(multipleSelectionGridPage.pointsInputField(), 'visible');
|
86
|
+
utilities.verifyInnerText(multipleSelectionGridPage.pointsPerRowLabel(), 'Points per row: -');
|
87
|
+
utilities.verifyElementVisibilityState(multipleSelectionGridPage.pointsPerRowLabel(), 'visible');
|
88
|
+
});
|
89
|
+
|
90
|
+
it('When the user enters points in the \'Point per row\' input field then the \'Point per row\' should be updated according to the number of row present', () => {
|
91
|
+
multipleSelectionGridPage.steps.allotPoints(10);
|
92
|
+
multipleSelectionGridPage.steps.verifyPointsPerRowValue('2.5');
|
93
|
+
});
|
94
|
+
|
95
|
+
it('When the user adds a new row, then the total points should be updated according to the total rows available', () => {
|
96
|
+
multipleSelectionGridPage.steps.addInputToRowInputStepper(5);
|
97
|
+
multipleSelectionGridPage.steps.verifyPointsPerRowValue('2');
|
98
|
+
});
|
99
|
+
|
100
|
+
it('When the user adds a new column, then the total points should remain the same according to the total rows available', () => {
|
101
|
+
multipleSelectionGridPage.steps.addInputToColumnInputStepper(4);
|
102
|
+
multipleSelectionGridPage.steps.verifyPointsPerRowValue('2');
|
103
|
+
});
|
104
|
+
|
105
|
+
it('When the user deletes a row, then the total points should be updated according to the total rows available', () => {
|
106
|
+
multipleSelectionGridPage.steps.addInputToRowInputStepper(4);
|
107
|
+
multipleSelectionGridPage.steps.verifyPointsPerRowValue('2.5');
|
108
|
+
});
|
109
|
+
|
110
|
+
it('When the user deletes a column, then the total points should remain the same according to the total rows available', () => {
|
111
|
+
multipleSelectionGridPage.steps.addInputToColumnInputStepper(3);
|
112
|
+
multipleSelectionGridPage.steps.verifyPointsPerRowValue('2.5');
|
113
|
+
});
|
114
|
+
|
115
|
+
it('When the user switches to \'All or nothing\' scoring, the \'Points per row\' label should not be displayed and the points displayed in \'Points\' input field should remain unchanged', () => {
|
116
|
+
multipleSelectionGridPage.steps.selectAutoScoredScoringSubtype('All or nothing');
|
117
|
+
utilities.verifyInnerText(multipleSelectionGridPage.pointsLabel(), 'Points');
|
118
|
+
multipleSelectionGridPage.steps.verifyPointsFieldValue('10');
|
119
|
+
utilities.verifyElementVisibilityState(multipleSelectionGridPage.pointsPerRowLabel(), 'notExist');
|
120
|
+
});
|
121
|
+
|
122
|
+
it('When the user updates the entered points in \'All or nothing\' scoring type and switches to \'Partial equal weights\' scoring type, then the points should be equally divided and displayed in the \'Points per row -\' label', () => {
|
123
|
+
multipleSelectionGridPage.steps.allotPoints(12);
|
124
|
+
multipleSelectionGridPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
125
|
+
multipleSelectionGridPage.steps.verifyPointsPerRowValue('3');
|
126
|
+
});
|
127
|
+
|
128
|
+
it('CSS of \'Points\' label and input field', { tags: 'css' }, () => {
|
129
|
+
utilities.verifyCSS(multipleSelectionGridPage.pointsLabel(), {
|
130
|
+
'color': css.color.labels,
|
131
|
+
'font-size': css.fontSize.normal,
|
132
|
+
'font-weight': css.fontWeight.semibold
|
133
|
+
});
|
134
|
+
utilities.verifyCSS(multipleSelectionGridPage.pointsInputField(), {
|
135
|
+
'color': css.color.text,
|
136
|
+
'font-size': css.fontSize.default,
|
137
|
+
'font-weight': css.fontWeight.regular
|
138
|
+
});
|
139
|
+
utilities.verifyCSS(multipleSelectionGridPage.pointsPerRowLabel(), {
|
140
|
+
'color': css.color.labels,
|
141
|
+
'font-size': css.fontSize.normal,
|
142
|
+
'font-weight': css.fontWeight.regular
|
143
|
+
});
|
144
|
+
utilities.verifyCSS(multipleSelectionGridPage.pointsPerRowLabel().find('span'), {
|
145
|
+
'color': css.color.labels,
|
146
|
+
'font-size': css.fontSize.normal,
|
147
|
+
'font-weight': css.fontWeight.bold
|
148
|
+
});
|
149
|
+
});
|
150
|
+
});
|
151
|
+
|
152
|
+
describe('Auto scored: Partial - different weights scoring - Scoring section', () => {
|
153
|
+
abortEarlySetup();
|
154
|
+
before(() => {
|
155
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
156
|
+
cy.barsPreLoaderWait();
|
157
|
+
});
|
158
|
+
|
159
|
+
it('User should be able to select \'Partial - different weights\' scoring', () => {
|
160
|
+
multipleSelectionGridPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
161
|
+
});
|
162
|
+
|
163
|
+
it('When the user has switched to \'Partial - different weights\' scoring, then \'Penalty scoring\', \'Minimum scoring\' and \'Rounding\' labels and dropdowns, \'Round negative scores to zero\' label and checkbox should not be displayed in the \'Scoring\' section', () => {
|
164
|
+
multipleSelectionGridPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
165
|
+
multipleSelectionGridPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
|
166
|
+
multipleSelectionGridPage.steps.verifyRoundingLabelAndDropdownDefaultState();
|
167
|
+
utilities.verifyElementVisibilityState(multipleSelectionGridPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
168
|
+
});
|
169
|
+
});
|
170
|
+
|
171
|
+
describe('Auto scored: Partial - different weights scoring - Specify correct answer section', () => {
|
172
|
+
abortEarlySetup();
|
173
|
+
before(() => {
|
174
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
175
|
+
cy.barsPreLoaderWait();
|
176
|
+
multipleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
177
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
178
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
179
|
+
multipleSelectionGridPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
180
|
+
});
|
181
|
+
|
182
|
+
multipleSelectionGridPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
183
|
+
|
184
|
+
it('When the user has switched to \'Partial - different weights\' scoring, then \'Points per row\' label should be displayed and a points input field should be displayed besides each row', () => {
|
185
|
+
utilities.verifyInnerText(multipleSelectionGridPage.pointsPerResponseLabel(), 'Points per row');
|
186
|
+
utilities.verifyElementVisibilityState(multipleSelectionGridPage.pointsPerResponseLabel(), 'visible');
|
187
|
+
multipleSelectionGridPage.steps.verifyPartialDifferentWeightsPointsInputFieldIsEmpty();
|
188
|
+
});
|
189
|
+
|
190
|
+
it('When the user has not set any answer in the specify correct answer section, then the \'Points\' input field should be disabled', () => {
|
191
|
+
for (let index = 0; index < 4; index++) {
|
192
|
+
multipleSelectionGridPage.steps.verifyPartialDifferentWeightsPointsInputFieldIsDisabled(index);
|
193
|
+
};
|
194
|
+
});
|
195
|
+
|
196
|
+
it('When the user sets answers in the specify correct answer section, then \'Points\' input field for the selected correct options should get enabled and the other unselected options should stay in disabled state', () => {
|
197
|
+
multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }]);
|
198
|
+
multipleSelectionGridPage.steps.verifyPartialDifferentWeightsPointsInputFieldIsEnabled(0);
|
199
|
+
multipleSelectionGridPage.steps.verifyPartialDifferentWeightsPointsInputFieldIsEnabled(1);
|
200
|
+
multipleSelectionGridPage.steps.verifyPartialDifferentWeightsPointsInputFieldIsDisabled(2);
|
201
|
+
multipleSelectionGridPage.steps.verifyPartialDifferentWeightsPointsInputFieldIsDisabled(3);
|
202
|
+
});
|
203
|
+
|
204
|
+
it('User should be able to set points in the \'Points\' input fields', () => {
|
205
|
+
cy.log('Setting correct answers for remaining rows')
|
206
|
+
multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 3, column: 0 }, { row: 4, column: 1 }]);
|
207
|
+
multipleSelectionGridPage.steps.allotPartialDifferentWeightsPoints({ 0: 2.3, 1: 3.4, 2: 1.2, 3: 1.1 });
|
208
|
+
});
|
209
|
+
|
210
|
+
it('CSS of \'Points per row\' label and \'Points\' input fields', { tags: 'css' }, () => {
|
211
|
+
utilities.verifyCSS(multipleSelectionGridPage.pointsPerResponseLabel(), {
|
212
|
+
'color': css.color.labels,
|
213
|
+
'font-size': css.fontSize.normal,
|
214
|
+
'font-weight': css.fontWeight.semibold
|
215
|
+
});
|
216
|
+
utilities.verifyCSS(multipleSelectionGridPage.pointsInputField(), {
|
217
|
+
'color': css.color.text,
|
218
|
+
'font-size': css.fontSize.default,
|
219
|
+
'font-weight': css.fontWeight.regular
|
220
|
+
});
|
221
|
+
});
|
222
|
+
|
223
|
+
it('When the user switches to \'All or nothing\' scoring, the points added for individual responses in Partial - different weights scoring should get summed up in the \'All or nothing scoring\' points input field', () => {
|
224
|
+
multipleSelectionGridPage.steps.selectAutoScoredScoringSubtype('All or nothing');
|
225
|
+
multipleSelectionGridPage.steps.verifyPointsFieldValue(8);
|
226
|
+
});
|
227
|
+
|
228
|
+
it('When the user updates the entered points in \'All or nothing\' scoring type and switches to \'Partial different weights\' scoring type, then the points should be equally divided and displayed besides each correct option', () => {
|
229
|
+
multipleSelectionGridPage.steps.allotPoints(9);
|
230
|
+
multipleSelectionGridPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
231
|
+
multipleSelectionGridPage.steps.verifyPartialDifferentWeightsPointsInputFieldValue([2.25, 2.25, 2.25, 2.25]);
|
232
|
+
});
|
233
|
+
});
|
234
|
+
|
235
|
+
describe('Manually scored scoring - Scoring section', () => {
|
236
|
+
abortEarlySetup();
|
237
|
+
before(() => {
|
238
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
239
|
+
cy.barsPreLoaderWait();
|
240
|
+
});
|
241
|
+
|
242
|
+
it('User should be able to select \'Manually scored\' scoring type from scoring type dropdown', () => {
|
243
|
+
multipleSelectionGridPage.steps.expandScoringTypeDropdown();
|
244
|
+
multipleSelectionGridPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
245
|
+
});
|
246
|
+
|
247
|
+
it('When the user has selected \'Manually scored\' scoring type, then the specify correct answer section should not be displayed', () => {
|
248
|
+
utilities.verifyElementVisibilityState(multipleSelectionGridPage.specifyCorrectAnswerLabel(), 'notExist');
|
249
|
+
utilities.verifyElementVisibilityState(multipleSelectionGridPage.specifyCorrectAnswerSectionWrapper(), 'notExist');
|
250
|
+
});
|
251
|
+
|
252
|
+
multipleSelectionGridPage.tests.verifyScoringSectionContentsForManuallyScoredScoringType();
|
253
|
+
|
254
|
+
multipleSelectionGridPage.tests.verifyPointsFieldErrorState();
|
255
|
+
|
256
|
+
it('When user has selected \'Manually scored\' scoring type, then in scoring section \'Minimum scoring\' label and dropdown should be visible', () => {
|
257
|
+
multipleSelectionGridPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
258
|
+
});
|
259
|
+
});
|
260
|
+
|
261
|
+
describe('Non scored scoring - Scoring section', () => {
|
262
|
+
abortEarlySetup();
|
263
|
+
before(() => {
|
264
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
265
|
+
cy.barsPreLoaderWait();
|
266
|
+
});
|
267
|
+
|
268
|
+
it('User should be able to select \'Non scored\' scoring type from scoring type dropdown', () => {
|
269
|
+
multipleSelectionGridPage.steps.expandScoringTypeDropdown();
|
270
|
+
multipleSelectionGridPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
271
|
+
});
|
272
|
+
|
273
|
+
multipleSelectionGridPage.tests.verifyScoringSectionContentsForNonScoredScoringType();
|
274
|
+
});
|
275
|
+
|
276
|
+
describe('Non scored scoring - Specify correct answer section', () => {
|
277
|
+
abortEarlySetup();
|
278
|
+
before(() => {
|
279
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
280
|
+
cy.barsPreLoaderWait();
|
281
|
+
multipleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
282
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
283
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
284
|
+
multipleSelectionGridPage.steps.expandScoringTypeDropdown();
|
285
|
+
multipleSelectionGridPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
286
|
+
});
|
287
|
+
|
288
|
+
multipleSelectionGridPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
289
|
+
|
290
|
+
multipleSelectionGridPage.tests.verifyPointsLabelAndInputFieldForNonScoredScoringType();
|
291
|
+
});
|
292
|
+
});
|
package/cypress/e2e/ILC/MultipleSelectionGridNew/minimumScoringPenaltyPointsAndRoundingDropdown.js
ADDED
@@ -0,0 +1,194 @@
|
|
1
|
+
import { multipleSelectionGridPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
const penaltyScoringTypeArray = ['No penalty points', 'Penalty points for the entire question', 'Penalty points for each incorrect row'];
|
6
|
+
|
7
|
+
describe('Create item page - Multiple selection grid: Minimum scoring, Penalty scoring, Rounding - Edit tab', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Scoring section: Minimum scoring - Edit tab', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
multipleSelectionGridPage.steps.allotPoints(10);
|
18
|
+
});
|
19
|
+
|
20
|
+
multipleSelectionGridPage.tests.verifyMinimumScoringDropdown();
|
21
|
+
|
22
|
+
multipleSelectionGridPage.tests.verifyMinimumPointsLabelAndInputField();
|
23
|
+
|
24
|
+
multipleSelectionGridPage.tests.verifyMinimumPointsFieldErrorState();
|
25
|
+
});
|
26
|
+
|
27
|
+
describe('Scoring section: Penalty scoring - Edit tab', () => {
|
28
|
+
abortEarlySetup();
|
29
|
+
before(() => {
|
30
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
31
|
+
cy.barsPreLoaderWait();
|
32
|
+
multipleSelectionGridPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
33
|
+
multipleSelectionGridPage.steps.allotPoints(10);
|
34
|
+
});
|
35
|
+
|
36
|
+
multipleSelectionGridPage.tests.verifyPenaltyScoringDropdown(penaltyScoringTypeArray);
|
37
|
+
|
38
|
+
multipleSelectionGridPage.tests.verifyPenaltyPointsLabelAndInputField();
|
39
|
+
|
40
|
+
multipleSelectionGridPage.tests.verifyPenaltyPointsErrorState();
|
41
|
+
|
42
|
+
it('When the user selects \'Penalty points for each incorrect row\' from the penalty scoring dropdown, \'Automatically set penalty for each incorrect row to total points / no. of incorrect row\' label and checkbox should be displayed, by default the checkbox should be unchecked. Two radio buttons with labels - \'Specify total penalty points\' and \'Specify points for each incorrect row\' should be displayed. By default, \'Specify total penalty points\' radio button should be checked', () => {
|
43
|
+
multipleSelectionGridPage.steps.expandPenaltyScoringDropdown();
|
44
|
+
multipleSelectionGridPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for each incorrect row');
|
45
|
+
utilities.verifyInnerText(multipleSelectionGridPage.automaticallySetPenaltyPointsCheckboxLabel(), 'Automatically set penalty for each incorrect row to total points / no. of incorrect row');
|
46
|
+
utilities.verifyInnerText(multipleSelectionGridPage.specifyTotalPenaltyPointsRadioButtonLabel(), 'Specify total penalty points');
|
47
|
+
utilities.verifyInnerText(multipleSelectionGridPage.specifyPointsForEachIncorrectOptionRadioButtonLabel(), 'Specify points for each incorrect row');
|
48
|
+
multipleSelectionGridPage.steps.verifyAutomaticallySetPenaltyPointsCheckboxUncheckedState();
|
49
|
+
multipleSelectionGridPage.steps.verifySpecifyTotalPenaltyPointsRadioButtonCheckedState();
|
50
|
+
multipleSelectionGridPage.steps.verifySpecifyPointsForEachIncorrectOptionRadioButtonUncheckedState();
|
51
|
+
});
|
52
|
+
|
53
|
+
it('When \'Specify total penalty points\' is selected, a penalty points detail section with \'Total penalty points\' label and empty input field, \'Penalty points for each incorrect row: -\' label should be displayed', () => {
|
54
|
+
utilities.verifyInnerText(multipleSelectionGridPage.penaltyPointsDetailsSectionInputFieldLabel(), 'Total penalty points');
|
55
|
+
multipleSelectionGridPage.steps.verifyTotalPenaltyPointsValue('');
|
56
|
+
utilities.verifyInnerText(multipleSelectionGridPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Penalty points for each incorrect row: -');
|
57
|
+
});
|
58
|
+
|
59
|
+
it('When the user allots total penalty points, then \'points for each incorrect row\' should get updated as per the count of incorrect options available', () => {
|
60
|
+
multipleSelectionGridPage.steps.allotTotalPenaltyPoints(5);
|
61
|
+
multipleSelectionGridPage.steps.verifyPenaltyPointsForEachIncorrectRow(1.25);
|
62
|
+
});
|
63
|
+
|
64
|
+
it('When the user adds a new row, then \'points for each incorrect row\' should get updated accordingly', () => {
|
65
|
+
multipleSelectionGridPage.steps.addInputToRowInputStepper(5);
|
66
|
+
multipleSelectionGridPage.steps.verifyPenaltyPointsForEachIncorrectRow(1);
|
67
|
+
});
|
68
|
+
|
69
|
+
it('When the user deletes a row, then \'points for each incorrect row\' should get updated accordingly', () => {
|
70
|
+
multipleSelectionGridPage.steps.addInputToRowInputStepper(4);
|
71
|
+
multipleSelectionGridPage.steps.verifyPenaltyPointsForEachIncorrectRow(1.25);
|
72
|
+
});
|
73
|
+
|
74
|
+
it('CSS of the penalty points section - Total penalty points', { tags: 'css' }, () => {
|
75
|
+
utilities.verifyCSS(multipleSelectionGridPage.automaticallySetPenaltyPointsCheckboxLabel(), {
|
76
|
+
'color': css.color.labelText,
|
77
|
+
'font-size': css.fontSize.normal,
|
78
|
+
'font-weight': css.fontWeight.regular
|
79
|
+
});
|
80
|
+
utilities.verifyCSS(multipleSelectionGridPage.automaticallySetPenaltyPointsCheckbox().parent().find('svg'), {
|
81
|
+
'fill': css.color.uncheckedCheckbox
|
82
|
+
});
|
83
|
+
utilities.verifyCSS(multipleSelectionGridPage.specifyTotalPenaltyPointsRadioButton().parent().find('svg'), {
|
84
|
+
'fill': css.color.activeButtons
|
85
|
+
});
|
86
|
+
utilities.verifyCSS(multipleSelectionGridPage.specifyPointsForEachIncorrectOptionRadioButton().parent().find('svg path'), {
|
87
|
+
'fill': css.color.uncheckedCheckbox
|
88
|
+
});
|
89
|
+
utilities.verifyCSS(multipleSelectionGridPage.specifyTotalPenaltyPointsRadioButtonLabel(), {
|
90
|
+
'color': css.color.labelText,
|
91
|
+
'font-size': css.fontSize.normal,
|
92
|
+
'font-weight': css.fontWeight.regular
|
93
|
+
});
|
94
|
+
utilities.verifyCSS(multipleSelectionGridPage.specifyPointsForEachIncorrectOptionRadioButtonLabel(), {
|
95
|
+
'color': css.color.labelText,
|
96
|
+
'font-size': css.fontSize.normal,
|
97
|
+
'font-weight': css.fontWeight.regular
|
98
|
+
});
|
99
|
+
utilities.verifyCSS(multipleSelectionGridPage.penaltyPointsDetailsSectionInputFieldLabel(), {
|
100
|
+
'color': css.color.labels,
|
101
|
+
'font-size': css.fontSize.normal,
|
102
|
+
'font-weight': css.fontWeight.regular
|
103
|
+
});
|
104
|
+
utilities.verifyCSS(multipleSelectionGridPage.totalPenaltyPointsInputField(), {
|
105
|
+
'color': css.color.text,
|
106
|
+
'font-size': css.fontSize.default,
|
107
|
+
'font-weight': css.fontWeight.regular
|
108
|
+
});
|
109
|
+
utilities.verifyCSS(multipleSelectionGridPage.penaltyPointsDetailsSectionAllottedPointsLabel(), {
|
110
|
+
'color': css.color.labels,
|
111
|
+
'font-size': css.fontSize.normal,
|
112
|
+
'font-weight': css.fontWeight.regular
|
113
|
+
});
|
114
|
+
});
|
115
|
+
|
116
|
+
it('Accessibility of the penalty points section - Total penalty points', { tags: 'a11y' }, () => {
|
117
|
+
cy.checkAccessibility(multipleSelectionGridPage.automaticallySetPenaltyPointsCheckboxLabel().parents('.penalty-score-for-each-incorrect-wrapper'));
|
118
|
+
});
|
119
|
+
|
120
|
+
it('When the user selects \'Specify points for each incorrect answer\', a penalty points detail section with \'Penalty points for each incorrect row:\' label and empty input field, \'Total penalty points: -\' label should be displayed', () => {
|
121
|
+
cy.log('Pre-step: Clearing the total penalty points input field')
|
122
|
+
multipleSelectionGridPage.steps.clearTotalPenaltyPointsInputField();
|
123
|
+
multipleSelectionGridPage.steps.selectPenaltyPointsForEachIncorrectOptionType('Specify points for each incorrect option');
|
124
|
+
utilities.verifyInnerText(multipleSelectionGridPage.penaltyPointsDetailsSectionInputFieldLabel(), 'Penalty points for each incorrect row');
|
125
|
+
multipleSelectionGridPage.steps.verifyPenaltyPointsForEachIncorrectRowValue('');
|
126
|
+
utilities.verifyInnerText(multipleSelectionGridPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Total penalty points: -');
|
127
|
+
});
|
128
|
+
|
129
|
+
it('When the user allots Penalty points for each incorrect row, then \'Total penalty points\' should get updated as per the count of rows', () => {
|
130
|
+
multipleSelectionGridPage.steps.allotPenaltyPointsForEachIncorrectRow(1);
|
131
|
+
multipleSelectionGridPage.steps.verifyTotalPenaltyPoints(4);
|
132
|
+
});
|
133
|
+
|
134
|
+
it('When the user adds a new row, then \'Total penalty points\' should get updated accordingly', () => {
|
135
|
+
multipleSelectionGridPage.steps.addInputToRowInputStepper(5);
|
136
|
+
multipleSelectionGridPage.steps.verifyTotalPenaltyPoints(5);
|
137
|
+
});
|
138
|
+
|
139
|
+
it('When the user deletes a row, then \'points for each incorrect row\' should get updated accordingly', () => {
|
140
|
+
multipleSelectionGridPage.steps.addInputToRowInputStepper(4);
|
141
|
+
multipleSelectionGridPage.steps.verifyTotalPenaltyPoints(4);
|
142
|
+
});
|
143
|
+
|
144
|
+
it('CSS of the penalty points section - Penalty points for each incorrect row', { tags: 'css' }, () => {
|
145
|
+
utilities.verifyCSS(multipleSelectionGridPage.penaltyPointsDetailsSectionInputFieldLabel(), {
|
146
|
+
'color': css.color.labels,
|
147
|
+
'font-size': css.fontSize.normal,
|
148
|
+
'font-weight': css.fontWeight.regular
|
149
|
+
});
|
150
|
+
utilities.verifyCSS(multipleSelectionGridPage.penaltyPointsForEachIncorrectRowInputField(), {
|
151
|
+
'color': css.color.text,
|
152
|
+
'font-size': css.fontSize.default,
|
153
|
+
'font-weight': css.fontWeight.regular
|
154
|
+
});
|
155
|
+
utilities.verifyCSS(multipleSelectionGridPage.penaltyPointsDetailsSectionAllottedPointsLabel(), {
|
156
|
+
'color': css.color.labels,
|
157
|
+
'font-size': css.fontSize.normal,
|
158
|
+
'font-weight': css.fontWeight.regular
|
159
|
+
});
|
160
|
+
});
|
161
|
+
|
162
|
+
it('Accessibility of the penalty points section - Penalty points for each incorrect row', { tags: 'a11y' }, () => {
|
163
|
+
cy.checkAccessibility(multipleSelectionGridPage.automaticallySetPenaltyPointsCheckboxLabel().parents('.penalty-score-for-each-incorrect-wrapper'));
|
164
|
+
});
|
165
|
+
|
166
|
+
it('When the user switches to the \'Specify total penalty points\' option, the total penalty points input field should be filled as per the total penalty points in \'Specify points for each incorrect row\'', () => {
|
167
|
+
multipleSelectionGridPage.steps.selectPenaltyPointsForEachIncorrectOptionType('Specify total penalty points');
|
168
|
+
multipleSelectionGridPage.steps.verifyTotalPenaltyPointsValue(4);
|
169
|
+
utilities.verifyInnerText(multipleSelectionGridPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Penalty points for each incorrect row: 1');
|
170
|
+
});
|
171
|
+
|
172
|
+
it('When the user checks the \'Automatically set penalty for each incorrect row to total points / no. of incorrect text containers\' checkbox, both radio buttons should get disabled, \'Specify points for each incorrect row\' should get checked, in the penalty points details section, \'Penalty points for each incorrect row: #\' and \'Total penalty points: #\' should be displayed as per the alloted points and available incorrect options', () => {
|
173
|
+
multipleSelectionGridPage.steps.checkAutomaticallySetPenaltyPointsCheckbox();
|
174
|
+
multipleSelectionGridPage.steps.verifySpecifyTotalPenaltyPointsDisabledState();
|
175
|
+
multipleSelectionGridPage.steps.verifySpecifyPointsForEachIncorrectOptionRadioButtonSelectedAndDisabledState();
|
176
|
+
utilities.verifyInnerText(utilities.getNthElement(multipleSelectionGridPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 0), 'Penalty points for each incorrect row: 2.5');
|
177
|
+
utilities.verifyInnerText(utilities.getNthElement(multipleSelectionGridPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 1), 'Total penalty points: 10');
|
178
|
+
});
|
179
|
+
});
|
180
|
+
|
181
|
+
describe('Scoring section: Rounding - Edit tab', () => {
|
182
|
+
abortEarlySetup();
|
183
|
+
before(() => {
|
184
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
185
|
+
cy.barsPreLoaderWait();
|
186
|
+
multipleSelectionGridPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
187
|
+
multipleSelectionGridPage.steps.allotPoints(10);
|
188
|
+
});
|
189
|
+
|
190
|
+
multipleSelectionGridPage.tests.verifyRoundingDropdown();
|
191
|
+
|
192
|
+
multipleSelectionGridPage.tests.verifyRoundNegativeScoreToZeroLabelAndCheckbox();
|
193
|
+
});
|
194
|
+
});
|
@@ -82,9 +82,17 @@ describe('Create item page - Multiple selection grid: Preview contents', () => {
|
|
82
82
|
utilities.verifyElementVisibilityState(multipleSelectionGridPage.questionInstructionsText(), 'visible');
|
83
83
|
});
|
84
84
|
|
85
|
-
//Complete after https://redmine.zeuslearning.com/issues/565255 gets resolved
|
86
85
|
it(`The question grid as set by the user should be displayed in the ${view}`, () => {
|
87
|
-
|
86
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 0 }, 'None');
|
87
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 1 }, 'Heading');
|
88
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 2 }, 'Heading');
|
89
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 1, column: 0 }, 'Heading');
|
90
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 1, column: 1 }, 'Checkbox with text');
|
91
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 2, column: 0 }, 'Subheading');
|
92
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 2, column: 2 }, 'No checkbox');
|
93
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 3, column: 0 }, 'Text');
|
94
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 3, column: 1 }, 'No checkbox');
|
95
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 4, column: 2 }, 'No checkbox');
|
88
96
|
});
|
89
97
|
|
90
98
|
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
@@ -0,0 +1,86 @@
|
|
1
|
+
import { multipleSelectionGridPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Create Item page - Multiple selection grid: Specify correct answer, Alternative correct answer', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Specify correct answer section - Header and \'Correct\' accordion', () => {
|
10
|
+
abortEarlySetup();
|
11
|
+
before(() => {
|
12
|
+
cy.log('Navigating to multiple selection grid question type');
|
13
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
14
|
+
cy.barsPreLoaderWait();
|
15
|
+
});
|
16
|
+
|
17
|
+
multipleSelectionGridPage.tests.verifyAutoScoredSpecifyCorrectAnswerHeaderSectionContents('multiple selection grid');
|
18
|
+
|
19
|
+
it('When the user has not updated any grid property in the specify rows and columns section, the first row with \'True\' and \'False\' as column headers and empty cells for question stems in the first column should be displayed, all the option checkboxes in the \'True\' and \'False\' columns should be in unchecked state', () => {
|
20
|
+
const checkboxIndices = [[1, 1], [1, 2], [2, 1], [2, 2], [3, 1], [3, 2], [4, 1], [4, 2]]
|
21
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 0, column: 0 }, 'None');
|
22
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 0, column: 1 }, 'Heading');
|
23
|
+
multipleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: 0, column: 1 }, 'True');
|
24
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 0, column: 2 }, 'Heading');
|
25
|
+
multipleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: 0, column: 2 }, 'False');
|
26
|
+
for (let index = 1; index < 5; index++) {
|
27
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: index, column: 0 }, 'Text');
|
28
|
+
};
|
29
|
+
checkboxIndices.forEach(([row, column]) => {
|
30
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: row, column: column }, 'Checkbox');
|
31
|
+
});
|
32
|
+
});
|
33
|
+
|
34
|
+
it('When the user modifies the table cell properties in the specify rows and columns section, the grid should get updated in the specify correct answer section', () => {
|
35
|
+
multipleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
36
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
37
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
38
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 0, column: 0 }, 'None');
|
39
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 1, column: 0 }, 'Heading');
|
40
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 2, column: 0 }, 'Subheading');
|
41
|
+
multipleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: 1, column: 0 }, 'Elephants are the only mammals that can\'t jump');
|
42
|
+
multipleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: 2, column: 0 }, 'Bats are blind and navigate by using echolocation');
|
43
|
+
multipleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: 3, column: 0 }, 'Whale are mammals');
|
44
|
+
multipleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
45
|
+
});
|
46
|
+
|
47
|
+
multipleSelectionGridPage.tests.verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
|
48
|
+
});
|
49
|
+
|
50
|
+
describe('Specify correct answer section - \'Alternative\' accordion', () => {
|
51
|
+
abortEarlySetup();
|
52
|
+
before(() => {
|
53
|
+
cy.log('Navigating to multiple selection grid question type');
|
54
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
55
|
+
cy.barsPreLoaderWait();
|
56
|
+
multipleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
57
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
58
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
59
|
+
});
|
60
|
+
|
61
|
+
multipleSelectionGridPage.tests.verifyAutoScoredAddAlternativeAnswerButtonAndValidation();
|
62
|
+
|
63
|
+
it('When user has added points and set correct answers in the \'Correct\' accordion, then the user should be able to add alternative answer for the question using \'Add alternative answer\' button', () => {
|
64
|
+
multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
65
|
+
multipleSelectionGridPage.steps.allotPoints(20);
|
66
|
+
multipleSelectionGridPage.steps.addAlternativeAnswerAccordion(1);
|
67
|
+
});
|
68
|
+
|
69
|
+
multipleSelectionGridPage.tests.verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Alternative');
|
70
|
+
|
71
|
+
it('User should be able to add another alternative answer for the question using \'Add alternative answer\' button and the name for this new accordion should be \'Alternative 2\'', () => {
|
72
|
+
multipleSelectionGridPage.steps.addAlternativeAnswerAccordion(2);
|
73
|
+
});
|
74
|
+
|
75
|
+
multipleSelectionGridPage.tests.verifyWarningPopupAndAccordionNavigationWhenNoPointsAddedInAlternativeAccordion();
|
76
|
+
|
77
|
+
it('User should be able to remove alternative correct answer by clicking on the \'Delete\' icon button alongside alternative answer accordion and the name of the alternative answer accordions should get updated accordingly', () => {
|
78
|
+
cy.log('Set correct answer and points in alternative 2 accordion, then switch to alternative 1 accordion and click delete icon button');
|
79
|
+
multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
80
|
+
multipleSelectionGridPage.steps.allotPoints(5);
|
81
|
+
multipleSelectionGridPage.steps.deleteAlternativeAnswerAccordion(1);
|
82
|
+
multipleSelectionGridPage.steps.verifyAlternativeAnswerAccordionNotExists(2);
|
83
|
+
multipleSelectionGridPage.steps.verifyAlternativeAnswerAccordionLabel(0);
|
84
|
+
});
|
85
|
+
});
|
86
|
+
});
|