itemengine-cypress-automation 1.0.193-packageUpdated-b3f3d0b.0 → 1.0.193-packageUpdated-0af2e49.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +3 -3
  2. package/cypress/e2e/ILC/AudioPlayerNew/audioOverviewAndTranscript.js +568 -0
  3. package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +4 -4
  4. package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +5 -5
  5. package/cypress/e2e/ILC/AudioPlayerNew/customizePlayerLayoutSettings.js +2 -2
  6. package/cypress/e2e/ILC/AudioPlayerNew/headerSection.js +125 -0
  7. package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +5 -5
  8. package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +4 -4
  9. package/cypress/e2e/ILC/AudioPlayerNew/studentViewSettings.js +3 -3
  10. package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +19 -17
  11. package/cypress/e2e/ILC/ChartsBar/previewContentsForAllViews.smoke.js +7 -4
  12. package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +366 -0
  13. package/cypress/e2e/ILC/ChartsLine/checkAnswerFunctionalityForAllViews.smoke.js +183 -0
  14. package/cypress/e2e/ILC/ChartsLine/gradingViewAndCorrectAnswerView.smoke.js +281 -0
  15. package/cypress/e2e/ILC/ChartsLine/previewContentsForAllViews.smoke.js +595 -0
  16. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +8 -8
  17. package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +241 -0
  18. package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +241 -0
  19. package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternatePoints.js +285 -0
  20. package/cypress/e2e/ILC/ImageHighlight/Scoring/manuallyAndNonScored.js +164 -0
  21. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +281 -0
  22. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsScoring.js +467 -0
  23. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +250 -0
  24. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeigtsCorrectPointsGreaterThanAlternativePoints.js +281 -0
  25. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +260 -0
  26. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsScoring.js +184 -0
  27. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +229 -0
  28. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +261 -0
  29. package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +409 -0
  30. package/cypress/e2e/ILC/chartsDotsPlot/checkAnswerFunctionalityForAllViews.smoke.js +199 -0
  31. package/cypress/e2e/ILC/chartsDotsPlot/gradingViewAndCorrectAnswerView.smoke.js +223 -0
  32. package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +402 -0
  33. package/cypress/pages/audioPlayerPage.js +229 -9
  34. package/cypress/pages/chartsBarPage.js +2 -70
  35. package/cypress/pages/chartsDotPlotPage.js +986 -3
  36. package/cypress/pages/chartsLinePage.js +368 -9
  37. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +0 -1
  38. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
  39. package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
  40. package/cypress/pages/components/barAndLineChartComponent.js +27 -1
  41. package/cypress/pages/components/chartsCommonComponent.js +31 -2
  42. package/cypress/pages/components/createQuestionBasePage.js +1 -0
  43. package/cypress/pages/components/layoutSectionComponent.js +2 -2
  44. package/cypress/pages/components/singleMultipleSelectionModeComponent.js +5 -0
  45. package/cypress/pages/components/toolSettingsComponent.js +2 -2
  46. package/cypress/pages/feedbackScalePage.js +1 -1
  47. package/cypress/pages/gridFillPage.js +13 -6
  48. package/cypress/pages/imageHighlightPage.js +308 -2
  49. package/cypress/pages/numberLinePage.js +40 -16
  50. package/cypress/pages/videoResponsePage.js +350 -6
  51. package/package.json +1 -1
