itemengine-cypress-automation 1.0.198 → 1.0.199
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +3 -1
- package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +1 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +348 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +346 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +401 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingPenaltyScoring.js +53 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightBasic.js +251 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightBasic.js +251 -0
- package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +366 -0
- package/cypress/e2e/ILC/ChartsBar/checkAnswerFunctionalityForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +367 -0
- package/cypress/e2e/ILC/ChartsLine/gradingViewAndCorrectAnswerView.smoke.js +3 -3
- package/cypress/e2e/ILC/Compass/compassEditTabBasicsSection.js +134 -0
- package/cypress/e2e/ILC/Compass/compassPreviewContent.smoke.js +88 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/editTabBasicSection.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +2 -2
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +1 -0
- package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +4 -2
- package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +3 -3
- package/cypress/e2e/ILC/ListOrderingNew/horizontalOrientationAllOrNothingForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +5 -5
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +3 -3
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +4 -4
- package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/UploadResponse/studentViewSettingsSection.js +1 -16
- package/cypress/e2e/ILC/chartsDotsPlot/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/chartsDotsPlot/editTabScoring.js +223 -0
- package/cypress/e2e/ILC/chartsDotsPlot/headerSection.js +110 -0
- package/cypress/e2e/ILC/chartsDotsPlot/minimumScoringPenaltyPointsAndRoundingDropdown.js +199 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +375 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +382 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +422 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/manualAndNonScoredScoring.js +159 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsBasic.js +233 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +380 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +293 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +382 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/toleranceThresholdScoring.js +184 -0
- package/cypress/e2e/ILC/chartsDotsPlot/toolSettings.js +76 -0
- package/cypress/pages/chartsBarPage.js +23 -15
- package/cypress/pages/chartsDotPlotPage.js +130 -7
- package/cypress/pages/chartsLinePage.js +11 -11
- package/cypress/pages/compassPage.js +57 -0
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
- package/cypress/pages/components/barAndLineChartComponent.js +7 -7
- package/cypress/pages/components/chartsCommonComponent.js +55 -7
- package/cypress/pages/components/createQuestionBasePage.js +1 -1
- package/cypress/pages/components/optionsWrapperComponent.js +1 -1
- package/cypress/pages/components/questionInputFieldComponent.js +2 -2
- package/cypress/pages/feedbackScalePage.js +3 -1
- package/cypress/pages/graphingPage.js +1 -1
- package/cypress/pages/imageHighlightPage.js +4 -434
- package/cypress/pages/index.js +2 -1
- package/cypress/pages/listOrderingPage.js +9 -9
- package/cypress/pages/textEntryMathPage.js +16 -16
- package/package.json +1 -1
@@ -0,0 +1,223 @@
|
|
1
|
+
import { chartsDotPlotPage } 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 - Charts - Dot plot: Scoring section', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Scoring section contents', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
17
|
+
});
|
18
|
+
|
19
|
+
chartsDotPlotPage.tests.verifyScoringTypeLabelAndDropdown('Auto scored');
|
20
|
+
|
21
|
+
chartsDotPlotPage.tests.verifyScoringSubtypeContentsForMultipleResponseTypeQuestion();
|
22
|
+
});
|
23
|
+
|
24
|
+
describe('Auto scored: All or nothing scoring - Scoring section', () => {
|
25
|
+
abortEarlySetup();
|
26
|
+
before(() => {
|
27
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
28
|
+
cy.barsPreLoaderWait();
|
29
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
30
|
+
chartsDotPlotPage.steps.allotPoints(10);
|
31
|
+
});
|
32
|
+
|
33
|
+
it('When the user has selected \'All or nothing\' scoring subtype, minimum scoring dropdown and penalty scoring dropdown should be displayed in the scoring section', () => {
|
34
|
+
chartsDotPlotPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
35
|
+
chartsDotPlotPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
|
36
|
+
});
|
37
|
+
|
38
|
+
chartsDotPlotPage.tests.verifyToleranceThresholdLabelAndInputField();
|
39
|
+
});
|
40
|
+
|
41
|
+
describe('Auto scored: All or nothing scoring - Specify correct answer section', () => {
|
42
|
+
abortEarlySetup();
|
43
|
+
before(() => {
|
44
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
45
|
+
cy.barsPreLoaderWait();
|
46
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
47
|
+
chartsDotPlotPage.steps.addTextInQuestionInstructionsInputField('Dot plot');
|
48
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
49
|
+
chartsDotPlotPage.steps.enterTextInIntervalInputField(1);
|
50
|
+
chartsDotPlotPage.steps.enterTextInAnnotateEveryInputField(1);
|
51
|
+
chartsDotPlotPage.steps.enterTextInMinInputField(1);
|
52
|
+
chartsDotPlotPage.steps.enterTextInMaxInputField(4);
|
53
|
+
});
|
54
|
+
|
55
|
+
chartsDotPlotPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
56
|
+
|
57
|
+
chartsDotPlotPage.tests.verifyPointsLabelAndInputField();
|
58
|
+
});
|
59
|
+
|
60
|
+
describe('Auto scored: Partial - equal weights scoring - Scoring section', () => {
|
61
|
+
abortEarlySetup();
|
62
|
+
before(() => {
|
63
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
64
|
+
cy.barsPreLoaderWait();
|
65
|
+
chartsDotPlotPage.steps.addTextInQuestionInstructionsInputField('Dot plot');
|
66
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
67
|
+
});
|
68
|
+
|
69
|
+
it('User should be able to select \'Partial - equal weights\' scoring type', () => {
|
70
|
+
chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
71
|
+
});
|
72
|
+
|
73
|
+
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', () => {
|
74
|
+
chartsDotPlotPage.steps.verifyPointsPerResponseLabel();
|
75
|
+
chartsDotPlotPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
76
|
+
chartsDotPlotPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
|
77
|
+
chartsDotPlotPage.steps.verifyRoundingLabelAndDropdownDefaultState();
|
78
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
79
|
+
});
|
80
|
+
|
81
|
+
chartsDotPlotPage.tests.verifyToleranceThresholdLabelAndInputField();
|
82
|
+
});
|
83
|
+
|
84
|
+
describe('Auto scored: Partial equal weights scoring - Specify correct answer section', () => {
|
85
|
+
abortEarlySetup();
|
86
|
+
before(() => {
|
87
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
88
|
+
cy.barsPreLoaderWait();
|
89
|
+
chartsDotPlotPage.steps.addTextInQuestionInstructionsInputField('Dot plot');
|
90
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
91
|
+
chartsDotPlotPage.steps.enterTextInIntervalInputField(1);
|
92
|
+
chartsDotPlotPage.steps.enterTextInAnnotateEveryInputField(1);
|
93
|
+
chartsDotPlotPage.steps.enterTextInMinInputField(1);
|
94
|
+
chartsDotPlotPage.steps.enterTextInMaxInputField(4);
|
95
|
+
chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
96
|
+
});
|
97
|
+
|
98
|
+
chartsDotPlotPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
99
|
+
|
100
|
+
it('\'Points per response\' label should be displayed and a \'-\' should be displayed besides each response in the \'Specify correct answer\' section', () => {
|
101
|
+
chartsDotPlotPage.steps.verifyPointsPerResponseLabel();
|
102
|
+
});
|
103
|
+
|
104
|
+
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', () => {
|
105
|
+
chartsDotPlotPage.steps.allotPoints(20);
|
106
|
+
chartsDotPlotPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('5');
|
107
|
+
});
|
108
|
+
|
109
|
+
it('When the user adds one more label on number line axis, then points per response should get updated accordingly', () => {
|
110
|
+
chartsDotPlotPage.steps.enterTextInMaxInputField(5);
|
111
|
+
chartsDotPlotPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('4');
|
112
|
+
});
|
113
|
+
|
114
|
+
it('When the user adds dot in dot column then the points per response should not be updated', () => {
|
115
|
+
chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 2, min: 1, interval: 1, defaultDots: 0 });
|
116
|
+
chartsDotPlotPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('4');
|
117
|
+
});
|
118
|
+
|
119
|
+
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', () => {
|
120
|
+
chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('All or nothing');
|
121
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.pointsPerResponseLabel(), 'notExist');
|
122
|
+
chartsDotPlotPage.steps.verifyPointsFieldValue(20);
|
123
|
+
});
|
124
|
+
|
125
|
+
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', () => {
|
126
|
+
chartsDotPlotPage.steps.allotPoints(15);
|
127
|
+
chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
128
|
+
chartsDotPlotPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('3');
|
129
|
+
});
|
130
|
+
|
131
|
+
it('CSS of \'Points per response\' label and its displayed score', { tags: 'css' }, () => {
|
132
|
+
utilities.verifyCSS(chartsDotPlotPage.pointsPerResponseLabel(), {
|
133
|
+
'color': css.color.labels,
|
134
|
+
'font-size': css.fontSize.normal,
|
135
|
+
'font-weight': css.fontWeight.regular
|
136
|
+
});
|
137
|
+
});
|
138
|
+
});
|
139
|
+
|
140
|
+
describe('Auto scored: Partial - different weights scoring - Scoring section', () => {
|
141
|
+
abortEarlySetup();
|
142
|
+
before(() => {
|
143
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
144
|
+
cy.barsPreLoaderWait();
|
145
|
+
chartsDotPlotPage.steps.addTextInQuestionInstructionsInputField('Dot plot');
|
146
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
147
|
+
});
|
148
|
+
|
149
|
+
it('User should be able to select \'Partial - different weights\' scoring', () => {
|
150
|
+
chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
151
|
+
});
|
152
|
+
|
153
|
+
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', () => {
|
154
|
+
chartsDotPlotPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
155
|
+
chartsDotPlotPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
|
156
|
+
chartsDotPlotPage.steps.verifyRoundingLabelAndDropdownDefaultState();
|
157
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
158
|
+
});
|
159
|
+
|
160
|
+
chartsDotPlotPage.tests.verifyToleranceThresholdLabelAndInputField();
|
161
|
+
});
|
162
|
+
|
163
|
+
describe('Auto scored: Partial - different weights scoring - Specify correct answer section', () => {
|
164
|
+
abortEarlySetup();
|
165
|
+
before(() => {
|
166
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
167
|
+
cy.barsPreLoaderWait();
|
168
|
+
chartsDotPlotPage.steps.addTextInQuestionInstructionsInputField('Dot plot');
|
169
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
170
|
+
chartsDotPlotPage.steps.enterTextInIntervalInputField(1);
|
171
|
+
chartsDotPlotPage.steps.enterTextInAnnotateEveryInputField(1);
|
172
|
+
chartsDotPlotPage.steps.enterTextInMinInputField(1);
|
173
|
+
chartsDotPlotPage.steps.enterTextInMaxInputField(4);
|
174
|
+
chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
175
|
+
});
|
176
|
+
|
177
|
+
chartsDotPlotPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
178
|
+
|
179
|
+
it('When the user has switched to \'Partial - different weights\' scoring, then dot columns numeration labels should be displayed and input field should be displayed below each label', () => {
|
180
|
+
utilities.verifyInnerText(utilities.getNthElement(chartsDotPlotPage.dotColumnNumerationPointsLabel(), 0), '1');
|
181
|
+
utilities.verifyInnerText(utilities.getNthElement(chartsDotPlotPage.dotColumnNumerationPointsLabel(), 1), '2');
|
182
|
+
utilities.verifyInnerText(utilities.getNthElement(chartsDotPlotPage.dotColumnNumerationPointsLabel(), 2), '3');
|
183
|
+
utilities.verifyInnerText(utilities.getNthElement(chartsDotPlotPage.dotColumnNumerationPointsLabel(), 3), '4')
|
184
|
+
utilities.verifyElementCount(chartsDotPlotPage.dotColumnNumerationPointsLabel(), 4);
|
185
|
+
utilities.verifyElementCount(chartsDotPlotPage.pointsInputField(), 4);
|
186
|
+
});
|
187
|
+
|
188
|
+
it('When user adds one more label on number line axis, then label for newly added label should be displayed with input field', () => {
|
189
|
+
chartsDotPlotPage.steps.enterTextInMaxInputField(5);
|
190
|
+
utilities.verifyInnerText(utilities.getNthElement(chartsDotPlotPage.dotColumnNumerationPointsLabel(), 4), '5');
|
191
|
+
utilities.verifyElementVisibilityState(utilities.getNthElement(chartsDotPlotPage.pointsInputField(), 4), 'visible');
|
192
|
+
chartsDotPlotPage.steps.verifyPartialDifferentWeightsPointsInputFieldIsEmpty();
|
193
|
+
});
|
194
|
+
|
195
|
+
it('User should be able to set points in the \'Points\' input fields', () => {
|
196
|
+
chartsDotPlotPage.steps.allotPartialDifferentWeightsPoints([1, 2, 3, 4, 5]);
|
197
|
+
});
|
198
|
+
|
199
|
+
it('CSS of \'Points\' label and \'Points\' input fields', { tags: 'css' }, () => {
|
200
|
+
utilities.verifyCSS(chartsDotPlotPage.pointsLabel(), {
|
201
|
+
'color': css.color.labels,
|
202
|
+
'font-size': css.fontSize.normal,
|
203
|
+
'font-weight': css.fontWeight.semibold
|
204
|
+
});
|
205
|
+
utilities.verifyCSS(chartsDotPlotPage.pointsInputField(), {
|
206
|
+
'color': css.color.text,
|
207
|
+
'font-size': css.fontSize.default,
|
208
|
+
'font-weight': css.fontWeight.regular
|
209
|
+
});
|
210
|
+
});
|
211
|
+
|
212
|
+
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', () => {
|
213
|
+
chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('All or nothing');
|
214
|
+
chartsDotPlotPage.steps.verifyPointsFieldValue(15);
|
215
|
+
});
|
216
|
+
|
217
|
+
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', () => {
|
218
|
+
chartsDotPlotPage.steps.allotPoints(10);
|
219
|
+
chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
220
|
+
chartsDotPlotPage.steps.verifyPartialDifferentWeightsPointsInputFieldValue([2, 2, 2, 2, 2]);
|
221
|
+
});
|
222
|
+
});
|
223
|
+
});
|
@@ -0,0 +1,110 @@
|
|
1
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
+
import { chartsDotPlotPage } from "../../../pages";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Create item page - Charts - Dot plot: Header section and saving question', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Header section contents', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
17
|
+
});
|
18
|
+
|
19
|
+
chartsDotPlotPage.tests.verifyCreateQuestionPageQuestionTypeHeader('Charts');
|
20
|
+
});
|
21
|
+
|
22
|
+
describe('Tabs section', () => {
|
23
|
+
abortEarlySetup();
|
24
|
+
before(() => {
|
25
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
26
|
+
cy.barsPreLoaderWait();
|
27
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
28
|
+
});
|
29
|
+
|
30
|
+
chartsDotPlotPage.tests.verifyTabsSection();
|
31
|
+
});
|
32
|
+
|
33
|
+
describe('Cancel button', () => {
|
34
|
+
abortEarlySetup();
|
35
|
+
before(() => {
|
36
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
37
|
+
cy.barsPreLoaderWait();
|
38
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
39
|
+
});
|
40
|
+
|
41
|
+
it('When user has made some edits/changes and clicks on cancel button, a popup should be displayed with message \'Are you sure you want to leave this page? Your changes have not been saved.\'', () => {
|
42
|
+
chartsDotPlotPage.steps.addTextInQuestionInstructionsInputField('Edited');
|
43
|
+
chartsDotPlotPage.steps.allotPoints(20);
|
44
|
+
chartsDotPlotPage.steps.clickOnCancelButton();
|
45
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.dialogBox(), 'visible');
|
46
|
+
utilities.verifyInnerText(chartsDotPlotPage.dialogBoxContent(), 'Are you sure you want to leave this page? Your changes have not been saved.');
|
47
|
+
utilities.verifyInnerText(chartsDotPlotPage.buttonAccept(), 'Yes, I want to leave this page');
|
48
|
+
utilities.verifyInnerText(chartsDotPlotPage.buttonReject(), 'No, I\'d like to go back');
|
49
|
+
});
|
50
|
+
|
51
|
+
it('CSS of popup', { tags: 'css' }, () => {
|
52
|
+
utilities.verifyCSS(chartsDotPlotPage.dialogBox(), {
|
53
|
+
'background-color': css.color.defaultBackground
|
54
|
+
})
|
55
|
+
|
56
|
+
utilities.verifyCSS(chartsDotPlotPage.dialogBoxContent(), {
|
57
|
+
'color': css.color.sectionHeading,
|
58
|
+
'font-size': css.fontSize.default,
|
59
|
+
'font-weight': css.fontWeight.regular
|
60
|
+
});
|
61
|
+
utilities.verifyCSS(chartsDotPlotPage.buttonAccept(), {
|
62
|
+
'color': css.color.primaryBtn,
|
63
|
+
'font-size': css.fontSize.default,
|
64
|
+
'font-weight': css.fontWeight.semibold,
|
65
|
+
'background-color': css.color.primaryBtnBg
|
66
|
+
});
|
67
|
+
utilities.verifyCSS(chartsDotPlotPage.buttonReject(), {
|
68
|
+
'color': css.color.secondaryBtn,
|
69
|
+
'font-size': css.fontSize.default,
|
70
|
+
'font-weight': css.fontWeight.semibold,
|
71
|
+
'background-color': css.color.transparent
|
72
|
+
});
|
73
|
+
});
|
74
|
+
|
75
|
+
it('Accessibility of popup', { tags: 'a11y' }, () => {
|
76
|
+
cy.checkAccessibility(chartsDotPlotPage.dialogBox());
|
77
|
+
});
|
78
|
+
|
79
|
+
it(`Clicking on \'No, I'd like to go back\' button should close the popup and user should remain on the edit interface of the question`, () => {
|
80
|
+
chartsDotPlotPage.steps.clickOnRejectButtonInDialogBox();
|
81
|
+
chartsDotPlotPage.steps.verifyEditTabSelectedState();
|
82
|
+
utilities.verifyTextContent(chartsDotPlotPage.questionInstructionsInputField(), 'Edited');
|
83
|
+
});
|
84
|
+
|
85
|
+
it(`Clicking on \'Yes, I want to leave this page\' button should should discard all changes and direct the user to the \'Select a question\' page.`, () => {
|
86
|
+
chartsDotPlotPage.steps.clickOnCancelButton();
|
87
|
+
chartsDotPlotPage.steps.clickOnAcceptButtonInDialogBox();
|
88
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.selectAQuestionHeaderText(), 'visible');
|
89
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.questionTypeOptionTitle(), 'visible');
|
90
|
+
});
|
91
|
+
});
|
92
|
+
|
93
|
+
describe('Save Question button', () => {
|
94
|
+
abortEarlySetup();
|
95
|
+
before(() => {
|
96
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
97
|
+
cy.barsPreLoaderWait();
|
98
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
99
|
+
});
|
100
|
+
|
101
|
+
|
102
|
+
chartsDotPlotPage.tests.verifyCreateItemWrapperContentsA11y();
|
103
|
+
|
104
|
+
it('When user clicks on "Save question" button, then the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
105
|
+
chartsDotPlotPage.steps.saveAQuestionAndVerifySnackbar();
|
106
|
+
});
|
107
|
+
|
108
|
+
chartsDotPlotPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
109
|
+
});
|
110
|
+
});
|
@@ -0,0 +1,199 @@
|
|
1
|
+
import { chartsDotPlotPage } 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 dot plot'];
|
6
|
+
|
7
|
+
describe('Create item page - Charts - Dot plot: 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
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
18
|
+
chartsDotPlotPage.steps.allotPoints(10);
|
19
|
+
});
|
20
|
+
|
21
|
+
chartsDotPlotPage.tests.verifyMinimumScoringDropdown();
|
22
|
+
|
23
|
+
chartsDotPlotPage.tests.verifyMinimumPointsLabelAndInputField();
|
24
|
+
|
25
|
+
chartsDotPlotPage.tests.verifyMinimumPointsFieldErrorState();
|
26
|
+
});
|
27
|
+
|
28
|
+
describe('Scoring section: Penalty scoring - Edit tab', () => {
|
29
|
+
abortEarlySetup();
|
30
|
+
before(() => {
|
31
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
32
|
+
cy.barsPreLoaderWait();
|
33
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
34
|
+
chartsDotPlotPage.steps.enterTextInIntervalInputField(1);
|
35
|
+
chartsDotPlotPage.steps.enterTextInAnnotateEveryInputField(1);
|
36
|
+
chartsDotPlotPage.steps.allotPoints(10);
|
37
|
+
chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
38
|
+
});
|
39
|
+
|
40
|
+
chartsDotPlotPage.tests.verifyPenaltyScoringDropdown(penaltyScoringTypeArray);
|
41
|
+
|
42
|
+
chartsDotPlotPage.tests.verifyPenaltyPointsLabelAndInputField();
|
43
|
+
|
44
|
+
chartsDotPlotPage.tests.verifyPenaltyPointsErrorState();
|
45
|
+
|
46
|
+
it('When the user selects \'Penalty points for each incorrect dot plot\' from the penalty scoring dropdown, \'Automatically set penalty for each incorrect dot plot to total points / no. of incorrect dot plots\' 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 dot plot\' should be displayed. By default, \'Specify total penalty points\' radio button should be checked', () => {
|
47
|
+
chartsDotPlotPage.steps.expandPenaltyScoringDropdown();
|
48
|
+
chartsDotPlotPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for each incorrect dot plot');
|
49
|
+
utilities.verifyInnerText(chartsDotPlotPage.automaticallySetPenaltyPointsCheckboxLabel(), 'Automatically set penalty for each incorrect dot plot to total points / no. of incorrect dot plots');
|
50
|
+
utilities.verifyInnerText(chartsDotPlotPage.specifyTotalPenaltyPointsRadioButtonLabel(), 'Specify total penalty points');
|
51
|
+
utilities.verifyInnerText(chartsDotPlotPage.specifyPointsForEachIncorrectOptionRadioButtonLabel(), 'Specify points for each incorrect dot plot');
|
52
|
+
chartsDotPlotPage.steps.verifyAutomaticallySetPenaltyPointsCheckboxUncheckedState();
|
53
|
+
chartsDotPlotPage.steps.verifySpecifyTotalPenaltyPointsRadioButtonCheckedState();
|
54
|
+
chartsDotPlotPage.steps.verifySpecifyPointsForEachIncorrectOptionRadioButtonUncheckedState();
|
55
|
+
});
|
56
|
+
|
57
|
+
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 dot plot: -\' label should be displayed', () => {
|
58
|
+
utilities.verifyInnerText(chartsDotPlotPage.penaltyPointsDetailsSectionInputFieldLabel(), 'Total penalty points');
|
59
|
+
chartsDotPlotPage.steps.verifyTotalPenaltyPointsValue('');
|
60
|
+
utilities.verifyInnerText(chartsDotPlotPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Penalty points for each incorrect dot plot: -');
|
61
|
+
});
|
62
|
+
|
63
|
+
it('When the user allots total penalty points, then \'points for each incorrect option\' should get updated as per the count of incorrect dot column available', () => {
|
64
|
+
chartsDotPlotPage.steps.allotTotalPenaltyPoints(6);
|
65
|
+
chartsDotPlotPage.steps.verifyPenaltyPointsForEachIncorrectDotPlot(1);
|
66
|
+
});
|
67
|
+
|
68
|
+
it('When the user removes a label from number line axis, then \'points for each incorrect option\' should get updated accordingly', () => {
|
69
|
+
chartsDotPlotPage.steps.enterTextInMaxInputField(5);
|
70
|
+
chartsDotPlotPage.steps.verifyPenaltyPointsForEachIncorrectDotPlot(1);
|
71
|
+
});
|
72
|
+
|
73
|
+
it('When the user adds a label on number line axis, then \'points for each incorrect option\' should get updated accordingly', () => {
|
74
|
+
chartsDotPlotPage.steps.enterTextInMaxInputField(6);
|
75
|
+
chartsDotPlotPage.steps.verifyPenaltyPointsForEachIncorrectDotPlot(1);
|
76
|
+
});
|
77
|
+
|
78
|
+
it.skip('CSS of the penalty points section - Total penalty points', { tags: 'css' }, () => {
|
79
|
+
utilities.verifyCSS(chartsDotPlotPage.automaticallySetPenaltyPointsCheckboxLabel(), {
|
80
|
+
'color': css.color.labels,
|
81
|
+
'font-size': css.fontSize.default,
|
82
|
+
'font-weight': css.fontWeight.regular
|
83
|
+
});
|
84
|
+
utilities.verifyCSS(chartsDotPlotPage.automaticallySetPenaltyPointsCheckbox().parent().find('svg'), {
|
85
|
+
'fill': css.color.uncheckedCheckbox
|
86
|
+
});
|
87
|
+
utilities.verifyCSS(chartsDotPlotPage.specifyTotalPenaltyPointsRadioButton().parent().find('svg'), {
|
88
|
+
'fill': css.color.activeButtons
|
89
|
+
});
|
90
|
+
utilities.verifyCSS(chartsDotPlotPage.specifyPointsForEachIncorrectOptionRadioButton().parent().find('svg path'), {
|
91
|
+
'fill': css.color.uncheckedCheckbox
|
92
|
+
});
|
93
|
+
utilities.verifyCSS(chartsDotPlotPage.specifyTotalPenaltyPointsRadioButtonLabel(), {
|
94
|
+
'color': css.color.labelText,
|
95
|
+
'font-size': css.fontSize.default,
|
96
|
+
'font-weight': css.fontWeight.regular
|
97
|
+
});
|
98
|
+
utilities.verifyCSS(chartsDotPlotPage.specifyPointsForEachIncorrectOptionRadioButtonLabel(), {
|
99
|
+
'color': css.color.labelText,
|
100
|
+
'font-size': css.fontSize.default,
|
101
|
+
'font-weight': css.fontWeight.regular
|
102
|
+
});
|
103
|
+
utilities.verifyCSS(chartsDotPlotPage.penaltyPointsDetailsSectionInputFieldLabel(), {
|
104
|
+
'color': css.color.labelText,
|
105
|
+
'font-size': css.fontSize.default,
|
106
|
+
'font-weight': css.fontWeight.regular
|
107
|
+
});
|
108
|
+
utilities.verifyCSS(chartsDotPlotPage.totalPenaltyPointsInputField(), {
|
109
|
+
'color': css.color.text,
|
110
|
+
'font-size': css.fontSize.default,
|
111
|
+
'font-weight': css.fontWeight.regular
|
112
|
+
});
|
113
|
+
utilities.verifyCSS(chartsDotPlotPage.penaltyPointsDetailsSectionAllottedPointsLabel(), {
|
114
|
+
'color': css.color.labelText,
|
115
|
+
'font-size': css.fontSize.default,
|
116
|
+
'font-weight': css.fontWeight.regular
|
117
|
+
});
|
118
|
+
});
|
119
|
+
|
120
|
+
it('Accessibility of the penalty points section - Total penalty points', { tags: 'a11y' }, () => {
|
121
|
+
cy.checkAccessibility(chartsDotPlotPage.automaticallySetPenaltyPointsCheckboxLabel().parents('.penalty-score-for-each-incorrect-wrapper'));
|
122
|
+
});
|
123
|
+
|
124
|
+
it('When the user selects \'Specify points for each incorrect answer\', a penalty points detail section with \'Penalty points for each incorrect dot plot:\' label and empty input field, \'Total penalty points: -\' label should be displayed', () => {
|
125
|
+
cy.log('Pre-step: Clearing the total penalty points input field')
|
126
|
+
chartsDotPlotPage.steps.clearTotalPenaltyPointsInputField();
|
127
|
+
chartsDotPlotPage.steps.selectPenaltyPointsForEachIncorrectOptionType('Specify points for each incorrect dot plot');
|
128
|
+
utilities.verifyInnerText(chartsDotPlotPage.penaltyPointsDetailsSectionInputFieldLabel(), 'Penalty points for each incorrect dot plot');
|
129
|
+
chartsDotPlotPage.steps.verifyPenaltyPointsForEachIncorrectOptionValue('');
|
130
|
+
utilities.verifyInnerText(chartsDotPlotPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Total penalty points: -');
|
131
|
+
});
|
132
|
+
|
133
|
+
it('When the user allots Penalty points for each incorrect dot plot, then \'Total penalty points\' should get updated as per the count of incorrect options available', () => {
|
134
|
+
chartsDotPlotPage.steps.allotPenaltyPointsForEachIncorrectOption(1);
|
135
|
+
chartsDotPlotPage.steps.verifyTotalPenaltyPoints(7);
|
136
|
+
});
|
137
|
+
|
138
|
+
it('When the user adds a new label on number line axis, then \'Total penalty points\' should get updated accordingly', () => {
|
139
|
+
chartsDotPlotPage.steps.enterTextInMaxInputField(7);
|
140
|
+
chartsDotPlotPage.steps.verifyTotalPenaltyPoints(8);
|
141
|
+
});
|
142
|
+
|
143
|
+
it('When the user removes a label from number line axis, then \'points for each incorrect option\' should get updated accordingly', () => {
|
144
|
+
chartsDotPlotPage.steps.enterTextInMaxInputField(6);
|
145
|
+
chartsDotPlotPage.steps.verifyTotalPenaltyPoints(7);
|
146
|
+
});
|
147
|
+
|
148
|
+
it.skip('CSS of the penalty points section - Penalty points for each incorrect dot plot', { tags: 'css' }, () => {
|
149
|
+
utilities.verifyCSS(chartsDotPlotPage.penaltyPointsDetailsSectionInputFieldLabel(), {
|
150
|
+
'color': css.color.labels,
|
151
|
+
'font-size': css.fontSize.default,
|
152
|
+
'font-weight': css.fontWeight.regular
|
153
|
+
});
|
154
|
+
utilities.verifyCSS(chartsDotPlotPage.penaltyPointsForEachIncorrectOptionInputField(), {
|
155
|
+
'color': css.color.text,
|
156
|
+
'font-size': css.fontSize.default,
|
157
|
+
'font-weight': css.fontWeight.regular
|
158
|
+
});
|
159
|
+
utilities.verifyCSS(chartsDotPlotPage.penaltyPointsDetailsSectionAllottedPointsLabel(), {
|
160
|
+
'color': css.color.labelText,
|
161
|
+
'font-size': css.fontSize.default,
|
162
|
+
'font-weight': css.fontWeight.regular
|
163
|
+
});
|
164
|
+
});
|
165
|
+
|
166
|
+
it('Accessibility of the penalty points section - Penalty points for each incorrect dot plot', { tags: 'a11y' }, () => {
|
167
|
+
cy.checkAccessibility(chartsDotPlotPage.automaticallySetPenaltyPointsCheckboxLabel().parents('.penalty-score-for-each-incorrect-wrapper'));
|
168
|
+
});
|
169
|
+
|
170
|
+
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 dot plot\'', () => {
|
171
|
+
chartsDotPlotPage.steps.selectPenaltyPointsForEachIncorrectOptionType('Specify total penalty points');
|
172
|
+
chartsDotPlotPage.steps.verifyTotalPenaltyPointsValue(7);
|
173
|
+
utilities.verifyInnerText(chartsDotPlotPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Penalty points for each incorrect dot plot: 1');
|
174
|
+
});
|
175
|
+
|
176
|
+
it('When the user checks the \'Automatically set penalty for each incorrect dot plot to total points / no. of incorrect dot plots\' checkbox, both radio buttons should get disabled, \'Specify points for each incorrect dot plot\' should get checked, in the penalty points details section, \'Penalty points for each incorrect dot plot: #\' and \'Total penalty points: #\' should be displayed as per the alloted points and available incorrect options', () => {
|
177
|
+
chartsDotPlotPage.steps.checkAutomaticallySetPenaltyPointsCheckbox();
|
178
|
+
chartsDotPlotPage.steps.verifySpecifyTotalPenaltyPointsDisabledState();
|
179
|
+
chartsDotPlotPage.steps.verifySpecifyPointsForEachIncorrectOptionRadioButtonSelectedAndDisabledState();
|
180
|
+
utilities.verifyInnerText(utilities.getNthElement(chartsDotPlotPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 0), 'Penalty points for each incorrect dot plot: 1.43');
|
181
|
+
utilities.verifyInnerText(utilities.getNthElement(chartsDotPlotPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 1), 'Total penalty points: 10.01');
|
182
|
+
});
|
183
|
+
});
|
184
|
+
|
185
|
+
describe('Scoring section: Rounding - Edit tab', () => {
|
186
|
+
abortEarlySetup();
|
187
|
+
before(() => {
|
188
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
189
|
+
cy.barsPreLoaderWait();
|
190
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
191
|
+
chartsDotPlotPage.steps.allotPoints(10);
|
192
|
+
chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('Partial equal weights')
|
193
|
+
});
|
194
|
+
|
195
|
+
chartsDotPlotPage.tests.verifyRoundingDropdown();
|
196
|
+
|
197
|
+
chartsDotPlotPage.tests.verifyRoundNegativeScoreToZeroLabelAndCheckbox();
|
198
|
+
});
|
199
|
+
});
|