itemengine-cypress-automation 1.0.204-graphQLUpdate-b0c0036.0 → 1.0.204
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +22 -22
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneBasic.js +4 -4
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneMinimumAndPenaltyScoring.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +8 -8
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +5 -1
- package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +2 -0
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +19 -21
- package/cypress/e2e/ILC/EssayResponseMath/mathCharacters.js +2 -4
- package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +14 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +6 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +4 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +3 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/conditionalCheckboxScoring.js +56 -56
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +6 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +2 -2
- package/cypress/e2e/ILC/GridFill/customizeLayoutFillImageBackgroundImage.js +8 -3
- package/cypress/e2e/ILC/ImageHighlight/additionalSettingsBasic.js +1 -1
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +2 -2
- package/cypress/e2e/ILC/Matching/toolSettings.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/additionalSettings.js +248 -0
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +1 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +3 -0
- package/cypress/e2e/ILC/SingleSelection/additionalSettings.js +249 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +6 -6
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +4 -4
- package/cypress/e2e/ILC/chartsDotsPlot/dotTypeFunctionality.js +235 -0
- package/cypress/e2e/ILC/chartsDotsPlot/minimumScoringPenaltyPointsAndRoundingDropdown.js +5 -5
- package/cypress/e2e/ILC/chartsDotsPlot/numberLineAxisSettings.js +265 -0
- package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +6 -6
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/manualAndNonScoredScoring.js +3 -3
- package/cypress/e2e/ILC/chartsDotsPlot/selectChartTypeSection.js +594 -0
- package/cypress/e2e/ILC/chartsDotsPlot/studentViewSettings.js +2 -3
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +1 -1
- package/cypress/fixtures/fillColorDefaultProperties.js +2 -2
- package/cypress/pages/chartsDotPlotPage.js +588 -59
- package/cypress/pages/components/autoScoredScoringPreviewTab.js +1 -1
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +1 -1
- package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
- package/cypress/pages/components/chartsCommonComponent.js +10 -1
- package/cypress/pages/components/customizeMathCharacterComponent.js +10 -5
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +2 -2
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +4 -3
- package/cypress/pages/components/gridQuestionCommonComponent.js +11 -11
- package/cypress/pages/components/imageCanvasComponent.js +2 -2
- package/cypress/pages/components/layoutSectionComponent.js +20 -18
- package/cypress/pages/components/mcqAdditionalSettingsBase.js +164 -24
- package/cypress/pages/dialogBoxBase.js +1 -1
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -5
- package/cypress/pages/drawingResponsePage.js +3 -3
- package/cypress/pages/feedbackScalePage.js +16 -9
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +6 -1
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +2 -1
- package/cypress/pages/gridFillPage.js +17 -14
- package/cypress/pages/itemPreviewSettingsPage.js +1 -0
- package/cypress/pages/matchingPage.js +1 -1
- package/cypress/pages/multipleSelectionPage.js +173 -1
- package/cypress/pages/singleSelectionPage.js +171 -1
- package/package.json +2 -2
@@ -382,14 +382,14 @@ describe('Create Item page - Charts - Dot: All or nothing ', () => {
|
|
382
382
|
chartsDotPlotPage.steps.allotMinimumPoints(2);
|
383
383
|
chartsDotPlotPage.steps.switchToPreviewTab();
|
384
384
|
chartsDotPlotPage.steps.switchToGradingView();
|
385
|
-
chartsDotPlotPage.steps.verifyPreviewScore(2,
|
385
|
+
chartsDotPlotPage.steps.verifyPreviewScore(2, 10);
|
386
386
|
chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
387
387
|
});
|
388
388
|
|
389
389
|
it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
|
390
390
|
chartsDotPlotPage.steps.resetQuestionPreview();
|
391
391
|
chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 3, min: 1, interval: 0.25 });
|
392
|
-
chartsDotPlotPage.steps.verifyPreviewScore(2,
|
392
|
+
chartsDotPlotPage.steps.verifyPreviewScore(2, 10);
|
393
393
|
chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
394
394
|
});
|
395
395
|
|
@@ -400,14 +400,14 @@ describe('Create Item page - Charts - Dot: All or nothing ', () => {
|
|
400
400
|
chartsDotPlotPage.steps.allotMinimumPoints(2);
|
401
401
|
chartsDotPlotPage.steps.switchToPreviewTab();
|
402
402
|
chartsDotPlotPage.steps.switchToGradingView();
|
403
|
-
chartsDotPlotPage.steps.verifyPreviewScore(0,
|
403
|
+
chartsDotPlotPage.steps.verifyPreviewScore(0, 10);
|
404
404
|
chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
405
405
|
});
|
406
406
|
|
407
407
|
it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
|
408
408
|
chartsDotPlotPage.steps.resetQuestionPreview();
|
409
409
|
chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 3, min: 1, interval: 0.25, defaultDots });
|
410
|
-
chartsDotPlotPage.steps.verifyPreviewScore(2,
|
410
|
+
chartsDotPlotPage.steps.verifyPreviewScore(2, 10);
|
411
411
|
});
|
412
412
|
});
|
413
413
|
};
|
@@ -0,0 +1,235 @@
|
|
1
|
+
|
2
|
+
import { chartsDotPlotPage, dialogBoxBase } from "../../../pages";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
5
|
+
|
6
|
+
describe('Dot plot - Dot type and Label options', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Dot type - content and edit tab functionality', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
17
|
+
});
|
18
|
+
|
19
|
+
it('Dot type label should be displayed', () => {
|
20
|
+
utilities.verifyInnerText(chartsDotPlotPage.dotTypeLabel(), 'Dot type');
|
21
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.dotTypeLabel(), 'visible');
|
22
|
+
});
|
23
|
+
|
24
|
+
it('Dot and X mark labels and radio button should be displayed and by default \'Dot\' radio button should be selected', () => {
|
25
|
+
utilities.verifyInnerText(chartsDotPlotPage.dotLabel(), 'Dot');
|
26
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.dotLabel(), 'visible');
|
27
|
+
utilities.verifyInnerText(chartsDotPlotPage.xMarkLabel(), 'X mark');
|
28
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.xAxisLabelSelectChartType(), 'visible');
|
29
|
+
chartsDotPlotPage.steps.verifyDotRadioButtonSelected();
|
30
|
+
});
|
31
|
+
|
32
|
+
it('When Dot radio button is selected then on plotting response in dot column \'Dots\' should be displayed in select chart type and specify correct answer section', () => {
|
33
|
+
chartsDotPlotPage.steps.verifyDotRadioButtonSelected();
|
34
|
+
chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(2, { point: 0, min: 0, interval: 0.25, defaultDots: 0 });
|
35
|
+
chartsDotPlotPage.steps.verifyDotTypeSelectChartType('Dot', { point: 0, min: 0, interval: 0.25 });
|
36
|
+
chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 0, min: 0, interval: 0.25, defaultDots: 0 });
|
37
|
+
chartsDotPlotPage.steps.verifyDotTypeSpecifyCorrectAnswer('Dot', { point: 0, min: 0, interval: 0.25 });
|
38
|
+
});
|
39
|
+
|
40
|
+
it('When user selects X mark radio button then added response in dot column should change to \'X\' mark in select chart type and specify correct answer section', () => {
|
41
|
+
chartsDotPlotPage.steps.selectXMarkRadioButton();
|
42
|
+
chartsDotPlotPage.steps.verifyDotTypeSelectChartType('XMark', { point: 0, min: 0, interval: 0.25 });
|
43
|
+
chartsDotPlotPage.steps.verifyDotTypeSpecifyCorrectAnswer('XMark', { point: 0, min: 0, interval: 0.25 });
|
44
|
+
});
|
45
|
+
|
46
|
+
it('When user hovers over add button then \'Add cross\' tooltip should be displayed', () => {
|
47
|
+
chartsDotPlotPage.steps.selectDotColumnInSelectChartTypeSection({ point: 0, min: 0, interval: 0.25 });
|
48
|
+
chartsDotPlotPage.steps.verifyTooltipInnerText(chartsDotPlotPage.addButtonSelectChartType, 'Add cross');
|
49
|
+
chartsDotPlotPage.steps.unselectDotColumnInSelectChartTypeSection({ point: 0, min: 0, interval: 0.25 });
|
50
|
+
});
|
51
|
+
|
52
|
+
it('When user hovers over minus button then \'Minus cross\' tooltip should be displayed', () => {
|
53
|
+
chartsDotPlotPage.steps.selectDotColumnInSelectChartTypeSection({ point: 0, min: 0, interval: 0.25 });
|
54
|
+
chartsDotPlotPage.steps.verifyTooltipInnerText(chartsDotPlotPage.minusButtonSelectChartType, 'Minus cross');
|
55
|
+
chartsDotPlotPage.steps.unselectDotColumnInSpecifyCorrectAnswer({ point: 0, min: 0, interval: 0.25 });
|
56
|
+
});
|
57
|
+
|
58
|
+
it('When user selects Dot radio button again then added response in dot column should change to \'Dot\' in select chart type and specify correct answer section', () => {
|
59
|
+
chartsDotPlotPage.steps.selectDotRadioButton();
|
60
|
+
chartsDotPlotPage.steps.verifyDotTypeSelectChartType('Dot', { point: 0, min: 0, interval: 0.25 });
|
61
|
+
chartsDotPlotPage.steps.verifyDotTypeSpecifyCorrectAnswer('Dot', { point: 0, min: 0, interval: 0.25 });
|
62
|
+
});
|
63
|
+
|
64
|
+
it('CSS of grid section', { tags: 'css' }, () => {
|
65
|
+
utilities.verifyCSS(chartsDotPlotPage.dotTypeLabel(), {
|
66
|
+
'color': css.color.labels,
|
67
|
+
'font-size': css.fontSize.normal,
|
68
|
+
'font-weight': css.fontWeight.semibold
|
69
|
+
});
|
70
|
+
utilities.verifyCSS(chartsDotPlotPage.dotLabel(), {
|
71
|
+
'color': css.color.labels,
|
72
|
+
'font-size': css.fontSize.normal,
|
73
|
+
'font-weight': css.fontWeight.regular
|
74
|
+
});
|
75
|
+
utilities.verifyCSS(chartsDotPlotPage.dotRadioButton().parents('.radio-option-checked').find('[data-name="Radio button - Selected"]'), {
|
76
|
+
'fill': css.color.activeButtons
|
77
|
+
});
|
78
|
+
utilities.verifyCSS(chartsDotPlotPage.xMarkLabel(), {
|
79
|
+
'color': css.color.labels,
|
80
|
+
'font-size': css.fontSize.normal,
|
81
|
+
'font-weight': css.fontWeight.regular
|
82
|
+
});
|
83
|
+
utilities.verifyCSS(chartsDotPlotPage.xMarkRadioButton().parents('span').find('.radio-btn-deselected'), {
|
84
|
+
'fill': css.color.uncheckedCheckbox
|
85
|
+
});
|
86
|
+
});
|
87
|
+
|
88
|
+
it('Accessibility of Dot type section', { tags: 'a11y' }, () => {
|
89
|
+
cy.checkAccessibility(chartsDotPlotPage.selectChartTypeGraphTitleButton().parents('[class*="Chartsstyles__ChartsQuestionWrapper"]'));
|
90
|
+
});
|
91
|
+
});
|
92
|
+
|
93
|
+
describe('Dot type - preview tab functionality', () => {
|
94
|
+
abortEarlySetup();
|
95
|
+
before(() => {
|
96
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
97
|
+
cy.barsPreLoaderWait();
|
98
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
99
|
+
});
|
100
|
+
|
101
|
+
it('When Dot radio button is selected then on plotting response in dot column, dots should be displayed in preview tab', () => {
|
102
|
+
chartsDotPlotPage.steps.verifyDotRadioButtonSelected();
|
103
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
104
|
+
chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 0, min: 0, interval: 0.25, defaultDots: 0 });
|
105
|
+
chartsDotPlotPage.steps.verifyDotTypePreviewTab('Dot', { point: 0, min: 0, interval: 0.25 });
|
106
|
+
});
|
107
|
+
|
108
|
+
it('When user selects X mark radio button in edit tab and plots response in dot column then \'X\' mark should be displayed in preview tab', () => {
|
109
|
+
chartsDotPlotPage.steps.switchToEditTab();
|
110
|
+
chartsDotPlotPage.steps.selectXMarkRadioButton();
|
111
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
112
|
+
chartsDotPlotPage.steps.selectDotColumnInPreviewTab({ point: 0, min: 0, interval: 0.25 });
|
113
|
+
chartsDotPlotPage.steps.increaseDotCountInDotColumnPreviewTab(2, { point: 0, min: 0, interval: 0.25, defaultDots: 0 });
|
114
|
+
chartsDotPlotPage.steps.verifyDotTypePreviewTab('XMark', { point: 0, min: 0, interval: 0.25 });
|
115
|
+
});
|
116
|
+
|
117
|
+
it('When user selects Dot radio button again in edit tab and plots response in dot column then dot should be displayed in preview tab', () => {
|
118
|
+
chartsDotPlotPage.steps.switchToEditTab();
|
119
|
+
chartsDotPlotPage.steps.selectDotRadioButton();
|
120
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
121
|
+
chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 0, min: 0, interval: 0.25, defaultDots: 0 });
|
122
|
+
chartsDotPlotPage.steps.verifyDotTypePreviewTab('Dot', { point: 0, min: 0, interval: 0.25 });
|
123
|
+
});
|
124
|
+
});
|
125
|
+
|
126
|
+
describe('Label options - content', () => {
|
127
|
+
abortEarlySetup();
|
128
|
+
before(() => {
|
129
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
130
|
+
cy.barsPreLoaderWait();
|
131
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
132
|
+
});
|
133
|
+
|
134
|
+
it('Label options label should be displayed', () => {
|
135
|
+
utilities.verifyInnerText(chartsDotPlotPage.labelOptionsLabel(), 'Label options');
|
136
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.labelOptionsLabel(), 'visible');
|
137
|
+
});
|
138
|
+
|
139
|
+
it('Allow students to edit label should be displayed', () => {
|
140
|
+
utilities.verifyInnerText(chartsDotPlotPage.allowStudentsToEditLabel(), 'Allow students to edit');
|
141
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.allowStudentsToEditLabel(), 'visible');
|
142
|
+
});
|
143
|
+
|
144
|
+
it('X Axis label and checkbox should be displayed and by default checkbox should be checked', () => {
|
145
|
+
utilities.verifyInnerText(chartsDotPlotPage.xAxisLabelSelectChartType(), 'X Axis');
|
146
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.xAxisLabelSelectChartType(), 'visible');
|
147
|
+
chartsDotPlotPage.steps.verifyXAxisCheckboxChecked();
|
148
|
+
});
|
149
|
+
|
150
|
+
it('CSS of grid section', { tags: 'css' }, () => {
|
151
|
+
utilities.verifyCSS(chartsDotPlotPage.labelOptionsLabel(), {
|
152
|
+
'color': css.color.labels,
|
153
|
+
'font-size': css.fontSize.default,
|
154
|
+
'font-weight': css.fontWeight.semibold
|
155
|
+
});
|
156
|
+
utilities.verifyCSS(chartsDotPlotPage.allowStudentsToEditLabel(), {
|
157
|
+
'color': css.color.labels,
|
158
|
+
'font-size': css.fontSize.normal,
|
159
|
+
'font-weight': css.fontWeight.semibold
|
160
|
+
});
|
161
|
+
utilities.verifyCSS(chartsDotPlotPage.xAxisCheckBox().parents('span').find('svg g .checkbox-icon-border-rect'), {
|
162
|
+
'fill': css.color.activeButtons
|
163
|
+
});
|
164
|
+
utilities.verifyCSS(chartsDotPlotPage.xAxisLabel(), {
|
165
|
+
'color': css.color.labels,
|
166
|
+
'font-size': css.fontSize.normal,
|
167
|
+
'font-weight': css.fontWeight.regular
|
168
|
+
});
|
169
|
+
});
|
170
|
+
|
171
|
+
it('Accessibility of Label options', { tags: 'a11y' }, () => {
|
172
|
+
cy.checkAccessibility(chartsDotPlotPage.labelOptionsLabel().parents('[class*="Chartsstyles__ChartsQuestionWrapper"]'));
|
173
|
+
});
|
174
|
+
});
|
175
|
+
|
176
|
+
describe('Label options - preview tab functionality', () => {
|
177
|
+
abortEarlySetup();
|
178
|
+
before(() => {
|
179
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
180
|
+
cy.barsPreLoaderWait();
|
181
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
182
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
183
|
+
});
|
184
|
+
|
185
|
+
it('When X Axis checkbox is checked in edit tab and user clicks on X axis label in preview tab then popup should be displayed with title \'X axis label\' and \'Add label\' label with input field should be displayed along with \'Save\' and \'Cancel\' button', () => {
|
186
|
+
chartsDotPlotPage.steps.clickOnXAxisLabelButtonInPreviewTab();
|
187
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
188
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'X axis label');
|
189
|
+
utilities.verifyInnerText(chartsDotPlotPage.titlePopupAddLabelLabel(), 'Add label');
|
190
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.titlePopupAddLabelInputField(), 'visible');
|
191
|
+
utilities.verifyInnerText(chartsDotPlotPage.titlePopupSaveButton(), 'Save');
|
192
|
+
utilities.verifyInnerText(chartsDotPlotPage.titlePopupCancelButton(), 'Cancel');
|
193
|
+
});
|
194
|
+
|
195
|
+
it('The input field should be prefilled with \'Label\'', () => {
|
196
|
+
chartsDotPlotPage.steps.verifyTextInTitlePopupAddLabelInputField('Label');
|
197
|
+
});
|
198
|
+
|
199
|
+
it('When the user edits the X axis label and clicks on \'Cancel\' button then the changes should not be displayed in the preview tab', () => {
|
200
|
+
chartsDotPlotPage.steps.enterTextInTitlePopupAddLabelInputField('Days');
|
201
|
+
chartsDotPlotPage.steps.clickOnTitlePopupCancelButton();
|
202
|
+
utilities.verifyInnerText(chartsDotPlotPage.previewTabXAxisLabelButton(), 'Label');
|
203
|
+
});
|
204
|
+
|
205
|
+
it('When the user clicks on the \'X axis label\' then the original text should be displayed in the popup', () => {
|
206
|
+
chartsDotPlotPage.steps.clickOnXAxisLabelButtonInPreviewTab();
|
207
|
+
chartsDotPlotPage.steps.verifyTextInTitlePopupAddLabelInputField('Label');
|
208
|
+
});
|
209
|
+
|
210
|
+
it('When the user clicks on \'Save\' after updating the input field the updated label should be displayed in the Preview tab', () => {
|
211
|
+
chartsDotPlotPage.steps.enterTextInTitlePopupAddLabelInputField('Days');
|
212
|
+
chartsDotPlotPage.steps.clickOnTitlePopupSaveButton();
|
213
|
+
utilities.verifyInnerText(chartsDotPlotPage.previewTabXAxisLabelButton(), 'Days');
|
214
|
+
});
|
215
|
+
|
216
|
+
it('Changes made to the x axis label in the preview tab should not reflect for the charts in the edit tab', () => {
|
217
|
+
chartsDotPlotPage.steps.switchToEditTab();
|
218
|
+
utilities.verifyInnerText(chartsDotPlotPage.xAxisLabelSpecifyCorrectAnswer(), 'Label');
|
219
|
+
utilities.verifyInnerText(chartsDotPlotPage.xAxisLabel(), 'Label');
|
220
|
+
});
|
221
|
+
|
222
|
+
it('When user revisits preview tab, then previously made changes in x axis label should no longer exist', () => {
|
223
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
224
|
+
utilities.verifyInnerText(chartsDotPlotPage.previewTabXAxisLabelButton(), 'Label');
|
225
|
+
});
|
226
|
+
|
227
|
+
it('When user unchecks X Axis label checkbox in edit tab, then on clicking on the x axis label, popup should not be displayed', () => {
|
228
|
+
chartsDotPlotPage.steps.switchToEditTab();
|
229
|
+
chartsDotPlotPage.steps.uncheckXAxisCheckbox();
|
230
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
231
|
+
chartsDotPlotPage.steps.clickOnXAxisLabelButtonInPreviewTab();
|
232
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
233
|
+
});
|
234
|
+
});
|
235
|
+
})
|
@@ -66,16 +66,16 @@ describe('Create item page - Charts - Dot plot: Minimum scoring, Penalty scoring
|
|
66
66
|
});
|
67
67
|
|
68
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(
|
70
|
-
chartsDotPlotPage.steps.verifyPenaltyPointsForEachIncorrectDotPlot(1);
|
69
|
+
chartsDotPlotPage.steps.enterTextInMaxInputField(4);
|
70
|
+
chartsDotPlotPage.steps.verifyPenaltyPointsForEachIncorrectDotPlot(1.2);
|
71
71
|
});
|
72
72
|
|
73
73
|
it('When the user adds a label on number line axis, then \'points for each incorrect option\' should get updated accordingly', () => {
|
74
74
|
chartsDotPlotPage.steps.enterTextInMaxInputField(6);
|
75
|
-
chartsDotPlotPage.steps.verifyPenaltyPointsForEachIncorrectDotPlot(
|
75
|
+
chartsDotPlotPage.steps.verifyPenaltyPointsForEachIncorrectDotPlot(0.86);
|
76
76
|
});
|
77
77
|
|
78
|
-
it
|
78
|
+
it('CSS of the penalty points section - Total penalty points', { tags: 'css' }, () => {
|
79
79
|
utilities.verifyCSS(chartsDotPlotPage.automaticallySetPenaltyPointsCheckboxLabel(), {
|
80
80
|
'color': css.color.labels,
|
81
81
|
'font-size': css.fontSize.default,
|
@@ -145,7 +145,7 @@ describe('Create item page - Charts - Dot plot: Minimum scoring, Penalty scoring
|
|
145
145
|
chartsDotPlotPage.steps.verifyTotalPenaltyPoints(7);
|
146
146
|
});
|
147
147
|
|
148
|
-
it
|
148
|
+
it('CSS of the penalty points section - Penalty points for each incorrect dot plot', { tags: 'css' }, () => {
|
149
149
|
utilities.verifyCSS(chartsDotPlotPage.penaltyPointsDetailsSectionInputFieldLabel(), {
|
150
150
|
'color': css.color.labels,
|
151
151
|
'font-size': css.fontSize.default,
|
@@ -0,0 +1,265 @@
|
|
1
|
+
import { chartsDotPlotPage } from "../../../pages";
|
2
|
+
import utilities from "../../../support/helpers/utilities";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
const displayNumbersOptions = ["Below line", "Above line"]
|
7
|
+
const lineSettingsOptions = ['Whole numbers', 'Decimals', 'Fractions', 'Mixed fractions'];
|
8
|
+
const numbers = ['0.25', '1\n4', "0\n1\n4"];
|
9
|
+
|
10
|
+
describe('Select chart type section', () => {
|
11
|
+
before(() => {
|
12
|
+
cy.loginAs('admin');
|
13
|
+
});
|
14
|
+
|
15
|
+
describe('Number line axis settings - content and edit tab functionality', () => {
|
16
|
+
abortEarlySetup();
|
17
|
+
before(() => {
|
18
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
19
|
+
cy.barsPreLoaderWait();
|
20
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
21
|
+
});
|
22
|
+
|
23
|
+
it('Interval label and input field should be displayed and by default, input field should have \'0.25\' pre-filled in it', () => {
|
24
|
+
utilities.verifyInnerText(chartsDotPlotPage.intervalLabel(), 'Interval');
|
25
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.intervalLabel(), 'visible');
|
26
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.intervalInputField(), 'visible');
|
27
|
+
chartsDotPlotPage.steps.verifyTextInIntervalInputField(0.25);
|
28
|
+
});
|
29
|
+
|
30
|
+
it('Annotate every label and input field should be displayed and by default, input field should have \'4\' pre-filled in it', () => {
|
31
|
+
utilities.verifyInnerText(chartsDotPlotPage.annotateEveryLabel(), 'Annotate every');
|
32
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.annotateEveryLabel(), 'visible');
|
33
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.annotateEveryInputField(), 'visible');
|
34
|
+
chartsDotPlotPage.steps.verifyTextInAnnotateEveryInputField(4);
|
35
|
+
});
|
36
|
+
|
37
|
+
it(`Display numbers label and 2 options ${displayNumbersOptions} should be displayed and by default, ${displayNumbersOptions[0]} should be selected`, () => {
|
38
|
+
utilities.verifyInnerText(chartsDotPlotPage.displayNumbersLabel(), 'Display numbers');
|
39
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.displayNumbersLabel(), 'visible');
|
40
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.displayNumbersToggleButton(), 'visible');
|
41
|
+
utilities.verifyElementCount(chartsDotPlotPage.displayNumbersToggleButton(), 2);
|
42
|
+
displayNumbersOptions.forEach((label) => {
|
43
|
+
utilities.verifyInnerText(chartsDotPlotPage.displayNumbersToggleButton(label), label);
|
44
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.displayNumbersToggleButton(label), 'visible');
|
45
|
+
});
|
46
|
+
chartsDotPlotPage.steps.verifyDisplayNumbersToggleButtonSelected(displayNumbersOptions[0]);
|
47
|
+
});
|
48
|
+
|
49
|
+
it(`Line settings label and 4 options ${lineSettingsOptions} should be displayed and by default ${lineSettingsOptions[0]} should be selected`, () => {
|
50
|
+
utilities.verifyInnerText(chartsDotPlotPage.lineSettingsLabel(), 'Line settings');
|
51
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.lineSettingsLabel(), 'visible');
|
52
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.lineSettingsToggleButton(), 'visible');
|
53
|
+
utilities.verifyElementCount(chartsDotPlotPage.lineSettingsToggleButton(), 4);
|
54
|
+
lineSettingsOptions.forEach((label) => {
|
55
|
+
utilities.verifyInnerText(chartsDotPlotPage.lineSettingsToggleButton(label), label);
|
56
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.lineSettingsToggleButton(label), 'visible');
|
57
|
+
});
|
58
|
+
chartsDotPlotPage.steps.verifyLineSettingsToggleButtonSelected(lineSettingsOptions[0]);
|
59
|
+
});
|
60
|
+
|
61
|
+
it('Display specific annotation (use semicolons to separate) label and input field should be displayed and by default input field should be empty', () => {
|
62
|
+
utilities.verifyInnerText(chartsDotPlotPage.displaySpecificAnnotationLabel(), 'Display specific annotation (use semicolons to separate)');
|
63
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.displaySpecificAnnotationLabel(), 'visible');
|
64
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.displaySpecificAnnotationInputField(), 'visible');
|
65
|
+
utilities.verifyInnerText(chartsDotPlotPage.displaySpecificAnnotationInputField(), '');
|
66
|
+
});
|
67
|
+
|
68
|
+
it('When user updates value in Interval input field and Annotate every input field then interval of labels and ticks should be updated in select chart type section and specify correct answer section', () => {
|
69
|
+
chartsDotPlotPage.steps.selectLineSettingsToggleButton('Whole numbers');
|
70
|
+
chartsDotPlotPage.steps.enterTextInIntervalInputField(1);
|
71
|
+
chartsDotPlotPage.steps.verifyTextInIntervalInputField(1);
|
72
|
+
chartsDotPlotPage.steps.enterTextInAnnotateEveryInputField(1);
|
73
|
+
chartsDotPlotPage.steps.verifyTextInAnnotateEveryInputField(1);
|
74
|
+
chartsDotPlotPage.steps.verifyLabelsOnNumberLineAxisSelectChartType(0, 5, 1);
|
75
|
+
chartsDotPlotPage.steps.verifyLabelsOnNumberLineAxisSpecifyCorrectAnswer(0, 5, 1);
|
76
|
+
});
|
77
|
+
|
78
|
+
it(`When "${displayNumbersOptions[0]}" is selected, labels should be displayed below the number line axis in both the select chart type section and the specify correct answer section.`, () => {
|
79
|
+
chartsDotPlotPage.steps.verifyDisplayNumbersToggleButtonSelected(displayNumbersOptions[0]);
|
80
|
+
chartsDotPlotPage.steps.verifyDisplayNumbersOrientationOnChartSelectChartType('Below');
|
81
|
+
chartsDotPlotPage.steps.verifyDisplayNumbersOrientationOnChartSpecifyCorrectAnswer('Below');
|
82
|
+
});
|
83
|
+
|
84
|
+
it(`When "${displayNumbersOptions[1]}" is selected, labels should be displayed above the number line axis in both the select chart type section and the specify correct answer section.`, () => {
|
85
|
+
chartsDotPlotPage.steps.selectDisplayNumbersToggleButton(displayNumbersOptions[1]);
|
86
|
+
chartsDotPlotPage.steps.verifyDisplayNumbersOrientationOnChartSelectChartType('Above');
|
87
|
+
chartsDotPlotPage.steps.verifyDisplayNumbersOrientationOnChartSpecifyCorrectAnswer('Above');
|
88
|
+
});
|
89
|
+
|
90
|
+
it('When user enters value in Display specific annotation (use semicolons to separate) input field then it should be displayed on number line in Number line section and Specify correct answer section', () => {
|
91
|
+
chartsDotPlotPage.steps.selectLineSettingsToggleButton(lineSettingsOptions[0]);
|
92
|
+
chartsDotPlotPage.steps.enterTextInDisplaySpecificAnnotationInputField('-9; -8;');
|
93
|
+
chartsDotPlotPage.steps.verifyTextInDisplaySpecificAnnotationInputField('-9; -8;');
|
94
|
+
chartsDotPlotPage.steps.verifyLabelOnNumberLineAxisSpecifyCorrectAnswer([{ value: -9, index: 0 }, { value: -8, index: 1 }]);
|
95
|
+
chartsDotPlotPage.steps.verifyLabelOnNumberLineAxisSelectChartType([{ value: -9, index: 0 }, { value: -8, index: 1 }]);
|
96
|
+
});
|
97
|
+
|
98
|
+
it('CSS of Number line axis settings', { tags: 'css' }, () => {
|
99
|
+
utilities.verifyCSS(chartsDotPlotPage.intervalLabel(), {
|
100
|
+
'color': css.color.labels,
|
101
|
+
'font-size': css.fontSize.normal,
|
102
|
+
'font-weight': css.fontWeight.semibold
|
103
|
+
});
|
104
|
+
utilities.verifyCSS(chartsDotPlotPage.intervalInputField(), {
|
105
|
+
'color': css.color.text,
|
106
|
+
'font-size': css.fontSize.default,
|
107
|
+
'font-weight': css.fontWeight.regular
|
108
|
+
});
|
109
|
+
utilities.verifyCSS(chartsDotPlotPage.annotateEveryLabel(), {
|
110
|
+
'color': css.color.labels,
|
111
|
+
'font-size': css.fontSize.normal,
|
112
|
+
'font-weight': css.fontWeight.semibold
|
113
|
+
});
|
114
|
+
utilities.verifyCSS(chartsDotPlotPage.annotateEveryInputField(), {
|
115
|
+
'color': css.color.text,
|
116
|
+
'font-size': css.fontSize.default,
|
117
|
+
'font-weight': css.fontWeight.regular
|
118
|
+
});
|
119
|
+
utilities.verifyCSS(chartsDotPlotPage.displayNumbersLabel(), {
|
120
|
+
'color': css.color.labels,
|
121
|
+
'font-size': css.fontSize.normal,
|
122
|
+
'font-weight': css.fontWeight.semibold
|
123
|
+
});
|
124
|
+
utilities.verifyCSS(chartsDotPlotPage.displayNumbersToggleButton(displayNumbersOptions[0]), {
|
125
|
+
'background-color': css.color.activeButtons,
|
126
|
+
'color': css.color.primaryBtn,
|
127
|
+
'font-size': css.fontSize.normal,
|
128
|
+
'font-weight': css.fontWeight.bold
|
129
|
+
});
|
130
|
+
utilities.verifyCSS(chartsDotPlotPage.displayNumbersToggleButton(displayNumbersOptions[1]), {
|
131
|
+
'background-color': css.color.transparent,
|
132
|
+
'color': css.color.closeIcon,
|
133
|
+
'font-size': css.fontSize.normal,
|
134
|
+
'font-weight': css.fontWeight.bold
|
135
|
+
});
|
136
|
+
utilities.verifyCSS(chartsDotPlotPage.displaySpecificAnnotationLabel(), {
|
137
|
+
'color': css.color.labels,
|
138
|
+
'font-size': css.fontSize.normal,
|
139
|
+
'font-weight': css.fontWeight.semibold
|
140
|
+
});
|
141
|
+
utilities.verifyCSS(chartsDotPlotPage.displaySpecificAnnotationInputField(), {
|
142
|
+
'color': css.color.text,
|
143
|
+
'font-size': css.fontSize.default,
|
144
|
+
'font-weight': css.fontWeight.regular
|
145
|
+
});
|
146
|
+
utilities.verifyCSS(chartsDotPlotPage.lineSettingsLabel(), {
|
147
|
+
'color': css.color.labels,
|
148
|
+
'font-size': css.fontSize.normal,
|
149
|
+
'font-weight': css.fontWeight.semibold
|
150
|
+
});
|
151
|
+
utilities.verifyCSS(chartsDotPlotPage.lineSettingsToggleButton(lineSettingsOptions[1]), {
|
152
|
+
'background-color': css.color.transparent,
|
153
|
+
'color': css.color.closeIcon,
|
154
|
+
'font-size': css.fontSize.normal,
|
155
|
+
'font-weight': css.fontWeight.bold
|
156
|
+
});
|
157
|
+
utilities.verifyCSS(chartsDotPlotPage.lineSettingsToggleButton(lineSettingsOptions[0]), {
|
158
|
+
'color': css.color.primaryBtn,
|
159
|
+
'font-size': css.fontSize.normal,
|
160
|
+
'font-weight': css.fontWeight.bold,
|
161
|
+
'background-color': css.color.activeButtons
|
162
|
+
});
|
163
|
+
});
|
164
|
+
|
165
|
+
|
166
|
+
it('Accessibility of Number line axis settings', { tags: 'a11y' }, () => {
|
167
|
+
cy.checkAccessibility(chartsDotPlotPage.intervalLabel().parents('.number-line-grid-setting'));
|
168
|
+
});
|
169
|
+
});
|
170
|
+
|
171
|
+
describe('Line settings section - Edit tab functionality', () => {
|
172
|
+
abortEarlySetup();
|
173
|
+
before(() => {
|
174
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
175
|
+
cy.barsPreLoaderWait();
|
176
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
177
|
+
chartsDotPlotPage.steps.enterTextInAnnotateEveryInputField(1);
|
178
|
+
});
|
179
|
+
|
180
|
+
it(`When \'Whole numbers\' is selected in line settings section, then number displayed on number line should be ${lineSettingsOptions[0]} in select chart type and specify correct answer section`, () => {
|
181
|
+
chartsDotPlotPage.steps.verifyLineSettingsToggleButtonSelected('Whole numbers');
|
182
|
+
chartsDotPlotPage.steps.verifyLabelOnNumberLineAxisSpecifyCorrectAnswer([{ value: 0, index: 0 }]);
|
183
|
+
chartsDotPlotPage.steps.verifyLabelOnNumberLineAxisSelectChartType([{ value: 0, index: 0 }]);
|
184
|
+
});
|
185
|
+
|
186
|
+
const lineSettingsOption = ['Decimals', 'Fractions', 'Mixed fractions'];
|
187
|
+
lineSettingsOption.forEach((option, index) => {
|
188
|
+
it(`When user selects ${option} in line settings section, then number displayed on number line should be ${option} in select chart type and specify correct answer section`, () => {
|
189
|
+
chartsDotPlotPage.steps.selectLineSettingsToggleButton(option);
|
190
|
+
chartsDotPlotPage.steps.verifyLineSettingsToggleButtonSelected(option);
|
191
|
+
chartsDotPlotPage.steps.verifyLabelOnNumberLineAxisSpecifyCorrectAnswer([{ value: numbers[index], index: 1 }]);
|
192
|
+
chartsDotPlotPage.steps.verifyLabelOnNumberLineAxisSelectChartType([{ value: numbers[index], index: 1 }]);
|
193
|
+
});
|
194
|
+
});
|
195
|
+
})
|
196
|
+
|
197
|
+
describe('Number line axis settings - preview tab functionality', () => {
|
198
|
+
abortEarlySetup();
|
199
|
+
before(() => {
|
200
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
201
|
+
cy.barsPreLoaderWait();
|
202
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
203
|
+
});
|
204
|
+
|
205
|
+
//Note- Can't check ticks are not annotated so adding it to manual sheet
|
206
|
+
it('When user updates value in Interval input field and Annotate every input field then interval of labels and ticks should be updated in preview tab', () => {
|
207
|
+
chartsDotPlotPage.steps.enterTextInIntervalInputField(1);
|
208
|
+
chartsDotPlotPage.steps.verifyTextInIntervalInputField(1);
|
209
|
+
chartsDotPlotPage.steps.enterTextInAnnotateEveryInputField(1);
|
210
|
+
chartsDotPlotPage.steps.verifyTextInAnnotateEveryInputField(1);
|
211
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
212
|
+
chartsDotPlotPage.steps.verifyLabelsOnNumberLineAxisPreviewTab(0, 5, 1);
|
213
|
+
});
|
214
|
+
|
215
|
+
it(`When ${displayNumbersOptions[0]} is selected then labels should be displayed below the number line axis in the preview tab.`, () => {
|
216
|
+
chartsDotPlotPage.steps.switchToEditTab();
|
217
|
+
chartsDotPlotPage.steps.verifyDisplayNumbersToggleButtonSelected(displayNumbersOptions[0]);
|
218
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
219
|
+
chartsDotPlotPage.steps.verifyDisplayNumbersOrientationOnChartPreviewTab('Below');
|
220
|
+
});
|
221
|
+
|
222
|
+
it(`When user selects ${displayNumbersOptions[1]} then labels should be displayed above the number line axis in the preview tab.`, () => {
|
223
|
+
chartsDotPlotPage.steps.switchToEditTab();
|
224
|
+
chartsDotPlotPage.steps.selectDisplayNumbersToggleButton(displayNumbersOptions[1]);
|
225
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
226
|
+
chartsDotPlotPage.steps.verifyDisplayNumbersOrientationOnChartPreviewTab('Above');
|
227
|
+
});
|
228
|
+
|
229
|
+
it('When user enters value in Display specific annotation (use semicolons to separate) input field then it should be displayed on number line in preview tab', () => {
|
230
|
+
chartsDotPlotPage.steps.switchToEditTab();
|
231
|
+
chartsDotPlotPage.steps.selectLineSettingsToggleButton(lineSettingsOptions[0]);
|
232
|
+
chartsDotPlotPage.steps.enterTextInDisplaySpecificAnnotationInputField('-9; -8;');
|
233
|
+
chartsDotPlotPage.steps.verifyTextInDisplaySpecificAnnotationInputField('-9; -8;');
|
234
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
235
|
+
chartsDotPlotPage.steps.verifyLabelOnNumberLineAxisPreviewTab([{ value: -9, index: 0 }, { value: -8, index: 1 }]);
|
236
|
+
});
|
237
|
+
});
|
238
|
+
|
239
|
+
describe('Line settings section - preview tab functionality', () => {
|
240
|
+
abortEarlySetup();
|
241
|
+
before(() => {
|
242
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
243
|
+
cy.barsPreLoaderWait();
|
244
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
245
|
+
chartsDotPlotPage.steps.enterTextInAnnotateEveryInputField(1);
|
246
|
+
});
|
247
|
+
|
248
|
+
it(`When \'Whole numbers\' is selected in line settings section, then number displayed on number line should be ${lineSettingsOptions[0]} in preview tab`, () => {
|
249
|
+
chartsDotPlotPage.steps.verifyLineSettingsToggleButtonSelected('Whole numbers');
|
250
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
251
|
+
chartsDotPlotPage.steps.verifyLabelOnNumberLineAxisPreviewTab([{ value: 0, index: 0 }]);
|
252
|
+
});
|
253
|
+
|
254
|
+
const lineSettingsOption = ['Decimals', 'Fractions', 'Mixed fractions'];
|
255
|
+
lineSettingsOption.forEach((option, index) => {
|
256
|
+
it(`When user selects ${option} in line settings section, then number displayed on number line should be ${option} in preview tab`, () => {
|
257
|
+
chartsDotPlotPage.steps.switchToEditTab();
|
258
|
+
chartsDotPlotPage.steps.selectLineSettingsToggleButton(option);
|
259
|
+
chartsDotPlotPage.steps.verifyLineSettingsToggleButtonSelected(option);
|
260
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
261
|
+
chartsDotPlotPage.steps.verifyLabelOnNumberLineAxisPreviewTab([{ value: numbers[index], index: 1 }]);
|
262
|
+
});
|
263
|
+
});
|
264
|
+
});
|
265
|
+
});
|
@@ -83,20 +83,20 @@ describe('Create item page: Charts - Dot - Preview contents in all views', () =>
|
|
83
83
|
});
|
84
84
|
|
85
85
|
it('When user hovers over dot column then it should be displayed in interactive state and tooltip with add and minus button should be displayed', () => {
|
86
|
-
utilities.
|
86
|
+
utilities.hoverOverElement(utilities.getNthElement(chartsDotPlotPage.dotColumnPreviewTab(), 4));
|
87
87
|
utilities.verifyCSS(utilities.getNthElement(chartsDotPlotPage.dotColumnPreviewTab(), 4), {
|
88
88
|
'background-color': css.color.draggableOptionsContainerBg
|
89
89
|
});
|
90
90
|
utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipWrapperPreviewTab(), 'visible');
|
91
91
|
utilities.verifyElementVisibilityState(chartsDotPlotPage.addButtonPreviewTab(), 'visible');
|
92
92
|
utilities.verifyElementVisibilityState(chartsDotPlotPage.minusButtonPreviewTab(), 'visible');
|
93
|
-
utilities.
|
93
|
+
utilities.hoverAwayFromElement();
|
94
94
|
});
|
95
95
|
|
96
96
|
it('Accessibility of interactive dot column', { tags: 'a11y' }, () => {
|
97
|
-
utilities.
|
97
|
+
utilities.hoverOverElement(utilities.getNthElement(chartsDotPlotPage.dotColumnPreviewTab(), 4));
|
98
98
|
cy.checkAccessibility(utilities.getNthElement(chartsDotPlotPage.dotColumnPreviewTab(), 4));
|
99
|
-
utilities.
|
99
|
+
utilities.hoverAwayFromElement();
|
100
100
|
});
|
101
101
|
|
102
102
|
it('When user selects an empty dot column, tooltip with add and minus should be displayed and by default minus button should be displayed in disabled state and add button should be in enabled state', () => {
|
@@ -128,14 +128,14 @@ describe('Create item page: Charts - Dot - Preview contents in all views', () =>
|
|
128
128
|
chartsDotPlotPage.steps.unselectDotColumnInPreviewTab({ point: 4, min: 1, interval: 0.25 });
|
129
129
|
});
|
130
130
|
|
131
|
-
it('The locked
|
131
|
+
it('The locked Dot column should be displayed in the locked state with added dots and when user hovers over it tooltip should not be displayed', () => {
|
132
132
|
chartsDotPlotPage.steps.verifyDotColumnIsLockedInPreviewTab({ point: 1, min: 1, interval: 0.25 });
|
133
133
|
chartsDotPlotPage.steps.verifyDotCountPreviewTab(2, { point: 1, min: 1, interval: 0.25 });
|
134
134
|
chartsDotPlotPage.steps.selectDotColumnInPreviewTab({ point: 1, min: 1, interval: 0.25 });
|
135
135
|
chartsDotPlotPage.steps.tooltipWrapperNotExistPreviewTab();
|
136
136
|
});
|
137
137
|
|
138
|
-
it('When user attempts the locked state
|
138
|
+
it('When user attempts the locked state Dot column using keyboard then user should be unable to make any changes', () => {
|
139
139
|
chartsDotPlotPage.steps.increaseDotInDotColumnUsingKeyboardPreviewTab(1, { point: 1, min: 1, interval: 0.25 });
|
140
140
|
chartsDotPlotPage.steps.verifyDotCountPreviewTab(2, { point: 1, min: 1, interval: 0.25 });
|
141
141
|
chartsDotPlotPage.steps.decreaseDotInDotColumnUsingKeyboardPreviewTab(1, { point: 1, min: 1, interval: 0.25 });
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { chartsDotPlotPage } from "
|
2
|
-
import abortEarlySetup from "
|
3
|
-
import utilities from "
|
1
|
+
import { chartsDotPlotPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
4
|
|
5
5
|
describe('Create Item page - Charts - Dot plot: Manually and non scored', () => {
|
6
6
|
before(() => {
|