@@ -0,0 +1,223 @@
1
+ import { chartsDotPlotPage, correctAnswerViewPage, itemPreviewPage, studentViewPage } from "../../../pages";
2
+ import { gradingViewPage } from "../../../pages";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ import utilities from "../../../support/helpers/utilities";
5
+ let gradingAndCorrectAnsView = ['Grading view', 'Correct answer view'];
6
+ const views = utilities.getViews(gradingAndCorrectAnsView);
7
+ var itemReferenceID = "";
8
+ const css = Cypress.env('css');
9
+
10
+ describe('Create item page - Dot plot charts : Grading view, Correct answer view contents', () => {
11
+ before(() => {
12
+ cy.loginAs('admin');
13
+ });
14
+
15
+ if (views.includes('Grading view')) {
16
+ describe('Grading view contents', { tags: 'smoke' }, () => {
17
+ abortEarlySetup();
18
+ before(() => {
19
+ chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
20
+ cy.barsPreLoaderWait();
21
+ chartsDotPlotPage.steps.addTextInQuestionInstructionsInputField('Dot plot');
22
+ chartsDotPlotPage.steps.selectDotPlot();
23
+ chartsDotPlotPage.steps.enterTextInMinInputField(1);
24
+ chartsDotPlotPage.steps.verifyTextInMinInputField(1);
25
+ chartsDotPlotPage.steps.enterTextInMaxInputField(6);
26
+ chartsDotPlotPage.steps.verifyTextInMaxInputField(6);
27
+ chartsDotPlotPage.steps.setGraphTitle('Five-day observation');
28
+ chartsDotPlotPage.steps.setXAxisLabel('Days');
29
+ chartsDotPlotPage.steps.selectDotColumnInSelectChartTypeSection({ point: 1, min: 1, interval: 0.25 });
30
+ chartsDotPlotPage.steps.addDotInSelectChartTypeSection(2);
31
+ chartsDotPlotPage.steps.unselectDotColumnInSelectChartTypeSection({ point: 1, min: 1, interval: 0.25 });
32
+ chartsDotPlotPage.steps.lockDotColumn({ point: 1, min: 1, interval: 0.25 });
33
+ chartsDotPlotPage.steps.selectDotColumnInSelectChartTypeSection({ point: 2, min: 1, interval: 0.25 });
34
+ chartsDotPlotPage.steps.addDotInSelectChartTypeSection(1);
35
+ chartsDotPlotPage.steps.unselectDotColumnInSelectChartTypeSection({ point: 2, min: 1, interval: 0.25 });
36
+ chartsDotPlotPage.steps.allotPoints(10);
37
+ chartsDotPlotPage.steps.selectDotColumnInSpecifyCorrectAnswer({ point: 3, min: 1, interval: 0.25 });
38
+ chartsDotPlotPage.steps.addDotInSpecifyCorrectAnswer(3);
39
+ chartsDotPlotPage.steps.unselectDotColumnInSpecifyCorrectAnswer({ point: 3, min: 1, interval: 0.25 });
40
+ chartsDotPlotPage.steps.clickOnSaveQuestionButton();
41
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
42
+ //Global variable issue, not working inside before
43
+ itemPreviewPage.referenceID()
44
+ .invoke('text')
45
+ .then(($refID) => {
46
+ itemReferenceID = $refID;
47
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
48
+ chartsDotPlotPage.steps.verifyDotColumnIsUnlockedInPreviewTab({ point: 2, min: 1, interval: 0.25 });
49
+ chartsDotPlotPage.steps.selectDotColumnInPreviewTab({ point: 2, min: 1, interval: 0.25 });
50
+ chartsDotPlotPage.steps.addDotInPreviewTab(1);
51
+ chartsDotPlotPage.steps.unselectDotColumnInPreviewTab({ point: 2, min: 1, interval: 0.25 });
52
+ chartsDotPlotPage.steps.verifyDotCountPreviewTab(2, { point: 2, min: 1, interval: 0.25 });
53
+ chartsDotPlotPage.steps.verifyDotColumnIsUnlockedInPreviewTab({ point: 2, min: 1, interval: 0.25 });
54
+ chartsDotPlotPage.steps.selectDotColumnInPreviewTab({ point: 3, min: 1, interval: 0.25 });
55
+ chartsDotPlotPage.steps.addDotInPreviewTab(3);
56
+ chartsDotPlotPage.steps.unselectDotColumnInPreviewTab({ point: 3, min: 1, interval: 0.25 });
57
+ chartsDotPlotPage.steps.verifyDotCountPreviewTab(3, { point: 3, min: 1, interval: 0.25 });
58
+ studentViewPage.steps.submitResponse();
59
+ studentViewPage.steps.clickOnGoToGradingViewButton();
60
+ });
61
+ });
62
+
63
+ it('Question instructions should be visible', () => {
64
+ utilities.verifyInnerText(chartsDotPlotPage.questionInstructionsText(), 'Dot plot');
65
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.questionInstructionsText(), 'visible');
66
+ });
67
+
68
+ it('Control options should not be displayed', () => {
69
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.controlOptionsPreviewTab(), 'notExist');
70
+ });
71
+
72
+ it('Correct answer label should be displayed', () => {
73
+ utilities.verifyInnerText(chartsDotPlotPage.correctAnswersLabel(), 'Correct answers');
74
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.correctAnswersLabel(), 'visible');
75
+ });
76
+
77
+ it('The number line axis should be displayed with labels from 1 to 6 with 20 divisions', () => {
78
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.numberLineAxisCorrectAnswerSection(), 'exist');
79
+ chartsDotPlotPage.steps.verifyDivisionsOnNumberLineAxisCorrectAnswerSection({ min: 1, max: 6, interval: 0.25 });
80
+ chartsDotPlotPage.steps.verifyLabelsOnNumberLineAxisCorrectAnswerSection(1, 6, 4);
81
+ });
82
+
83
+ it('When user hovers over dot column then it should be displayed in interactive state ad tooltip should not be displayed', () => {
84
+ utilities.triggerMouseover(utilities.getNthElement(chartsDotPlotPage.dotColumnPreviewTab(), 2));
85
+ utilities.verifyCSS(utilities.getNthElement(chartsDotPlotPage.dotColumnPreviewTab(), 2), {
86
+ 'background-color': css.color.draggableOptionsContainerBg
87
+ });
88
+ chartsDotPlotPage.steps.tooltipWrapperNotExistPreviewTab();
89
+ utilities.triggerMouseout(utilities.getNthElement(chartsDotPlotPage.dotColumnPreviewTab(), 2));
90
+ });
91
+
92
+ it('Dot plot chart should not be editable in grading view', () => {
93
+ chartsDotPlotPage.steps.selectDotColumnInPreviewTab({ point: 4, min: 1, interval: 0.25 });
94
+ chartsDotPlotPage.steps.tooltipWrapperNotExistPreviewTab();
95
+ chartsDotPlotPage.steps.addDotUsingKeyboardPreviewTab(1, { point: 4, min: 1, interval: 0.25 });
96
+ chartsDotPlotPage.steps.verifyDotNotExistPreviewTab({ point: 4, min: 1, interval: 0.25 });
97
+ });
98
+
99
+ it('Locked bar with prefilled dots should be displayed in correct answer section', () => {
100
+ chartsDotPlotPage.steps.verifyDotColumnIsLockedInCorrectAnswerSection({ point: 1, min: 1, interval: 0.25 });
101
+ chartsDotPlotPage.steps.verifyDotCountCorrectAnswerSection(2, { point: 1, min: 1, interval: 0.25 });
102
+ });
103
+
104
+ it('Correct answer section along with dot plot attempted by the user should be displayed', () => {
105
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
106
+ chartsDotPlotPage.steps.verifyCorrectDotPreviewTab({ point: 3, min: 1, interval: 0.25 });
107
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25 });
108
+ chartsDotPlotPage.steps.verifyIncorrectDotPreviewTab({ point: 2, min: 1, interval: 0.25 });
109
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 3, min: 1, interval: 0.25 });
110
+ chartsDotPlotPage.steps.verifyCorrectDotCorrectAnswerSection({ point: 3, min: 1, interval: 0.25 });
111
+ });
112
+
113
+ it('Points and the total score should be displayed', () => {
114
+ gradingViewPage.steps.verifyGradingViewScore(0, 10);
115
+ });
116
+
117
+ it('CSS of grading view', { tags: 'css' }, () => {
118
+ utilities.verifyCSS(utilities.getNthElement(chartsDotPlotPage.dotIconPreviewTab(), 0), {
119
+ 'background-color': css.color.activeButtons,
120
+ });
121
+ utilities.verifyCSS(chartsDotPlotPage.previewTabGraphTitle(), {
122
+ 'color': css.color.text,
123
+ 'font-size': css.fontSize.default,
124
+ 'font-weight': css.fontWeight.bold
125
+ });
126
+ utilities.verifyCSS(chartsDotPlotPage.graphTitleCorrectAnswerSection(), {
127
+ 'color': css.color.text,
128
+ 'font-size': css.fontSize.default,
129
+ 'font-weight': css.fontWeight.bold
130
+ });
131
+ });
132
+
133
+ it('Accessibility of grading view', { tags: 'a11y' }, () => {
134
+ cy.checkAccessibility(chartsDotPlotPage.dotPlotChartPreviewTab().parents('[class*="question-preview-wrapper"]'));
135
+ });
136
+ });
137
+ }
138
+
139
+ if (views.includes('Correct answer view')) {
140
+ describe('Correct answer view contents', { tags: 'smoke' }, () => {
141
+ abortEarlySetup();
142
+ before(() => {
143
+ chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
144
+ cy.barsPreLoaderWait();
145
+ chartsDotPlotPage.steps.addTextInQuestionInstructionsInputField('Dot plot');
146
+ chartsDotPlotPage.steps.selectDotPlot();
147
+ chartsDotPlotPage.steps.enterTextInMinInputField(1);
148
+ chartsDotPlotPage.steps.verifyTextInMinInputField(1);
149
+ chartsDotPlotPage.steps.enterTextInMaxInputField(6);
150
+ chartsDotPlotPage.steps.verifyTextInMaxInputField(6);
151
+ chartsDotPlotPage.steps.setGraphTitle('Five-day observation');
152
+ chartsDotPlotPage.steps.setXAxisLabel('Days');
153
+ chartsDotPlotPage.steps.selectDotColumnInSelectChartTypeSection({ point: 1, min: 1, interval: 0.25 });
154
+ chartsDotPlotPage.steps.addDotInSelectChartTypeSection(2);
155
+ chartsDotPlotPage.steps.unselectDotColumnInSelectChartTypeSection({ point: 1, min: 1, interval: 0.25 });
156
+ chartsDotPlotPage.steps.lockDotColumn({ point: 1, min: 1, interval: 0.25 });
157
+ chartsDotPlotPage.steps.selectDotColumnInSelectChartTypeSection({ point: 2, min: 1, interval: 0.25 });
158
+ chartsDotPlotPage.steps.addDotInSelectChartTypeSection(1);
159
+ chartsDotPlotPage.steps.unselectDotColumnInSelectChartTypeSection({ point: 2, min: 1, interval: 0.25 });
160
+ chartsDotPlotPage.steps.allotPoints(10);
161
+ chartsDotPlotPage.steps.selectDotColumnInSpecifyCorrectAnswer({ point: 3, min: 1, interval: 0.25 });
162
+ chartsDotPlotPage.steps.addDotInSpecifyCorrectAnswer(3);
163
+ chartsDotPlotPage.steps.unselectDotColumnInSpecifyCorrectAnswer({ point: 3, min: 1, interval: 0.25 });
164
+ chartsDotPlotPage.steps.clickOnSaveQuestionButton();
165
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
166
+ //Global variable issue, not working inside before
167
+ itemPreviewPage.referenceID()
168
+ .invoke('text')
169
+ .then(($refID) => {
170
+ itemReferenceID = $refID
171
+ cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
172
+ });
173
+ });
174
+
175
+ it('Question instructions should be visible', () => {
176
+ utilities.verifyInnerText(chartsDotPlotPage.questionInstructionsText(), 'Dot plot');
177
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.questionInstructionsText(), 'visible');
178
+ });
179
+
180
+ it('Control options should not be displayed', () => {
181
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.controlOptionsPreviewTab(), 'notExist');
182
+ });
183
+
184
+ it('When user hovers over dot column then it should be displayed in interactive state ad tooltip should not be displayed', () => {
185
+ utilities.triggerMouseover(utilities.getNthElement(chartsDotPlotPage.dotColumnPreviewTab(), 3));
186
+ utilities.verifyCSS(utilities.getNthElement(chartsDotPlotPage.dotColumnPreviewTab(), 3), {
187
+ 'background-color': css.color.draggableOptionsContainerBg
188
+ });
189
+ chartsDotPlotPage.steps.tooltipWrapperNotExistPreviewTab();
190
+ utilities.triggerMouseout(utilities.getNthElement(chartsDotPlotPage.dotColumnPreviewTab(), 3));
191
+ });
192
+
193
+ it('Locked bar with prefilled dots should be displayed', () => {
194
+ chartsDotPlotPage.steps.verifyDotColumnIsLockedInPreviewTab({ point: 1, min: 1, interval: 0.25 });
195
+ chartsDotPlotPage.steps.verifyDotCountPreviewTab(2, { point: 1, min: 1, interval: 0.25 });
196
+ });
197
+
198
+ it('The correct answer set by user should be displayed in the correct answer view', () => {
199
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
200
+ chartsDotPlotPage.steps.verifyCorrectDotPreviewTab({ point: 3, min: 1, interval: 0.25 });
201
+ });
202
+
203
+ it('The points alloted to the question should be displayed', () => {
204
+ correctAnswerViewPage.steps.verifyAvailablePoints(10);
205
+ });
206
+
207
+ it('CSS of correct answer section', { tags: 'css' }, () => {
208
+ utilities.verifyCSS(utilities.getNthElement(chartsDotPlotPage.dotIconPreviewTab(), 0), {
209
+ 'background-color': css.color.activeButtons,
210
+ });
211
+ utilities.verifyCSS(chartsDotPlotPage.previewTabGraphTitle(), {
212
+ 'color': css.color.text,
213
+ 'font-size': css.fontSize.default,
214
+ 'font-weight': css.fontWeight.bold
215
+ });
216
+ });
217
+
218
+ it('Accessibility of correct answer section', { tags: 'a11y' }, () => {
219
+ cy.checkAccessibility(chartsDotPlotPage.dotPlotChartPreviewTab().parents('[class*="question-preview-wrapper"]'));
220
+ });
221
+ });
222
+ }
223
+ });
@@ -0,0 +1,402 @@
1
+ import { chartsDotPlotPage, itemPreviewPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ const previewContentViews = ['Question preview'];
7
+ const views = utilities.getViews(previewContentViews);
8
+ var itemReferenceID = "";
9
+ const controlOptions = ['Undo', 'Redo', 'Reset'];
10
+
11
+ describe('Create item page: Charts - Dot - Preview contents in all views', () => {
12
+ before(() => {
13
+ cy.loginAs('admin');
14
+ });
15
+
16
+ views.forEach((view) => {
17
+ describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
18
+ abortEarlySetup();
19
+ before(() => {
20
+ switch (view) {
21
+ case 'Question preview':
22
+ chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
23
+ cy.barsPreLoaderWait();
24
+ chartsDotPlotPage.steps.addTextInQuestionInstructionsInputField('Dot plot');
25
+ chartsDotPlotPage.steps.selectDotPlot();
26
+ chartsDotPlotPage.steps.enterTextInMinInputField(1);
27
+ chartsDotPlotPage.steps.verifyTextInMinInputField(1);
28
+ chartsDotPlotPage.steps.enterTextInMaxInputField(6);
29
+ chartsDotPlotPage.steps.verifyTextInMaxInputField(6);
30
+ chartsDotPlotPage.steps.setGraphTitle('Five-day observation');
31
+ chartsDotPlotPage.steps.setXAxisLabel('Days');
32
+ chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(2, { point: 1, min: 1, interval: 0.25, defaultDots: 0 });
33
+ chartsDotPlotPage.steps.lockDotColumn({ point: 1, min: 1, interval: 0.25 });
34
+ chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(1, { point: 2, min: 1, interval: 0.25, defaultDots: 0 });
35
+ chartsDotPlotPage.steps.allotPoints(10);
36
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 3, min: 1, interval: 0.25, defaultDots:0 });
37
+ chartsDotPlotPage.steps.switchToPreviewTab();
38
+ break;
39
+ case 'Item view':
40
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
41
+ break;
42
+ case 'Item preview':
43
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
44
+ chartsDotPlotPage.steps.switchToPreviewTab();
45
+ break;
46
+ case 'Student view':
47
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
48
+ break;
49
+ default:
50
+ throw new Error('Invalid view');
51
+ }
52
+ });
53
+
54
+ after(() => {
55
+ if (view === 'Question preview') {
56
+ chartsDotPlotPage.steps.clickOnSaveQuestionButton();
57
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
58
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
59
+ }
60
+ });
61
+
62
+ it('Question instructions should be visible', () => {
63
+ utilities.verifyInnerText(chartsDotPlotPage.questionInstructionsText(), 'Dot plot');
64
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.questionInstructionsText(), 'visible');
65
+ });
66
+
67
+ it('The graph title and X axis label set by the user should be displayed', () => {
68
+ utilities.verifyInnerText(chartsDotPlotPage.previewTabGraphTitle(), 'Five-day observation');
69
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.previewTabGraphTitle(), 'visible');
70
+ utilities.verifyInnerText(chartsDotPlotPage.previewTabXAxisLabelButton(), 'Days');
71
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.previewTabXAxisLabelButton(), 'visible');
72
+ });
73
+
74
+ it('The number line axis should be displayed with labels from 1 to 6 with 20 divisions', () => {
75
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.numberLineAxisPreviewTab(), 'exist');
76
+ chartsDotPlotPage.steps.verifyDivisionsOnNumberLineAxisPreviewTab({ min: 1, max: 6, interval: 0.25 });
77
+ chartsDotPlotPage.steps.verifyLabelsOnNumberLineAxisPreviewTab(1, 6, 4);
78
+ });
79
+
80
+ it('User should be able to edit the X axis labels in preview tab', () => {
81
+ chartsDotPlotPage.steps.editXAxisLabelInPreviewTab('Numbers of days');
82
+ utilities.verifyInnerText(chartsDotPlotPage.previewTabXAxisLabelButton(), 'Numbers of days');
83
+ });
84
+
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.triggerMouseover(utilities.getNthElement(chartsDotPlotPage.dotColumnPreviewTab(), 4));
87
+ utilities.verifyCSS(utilities.getNthElement(chartsDotPlotPage.dotColumnPreviewTab(), 4), {
88
+ 'background-color': css.color.draggableOptionsContainerBg
89
+ });
90
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipWrapperPreviewTab(), 'visible');
91
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.addButtonPreviewTab(), 'visible');
92
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.minusButtonPreviewTab(), 'visible');
93
+ utilities.triggerMouseout(utilities.getNthElement(chartsDotPlotPage.dotColumnPreviewTab(), 4));
94
+ });
95
+
96
+ it('Accessibility of interactive dot column', { tags: 'a11y' }, () => {
97
+ utilities.triggerMouseover(utilities.getNthElement(chartsDotPlotPage.dotColumnPreviewTab(), 4));
98
+ cy.checkAccessibility(utilities.getNthElement(chartsDotPlotPage.dotColumnPreviewTab(), 4));
99
+ utilities.triggerMouseout(utilities.getNthElement(chartsDotPlotPage.dotColumnPreviewTab(), 4));
100
+ });
101
+
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', () => {
103
+ chartsDotPlotPage.steps.selectDotColumnInPreviewTab({ point: 4, min: 1, interval: 0.25 });
104
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipWrapperPreviewTab(), 'visible');
105
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.addButtonPreviewTab(), 'visible');
106
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.minusButtonPreviewTab(), 'visible');
107
+ utilities.verifyElementDisabled(chartsDotPlotPage.minusButtonPreviewTab());
108
+ utilities.verifyElementNotDisabled(chartsDotPlotPage.addButtonPreviewTab());
109
+ chartsDotPlotPage.steps.unselectDotColumnInPreviewTab({ point: 4, min: 1, interval: 0.25 });
110
+ });
111
+
112
+ it('When user adds dots to empty dot column then \'Minus dot\' button should be in enabled state', () => {
113
+ chartsDotPlotPage.steps.selectDotColumnInPreviewTab({ point: 4, min: 1, interval: 0.25 });
114
+ chartsDotPlotPage.steps.addDotInPreviewTab(1);
115
+ utilities.verifyElementNotDisabled(chartsDotPlotPage.minusButtonPreviewTab());
116
+ chartsDotPlotPage.steps.unselectDotColumnInPreviewTab({ point: 4, min: 1, interval: 0.25 });
117
+ });
118
+
119
+ it('When user hovers over add button then \'Add dot\' tooltip should be displayed', () => {
120
+ chartsDotPlotPage.steps.selectDotColumnInPreviewTab({ point: 4, min: 1, interval: 0.25 });
121
+ chartsDotPlotPage.steps.verifyTooltipInnerText(chartsDotPlotPage.addButtonPreviewTab, 'Add dot');
122
+ chartsDotPlotPage.steps.unselectDotColumnInPreviewTab({ point: 4, min: 1, interval: 0.25 });
123
+ });
124
+
125
+ it('When user hovers over minus button then \'Minus dot\' tooltip should be displayed', () => {
126
+ chartsDotPlotPage.steps.selectDotColumnInPreviewTab({ point: 4, min: 1, interval: 0.25 });
127
+ chartsDotPlotPage.steps.verifyTooltipInnerText(chartsDotPlotPage.minusButtonPreviewTab, 'Minus dot');
128
+ chartsDotPlotPage.steps.unselectDotColumnInPreviewTab({ point: 4, min: 1, interval: 0.25 });
129
+ });
130
+
131
+ it('The locked DotColumn should be displayed in the locked state with added dots and when user hovers over it tooltip should not be displayed', () => {
132
+ chartsDotPlotPage.steps.verifyDotColumnIsLockedInPreviewTab({ point: 1, min: 1, interval: 0.25 });
133
+ chartsDotPlotPage.steps.verifyDotCountPreviewTab(2, { point: 1, min: 1, interval: 0.25 });
134
+ chartsDotPlotPage.steps.selectDotColumnInPreviewTab({ point: 1, min: 1, interval: 0.25 });
135
+ chartsDotPlotPage.steps.tooltipWrapperNotExistPreviewTab();
136
+ });
137
+
138
+ it('When user attempts the locked state DotColumn using keyboard then user should be unable to make any changes', () => {
139
+ chartsDotPlotPage.steps.addDotUsingKeyboardPreviewTab(1, { point: 1, min: 1, interval: 0.25 });
140
+ chartsDotPlotPage.steps.verifyDotCountPreviewTab(2, { point: 1, min: 1, interval: 0.25 });
141
+ chartsDotPlotPage.steps.minusDotUsingKeyboardPreviewTab(1, { point: 1, min: 1, interval: 0.25 });
142
+ chartsDotPlotPage.steps.verifyDotCountPreviewTab(2, { point: 1, min: 1, interval: 0.25 });
143
+ });
144
+
145
+ it('The unlocked dot column should be displayed with prefilled dots and user should be able to add dots into it in preview tab', () => {
146
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 0.25 });
147
+ });
148
+
149
+ it('User should be able to decrease the number of dots of the dot column in preview tab', () => {
150
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 0.25 });
151
+ });
152
+
153
+ it('User should be able to add or remove dots in dot column using keyboard', () => {
154
+ chartsDotPlotPage.steps.addDotUsingKeyboardPreviewTab(5, { point: 3, min: 1, interval: 0.25 });
155
+ chartsDotPlotPage.steps.verifyDotCountPreviewTab(5, { point: 3, min: 1, interval: 0.25 });
156
+ chartsDotPlotPage.steps.minusDotUsingKeyboardPreviewTab(2, { point: 3, min: 1, interval: 0.25 });
157
+ chartsDotPlotPage.steps.verifyDotCountPreviewTab(3, { point: 3, min: 1, interval: 0.25 });
158
+ });
159
+
160
+ it('When user tries to add more than 10 dots in a dot column then user should only be able to add 10 dots and \'Add\' button should be disabled', () => {
161
+ //using add button
162
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(10, { point: 5, min: 1, interval: 0.25, defaultDots: 0 });
163
+ chartsDotPlotPage.steps.selectDotColumnInPreviewTab({ point: 5, min: 1, interval: 0.25 });
164
+ utilities.verifyElementDisabled(chartsDotPlotPage.addButtonPreviewTab());
165
+ chartsDotPlotPage.steps.unselectDotColumnInPreviewTab({ point: 5, min: 1, interval: 0.25 });
166
+ //using keyboard
167
+ chartsDotPlotPage.steps.addDotUsingKeyboardPreviewTab(10, { point: 4, min: 1, interval: 0.25 });
168
+ chartsDotPlotPage.steps.verifyDotCountPreviewTab(10, { point: 4, min: 1, interval: 0.25 });
169
+ utilities.verifyElementDisabled(chartsDotPlotPage.addButtonPreviewTab());
170
+ chartsDotPlotPage.steps.unselectDotColumnInPreviewTab({ point: 4, min: 1, interval: 0.25 });
171
+ });
172
+
173
+ it('When user removes dots from dot column having 10 dots then \'Add dot\' button should be in enabled state', () => {
174
+ //using minus button
175
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(9, { point: 5, min: 1, interval: 0.25 });
176
+ chartsDotPlotPage.steps.selectDotColumnInPreviewTab({ point: 5, min: 1, interval: 0.25 });
177
+ utilities.verifyElementNotDisabled(chartsDotPlotPage.addButtonPreviewTab());
178
+ chartsDotPlotPage.steps.unselectDotColumnInPreviewTab({ point: 5, min: 1, interval: 0.25 });
179
+ //using keyboard
180
+ chartsDotPlotPage.steps.minusDotUsingKeyboardPreviewTab(1, { point: 4, min: 1, interval: 0.25 });
181
+ utilities.verifyElementNotDisabled(chartsDotPlotPage.addButtonPreviewTab());
182
+ chartsDotPlotPage.steps.unselectDotColumnInPreviewTab({ point: 4, min: 1, interval: 0.25 });
183
+ });
184
+
185
+ it('CSS of preview tab contents', { tags: 'css' }, () => {
186
+ utilities.verifyCSS(chartsDotPlotPage.previewTabGraphTitle(), {
187
+ 'color': css.color.text,
188
+ 'font-size': css.fontSize.default,
189
+ 'font-weight': css.fontWeight.bold
190
+ });
191
+ utilities.verifyCSS(chartsDotPlotPage.previewTabXAxisLabelButton(), {
192
+ 'color': css.color.activeButtons,
193
+ 'font-size': css.fontSize.default,
194
+ 'font-weight': css.fontWeight.bold
195
+ });
196
+ utilities.verifyCSS(chartsDotPlotPage.dotColumnLockIconPreviewTab().find('[id="Lock"]'), {
197
+ 'color': css.color.barLockIcon
198
+ });
199
+ chartsDotPlotPage.steps.selectDotColumnInPreviewTab({ point: 4, min: 1, interval: 0.25 })
200
+ utilities.verifyCSS(chartsDotPlotPage.tooltipWrapperPreviewTab(), {
201
+ 'background-color': css.color.draggableOptionsContainerBg
202
+ });
203
+ utilities.verifyCSS(chartsDotPlotPage.addButtonPreviewTab().find('rect'), {
204
+ 'fill': css.color.addDotButtonBg
205
+ });
206
+ utilities.verifyCSS(chartsDotPlotPage.minusButtonPreviewTab().find('rect'), {
207
+ 'fill': css.color.minusDotButtonBg
208
+ });
209
+ utilities.verifyCSS(utilities.getNthElement(chartsDotPlotPage.dotIconPreviewTab(), 0), {
210
+ 'background-color': css.color.activeButtons
211
+ });
212
+ });
213
+
214
+ it('Accessibility of preview tab contents', { tags: 'a11y' }, () => {
215
+ cy.checkAccessibility(chartsDotPlotPage.previewTabGraphTitle().parents('[class*="question-preview-wrapper"]'));
216
+ });
217
+ });
218
+ });
219
+
220
+ views.forEach((view) => {
221
+ describe(`Preview tab contents : Control buttons - ${view}`, { tags: 'smoke' }, () => {
222
+ abortEarlySetup();
223
+ before(() => {
224
+ switch (view) {
225
+ case 'Question preview':
226
+ chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
227
+ cy.barsPreLoaderWait();
228
+ chartsDotPlotPage.steps.addTextInQuestionInstructionsInputField('Dot plot');
229
+ chartsDotPlotPage.steps.selectDotPlot();
230
+ chartsDotPlotPage.steps.enterTextInMinInputField(1);
231
+ chartsDotPlotPage.steps.verifyTextInMinInputField(1);
232
+ chartsDotPlotPage.steps.enterTextInMaxInputField(6);
233
+ chartsDotPlotPage.steps.verifyTextInMaxInputField(6);
234
+ chartsDotPlotPage.steps.setGraphTitle('Five-day observation');
235
+ chartsDotPlotPage.steps.setXAxisLabel('Days');
236
+ chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(2, { point: 1, min: 1, interval: 0.25, defaultDots: 0 });
237
+ chartsDotPlotPage.steps.lockDotColumn({ point: 1, min: 1, interval: 0.25 });
238
+ chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(1, { point: 2, min: 1, interval: 0.25, defaultDots: 0 });
239
+ chartsDotPlotPage.steps.allotPoints(10);
240
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 3, min: 1, interval: 0.25, defaultDots:0 });
241
+ chartsDotPlotPage.steps.switchToPreviewTab();
242
+ break;
243
+ case 'Item view':
244
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
245
+ break;
246
+ case 'Item preview':
247
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
248
+ chartsDotPlotPage.steps.switchToPreviewTab();
249
+ break;
250
+ case 'Student view':
251
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
252
+ break;
253
+ default:
254
+ throw new Error('Invalid view');
255
+ }
256
+ });
257
+
258
+ after(() => {
259
+ if (view === 'Question preview') {
260
+ chartsDotPlotPage.steps.clickOnSaveQuestionButton();
261
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
262
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
263
+ }
264
+ });
265
+
266
+ it(`${controlOptions} control options should be displayed in the preview tab and by default, control options should be in disabled state`, () => {
267
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[0]), 'visible');
268
+ utilities.verifyElementDisabled(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[0]));
269
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[1]), 'visible');
270
+ utilities.verifyElementDisabled(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[1]));
271
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[2]), 'visible');
272
+ utilities.verifyElementDisabled(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[2]));
273
+ });
274
+
275
+ it('When user has perform an action on the dot plot chart, then the undo and reset button should be displayed in enabled state', () => {
276
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 0.25 });
277
+ utilities.verifyElementNotDisabled(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[0]));
278
+ utilities.verifyElementNotDisabled(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[2]));
279
+ });
280
+
281
+ it('When user hovers on the enabled undo and reset button, then tooltips \'Undo\' and \'Reset\' should be displayed', () => {
282
+ chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[0])
283
+ .verifyTooltip('Undo');
284
+ chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[2])
285
+ .verifyTooltip('Reset');
286
+ });
287
+
288
+ it('CSS of the tooltip text', { tags: 'css' }, () => {
289
+ utilities.triggerMouseover(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[0]));
290
+ utilities.verifyCSS(chartsDotPlotPage.tooltipText(), {
291
+ 'color': css.color.whiteText,
292
+ 'font-size': css.fontSize.normal,
293
+ 'font-weight': css.fontWeight.regular,
294
+ 'background-color': css.color.tooltipBg
295
+ });
296
+ utilities.triggerMouseout(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[0]));
297
+ utilities.triggerMouseover(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[2]));
298
+ utilities.verifyCSS(chartsDotPlotPage.tooltipText(), {
299
+ 'color': css.color.whiteText,
300
+ 'font-size': css.fontSize.normal,
301
+ 'font-weight': css.fontWeight.regular,
302
+ 'background-color': css.color.tooltipBg
303
+ });
304
+ utilities.triggerMouseout(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[2]));
305
+ });
306
+
307
+ it('Accessibility of the tooltip text', { tags: 'a11y' }, () => {
308
+ utilities.triggerMouseover(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[0]));
309
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipText(), 'visible');
310
+ cy.checkAccessibility(chartsDotPlotPage.tooltipText());
311
+ utilities.triggerMouseout(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[0]));
312
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipText(), 'notExist');
313
+ utilities.triggerMouseover(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[2]));
314
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipText(), 'visible');
315
+ cy.checkAccessibility(chartsDotPlotPage.tooltipText());
316
+ utilities.triggerMouseout(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[2]));
317
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipText(), 'notExist');
318
+ });
319
+
320
+ it('When user clicks on the undo button, then the last performed action should be reverted', () => {
321
+ chartsDotPlotPage.steps.selectControlOptionPreviewTab(controlOptions[0]);
322
+ chartsDotPlotPage.steps.verifyDotCountPreviewTab(3, { point: 2, min: 1, interval: 0.25 });
323
+ });
324
+
325
+ it('When user has clicked on undo button, then the redo button should be enabled', () => {
326
+ utilities.verifyElementNotDisabled(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[1]));
327
+ });
328
+
329
+ it('When user hovers on the enabled redo button, then tooltip \'Redo\' should be displayed', () => {
330
+ chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[1])
331
+ .verifyTooltip('Redo');
332
+ });
333
+
334
+ it('CSS of the tooltip text', { tags: 'css' }, () => {
335
+ utilities.triggerMouseover(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[1]));
336
+ utilities.verifyCSS(chartsDotPlotPage.tooltipText(), {
337
+ 'color': css.color.whiteText,
338
+ 'font-size': css.fontSize.normal,
339
+ 'font-weight': css.fontWeight.regular,
340
+ 'background-color': css.color.tooltipBg
341
+ });
342
+ utilities.triggerMouseout(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[1]));
343
+ });
344
+
345
+ it('Accessibility of the tooltip text', { tags: 'a11y' }, () => {
346
+ utilities.triggerMouseover(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[1]));
347
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipText(), 'visible');
348
+ cy.checkAccessibility(chartsDotPlotPage.tooltipText());
349
+ utilities.triggerMouseout(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[1]));
350
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.tooltipText(), 'notExist');
351
+ });
352
+
353
+ 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', () => {
354
+ chartsDotPlotPage.steps.selectControlOptionPreviewTab(controlOptions[1]);
355
+ chartsDotPlotPage.steps.verifyDotCountPreviewTab(4, { point: 2, min: 1, interval: 0.25 });
356
+ utilities.verifyElementDisabled(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[1]));
357
+ utilities.verifyElementNotDisabled(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[0]));
358
+ });
359
+
360
+ it(`When the user reaches the initial state by performing undo actions, the \'Undo\' button should get disabled`, () => {
361
+ for (var i = 0; i < 3; i++) {
362
+ chartsDotPlotPage.steps.selectControlOptionPreviewTab(controlOptions[0]);
363
+ }
364
+ chartsDotPlotPage.steps.verifyDotCountPreviewTab(1, { point: 2, min: 1, interval: 0.25 });
365
+ utilities.verifyElementDisabled(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[0]));
366
+ utilities.verifyElementNotDisabled(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[1]));
367
+ });
368
+
369
+ it('When the user reaches the latest state by performing redo actions, the \'Redo\' button should get disabled and error message should disappear', () => {
370
+ for (var i = 0; i < 3; i++) {
371
+ chartsDotPlotPage.steps.selectControlOptionPreviewTab(controlOptions[1]);
372
+ }
373
+ chartsDotPlotPage.steps.verifyDotCountPreviewTab(4, { point: 2, min: 1, interval: 0.25 });
374
+ utilities.verifyElementDisabled(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[1]));
375
+ utilities.verifyElementNotDisabled(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[0]));
376
+ });
377
+
378
+ 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', () => {
379
+ chartsDotPlotPage.steps.selectControlOptionPreviewTab(controlOptions[2]);
380
+ chartsDotPlotPage.steps.confirmReset();
381
+ chartsDotPlotPage.steps.verifyDotColumnIsLockedInPreviewTab({ point: 1, min: 1, interval: 0.25 });
382
+ chartsDotPlotPage.steps.verifyDotCountPreviewTab(2, { point: 1, min: 1, interval: 0.25 });
383
+ chartsDotPlotPage.steps.verifyDotCountPreviewTab(1, { point: 2, min: 1, interval: 0.25 });
384
+ utilities.verifyElementDisabled(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[0]));
385
+ utilities.verifyElementDisabled(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[1]));
386
+ utilities.verifyElementDisabled(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[2]));
387
+ });
388
+
389
+ it('CSS of preview tab contents', { tags: 'css' }, () => {
390
+ controlOptions.forEach((option) => {
391
+ utilities.verifyCSS(chartsDotPlotPage.controlOptionsPreviewTab(option).find('svg'), {
392
+ 'fill': css.color.secondaryBtnDisabled
393
+ });
394
+ });
395
+ });
396
+
397
+ it('Accessibility of preview tab contents', { tags: 'a11y' }, () => {
398
+ cy.checkAccessibility(chartsDotPlotPage.previewTabGraphTitle().parents('[class*="question-preview-wrapper"]'));
399
+ });
400
+ });
401
+ });
402
+ });