itemengine-cypress-automation 1.0.151-28MarchRepoUpdate-4cfb82e.0 → 1.0.151
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +3 -3
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabScoring.js +1 -0
- package/cypress/e2e/ILC/EditTabSettingPage/ItemPreviewSettingsTabContent.js +2 -2
- package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +25 -25
- package/cypress/e2e/ILC/GridFill/customizeLayoutSectionShadeCellsGridBorders.js +506 -0
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingGroupedScoring.js +155 -0
- package/cypress/e2e/ILC/Matching/Scoring/manuallyAndNonScored.js +143 -0
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/Matching/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/Matching/draggableOptions.js +180 -0
- package/cypress/e2e/ILC/Matching/editTabScoring.js +221 -0
- package/cypress/e2e/ILC/Matching/manuallyAndNonScoredEditTab.js +68 -0
- package/cypress/e2e/ILC/Matching/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/Matching/switchingCasesBetweenOptionsLayout.js +49 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +1 -1
- package/cypress/fixtures/theme/ilc.json +7 -1
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/optionsWrapperComponent.js +1 -1
- package/cypress/pages/contentBlocksPage.js +30 -1
- package/cypress/pages/createItemPage.js +1 -1
- package/cypress/pages/essayResponsePage.js +1 -1
- package/cypress/pages/graphingPage.js +29 -29
- package/cypress/pages/gridFillPage.js +663 -15
- package/cypress/pages/itemPreviewSettingsPage.js +3 -3
- package/cypress/pages/matchingPage.js +466 -5
- package/cypress/pages/shortTextResponsePage.js +1 -0
- package/cypress/pages/textEntryMathPage.js +1 -1
- package/cypress/pages/textEntryMathWithImagePage.js +1 -1
- package/package.json +2 -2
@@ -0,0 +1,221 @@
|
|
1
|
+
import { matchingPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
|
6
|
+
const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle', 'Penguin'];
|
7
|
+
|
8
|
+
describe('Create item page - Matching: Scoring section', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Scoring section contents', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
});
|
19
|
+
|
20
|
+
matchingPage.tests.verifyScoringTypeLabelAndDropdown('Auto scored');
|
21
|
+
|
22
|
+
matchingPage.tests.verifyScoringSubtypeContentsForMultipleResponseTypeQuestion();
|
23
|
+
});
|
24
|
+
|
25
|
+
describe('Auto scored: All or nothing scoring - Scoring section', () => {
|
26
|
+
abortEarlySetup();
|
27
|
+
before(() => {
|
28
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
29
|
+
cy.barsPreLoaderWait();
|
30
|
+
matchingPage.steps.allotPoints(10);
|
31
|
+
});
|
32
|
+
|
33
|
+
it('When the user has selected \'All or nothing\' scoring subtype, minimum scoring dropdown should be displayed in the scoring section', () => {
|
34
|
+
matchingPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
35
|
+
});
|
36
|
+
});
|
37
|
+
|
38
|
+
describe('Auto scored: All or nothing scoring - Specify correct answer section', () => {
|
39
|
+
abortEarlySetup();
|
40
|
+
before(() => {
|
41
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
42
|
+
cy.barsPreLoaderWait();
|
43
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
|
44
|
+
matchingPage.steps.addMultipleOptionFields(3);
|
45
|
+
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
46
|
+
matchingPage.steps.enterTextInOptionInputField(optionsArray);
|
47
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
48
|
+
});
|
49
|
+
|
50
|
+
matchingPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
51
|
+
|
52
|
+
matchingPage.tests.verifyPointsLabelAndInputField();
|
53
|
+
});
|
54
|
+
|
55
|
+
describe('Auto scored: Partial - equal weights scoring - Scoring section', () => {
|
56
|
+
abortEarlySetup();
|
57
|
+
before(() => {
|
58
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
59
|
+
cy.barsPreLoaderWait();
|
60
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
|
61
|
+
matchingPage.steps.addMultipleOptionFields(3);
|
62
|
+
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
63
|
+
matchingPage.steps.enterTextInOptionInputField(optionsArray);
|
64
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
65
|
+
});
|
66
|
+
|
67
|
+
it('User should be able to select \'Partial - equal weights\' scoring type', () => {
|
68
|
+
matchingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
69
|
+
});
|
70
|
+
|
71
|
+
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', () => {
|
72
|
+
matchingPage.steps.verifyPointsPerResponseLabel();
|
73
|
+
matchingPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
74
|
+
matchingPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
|
75
|
+
matchingPage.steps.verifyRoundingLabelAndDropdownDefaultState();
|
76
|
+
utilities.verifyElementVisibilityState(matchingPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
77
|
+
});
|
78
|
+
});
|
79
|
+
|
80
|
+
describe('Auto scored: Partial equal weights scoring - Specify correct answer section', () => {
|
81
|
+
abortEarlySetup();
|
82
|
+
before(() => {
|
83
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
84
|
+
cy.barsPreLoaderWait();
|
85
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
|
86
|
+
matchingPage.steps.addMultipleOptionFields(3);
|
87
|
+
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
88
|
+
matchingPage.steps.enterTextInOptionInputField(optionsArray);
|
89
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
90
|
+
matchingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
91
|
+
});
|
92
|
+
|
93
|
+
matchingPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
94
|
+
|
95
|
+
it('\'Points per response\' label should be displayed and a \'-\' should be displayed besides each response in the \'Specify correct answer\' section', () => {
|
96
|
+
matchingPage.steps.verifyPointsPerResponseLabel();
|
97
|
+
});
|
98
|
+
|
99
|
+
it('When the user gives a score input to \'Points\' input field, then the score should be equally divided among the dropzone \'Points per response\' label', () => {
|
100
|
+
matchingPage.steps.allotPoints(6);
|
101
|
+
matchingPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('2');
|
102
|
+
});
|
103
|
+
|
104
|
+
it('When the user adds a prompt, then points per response should get updated accordingly', () => {
|
105
|
+
matchingPage.steps.addPrompt();
|
106
|
+
matchingPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('1.5');
|
107
|
+
});
|
108
|
+
|
109
|
+
it('When the user deletes a prompt, then points per response should get updated accordingly', () => {
|
110
|
+
matchingPage.steps.deletePrompt(3);
|
111
|
+
matchingPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('2');
|
112
|
+
});
|
113
|
+
|
114
|
+
it('When the user adds an option in the specify correct answer section, then points per response should remain the same', () => {
|
115
|
+
matchingPage.steps.addOption();
|
116
|
+
matchingPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('2');
|
117
|
+
});
|
118
|
+
|
119
|
+
it('When the user deletes an option from the options section then the points should not change', () => {
|
120
|
+
matchingPage.steps.deleteOption(6);
|
121
|
+
matchingPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('2');
|
122
|
+
});
|
123
|
+
|
124
|
+
it('When the user switches to \'All or nothing\' scoring, the \'Points per response\' label and the points displayed for individual responses should not be displayed and the points displayed in \'Points\' input field should remain unchanged', () => {
|
125
|
+
matchingPage.steps.selectAutoScoredScoringSubtype('All or nothing');
|
126
|
+
utilities.verifyElementVisibilityState(matchingPage.pointsPerResponseLabel(), 'notExist');
|
127
|
+
matchingPage.steps.verifyPointsFieldValue(6);
|
128
|
+
});
|
129
|
+
|
130
|
+
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 besides each correct option', () => {
|
131
|
+
matchingPage.steps.allotPoints(12);
|
132
|
+
matchingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
133
|
+
matchingPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('4');
|
134
|
+
});
|
135
|
+
|
136
|
+
it('CSS of \'Points per response\' label and its displayed score', { tags: 'css' }, () => {
|
137
|
+
utilities.verifyCSS(matchingPage.pointsPerResponseLabel(), {
|
138
|
+
'color': css.color.labels,
|
139
|
+
'font-size': css.fontSize.normal,
|
140
|
+
'font-weight': css.fontWeight.semibold
|
141
|
+
});
|
142
|
+
});
|
143
|
+
});
|
144
|
+
|
145
|
+
describe('Auto scored: Partial - different weights scoring - Scoring section', () => {
|
146
|
+
abortEarlySetup();
|
147
|
+
before(() => {
|
148
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
149
|
+
cy.barsPreLoaderWait();
|
150
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
|
151
|
+
matchingPage.steps.addMultipleOptionFields(3);
|
152
|
+
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
153
|
+
matchingPage.steps.enterTextInOptionInputField(optionsArray);
|
154
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
155
|
+
});
|
156
|
+
|
157
|
+
it('User should be able to select \'Partial - different weights\' scoring', () => {
|
158
|
+
matchingPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
159
|
+
});
|
160
|
+
|
161
|
+
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', () => {
|
162
|
+
matchingPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
163
|
+
matchingPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
|
164
|
+
matchingPage.steps.verifyRoundingLabelAndDropdownDefaultState();
|
165
|
+
utilities.verifyElementVisibilityState(matchingPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
166
|
+
});
|
167
|
+
});
|
168
|
+
|
169
|
+
describe('Auto scored: Partial - different weights scoring - Specify correct answer section', () => {
|
170
|
+
abortEarlySetup();
|
171
|
+
before(() => {
|
172
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
173
|
+
cy.barsPreLoaderWait();
|
174
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
|
175
|
+
matchingPage.steps.addMultipleOptionFields(3);
|
176
|
+
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
177
|
+
matchingPage.steps.enterTextInOptionInputField(optionsArray);
|
178
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
179
|
+
matchingPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
180
|
+
});
|
181
|
+
|
182
|
+
matchingPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
183
|
+
|
184
|
+
it('When the user has switched to \'Partial - different weights\' scoring, then \'Points\' label should be displayed and a points input field should be displayed besides each option', () => {
|
185
|
+
utilities.verifyInnerText(matchingPage.partialDifferentWeightsPointsLabel(), 'Points');
|
186
|
+
utilities.verifyElementVisibilityState(matchingPage.partialDifferentWeightsPointsLabel(), 'visible');
|
187
|
+
});
|
188
|
+
|
189
|
+
it('By default the \'Points\' input field should be empty', () => {
|
190
|
+
matchingPage.steps.verifyPartialDifferentWeightsPointsInputFieldIsEmpty();
|
191
|
+
});
|
192
|
+
|
193
|
+
it('User should be able to set points in the \'Points\' input fields', () => {
|
194
|
+
matchingPage.steps.allotPartialDifferentWeightsPoints({ 0: 2.3, 1: 3.4 });
|
195
|
+
});
|
196
|
+
|
197
|
+
it('CSS of \'Points\' label and \'Points\' input fields', { tags: 'css' }, () => {
|
198
|
+
utilities.verifyCSS(matchingPage.partialDifferentWeightsPointsLabel(), {
|
199
|
+
'color': css.color.labels,
|
200
|
+
'font-size': css.fontSize.normal,
|
201
|
+
'font-weight': css.fontWeight.semibold
|
202
|
+
});
|
203
|
+
utilities.verifyCSS(matchingPage.pointsInputField(), {
|
204
|
+
'color': css.color.text,
|
205
|
+
'font-size': css.fontSize.default,
|
206
|
+
'font-weight': css.fontWeight.regular
|
207
|
+
});
|
208
|
+
});
|
209
|
+
|
210
|
+
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', () => {
|
211
|
+
matchingPage.steps.selectAutoScoredScoringSubtype('All or nothing');
|
212
|
+
matchingPage.steps.verifyPointsFieldValue(5.7);
|
213
|
+
});
|
214
|
+
|
215
|
+
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', () => {
|
216
|
+
matchingPage.steps.allotPoints(9);
|
217
|
+
matchingPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
218
|
+
matchingPage.steps.verifyPartialDifferentWeightsPointsInputFieldValue([3, 3, 3]);
|
219
|
+
});
|
220
|
+
});
|
221
|
+
});
|
@@ -0,0 +1,68 @@
|
|
1
|
+
import { matchingPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
|
5
|
+
const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle', 'Penguin'];
|
6
|
+
|
7
|
+
describe('Create Item page - Matching: Scoring cases', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Manually Scored scoring - Edit tab', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
|
18
|
+
});
|
19
|
+
|
20
|
+
it('When the user selects \'Manually scored\' option from the scoring Type dropdown then the \'Specify correct answer\' section should not be displayed; \'Points\' and \'Minimum scoring\' label and dropdown should be displayed', () => {
|
21
|
+
matchingPage.steps.expandScoringTypeDropdown();
|
22
|
+
matchingPage.steps.selectOptionFromScoringTypeDropdown('Manually scored')
|
23
|
+
utilities.verifyElementVisibilityState(matchingPage.pointsLabel(), 'visible');
|
24
|
+
utilities.verifyElementVisibilityState(matchingPage.pointsInputField(), 'visible');
|
25
|
+
matchingPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
26
|
+
utilities.verifyElementVisibilityState(matchingPage.specifyCorrectAnswerLabel(), 'notExist');
|
27
|
+
utilities.verifyElementVisibilityState(matchingPage.specifyCorrectAnswerSectionWrapper(), 'notExist');
|
28
|
+
utilities.verifyElementVisibilityState(matchingPage.dropzoneSpecifyCorrectAnswerSection(), 'notExist');
|
29
|
+
utilities.verifyElementVisibilityState(matchingPage.draggableOption(), 'notExist');
|
30
|
+
});
|
31
|
+
|
32
|
+
matchingPage.tests.verifyPointsFieldErrorState(10);
|
33
|
+
});
|
34
|
+
|
35
|
+
describe('Non scored scoring - Scoring section', () => {
|
36
|
+
abortEarlySetup();
|
37
|
+
before(() => {
|
38
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
39
|
+
cy.barsPreLoaderWait();
|
40
|
+
});
|
41
|
+
|
42
|
+
it('User should be able to select \'Non scored\' scoring type from scoring type dropdown', () => {
|
43
|
+
matchingPage.steps.expandScoringTypeDropdown();
|
44
|
+
matchingPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
45
|
+
});
|
46
|
+
|
47
|
+
matchingPage.tests.verifyScoringSectionContentsForNonScoredScoringType();
|
48
|
+
});
|
49
|
+
|
50
|
+
describe('Non scored scoring - Specify correct answer section', () => {
|
51
|
+
abortEarlySetup();
|
52
|
+
before(() => {
|
53
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
54
|
+
cy.barsPreLoaderWait();
|
55
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
|
56
|
+
matchingPage.steps.addMultipleOptionFields(3);
|
57
|
+
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
58
|
+
matchingPage.steps.enterTextInOptionInputField(optionsArray);
|
59
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
60
|
+
matchingPage.steps.expandScoringTypeDropdown();
|
61
|
+
matchingPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
62
|
+
});
|
63
|
+
|
64
|
+
matchingPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
65
|
+
|
66
|
+
matchingPage.tests.verifyPointsLabelAndInputFieldForNonScoredScoringType();
|
67
|
+
});
|
68
|
+
});
|
@@ -0,0 +1,194 @@
|
|
1
|
+
import { matchingPage } 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 dropzone'];
|
6
|
+
|
7
|
+
describe('Create item page - Matching: 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
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
matchingPage.steps.allotPoints(10);
|
18
|
+
});
|
19
|
+
|
20
|
+
matchingPage.tests.verifyMinimumScoringDropdown();
|
21
|
+
|
22
|
+
matchingPage.tests.verifyMinimumPointsLabelAndInputField();
|
23
|
+
|
24
|
+
matchingPage.tests.verifyMinimumPointsFieldErrorState();
|
25
|
+
});
|
26
|
+
|
27
|
+
describe('Scoring section: Penalty scoring - Edit tab', () => {
|
28
|
+
abortEarlySetup();
|
29
|
+
before(() => {
|
30
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
31
|
+
cy.barsPreLoaderWait();
|
32
|
+
matchingPage.steps.allotPoints(10);
|
33
|
+
matchingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
34
|
+
});
|
35
|
+
|
36
|
+
matchingPage.tests.verifyPenaltyScoringDropdown(penaltyScoringTypeArray);
|
37
|
+
|
38
|
+
matchingPage.tests.verifyPenaltyPointsLabelAndInputField();
|
39
|
+
|
40
|
+
matchingPage.tests.verifyPenaltyPointsErrorState();
|
41
|
+
|
42
|
+
it('When the user selects \'Penalty points for each incorrect dropzone\' from the penalty scoring dropdown, \'Automatically set penalty for each incorrect dropzone to total points / no. of incorrect dropzones\' 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 option\' should be displayed. By default, \'Specify total penalty points\' radio button should be checked', () => {
|
43
|
+
matchingPage.steps.expandPenaltyScoringDropdown();
|
44
|
+
matchingPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for each incorrect dropzone');
|
45
|
+
utilities.verifyInnerText(matchingPage.automaticallySetPenaltyPointsCheckboxLabel(), 'Automatically set penalty for each incorrect dropzone to total points / no. of incorrect dropzones');
|
46
|
+
utilities.verifyInnerText(matchingPage.specifyTotalPenaltyPointsRadioButtonLabel(), 'Specify total penalty points');
|
47
|
+
utilities.verifyInnerText(matchingPage.specifyPointsForEachIncorrectOptionRadioButtonLabel(), 'Specify points for each incorrect dropzone');
|
48
|
+
matchingPage.steps.verifyAutomaticallySetPenaltyPointsCheckboxUncheckedState();
|
49
|
+
matchingPage.steps.verifySpecifyTotalPenaltyPointsRadioButtonCheckedState();
|
50
|
+
matchingPage.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 dropzone: -\' label should be displayed', () => {
|
54
|
+
utilities.verifyInnerText(matchingPage.penaltyPointsDetailsSectionInputFieldLabel(), 'Total penalty points');
|
55
|
+
matchingPage.steps.verifyTotalPenaltyPointsValue('');
|
56
|
+
utilities.verifyInnerText(matchingPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Penalty points for each incorrect dropzone: -');
|
57
|
+
});
|
58
|
+
|
59
|
+
it('When the user allots total penalty points, then \'points for each incorrect option\' should get updated as per the count of incorrect options available', () => {
|
60
|
+
matchingPage.steps.allotTotalPenaltyPoints(5);
|
61
|
+
matchingPage.steps.verifyPenaltyPointsForEachIncorrectDropzone(1.67);
|
62
|
+
});
|
63
|
+
|
64
|
+
it('When the user deletes an option, then \'points for each incorrect option\' should get updated accordingly', () => {
|
65
|
+
matchingPage.steps.deleteOption(0);
|
66
|
+
matchingPage.steps.verifyPenaltyPointsForEachIncorrectDropzone(2.5);
|
67
|
+
});
|
68
|
+
|
69
|
+
it('When the user adds a new option, then \'points for each incorrect option\' should get updated accordingly', () => {
|
70
|
+
matchingPage.steps.addOption();
|
71
|
+
matchingPage.steps.verifyPenaltyPointsForEachIncorrectDropzone(1.67);
|
72
|
+
});
|
73
|
+
|
74
|
+
it('CSS of the penalty points section - Total penalty points', { tags: 'css' }, () => {
|
75
|
+
utilities.verifyCSS(matchingPage.automaticallySetPenaltyPointsCheckboxLabel(), {
|
76
|
+
'color': css.color.labelText,
|
77
|
+
'font-size': css.fontSize.default,
|
78
|
+
'font-weight': css.fontWeight.regular
|
79
|
+
});
|
80
|
+
utilities.verifyCSS(matchingPage.automaticallySetPenaltyPointsCheckbox().parent().find('svg'), {
|
81
|
+
'fill': css.color.uncheckedCheckbox
|
82
|
+
});
|
83
|
+
utilities.verifyCSS(matchingPage.specifyTotalPenaltyPointsRadioButton().parent().find('svg'), {
|
84
|
+
'fill': css.color.activeButtons
|
85
|
+
});
|
86
|
+
utilities.verifyCSS(matchingPage.specifyPointsForEachIncorrectOptionRadioButton().parent().find('svg path'), {
|
87
|
+
'fill': css.color.uncheckedCheckbox
|
88
|
+
});
|
89
|
+
utilities.verifyCSS(matchingPage.specifyTotalPenaltyPointsRadioButtonLabel(), {
|
90
|
+
'color': css.color.labelText,
|
91
|
+
'font-size': css.fontSize.default,
|
92
|
+
'font-weight': css.fontWeight.regular
|
93
|
+
});
|
94
|
+
utilities.verifyCSS(matchingPage.specifyPointsForEachIncorrectOptionRadioButtonLabel(), {
|
95
|
+
'color': css.color.labelText,
|
96
|
+
'font-size': css.fontSize.default,
|
97
|
+
'font-weight': css.fontWeight.regular
|
98
|
+
});
|
99
|
+
utilities.verifyCSS(matchingPage.penaltyPointsDetailsSectionInputFieldLabel(), {
|
100
|
+
'color': css.color.labelText,
|
101
|
+
'font-size': css.fontSize.default,
|
102
|
+
'font-weight': css.fontWeight.regular
|
103
|
+
});
|
104
|
+
utilities.verifyCSS(matchingPage.totalPenaltyPointsInputField(), {
|
105
|
+
'color': css.color.text,
|
106
|
+
'font-size': css.fontSize.default,
|
107
|
+
'font-weight': css.fontWeight.regular
|
108
|
+
});
|
109
|
+
utilities.verifyCSS(matchingPage.penaltyPointsDetailsSectionAllottedPointsLabel(), {
|
110
|
+
'color': css.color.labelText,
|
111
|
+
'font-size': css.fontSize.default,
|
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(matchingPage.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 dropzone:\' 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
|
+
matchingPage.steps.clearTotalPenaltyPointsInputField();
|
123
|
+
matchingPage.steps.selectPenaltyPointsForEachIncorrectOptionType('Specify points for each incorrect option');
|
124
|
+
utilities.verifyInnerText(matchingPage.penaltyPointsDetailsSectionInputFieldLabel(), 'Penalty points for each incorrect dropzone');
|
125
|
+
matchingPage.steps.verifyPenaltyPointsForEachIncorrectDropzoneValue('');
|
126
|
+
utilities.verifyInnerText(matchingPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Total penalty points: -');
|
127
|
+
});
|
128
|
+
|
129
|
+
it('When the user allots Penalty points for each incorrect dropzone, then \'Total penalty points\' should get updated as per the count of incorrect options available', () => {
|
130
|
+
matchingPage.steps.allotPenaltyPointsForEachIncorrectDropzone(1);
|
131
|
+
matchingPage.steps.verifyTotalPenaltyPoints(3);
|
132
|
+
});
|
133
|
+
|
134
|
+
it('When the user adds a new option, then \'Total penalty points\' should get updated accordingly', () => {
|
135
|
+
matchingPage.steps.addOption();
|
136
|
+
matchingPage.steps.verifyTotalPenaltyPoints(4);
|
137
|
+
});
|
138
|
+
|
139
|
+
it('When the user deletes an option, then \'points for each incorrect option\' should get updated accordingly', () => {
|
140
|
+
matchingPage.steps.deleteOption(0);
|
141
|
+
matchingPage.steps.verifyTotalPenaltyPoints(3);
|
142
|
+
});
|
143
|
+
|
144
|
+
it('CSS of the penalty points section - Penalty points for each incorrect dropzone', { tags: 'css' }, () => {
|
145
|
+
utilities.verifyCSS(matchingPage.penaltyPointsDetailsSectionInputFieldLabel(), {
|
146
|
+
'color': css.color.labelText,
|
147
|
+
'font-size': css.fontSize.default,
|
148
|
+
'font-weight': css.fontWeight.regular
|
149
|
+
});
|
150
|
+
utilities.verifyCSS(matchingPage.penaltyPointsForEachIncorrectOptionInputField(), {
|
151
|
+
'color': css.color.text,
|
152
|
+
'font-size': css.fontSize.default,
|
153
|
+
'font-weight': css.fontWeight.regular
|
154
|
+
});
|
155
|
+
utilities.verifyCSS(matchingPage.penaltyPointsDetailsSectionAllottedPointsLabel(), {
|
156
|
+
'color': css.color.labelText,
|
157
|
+
'font-size': css.fontSize.default,
|
158
|
+
'font-weight': css.fontWeight.regular
|
159
|
+
});
|
160
|
+
});
|
161
|
+
|
162
|
+
it('Accessibility of the penalty points section - Penalty points for each incorrect dropzone', { tags: 'a11y' }, () => {
|
163
|
+
cy.checkAccessibility(matchingPage.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 option\'', () => {
|
167
|
+
matchingPage.steps.selectPenaltyPointsForEachIncorrectOptionType('Specify total penalty points');
|
168
|
+
matchingPage.steps.verifyTotalPenaltyPointsValue(3);
|
169
|
+
utilities.verifyInnerText(matchingPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Penalty points for each incorrect dropzone: 1');
|
170
|
+
});
|
171
|
+
|
172
|
+
it('When the user checks the \'Automatically set penalty for each incorrect dropzone to total points / no. of incorrect dropzones\' checkbox, both radio buttons should get disabled, \'Specify points for each incorrect option\' should get checked, in the penalty points details section, \'Penalty points for each incorrect dropzone: #\' and \'Total penalty points: #\' should be displayed as per the alloted points and available incorrect options', () => {
|
173
|
+
matchingPage.steps.checkAutomaticallySetPenaltyPointsCheckbox();
|
174
|
+
matchingPage.steps.verifySpecifyTotalPenaltyPointsDisabledState();
|
175
|
+
matchingPage.steps.verifySpecifyPointsForEachIncorrectOptionRadioButtonSelectedAndDisabledState();
|
176
|
+
utilities.verifyInnerText(utilities.getNthElement(matchingPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 0), 'Penalty points for each incorrect dropzone: 3.33');
|
177
|
+
utilities.verifyInnerText(utilities.getNthElement(matchingPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 1), 'Total penalty points: 9.99');
|
178
|
+
});
|
179
|
+
});
|
180
|
+
|
181
|
+
describe('Scoring section: Rounding - Edit tab', () => {
|
182
|
+
abortEarlySetup();
|
183
|
+
before(() => {
|
184
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
185
|
+
cy.barsPreLoaderWait();
|
186
|
+
matchingPage.steps.allotPoints(10);
|
187
|
+
matchingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights')
|
188
|
+
});
|
189
|
+
|
190
|
+
matchingPage.tests.verifyRoundingDropdown();
|
191
|
+
|
192
|
+
matchingPage.tests.verifyRoundNegativeScoreToZeroLabelAndCheckbox();
|
193
|
+
});
|
194
|
+
});
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import { matchingPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const options1 = ['Flower', 'Petals', 'Roots'];
|
5
|
+
const options2 = ['Seeds', 'Stem', 'Branch'];
|
6
|
+
const options3 = options1.concat(options2);
|
7
|
+
|
8
|
+
describe('Create Item Page: Matching: Switching cases between \'Standard\' and \'Grouped\' options layout', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Matching: Switching cases between \'Standard\' and \'Grouped\' options layout: \'Response Options section\'', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Matching');
|
19
|
+
matchingPage.steps.enterTextInOptionInputField(options1);
|
20
|
+
});
|
21
|
+
|
22
|
+
it('When the user switches from \'Standard\' response layout to \'Grouped\', all the option input fields along with text should appear in the group options', () => {
|
23
|
+
matchingPage.steps.expandDraggableOptionsLayoutDropdown();
|
24
|
+
matchingPage.steps.selectOptionFromDraggableOptionsLayoutDropdown('Grouped');
|
25
|
+
matchingPage.steps.verifyTextInOptionInputField(options1);
|
26
|
+
cy.log('verifying draggable options in \'Specify correct answer\' section')
|
27
|
+
matchingPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, options1);
|
28
|
+
});
|
29
|
+
|
30
|
+
it('When the user creates more than one group of options and switches to \'Standard\' response layout, all the option input fields along with text should appear in the standard options', () => {
|
31
|
+
cy.log('Adding a new group and adding input to the option fields')
|
32
|
+
matchingPage.steps.addGroupWithTitleAndOptionsInDraggableOptionsSection('Group B', options2);
|
33
|
+
matchingPage.steps.expandDraggableOptionsLayoutDropdown();
|
34
|
+
matchingPage.steps.selectOptionFromDraggableOptionsLayoutDropdown('Standard');
|
35
|
+
matchingPage.steps.verifyTextInOptionInputField(options3);
|
36
|
+
cy.log('verifying draggable options in \'Specify correct answer\' section')
|
37
|
+
matchingPage.steps.verifyDraggableOptionInOptionsContainerSpecifyCorrectAnswerSection(options3);
|
38
|
+
});
|
39
|
+
|
40
|
+
it('On switching back to \'Grouped\' response layout, all option input fields should be present under Group A and no other group should exist', () => {
|
41
|
+
matchingPage.steps.expandDraggableOptionsLayoutDropdown();
|
42
|
+
matchingPage.steps.selectOptionFromDraggableOptionsLayoutDropdown('Grouped');
|
43
|
+
utilities.verifyElementCount(matchingPage.groupTab(), 1);
|
44
|
+
matchingPage.steps.verifyTextInOptionInputField(options3);
|
45
|
+
cy.log('verifying draggable options in \'Specify correct answer\' section')
|
46
|
+
matchingPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, options3);
|
47
|
+
});
|
48
|
+
});
|
49
|
+
});
|
@@ -59,7 +59,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
|
|
59
59
|
|
60
60
|
//Failing due to https://redmine.zeuslearning.com/issues/561708, https://redmine.zeuslearning.com/issues/561177
|
61
61
|
views.forEach((view) => {
|
62
|
-
describe
|
62
|
+
describe(`Text entry math: all or nothing scoring - ${view}`, { tags: 'smoke' }, () => {
|
63
63
|
abortEarlySetup();
|
64
64
|
before(() => {
|
65
65
|
switch (view) {
|
@@ -101,7 +101,7 @@ describe('Tool settings content for all views', () => {
|
|
101
101
|
});
|
102
102
|
});
|
103
103
|
|
104
|
-
describe
|
104
|
+
describe(`Preview tab contents : Multiple tools selected - ${view}`, { tags: 'smoke' }, () => {
|
105
105
|
abortEarlySetup();
|
106
106
|
before(() => {
|
107
107
|
switch (view) {
|
@@ -122,16 +122,22 @@
|
|
122
122
|
"geoGebraCanvasBorder": "rgb(102, 102, 102)",
|
123
123
|
"geoGebraHttpsBg": "rgb(233, 238, 255)",
|
124
124
|
"enabledSwitchBg": "rgb(48, 160, 79)",
|
125
|
+
"disabledSwitchBg": "rgb(0, 0, 124)",
|
125
126
|
"gridCellHoverStateBg": "rgba(186, 201, 255, 0.6)",
|
126
127
|
"gridCellDefaultStateBg": "rgba(186, 201, 255, 0.2)",
|
127
128
|
"gridCellSelectedStateBg": "rgba(107, 139, 255, 0.7)",
|
128
129
|
"gridCellCorrectAnswerBg": "rgba(43, 120, 74, 0.4)",
|
129
|
-
"gridCellIncorrectAnswerBg": "rgba(209, 51, 51, 0.4)"
|
130
|
+
"gridCellIncorrectAnswerBg": "rgba(209, 51, 51, 0.4)",
|
131
|
+
"gridCellSelectedStateBorder": "rgb(41, 0, 128)",
|
132
|
+
"gridCellHiddenStateBorder": "rgb(117, 117, 154)",
|
133
|
+
"gridCellIcon": "rgb(41, 0, 128)",
|
134
|
+
"gridBorder": "rgb(0, 0, 124)"
|
130
135
|
},
|
131
136
|
"fontSize": {
|
132
137
|
"extraSmall": "10px",
|
133
138
|
"small": "12px",
|
134
139
|
"normal": "14px",
|
140
|
+
"big": "15px",
|
135
141
|
"default": "16px",
|
136
142
|
"large": "17px",
|
137
143
|
"heading": "18px",
|
@@ -4,7 +4,7 @@ const css = Cypress.env('css');
|
|
4
4
|
|
5
5
|
//Note: We need to work on this file, as disablePreviousIncorrectOptionLabel is not present for all auto scored question types, need to create different component files allowStudentsToCheckAnswerComponent, disablePreviousOptionComponent
|
6
6
|
const selectors = {
|
7
|
-
allowStudentToCheckAnswerLabel: () => cy.get('[data-ngie-testid="allow-
|
7
|
+
allowStudentToCheckAnswerLabel: () => cy.get('[data-ngie-testid="allow-students-to-check-answer-checkbox"] .MuiFormControlLabel-label'),
|
8
8
|
//Note: update after https://redmine.zeuslearning.com/issues/565666 gets resolved
|
9
9
|
allowStudentToCheckAnswerCheckbox: () => cy.get('[data-ngie-testid="allow-students-to-check-answer-checkbox"] input'),
|
10
10
|
maximumCheckAnswerAttemptsDropdownLabel: () => cy.get('#Maximum-check-answer-attempts-dropdown-label'),
|
@@ -441,7 +441,7 @@ const tests = {
|
|
441
441
|
utilities.verifyElementVisibilityState(commonComponents.tooltipText(), 'visible')
|
442
442
|
utilities.verifyCSS(commonComponents.tooltipText(), {
|
443
443
|
'color': css.color.whiteText,
|
444
|
-
'font-size': css.fontSize.
|
444
|
+
'font-size': css.fontSize.normal,
|
445
445
|
'font-weight': css.fontWeight.regular
|
446
446
|
});
|
447
447
|
utilities.getNthElement(optionsWrapperComponent.deleteOptionButton(), 0)
|
@@ -1,9 +1,11 @@
|
|
1
1
|
import utilities from "../support/helpers/utilities";
|
2
2
|
import { createQuestionBasePage, commonComponents } from "./components";
|
3
|
+
import { createItemPage } from "./createItemPage";
|
3
4
|
const css = Cypress.env('css');
|
4
5
|
|
5
6
|
const selectors = {
|
6
7
|
...commonComponents,
|
8
|
+
...createQuestionBasePage,
|
7
9
|
headerLabel: () => cy.get('[class*="ContentBlocksstyles__LabelContent"]'),
|
8
10
|
titleLabel: () => cy.get('.inline-text-property-label').eq(0),
|
9
11
|
titleInputField: () => cy.get('.input-field input').eq(0),
|
@@ -565,7 +567,34 @@ const steps = {
|
|
565
567
|
.should('have.text', `${index + 1}`);
|
566
568
|
});
|
567
569
|
});
|
568
|
-
}
|
570
|
+
},
|
571
|
+
|
572
|
+
createBasicContentBlockResourceAndTool: (inputHeadingText, inputBodyText) => {
|
573
|
+
contentBlocksPage.titleInputField()
|
574
|
+
.type(inputHeadingText);
|
575
|
+
contentBlocksPage.textBlockInputField()
|
576
|
+
.type(inputBodyText);
|
577
|
+
contentBlocksPage.saveQuestionButton()
|
578
|
+
.click();
|
579
|
+
},
|
580
|
+
|
581
|
+
/**
|
582
|
+
* @param {number} panel denotes panel number
|
583
|
+
* @param {number} questionNumber denotes question number
|
584
|
+
* @param {string} questionTitle denotes question title
|
585
|
+
* @param {string} questionInstruction denotes question instruction
|
586
|
+
* @description verify question content
|
587
|
+
*/
|
588
|
+
verifyContentBlockContentsPreview: ({ questionIndex, questionTitle, questionInstructions, panel = 0 }) => {
|
589
|
+
createItemPage.panelWrapper()
|
590
|
+
.eq(panel)
|
591
|
+
.within(() => {
|
592
|
+
utilities.verifyInnerText(createItemPage.questionTitle().eq(questionIndex), questionTitle);
|
593
|
+
utilities.verifyElementVisibilityState(createItemPage.questionTitle().eq(questionIndex), 'visible');
|
594
|
+
utilities.verifyInnerText(contentBlocksPage.contentWrapperPreviewTab().eq(questionIndex), questionInstructions);
|
595
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.contentWrapperPreviewTab().eq(questionIndex), 'visible');
|
596
|
+
});
|
597
|
+
},
|
569
598
|
}
|
570
599
|
|
571
600
|
export const contentBlocksPage = {
|