itemengine-cypress-automation 1.0.204-graphQLUpdate-b0c0036.0 → 1.0.205-8thJuneFixes-5ad148f.0
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 +1 -1
@@ -0,0 +1,594 @@
|
|
1
|
+
import { chartsDotPlotPage, dialogBoxBase } from "../../../pages";
|
2
|
+
import utilities from "../../../support/helpers/utilities";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Charts - Dot plot: Select chart type section', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Control buttons - Select chart type section', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
17
|
+
});
|
18
|
+
|
19
|
+
it(`Undo, Redo and Reset control options should be displayed in the select chart type section and by default, control options should be in disabled state`, () => {
|
20
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.controlOptionsSelectChartType('Undo'), 'visible');
|
21
|
+
utilities.verifyElementDisabled(chartsDotPlotPage.controlOptionsSelectChartType('Undo'));
|
22
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.controlOptionsSelectChartType('Redo'), 'visible');
|
23
|
+
utilities.verifyElementDisabled(chartsDotPlotPage.controlOptionsSelectChartType('Redo'));
|
24
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.controlOptionsSelectChartType('Reset'), 'visible');
|
25
|
+
utilities.verifyElementDisabled(chartsDotPlotPage.controlOptionsSelectChartType('Reset'));
|
26
|
+
});
|
27
|
+
|
28
|
+
it('When user has perform an action on the dot plot chart, then the undo and reset button should be displayed in enabled state', () => {
|
29
|
+
chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(4, { point: 2, min: -3, interval: 0.25, defaultDots: 0 });
|
30
|
+
utilities.verifyElementNotDisabled(chartsDotPlotPage.controlOptionsSelectChartType('Undo'));
|
31
|
+
utilities.verifyElementNotDisabled(chartsDotPlotPage.controlOptionsSelectChartType('Reset'));
|
32
|
+
});
|
33
|
+
|
34
|
+
it('When user hovers on the enabled undo and reset button, then tooltips \'Undo\' and \'Reset\' should be displayed', () => {
|
35
|
+
chartsDotPlotPage.controlOptionsSelectChartType('Undo')
|
36
|
+
.verifyTooltip('Undo');
|
37
|
+
chartsDotPlotPage.controlOptionsSelectChartType('Reset')
|
38
|
+
.verifyTooltip('Reset');
|
39
|
+
});
|
40
|
+
|
41
|
+
it('CSS of the tooltip text', { tags: 'css' }, () => {
|
42
|
+
utilities.triggerMouseover(chartsDotPlotPage.controlOptionsSelectChartType('Undo'));
|
43
|
+
utilities.verifyCSS(chartsDotPlotPage.tooltipText(), {
|
44
|
+
'color': css.color.whiteText,
|
45
|
+
'font-size': css.fontSize.small,
|
46
|
+
'font-weight': css.fontWeight.regular,
|
47
|
+
'background-color': css.color.tooltipBg
|
48
|
+
});
|
49
|
+
utilities.triggerMouseout(chartsDotPlotPage.controlOptionsSelectChartType('Undo'));
|
50
|
+
utilities.triggerMouseover(chartsDotPlotPage.controlOptionsSelectChartType('Reset'));
|
51
|
+
utilities.verifyCSS(chartsDotPlotPage.tooltipText(), {
|
52
|
+
'color': css.color.whiteText,
|
53
|
+
'font-size': css.fontSize.small,
|
54
|
+
'font-weight': css.fontWeight.regular,
|
55
|
+
'background-color': css.color.tooltipBg
|
56
|
+
});
|
57
|
+
utilities.triggerMouseout(chartsDotPlotPage.controlOptionsSelectChartType('Reset'));
|
58
|
+
});
|
59
|
+
|
60
|
+
it('Accessibility of the tooltip text', { tags: 'a11y' }, () => {
|
61
|
+
utilities.triggerMouseover(chartsDotPlotPage.controlOptionsSelectChartType('Undo'));
|
62
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipText(), 'visible');
|
63
|
+
cy.checkAccessibility(chartsDotPlotPage.tooltipText());
|
64
|
+
utilities.triggerMouseout(chartsDotPlotPage.controlOptionsSelectChartType('Undo'));
|
65
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipText(), 'notExist');
|
66
|
+
utilities.triggerMouseover(chartsDotPlotPage.controlOptionsSelectChartType('Reset'));
|
67
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipText(), 'visible');
|
68
|
+
cy.checkAccessibility(chartsDotPlotPage.tooltipText());
|
69
|
+
utilities.triggerMouseout(chartsDotPlotPage.controlOptionsSelectChartType('Reset'));
|
70
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipText(), 'notExist');
|
71
|
+
});
|
72
|
+
|
73
|
+
it('When user clicks on the undo button, then the last performed action should be reverted', () => {
|
74
|
+
chartsDotPlotPage.steps.selectControlOptionSelectChartTypeSection('Undo');
|
75
|
+
chartsDotPlotPage.steps.verifyDotCountSelectChartTypeSection(3, { point: 2, min: -3, interval: 0.25 });
|
76
|
+
});
|
77
|
+
|
78
|
+
it('When user has clicked on undo button, then the redo button should be enabled', () => {
|
79
|
+
utilities.verifyElementNotDisabled(chartsDotPlotPage.controlOptionsSelectChartType('Redo'));
|
80
|
+
});
|
81
|
+
|
82
|
+
it('When user hovers on the enabled redo button, then tooltip \'Redo\' should be displayed', () => {
|
83
|
+
chartsDotPlotPage.controlOptionsSelectChartType('Redo')
|
84
|
+
.verifyTooltip('Redo');
|
85
|
+
});
|
86
|
+
|
87
|
+
it('CSS of the tooltip text', { tags: 'css' }, () => {
|
88
|
+
utilities.triggerMouseover(chartsDotPlotPage.controlOptionsSelectChartType('Redo'));
|
89
|
+
utilities.verifyCSS(chartsDotPlotPage.tooltipText(), {
|
90
|
+
'color': css.color.whiteText,
|
91
|
+
'font-size': css.fontSize.small,
|
92
|
+
'font-weight': css.fontWeight.regular,
|
93
|
+
'background-color': css.color.tooltipBg
|
94
|
+
});
|
95
|
+
utilities.triggerMouseout(chartsDotPlotPage.controlOptionsSelectChartType('Redo'));
|
96
|
+
});
|
97
|
+
|
98
|
+
it('Accessibility of the tooltip text', { tags: 'a11y' }, () => {
|
99
|
+
utilities.triggerMouseover(chartsDotPlotPage.controlOptionsSelectChartType('Redo'));
|
100
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipText(), 'visible');
|
101
|
+
cy.checkAccessibility(chartsDotPlotPage.tooltipText());
|
102
|
+
utilities.triggerMouseout(chartsDotPlotPage.controlOptionsSelectChartType('Redo'));
|
103
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipText(), 'notExist');
|
104
|
+
});
|
105
|
+
|
106
|
+
it('When the user clicks on redo button, then the last reverted action should be performed and the \'Redo\' button should be disabled again and \'Undo\' button should be enabled', () => {
|
107
|
+
chartsDotPlotPage.steps.selectControlOptionSelectChartTypeSection('Redo');
|
108
|
+
chartsDotPlotPage.steps.verifyDotCountSelectChartTypeSection(4, { point: 2, min: -3, interval: 0.25 });
|
109
|
+
utilities.verifyElementDisabled(chartsDotPlotPage.controlOptionsSelectChartType('Redo'));
|
110
|
+
utilities.verifyElementNotDisabled(chartsDotPlotPage.controlOptionsSelectChartType('Undo'));
|
111
|
+
});
|
112
|
+
|
113
|
+
it(`When the user reaches the initial state by performing undo actions, the \'Undo\' button should get disabled and \'Redo\' should be enabled`, () => {
|
114
|
+
for (var i = 0; i < 4; i++) {
|
115
|
+
chartsDotPlotPage.steps.selectControlOptionSelectChartTypeSection('Undo');
|
116
|
+
}
|
117
|
+
chartsDotPlotPage.steps.verifyDotCountSelectChartTypeSection(0, { point: 2, min: -3, interval: 0.25 });
|
118
|
+
utilities.verifyElementDisabled(chartsDotPlotPage.controlOptionsSelectChartType('Undo'));
|
119
|
+
utilities.verifyElementNotDisabled(chartsDotPlotPage.controlOptionsSelectChartType('Redo'));
|
120
|
+
});
|
121
|
+
|
122
|
+
it('When the user reaches the latest state by performing redo actions, the \'Redo\' button should get disabled and \'Undo\' should be enabled', () => {
|
123
|
+
for (var i = 0; i < 4; i++) {
|
124
|
+
chartsDotPlotPage.steps.selectControlOptionSelectChartTypeSection('Redo');
|
125
|
+
}
|
126
|
+
chartsDotPlotPage.steps.verifyDotCountSelectChartTypeSection(4, { point: 2, min: -3, interval: 0.25 });
|
127
|
+
utilities.verifyElementDisabled(chartsDotPlotPage.controlOptionsSelectChartType('Redo'));
|
128
|
+
utilities.verifyElementNotDisabled(chartsDotPlotPage.controlOptionsSelectChartType('Undo'));
|
129
|
+
});
|
130
|
+
|
131
|
+
it('When the user clicks on Reset button and confirms reset, then all the chart actions should be reverted and chart should be reverted to default state and control options should be in disabled state', () => {
|
132
|
+
chartsDotPlotPage.steps.selectControlOptionSelectChartTypeSection('Reset');
|
133
|
+
chartsDotPlotPage.steps.confirmReset();
|
134
|
+
chartsDotPlotPage.steps.verifyDotCountSelectChartTypeSection(0, { point: 2, min: -3, interval: 0.25 });
|
135
|
+
utilities.verifyElementDisabled(chartsDotPlotPage.controlOptionsSelectChartType('Undo'));
|
136
|
+
utilities.verifyElementDisabled(chartsDotPlotPage.controlOptionsSelectChartType('Redo'));
|
137
|
+
utilities.verifyElementDisabled(chartsDotPlotPage.controlOptionsSelectChartType('Reset'));
|
138
|
+
});
|
139
|
+
|
140
|
+
it('CSS of Control buttons in disabled state', { tags: 'css' }, () => {
|
141
|
+
utilities.verifyCSS(chartsDotPlotPage.controlOptionsSelectChartType('Undo').find('svg'), {
|
142
|
+
'fill': css.color.secondaryBtnDisabled
|
143
|
+
});
|
144
|
+
utilities.verifyCSS(chartsDotPlotPage.controlOptionsSelectChartType('Redo').find('svg'), {
|
145
|
+
'fill': css.color.secondaryBtnDisabled
|
146
|
+
});
|
147
|
+
utilities.verifyCSS(chartsDotPlotPage.controlOptionsSelectChartType('Reset').find('svg'), {
|
148
|
+
'fill': css.color.secondaryBtnDisabled
|
149
|
+
});
|
150
|
+
});
|
151
|
+
|
152
|
+
it('Accessibility of select chart type section contents', { tags: 'a11y' }, () => {
|
153
|
+
cy.checkAccessibility(chartsDotPlotPage.controlOptionsWrapperSelectChartType().parents('.ngie-dot-plot-chart'));
|
154
|
+
});
|
155
|
+
});
|
156
|
+
|
157
|
+
describe('Select chart type - Content', () => {
|
158
|
+
abortEarlySetup();
|
159
|
+
before(() => {
|
160
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
161
|
+
cy.barsPreLoaderWait();
|
162
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
163
|
+
});
|
164
|
+
|
165
|
+
it('Graph title button should be displayed', () => {
|
166
|
+
utilities.verifyInnerText(chartsDotPlotPage.selectChartTypeGraphTitleButton(), 'Graph title');
|
167
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.selectChartTypeGraphTitleButton(), 'visible');
|
168
|
+
});
|
169
|
+
|
170
|
+
it('Min label and input field should be displayed and input field should be prefilled with 0 by default', () => {
|
171
|
+
utilities.verifyInnerText(chartsDotPlotPage.minLabel(), 'Min');
|
172
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.minLabel(), 'visible');
|
173
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.minInputField(), 'visible');
|
174
|
+
chartsDotPlotPage.steps.verifyTextInMinInputField(0);
|
175
|
+
});
|
176
|
+
|
177
|
+
it('Max label and input field should be displayed and input field should be prefilled with 5 by default', () => {
|
178
|
+
utilities.verifyInnerText(chartsDotPlotPage.maxLabel(), 'Max');
|
179
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.maxLabel(), 'visible');
|
180
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.maxInputField(), 'visible');
|
181
|
+
chartsDotPlotPage.steps.verifyTextInMaxInputField(5);
|
182
|
+
});
|
183
|
+
|
184
|
+
it('Number line axis should be displayed with labels from 0 to 5 and 20 divisions', () => {
|
185
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.numberLineAxisSelectChartType(), 'exist');
|
186
|
+
chartsDotPlotPage.steps.verifyDivisionsOnNumberLineAxisSelectChartType({ min: 0, max: 5, interval: 0.25 });
|
187
|
+
chartsDotPlotPage.steps.verifyLabelsOnNumberLineAxisSelectChartType(0, 5, 4);
|
188
|
+
});
|
189
|
+
|
190
|
+
it('X axis label button should be displayed and by default it should be label', () => {
|
191
|
+
utilities.verifyInnerText(chartsDotPlotPage.selectChartTypeXAxisLabelButton(), 'Label');
|
192
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.selectChartTypeXAxisLabelButton(), 'visible');
|
193
|
+
});
|
194
|
+
|
195
|
+
it('CSS of Select chart type section', { tags: 'css' }, () => {
|
196
|
+
utilities.verifyCSS(chartsDotPlotPage.selectChartTypeGraphTitleButton(), {
|
197
|
+
'color': css.color.activeButtons,
|
198
|
+
'font-size': css.fontSize.heading,
|
199
|
+
'font-weight': css.fontWeight.bold
|
200
|
+
});
|
201
|
+
utilities.verifyCSS(chartsDotPlotPage.minLabel(), {
|
202
|
+
'color': css.color.labels,
|
203
|
+
'font-size': css.fontSize.normal,
|
204
|
+
'font-weight': css.fontWeight.semibold
|
205
|
+
});
|
206
|
+
utilities.verifyCSS(chartsDotPlotPage.minInputField(), {
|
207
|
+
'color': css.color.text,
|
208
|
+
'font-size': css.fontSize.default,
|
209
|
+
'font-weight': css.fontWeight.regular
|
210
|
+
});
|
211
|
+
utilities.verifyCSS(chartsDotPlotPage.maxLabel(), {
|
212
|
+
'color': css.color.labels,
|
213
|
+
'font-size': css.fontSize.normal,
|
214
|
+
'font-weight': css.fontWeight.semibold
|
215
|
+
});
|
216
|
+
utilities.verifyCSS(chartsDotPlotPage.maxInputField(), {
|
217
|
+
'color': css.color.text,
|
218
|
+
'font-size': css.fontSize.default,
|
219
|
+
'font-weight': css.fontWeight.regular
|
220
|
+
});
|
221
|
+
utilities.verifyCSS(chartsDotPlotPage.labelsNumberLineAxisSelectChartType(), {
|
222
|
+
'color': css.color.text,
|
223
|
+
'font-size': css.fontSize.default,
|
224
|
+
'font-weight': css.fontWeight.semibold
|
225
|
+
});
|
226
|
+
utilities.verifyCSS(chartsDotPlotPage.selectChartTypeXAxisLabelButton(), {
|
227
|
+
'color': css.color.activeButtons,
|
228
|
+
'font-size': css.fontSize.default,
|
229
|
+
'font-weight': css.fontWeight.bold
|
230
|
+
});
|
231
|
+
});
|
232
|
+
|
233
|
+
it('Accessibility of Select chart type section', { tags: 'a11y' }, () => {
|
234
|
+
cy.checkAccessibility(chartsDotPlotPage.selectChartTypeGraphTitleButton().parents('[class*="Chartsstyles__ChartsQuestionWrapper"]'));
|
235
|
+
});
|
236
|
+
});
|
237
|
+
|
238
|
+
describe('Select chart type - edit tab functionality', () => {
|
239
|
+
abortEarlySetup();
|
240
|
+
before(() => {
|
241
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
242
|
+
cy.barsPreLoaderWait();
|
243
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
244
|
+
});
|
245
|
+
|
246
|
+
it('When user clicks on Graph title then popup should be displayed with title \'Graph title\' and \'Add title\' label with input field should be displayed along with \'Save\' and \'Cancel\' button', () => {
|
247
|
+
chartsDotPlotPage.steps.clickOnGraphTitleButton();
|
248
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
249
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'Graph title');
|
250
|
+
utilities.verifyInnerText(chartsDotPlotPage.titlePopupAddLabelLabel(), 'Add title');
|
251
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.titlePopupAddLabelInputField(), 'visible');
|
252
|
+
utilities.verifyInnerText(chartsDotPlotPage.titlePopupSaveButton(), 'Save');
|
253
|
+
utilities.verifyInnerText(chartsDotPlotPage.titlePopupCancelButton(), 'Cancel');
|
254
|
+
});
|
255
|
+
|
256
|
+
it('The input field should be prefilled with \'Graph title\'', () => {
|
257
|
+
chartsDotPlotPage.steps.verifyTextInTitlePopupAddLabelInputField('Graph title');
|
258
|
+
});
|
259
|
+
|
260
|
+
it('When the user edits the Graph title and clicks on \'Cancel\' button then the changes should not be displayed select chart type and specify correct answer section', () => {
|
261
|
+
chartsDotPlotPage.steps.enterTextInTitlePopupAddLabelInputField('Days');
|
262
|
+
chartsDotPlotPage.steps.clickOnTitlePopupCancelButton();
|
263
|
+
chartsDotPlotPage.steps.verifyGraphTitleInSelectChartType('Graph title');
|
264
|
+
chartsDotPlotPage.steps.verifyGraphTitleInSpecifyCorrectAnswer('Graph title');
|
265
|
+
});
|
266
|
+
|
267
|
+
it('When the user clicks on the \'Graph title\' then the original text should be displayed in the popup', () => {
|
268
|
+
chartsDotPlotPage.steps.clickOnGraphTitleButton();
|
269
|
+
chartsDotPlotPage.steps.verifyTextInTitlePopupAddLabelInputField('Graph title');
|
270
|
+
});
|
271
|
+
|
272
|
+
it('When the user clicks on \'Save\' after updating the input field the updated label should be displayed in the select chart type and specify correct answer section', () => {
|
273
|
+
chartsDotPlotPage.steps.enterTextInTitlePopupAddLabelInputField('Days');
|
274
|
+
chartsDotPlotPage.steps.clickOnTitlePopupSaveButton();
|
275
|
+
chartsDotPlotPage.steps.verifyGraphTitleInSelectChartType('Days');
|
276
|
+
chartsDotPlotPage.steps.verifyGraphTitleInSpecifyCorrectAnswer('Days');
|
277
|
+
});
|
278
|
+
|
279
|
+
it('When user updates Min value then it should be updated on number line axis in select chart type section and specify correct answer section', () => {
|
280
|
+
chartsDotPlotPage.steps.enterTextInMinInputField(-3);
|
281
|
+
chartsDotPlotPage.steps.verifyMinOnNumberLineAxisSpecifyCorrectAnswer(-3);
|
282
|
+
chartsDotPlotPage.steps.verifyMinOnNumberLineAxisSelectChartType(-3);
|
283
|
+
});
|
284
|
+
|
285
|
+
it('When user updates Max value then it should be updated on number line axis in select chart type section and specify correct answer section', () => {
|
286
|
+
chartsDotPlotPage.steps.enterTextInMaxInputField(3);
|
287
|
+
chartsDotPlotPage.steps.verifyMaxOnNumberLineAxisSpecifyCorrectAnswer(3);
|
288
|
+
chartsDotPlotPage.steps.verifyMaxOnNumberLineAxisSelectChartType(3);
|
289
|
+
});
|
290
|
+
|
291
|
+
it('When user hovers over dot column then it should be displayed in interactive state and tooltip should be displayed', () => {
|
292
|
+
utilities.hoverOverElement(utilities.getNthElement(chartsDotPlotPage.dotColumnSelectChartType(), 4));
|
293
|
+
utilities.verifyCSS(utilities.getNthElement(chartsDotPlotPage.dotColumnSelectChartType(), 4), {
|
294
|
+
'background-color': css.color.draggableOptionsContainerBg
|
295
|
+
});
|
296
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipWrapperSelectChartType(), 'visible');
|
297
|
+
utilities.hoverAwayFromElement();
|
298
|
+
utilities.hoverOverElement(utilities.getNthElement(chartsDotPlotPage.dotColumnSpecifyCorrectAnswer(), 4));
|
299
|
+
utilities.verifyCSS(utilities.getNthElement(chartsDotPlotPage.dotColumnSpecifyCorrectAnswer(), 4), {
|
300
|
+
'background-color': css.color.draggableOptionsContainerBg
|
301
|
+
});
|
302
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipWrapperSpecifyCorrectAnswer(), 'visible');
|
303
|
+
utilities.hoverAwayFromElement();
|
304
|
+
});
|
305
|
+
|
306
|
+
it('When user selects an empty dot column, tooltip with unlocked bar button, add button and minus button should be displayed and by default minus button should be displayed in disabled state and add button should be in enabled state', () => {
|
307
|
+
chartsDotPlotPage.steps.selectDotColumnInSelectChartTypeSection({ point: 0, min: -3, interval: 0.25 });
|
308
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipWrapperSelectChartType(), 'visible');
|
309
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.lockUnlockButtonSelectChartType(), 'visible');
|
310
|
+
chartsDotPlotPage.steps.verifyLockUnlockButtonIcon('Unlocked');
|
311
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.addButtonSelectChartType(), 'visible');
|
312
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.minusButtonSelectChartType(), 'visible');
|
313
|
+
utilities.verifyElementDisabled(chartsDotPlotPage.minusButtonSelectChartType());
|
314
|
+
utilities.verifyElementNotDisabled(chartsDotPlotPage.addButtonSelectChartType());
|
315
|
+
chartsDotPlotPage.steps.selectDotColumnInSpecifyCorrectAnswer({ point: 0, min: -3, interval: 0.25 });
|
316
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipWrapperSpecifyCorrectAnswer(), 'visible');
|
317
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.addButtonSpecifyCorrectAnswer(), 'visible');
|
318
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.minusButtonSpecifyCorrectAnswer(), 'visible');
|
319
|
+
utilities.verifyElementDisabled(chartsDotPlotPage.minusButtonSpecifyCorrectAnswer());
|
320
|
+
utilities.verifyElementNotDisabled(chartsDotPlotPage.addButtonSpecifyCorrectAnswer());
|
321
|
+
});
|
322
|
+
|
323
|
+
it('When user hovers over unlocked bar button then \'Unlocked bar\' tooltip should be displayed', () => {
|
324
|
+
chartsDotPlotPage.steps.selectDotColumnInSelectChartTypeSection({ point: 0, min: -3, interval: 0.25 });
|
325
|
+
chartsDotPlotPage.steps.verifyTooltipInnerText(chartsDotPlotPage.lockUnlockButtonSelectChartType, 'Unlocked bar');
|
326
|
+
chartsDotPlotPage.steps.unselectDotColumnInSelectChartTypeSection({ point: 0, min: -3, interval: 0.25 });
|
327
|
+
});
|
328
|
+
|
329
|
+
it('When user hovers over add button then \'Add dot\' tooltip should be displayed', () => {
|
330
|
+
chartsDotPlotPage.steps.selectDotColumnInSelectChartTypeSection({ point: 0, min: -3, interval: 0.25 });
|
331
|
+
chartsDotPlotPage.steps.verifyTooltipInnerText(chartsDotPlotPage.addButtonSelectChartType, 'Add dot');
|
332
|
+
chartsDotPlotPage.steps.unselectDotColumnInSelectChartTypeSection({ point: 0, min: -3, interval: 0.25 });
|
333
|
+
chartsDotPlotPage.steps.selectDotColumnInSpecifyCorrectAnswer({ point: 0, min: -3, interval: 0.25 });
|
334
|
+
chartsDotPlotPage.steps.verifyTooltipInnerText(chartsDotPlotPage.addButtonSpecifyCorrectAnswer, 'Add dot');
|
335
|
+
chartsDotPlotPage.steps.unselectDotColumnInSpecifyCorrectAnswer({ point: 0, min: -3, interval: 0.25 });
|
336
|
+
});
|
337
|
+
|
338
|
+
it('When user hovers over minus button then \'Minus dot\' tooltip should be displayed', () => {
|
339
|
+
chartsDotPlotPage.steps.selectDotColumnInSelectChartTypeSection({ point: 0, min: -3, interval: 0.25 });
|
340
|
+
chartsDotPlotPage.steps.verifyTooltipInnerText(chartsDotPlotPage.minusButtonSelectChartType, 'Minus dot');
|
341
|
+
chartsDotPlotPage.steps.unselectDotColumnInSpecifyCorrectAnswer({ point: 0, min: -3, interval: 0.25 });
|
342
|
+
chartsDotPlotPage.steps.selectDotColumnInSpecifyCorrectAnswer({ point: 0, min: -3, interval: 0.25 });
|
343
|
+
chartsDotPlotPage.steps.verifyTooltipInnerText(chartsDotPlotPage.minusButtonSpecifyCorrectAnswer, 'Minus dot');
|
344
|
+
chartsDotPlotPage.steps.unselectDotColumnInSpecifyCorrectAnswer({ point: 0, min: -3, interval: 0.25 });
|
345
|
+
});
|
346
|
+
|
347
|
+
it('When user adds dots to empty dot column then added should be displayed and \'Minus dot\' button should be in enabled state in select chart type and specify correct answer section', () => {
|
348
|
+
chartsDotPlotPage.steps.selectDotColumnInSelectChartTypeSection({ point: 0, min: -3, interval: 0.25 });
|
349
|
+
chartsDotPlotPage.steps.increaseDotCountInDotColumnSelectChartTypeSection(1);
|
350
|
+
utilities.verifyElementNotDisabled(chartsDotPlotPage.minusButtonSelectChartType());
|
351
|
+
chartsDotPlotPage.steps.unselectDotColumnInSelectChartTypeSection({ point: 0, min: -3, interval: 0.25 });
|
352
|
+
chartsDotPlotPage.steps.selectDotColumnInSpecifyCorrectAnswer({ point: 0, min: -3, interval: 0.25 });
|
353
|
+
chartsDotPlotPage.steps.increaseDotCountInDotColumnSpecifyCorrectAnswer(1);
|
354
|
+
utilities.verifyElementNotDisabled(chartsDotPlotPage.minusButtonSpecifyCorrectAnswer());
|
355
|
+
chartsDotPlotPage.steps.unselectDotColumnInSpecifyCorrectAnswer({ point: 0, min: -3, interval: 0.25 });
|
356
|
+
});
|
357
|
+
|
358
|
+
it('When user clicks on enabled \'Minus dot\' button then previously added dot should disappear and \'Minus dot\' button should be displayed in disabled state again in select chart type and specify correct answer section', () => {
|
359
|
+
chartsDotPlotPage.steps.selectDotColumnInSelectChartTypeSection({ point: 0, min: -3, interval: 0.25 });
|
360
|
+
chartsDotPlotPage.steps.decreaseDotCountInDotColumnSelectChartTypeSection(1);
|
361
|
+
utilities.verifyElementDisabled(chartsDotPlotPage.minusButtonSelectChartType());
|
362
|
+
chartsDotPlotPage.steps.unselectDotColumnInSelectChartTypeSection({ point: 0, min: -3, interval: 0.25 });
|
363
|
+
chartsDotPlotPage.steps.selectDotColumnInSpecifyCorrectAnswer({ point: 0, min: -3, interval: 0.25 });
|
364
|
+
chartsDotPlotPage.steps.decreaseDotCountInDotColumnSpecifyCorrectAnswer(1);
|
365
|
+
utilities.verifyElementDisabled(chartsDotPlotPage.minusButtonSpecifyCorrectAnswer());
|
366
|
+
chartsDotPlotPage.steps.unselectDotColumnInSpecifyCorrectAnswer({ point: 0, min: -3, interval: 0.25 });
|
367
|
+
});
|
368
|
+
|
369
|
+
it('When user adds dots in dot column and locks it then locked icon should be displayed on dot column in select chart type section and specify correct answer section', () => {
|
370
|
+
chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(1, { point: 0, min: -3, interval: 0.25, defaultDots: 0 });
|
371
|
+
chartsDotPlotPage.steps.lockDotColumn({ point: 0, min: -3, interval: 0.25 });
|
372
|
+
chartsDotPlotPage.steps.verifyLockedDotColumnSelectChartType({ point: 0, min: -3, interval: 0.25 });
|
373
|
+
chartsDotPlotPage.steps.verifyLockedDotColumnSpecifyCorrectAnswer({ point: 0, min: -3, interval: 0.25 });
|
374
|
+
});
|
375
|
+
|
376
|
+
it('When user has locked a dot column then unlocked bar button in tooltip should change to Locked bar button and when user hovers over it then \'Locked bar\' tooltip should be displayed', () => {
|
377
|
+
chartsDotPlotPage.steps.selectDotColumnInSelectChartTypeSection({ point: 0, min: -3, interval: 0.25 });
|
378
|
+
chartsDotPlotPage.steps.verifyLockUnlockButtonIcon('Locked');
|
379
|
+
chartsDotPlotPage.steps.verifyTooltipInnerText(chartsDotPlotPage.lockUnlockButtonSelectChartType, 'Locked bar');
|
380
|
+
chartsDotPlotPage.steps.unselectDotColumnInSelectChartTypeSection({ point: 0, min: -3, interval: 0.25 });
|
381
|
+
});
|
382
|
+
|
383
|
+
it('User should not be able to update dot count in locked dot column in specify correct answer section', () => {
|
384
|
+
chartsDotPlotPage.steps.verifyLockedDotColumnSpecifyCorrectAnswer({ point: 0, min: -3, interval: 0.25 });
|
385
|
+
chartsDotPlotPage.steps.verifyDotCountSpecifyCorrectAnswer(1, { point: 0, min: -3, interval: 0.25 });
|
386
|
+
chartsDotPlotPage.steps.selectDotColumnInSpecifyCorrectAnswer({ point: 0, min: -3, interval: 0.25 });
|
387
|
+
chartsDotPlotPage.steps.tooltipWrapperNotExistSpecifyCorrectAnswer();
|
388
|
+
|
389
|
+
chartsDotPlotPage.steps.increaseDotInDotColumnUsingKeyboardSpecifyCorrectAnswer(1, { point: 1, min: -3, interval: 0.25 });
|
390
|
+
chartsDotPlotPage.steps.verifyDotCountSpecifyCorrectAnswer(1, { point: 0, min: -3, interval: 0.25 });
|
391
|
+
chartsDotPlotPage.steps.decreaseDotInDotColumnUsingKeyboardSpecifyCorrectAnswer(1, { point: 0, min: -3, interval: 0.25 });
|
392
|
+
chartsDotPlotPage.steps.verifyDotCountSpecifyCorrectAnswer(1, { point: 0, min: -3, interval: 0.25 });
|
393
|
+
});
|
394
|
+
|
395
|
+
it('User should be able to update dot count in locked dot column in select chart type section', () => {
|
396
|
+
chartsDotPlotPage.steps.verifyLockedDotColumnSelectChartType({ point: 0, min: -3, interval: 0.25 });
|
397
|
+
chartsDotPlotPage.steps.selectDotColumnInSelectChartTypeSection({ point: 0, min: -3, interval: 0.25 });
|
398
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipWrapperSelectChartType(), 'visible');
|
399
|
+
chartsDotPlotPage.steps.increaseDotCountInDotColumnSelectChartTypeSection(2, { point: 0, min: -3, interval: 0.25 });
|
400
|
+
chartsDotPlotPage.steps.unselectDotColumnInSelectChartTypeSection({ point: 0, min: -3, interval: 0.25 });
|
401
|
+
chartsDotPlotPage.steps.verifyDotCountSelectChartTypeSection(3, { point: 0, min: -3, interval: 0.25 });
|
402
|
+
chartsDotPlotPage.steps.verifyDotCountSpecifyCorrectAnswer(3, { point: 0, min: -3, interval: 0.25 });
|
403
|
+
});
|
404
|
+
|
405
|
+
it('When user unlocks the locked dot column then dot column should be displayed in unlocked state in select chart type and specify correct answer section and locked bar button should change to unlocked bar button in tooltip', () => {
|
406
|
+
chartsDotPlotPage.steps.unlockDotColumn({ point: 0, min: -3, interval: 0.25 });
|
407
|
+
chartsDotPlotPage.steps.selectDotColumnInSelectChartTypeSection({ point: 0, min: -3, interval: 0.25 });
|
408
|
+
chartsDotPlotPage.steps.verifyLockUnlockButtonIcon('Unlocked');
|
409
|
+
chartsDotPlotPage.steps.unselectDotColumnInSelectChartTypeSection({ point: 0, min: -3, interval: 0.25 });
|
410
|
+
chartsDotPlotPage.steps.verifyDotColumnIsUnlockedInSelectChartType({ point: 0, min: -3, interval: 0.25 });
|
411
|
+
chartsDotPlotPage.steps.verifyDotColumnIsUnlockedInSpecifyCorrectAnswer({ point: 0, min: -3, interval: 0.25 });
|
412
|
+
});
|
413
|
+
|
414
|
+
it('User should be able to add or remove dots in dot column using keyboard', () => {
|
415
|
+
chartsDotPlotPage.steps.selectDotColumnInSelectChartTypeSection({ point: 1, min: -3, interval: 0.25 });
|
416
|
+
chartsDotPlotPage.steps.increaseDotInDotColumnUsingKeyboardSelectChartType(3, { point: 1, min: -3, interval: 0.25 });
|
417
|
+
chartsDotPlotPage.steps.verifyDotCountSelectChartTypeSection(3, { point: 1, min: -3, interval: 0.25 });
|
418
|
+
chartsDotPlotPage.steps.decreaseDotInDotColumnUsingKeyboardSelectChartType(2, { point: 1, min: -3, interval: 0.25 });
|
419
|
+
chartsDotPlotPage.steps.verifyDotCountSelectChartTypeSection(1, { point: 1, min: -3, interval: 0.25 });
|
420
|
+
chartsDotPlotPage.steps.unselectDotColumnInSelectChartTypeSection({ point: 1, min: -3, interval: 0.25 });
|
421
|
+
|
422
|
+
chartsDotPlotPage.steps.selectDotColumnInSpecifyCorrectAnswer({ point: -1, min: -3, interval: 0.25 });
|
423
|
+
chartsDotPlotPage.steps.increaseDotInDotColumnUsingKeyboardSpecifyCorrectAnswer(3, { point: -1, min: -3, interval: 0.25 });
|
424
|
+
chartsDotPlotPage.steps.verifyDotCountSpecifyCorrectAnswer(3, { point: -1, min: -3, interval: 0.25 });
|
425
|
+
chartsDotPlotPage.steps.decreaseDotInDotColumnUsingKeyboardSpecifyCorrectAnswer(2, { point: -1, min: -3, interval: 0.25 });
|
426
|
+
chartsDotPlotPage.steps.verifyDotCountSpecifyCorrectAnswer(1, { point: -1, min: -3, interval: 0.25 });
|
427
|
+
chartsDotPlotPage.steps.unselectDotColumnInSpecifyCorrectAnswer({ point: -1, min: -3, interval: 0.25 });
|
428
|
+
});
|
429
|
+
|
430
|
+
it('When user tries to add more than 10 dots in a dot column then the user should be able to add only 10 dots after which \'Add\' button should be disabled', () => {
|
431
|
+
chartsDotPlotPage.steps.selectDotColumnInSelectChartTypeSection({ point: -1, min: -3, interval: 0.25 });
|
432
|
+
chartsDotPlotPage.steps.increaseDotCountInDotColumnSelectChartTypeSection(10, { point: -1, min: -3, interval: 0.25 });
|
433
|
+
chartsDotPlotPage.steps.verifyDotCountSelectChartTypeSection(10, { point: -1, min: -3, interval: 0.25 });
|
434
|
+
utilities.verifyElementDisabled(chartsDotPlotPage.addButtonSelectChartType());
|
435
|
+
chartsDotPlotPage.steps.unselectDotColumnInSelectChartTypeSection({ point: -1, min: -3, interval: 0.25 });
|
436
|
+
chartsDotPlotPage.steps.selectDotColumnInSpecifyCorrectAnswer({ point: -2, min: -3, interval: 0.25 });
|
437
|
+
chartsDotPlotPage.steps.increaseDotCountInDotColumnSpecifyCorrectAnswer(10, { point: -2, min: -3, interval: 0.25 });
|
438
|
+
chartsDotPlotPage.steps.verifyDotCountSpecifyCorrectAnswer(10, { point: -2, min: -3, interval: 0.25 });
|
439
|
+
utilities.verifyElementDisabled(chartsDotPlotPage.addButtonSpecifyCorrectAnswer());
|
440
|
+
chartsDotPlotPage.steps.unselectDotColumnInSpecifyCorrectAnswer({ point: -2, min: -3, interval: 0.25 });
|
441
|
+
});
|
442
|
+
|
443
|
+
it('When user removes dots from dot column having 10 dots then \'Add dot\' button should be in enabled state', () => {
|
444
|
+
chartsDotPlotPage.steps.selectDotColumnInSelectChartTypeSection({ point: -1, min: -3, interval: 0.25 });
|
445
|
+
chartsDotPlotPage.steps.decreaseDotCountInDotColumnSelectChartTypeSection(1, { point: -1, min: -3, interval: 0.25 });
|
446
|
+
chartsDotPlotPage.steps.verifyDotCountSelectChartTypeSection(9, { point: -1, min: -3, interval: 0.25 });
|
447
|
+
utilities.verifyElementNotDisabled(chartsDotPlotPage.addButtonSelectChartType());
|
448
|
+
chartsDotPlotPage.steps.unselectDotColumnInSelectChartTypeSection({ point: -1, min: -3, interval: 0.25 });
|
449
|
+
chartsDotPlotPage.steps.selectDotColumnInSpecifyCorrectAnswer({ point: -2, min: -3, interval: 0.25 });
|
450
|
+
chartsDotPlotPage.steps.decreaseDotCountInDotColumnSpecifyCorrectAnswer(1, { point: -2, min: -3, interval: 0.25 });
|
451
|
+
chartsDotPlotPage.steps.verifyDotCountSpecifyCorrectAnswer(9, { point: -2, min: -3, interval: 0.25 });
|
452
|
+
utilities.verifyElementNotDisabled(chartsDotPlotPage.addButtonSpecifyCorrectAnswer());
|
453
|
+
chartsDotPlotPage.steps.unselectDotColumnInSpecifyCorrectAnswer({ point: -2, min: -3, interval: 0.25 });
|
454
|
+
});
|
455
|
+
|
456
|
+
it('When user adds dot in dot column and does not lock the dot column then it should not be reflected in specify correct answer section', () => {
|
457
|
+
chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(3, { point: 3, min: -3, interval: 0.25, defaultDots: 0 });
|
458
|
+
chartsDotPlotPage.steps.verifyDotCountSpecifyCorrectAnswer(0, { point: 3, min: -3, interval: 0.25 });
|
459
|
+
});
|
460
|
+
|
461
|
+
it('When user clicks on x axis label 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', () => {
|
462
|
+
chartsDotPlotPage.steps.clickOnXAxisLabelButton();
|
463
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
464
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'X axis label');
|
465
|
+
utilities.verifyInnerText(chartsDotPlotPage.titlePopupAddLabelLabel(), 'Add label');
|
466
|
+
utilities.verifyElementVisibilityState(chartsDotPlotPage.titlePopupAddLabelInputField(), 'visible');
|
467
|
+
utilities.verifyInnerText(chartsDotPlotPage.titlePopupSaveButton(), 'Save');
|
468
|
+
utilities.verifyInnerText(chartsDotPlotPage.titlePopupCancelButton(), 'Cancel');
|
469
|
+
});
|
470
|
+
|
471
|
+
it('The input field should be prefilled with \'Label\'', () => {
|
472
|
+
chartsDotPlotPage.steps.verifyTextInTitlePopupAddLabelInputField('Label');
|
473
|
+
});
|
474
|
+
|
475
|
+
it('When the user edits the X axis label and clicks on \'Cancel\' button then the changes should not be displayed select chart type and specify correct answer section', () => {
|
476
|
+
chartsDotPlotPage.steps.enterTextInTitlePopupAddLabelInputField('Days');
|
477
|
+
chartsDotPlotPage.steps.clickOnTitlePopupCancelButton();
|
478
|
+
utilities.verifyInnerText(chartsDotPlotPage.selectChartTypeXAxisLabelButton(), 'Label');
|
479
|
+
});
|
480
|
+
|
481
|
+
it('When the user clicks on the X axis label then the original text should be displayed in the popup', () => {
|
482
|
+
chartsDotPlotPage.steps.clickOnXAxisLabelButton();
|
483
|
+
chartsDotPlotPage.steps.verifyTextInTitlePopupAddLabelInputField('Label');
|
484
|
+
});
|
485
|
+
|
486
|
+
it('When the user clicks on \'Save\' after updating the input field the updated label should be displayed in the select chart type and specify correct answer section', () => {
|
487
|
+
chartsDotPlotPage.steps.enterTextInTitlePopupAddLabelInputField('Days');
|
488
|
+
chartsDotPlotPage.steps.clickOnTitlePopupSaveButton();
|
489
|
+
utilities.verifyInnerText(chartsDotPlotPage.selectChartTypeXAxisLabelButton(), 'Days');
|
490
|
+
chartsDotPlotPage.steps.verifyXAxisLabelInSpecifyCorrectAnswer('Days');
|
491
|
+
});
|
492
|
+
});
|
493
|
+
|
494
|
+
describe('Select chart type - preview tab functionality', () => {
|
495
|
+
abortEarlySetup();
|
496
|
+
before(() => {
|
497
|
+
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
498
|
+
cy.barsPreLoaderWait();
|
499
|
+
chartsDotPlotPage.steps.selectDotPlot();
|
500
|
+
});
|
501
|
+
|
502
|
+
it('When the user edits the Graph title and clicks on \'Cancel\' button then the changes should not be displayed in preview tab', () => {
|
503
|
+
chartsDotPlotPage.steps.clickOnGraphTitleButton();
|
504
|
+
chartsDotPlotPage.steps.enterTextInTitlePopupAddLabelInputField('Number of Days');
|
505
|
+
chartsDotPlotPage.steps.clickOnTitlePopupCancelButton();
|
506
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
507
|
+
utilities.verifyInnerText(chartsDotPlotPage.previewTabGraphTitle(), 'Graph title');
|
508
|
+
});
|
509
|
+
|
510
|
+
it('When the user clicks on \'Save\' after updating the input field the updated label should be displayed in preview tab', () => {
|
511
|
+
chartsDotPlotPage.steps.switchToEditTab();
|
512
|
+
chartsDotPlotPage.steps.clickOnGraphTitleButton();
|
513
|
+
chartsDotPlotPage.steps.enterTextInTitlePopupAddLabelInputField('Number of days');
|
514
|
+
chartsDotPlotPage.steps.clickOnTitlePopupSaveButton();
|
515
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
516
|
+
utilities.verifyInnerText(chartsDotPlotPage.previewTabGraphTitle(), 'Number of days');
|
517
|
+
});
|
518
|
+
|
519
|
+
it('When user updates Min value then it should be updated on number line axis in preview tab', () => {
|
520
|
+
chartsDotPlotPage.steps.switchToEditTab();
|
521
|
+
chartsDotPlotPage.steps.enterTextInMinInputField(-3);
|
522
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
523
|
+
chartsDotPlotPage.steps.verifyMinOnNumberLineAxisPreviewTab(-3);
|
524
|
+
});
|
525
|
+
|
526
|
+
it('When user updates Max value then it should be updated on number line axis in preview tab', () => {
|
527
|
+
chartsDotPlotPage.steps.switchToEditTab();
|
528
|
+
chartsDotPlotPage.steps.enterTextInMaxInputField(3);
|
529
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
530
|
+
chartsDotPlotPage.steps.verifyMaxOnNumberLineAxisPreviewTab(3);
|
531
|
+
});
|
532
|
+
|
533
|
+
it('User should be able add dots and remove dots from dot column in preview tab', () => {
|
534
|
+
chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 0, min: -3, interval: 0.25, defaultDots: 0 });
|
535
|
+
chartsDotPlotPage.steps.selectDotColumnInPreviewTab({ point: 0, min: -3, interval: 0.25 });
|
536
|
+
chartsDotPlotPage.steps.decreaseDotInDotColumnUsingKeyboardPreviewTab(2, { point: 0, min: -3, interval: 0.25 });
|
537
|
+
chartsDotPlotPage.steps.verifyDotCountPreviewTab(3, { point: 0, min: -3, interval: 0.25 });
|
538
|
+
chartsDotPlotPage.steps.unselectDotColumnInPreviewTab({ point: 0, min: -3, interval: 0.25 });
|
539
|
+
});
|
540
|
+
|
541
|
+
it('When user adds dots in dot column and locks it then locked icon should be displayed on dot column in preview tab', () => {
|
542
|
+
chartsDotPlotPage.steps.switchToEditTab();
|
543
|
+
chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(2, { point: 1, min: -3, interval: 0.25, defaultDots: 0 });
|
544
|
+
chartsDotPlotPage.steps.lockDotColumn({ point: 1, min: -3, interval: 0.25 });
|
545
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
546
|
+
chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: -3, interval: 0.25 });
|
547
|
+
});
|
548
|
+
|
549
|
+
it('User should not be able to update dot count in locked dot column in preview tab', () => {
|
550
|
+
chartsDotPlotPage.steps.verifyDotColumnIsLockedInPreviewTab({ point: 1, min: 1, interval: 0.25 });
|
551
|
+
chartsDotPlotPage.steps.verifyDotCountPreviewTab(2, { point: 1, min: 1, interval: 0.25 });
|
552
|
+
chartsDotPlotPage.steps.selectDotColumnInPreviewTab({ point: 1, min: 1, interval: 0.25 });
|
553
|
+
chartsDotPlotPage.steps.tooltipWrapperNotExistPreviewTab();
|
554
|
+
});
|
555
|
+
|
556
|
+
it('When user unlocks the locked dot column then dot column should be displayed in unlocked state in preview tab', () => {
|
557
|
+
chartsDotPlotPage.steps.switchToEditTab();
|
558
|
+
chartsDotPlotPage.steps.unlockDotColumn({ point: 1, min: -3, interval: 0.25 });
|
559
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
560
|
+
chartsDotPlotPage.steps.verifyDotColumnIsUnlockedInPreviewTab({ point: 1, min: -3, interval: 0.25 });
|
561
|
+
});
|
562
|
+
|
563
|
+
it('When user adds dot in dot column and does not lock the dot column then it should be reflected in preview tab', () => {
|
564
|
+
chartsDotPlotPage.steps.switchToEditTab();
|
565
|
+
chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(2, { point: 2, min: -3, interval: 0.25, defaultDots: 0 });
|
566
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
567
|
+
chartsDotPlotPage.steps.verifyDotCountPreviewTab(2, { point: 2, min: -3, interval: 0.25 });
|
568
|
+
chartsDotPlotPage.steps.verifyDotColumnIsUnlockedInPreviewTab({ point: 2, min: -3, interval: 0.25 });
|
569
|
+
});
|
570
|
+
|
571
|
+
it('When user updates dot count in select chart type then dot count should be updated in preview tab', () => {
|
572
|
+
chartsDotPlotPage.steps.switchToEditTab();
|
573
|
+
chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(4, { point: 2, min: -3, interval: 0.25, defaultDots: 0 });
|
574
|
+
chartsDotPlotPage.steps.switchToPreviewTab();
|
575
|
+
chartsDotPlotPage.steps.verifyDotCountPreviewTab(4, { point: 2, min: -3, interval: 0.25 });
|
576
|
+
});
|
577
|
+
|
578
|
+
it('When the user edits the X axis label and clicks on \'Cancel\' button then the changes should not be displayed in preview tab', () => {
|
579
|
+
chartsDotPlotPage.steps.switchToEditTab();
|
580
|
+
chartsDotPlotPage.steps.clickOnXAxisLabelButton();
|
581
|
+
chartsDotPlotPage.steps.enterTextInTitlePopupAddLabelInputField('Days');
|
582
|
+
chartsDotPlotPage.steps.clickOnTitlePopupCancelButton();
|
583
|
+
utilities.verifyInnerText(chartsDotPlotPage.previewTabXAxisLabelButton(), 'Label');
|
584
|
+
});
|
585
|
+
|
586
|
+
it('When the user clicks on \'Save\' after updating the input field the updated label should be displayed in preview tab', () => {
|
587
|
+
chartsDotPlotPage.steps.switchToEditTab();
|
588
|
+
chartsDotPlotPage.steps.clickOnXAxisLabelButton();
|
589
|
+
chartsDotPlotPage.steps.enterTextInTitlePopupAddLabelInputField('Days');
|
590
|
+
chartsDotPlotPage.steps.clickOnTitlePopupSaveButton();
|
591
|
+
utilities.verifyInnerText(chartsDotPlotPage.previewTabXAxisLabelButton(), 'Days');
|
592
|
+
});
|
593
|
+
});
|
594
|
+
});
|
@@ -2,9 +2,8 @@ import { chartsDotPlotPage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
4
4
|
const css = Cypress.env('css');
|
5
|
-
const range = 20.75;
|
6
5
|
|
7
|
-
describe('Create Item page - Charts - Dot plot : Student view settings', () => {
|
6
|
+
/*describe('Create Item page - Charts - Dot plot : Student view settings', () => {
|
8
7
|
before(() => {
|
9
8
|
cy.loginAs('admin');
|
10
9
|
});
|
@@ -138,4 +137,4 @@ describe('Create Item page - Charts - Dot plot : Student view settings', () => {
|
|
138
137
|
chartsDotPlotPage.steps.verifyCheckAnswerButtonEnabled();
|
139
138
|
});
|
140
139
|
});
|
141
|
-
})
|
140
|
+
});*/
|
@@ -25,8 +25,8 @@ export const gridFillColorProperties = {
|
|
25
25
|
displayName: 'Filled',
|
26
26
|
colorProperties: {
|
27
27
|
fillColorHexValue: '#6B8BFF',
|
28
|
-
fillColorRgbaValue: '
|
29
|
-
fillColorOpacity:
|
28
|
+
fillColorRgbaValue: 'rgb(107, 139, 255)',
|
29
|
+
fillColorOpacity: 100,
|
30
30
|
borderColorHexValue: '#290080',
|
31
31
|
borderColorRgbValue: 'rgb(41, 0, 128)',
|
32
32
|
borderColorOpacity: 100
|