itemengine-cypress-automation 1.0.190-repoUpdate3May-f180558.0 → 1.0.190

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +2 -0
  2. package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +3 -30
  3. package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +0 -27
  4. package/cypress/e2e/ILC/AudioPlayerNew/customizePlayerLayoutSettings.js +9 -9
  5. package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +12 -12
  6. package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +1 -1
  7. package/cypress/e2e/ILC/AudioResponseNew/editAndPreviewTabScoringSection.js +1 -1
  8. package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +1 -0
  9. package/cypress/e2e/ILC/AudioResponseNew/headerSection.js +4 -20
  10. package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +366 -0
  11. package/cypress/e2e/ILC/ChartsBar/checkAnswerFunctionalityForAllViews.smoke.js +181 -0
  12. package/cypress/e2e/ILC/ChartsBar/gradingViewAndCorrectAnswerView.smoke.js +283 -0
  13. package/cypress/e2e/ILC/ChartsBar/previewContentsForAllViews.smoke.js +396 -130
  14. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettingsBasic.js +1 -1
  15. package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +2 -2
  16. package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +0 -3
  17. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +3 -5
  18. package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabBasicSection.js +0 -4
  19. package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabScoring.js +0 -1
  20. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePageHeaderSection.js +4 -24
  21. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +0 -9
  22. package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +3 -3
  23. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +0 -2
  24. package/cypress/e2e/ILC/EssayResponse/headerSection.js +3 -18
  25. package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +0 -1
  26. package/cypress/e2e/ILC/EssayResponseMath/mathCharacters.js +0 -1
  27. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/headerSection.js +0 -5
  28. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +0 -4
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +3 -3
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/headerSection.js +5 -5
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +3 -3
  32. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +0 -4
  33. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +1 -2
  34. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +0 -2
  35. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +2 -1
  36. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +6 -6
  37. package/cypress/e2e/ILC/GridFill/headerSection.js +4 -5
  38. package/cypress/e2e/ILC/ImageHighlight/allOrNothingForAllViews.smoke.js +276 -0
  39. package/cypress/e2e/ILC/ImageHighlight/checkAnswerFunctionalityForAllViews.smoke.js +141 -0
  40. package/cypress/e2e/ILC/ImageHighlight/previewContentsForAllViews.smoke.js +150 -0
  41. package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +1 -1
  42. package/cypress/e2e/ILC/ListOrderingDropdown/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
  43. package/cypress/e2e/ILC/Matching/additionalSettings.js +1 -0
  44. package/cypress/e2e/ILC/Matching/headerSection.js +2 -2
  45. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +22 -20
  46. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +4 -2
  47. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +4 -2
  48. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +3 -2
  49. package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +2 -1
  50. package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +1 -8
  51. package/cypress/e2e/ILC/NumberLine/headerSection.js +3 -3
  52. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
  53. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +5 -4
  54. package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +4 -2
  55. package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +4 -2
  56. package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +4 -2
  57. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +2 -1
  58. package/cypress/e2e/ILC/NumberLineLabel/checkAnswerFunctionalityForAllViews.smoke.js +3 -2
  59. package/cypress/e2e/ILC/ShortTextResponseNew/editTabScoringSection.js +1 -1
  60. package/cypress/e2e/ILC/ShortTextResponseNew/headerSection.js +1 -7
  61. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +0 -1
  62. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +2 -2
  63. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +3 -3
  64. package/cypress/e2e/ILC/VideoResponseNew/customizePlaybackControls.js +2 -2
  65. package/cypress/e2e/ILC/VideoResponseNew/editTabBasicSection.js +2 -2
  66. package/cypress/e2e/ILC/VideoResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +6 -6
  67. package/cypress/e2e/ILC/VideoResponseNew/previewContentsForAllViews.smoke.js +6 -6
  68. package/cypress/e2e/ILC/VideoResponseNew/standardRecorderStyle.js +9 -9
  69. package/cypress/e2e/ILC/VideoResponseNew/studentViewSettings.js +2 -4
  70. package/cypress/pages/audioPlayerPage.js +4 -2
  71. package/cypress/pages/audioResponsePage.js +2 -0
  72. package/cypress/pages/chartsBarPage.js +289 -3
  73. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +8 -5
  74. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
  75. package/cypress/pages/components/barAndLineChartComponent.js +7 -4
  76. package/cypress/pages/components/chartsCommonComponent.js +33 -0
  77. package/cypress/pages/components/imageCanvasComponent.js +3 -3
  78. package/cypress/pages/components/index.js +2 -1
  79. package/cypress/pages/components/questionInputFieldComponent.js +2 -1
  80. package/cypress/pages/components/resetPopupComponent.js +7 -3
  81. package/cypress/pages/components/scoringSectionBaseEditTab.js +6 -17
  82. package/cypress/pages/components/singleMultipleSelectionModeComponent.js +16 -0
  83. package/cypress/pages/contentBlocksPage.js +1 -1
  84. package/cypress/pages/dragAndDropIntoCategoriesPage.js +22 -24
  85. package/cypress/pages/drawingResponsePage.js +3 -2
  86. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +14 -0
  87. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +1 -1
  88. package/cypress/pages/imageHighlightPage.js +364 -0
  89. package/cypress/pages/index.js +2 -1
  90. package/cypress/pages/matchingPage.js +2 -1
  91. package/cypress/pages/numberLineLabelPage.js +14 -7
  92. package/cypress/pages/protractorPage.js +1 -1
  93. package/cypress/pages/readingRulerPage.js +1 -1
  94. package/cypress/pages/rulerPage.js +3 -3
  95. package/cypress/pages/textEntryMathPage.js +2 -2
  96. package/cypress/pages/videoResponsePage.js +6 -5
  97. package/package.json +1 -1
  98. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
  99. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
@@ -14,7 +14,7 @@ describe('Create item page: Charts - Bar - Preview contents in all views', () =>
14
14
  });
15
15
 
16
16
  views.forEach((view) => {
17
- describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
17
+ describe(`Preview tab contents - Edit bar graphs, graph labels, locked graph ${view}`, { tags: 'smoke' }, () => {
18
18
  abortEarlySetup();
19
19
  before(() => {
20
20
  switch (view) {
@@ -80,30 +80,6 @@ describe('Create item page: Charts - Bar - Preview contents in all views', () =>
80
80
  utilities.verifyElementDisabled(chartsBarPage.previewTabToolsResetButton());
81
81
  });
82
82
 
83
- it('When user hovers on the enabled add bar button, then tooltip \'Add bar\' should be displayed', () => {
84
- chartsBarPage.previewTabToolsAddBarOrPointButton()
85
- .verifyTooltip('Add bar');
86
- });
87
-
88
- it('CSS of the tooltip text', { tags: 'css' }, () => {
89
- utilities.triggerMouseover(chartsBarPage.previewTabToolsAddBarOrPointButton());
90
- utilities.verifyCSS(chartsBarPage.tooltipText(), {
91
- 'color': css.color.whiteText,
92
- 'font-size': css.fontSize.normal,
93
- 'font-weight': css.fontWeight.regular,
94
- 'background-color': css.color.tooltipBg
95
- });
96
- utilities.triggerMouseout(chartsBarPage.previewTabToolsAddBarOrPointButton());
97
- });
98
-
99
- it('Accessibility of the tooltip text', { tags: 'a11y' }, () => {
100
- utilities.triggerMouseover(chartsBarPage.previewTabToolsAddBarOrPointButton());
101
- utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'visible');
102
- cy.checkAccessibility(chartsBarPage.tooltipText());
103
- utilities.triggerMouseout(chartsBarPage.previewTabToolsAddBarOrPointButton());
104
- utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'notExist');
105
- });
106
-
107
83
  it('The graph title, Y axis label, X axis label and bar labels should be displayed', () => {
108
84
  utilities.verifyInnerText(chartsBarPage.previewTabGraphTitle(), 'Graph of profits');
109
85
  utilities.verifyElementVisibilityState(chartsBarPage.previewTabGraphTitle(), 'visible');
@@ -119,7 +95,7 @@ describe('Create item page: Charts - Bar - Preview contents in all views', () =>
119
95
 
120
96
  it('The graph max value should be as set in the Max Y input field and it should affect the chart division', () => {
121
97
  utilities.verifyTextContent(utilities.getNthElement(chartsBarPage.previewTabYAxisCoordinate(), 0), 20);
122
- utilities.verifyElementCount(chartsBarPage.previewTabChartRowHeaderContainer(), 11); //Chart has 10 rows but checking 11 as table also contains bar labels
98
+ utilities.verifyElementCount(chartsBarPage.previewTabChartRowHeaderContainer(), 21);
123
99
  });
124
100
 
125
101
  it('User should be able to edit the Y axis and X axis labels in preview tab', () => {
@@ -140,58 +116,166 @@ describe('Create item page: Charts - Bar - Preview contents in all views', () =>
140
116
  chartsBarPage.steps.verifyBarIsLockedInPreviewTab(1);
141
117
  });
142
118
 
119
+ it('User should not be able to edit the locked bar height', () => {
120
+ chartsBarPage.steps.verifyLockedBarIsUneditableInPreviewTab(1);
121
+ });
122
+
143
123
  it('User should be able to increase the bar height in preview tab', () => {
144
124
  chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 20, range: 20 });
145
125
  });
146
126
 
147
- it('When user has perform an action on the bar chart, then the undo and reset button should be displayed in enabled state', () => {
148
- utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
149
- utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsResetButton());
127
+ it('User should be able to decrease the height of the bar in preview tab', () => {
128
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 0, range: 20 });
150
129
  });
151
130
 
152
- it('When user hovers on the enabled undo and reset button, then tooltips \'Undo\' and \'Reset\' should be displayed', () => {
153
- chartsBarPage.previewTabToolsUndoButton()
154
- .verifyTooltip('Undo');
155
- chartsBarPage.previewTabToolsResetButton()
156
- .verifyTooltip('Reset');
131
+ it('When bar is at the topmost value and the user still tries to increase its value, then the bar value should not increase', () => {
132
+ chartsBarPage.steps.keyBoardUpBarInPreviewTab(0);
133
+ chartsBarPage.steps.keyBoardUpBarInPreviewTab(0);
134
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 0, barValue: 20, range: 20 });
157
135
  });
158
136
 
159
- it('CSS of the tooltip text', { tags: 'css' }, () => {
160
- utilities.triggerMouseover(chartsBarPage.previewTabToolsUndoButton());
161
- utilities.verifyCSS(chartsBarPage.tooltipText(), {
162
- 'color': css.color.whiteText,
137
+ it('When bar is at the bottommost value and the user still tries to decrease its value, then the bar value should not decrease', () => {
138
+ chartsBarPage.steps.keyBoardDownBarInPreviewTab(2);
139
+ chartsBarPage.steps.keyBoardDownBarInPreviewTab(2);
140
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 2, barValue: 0, range: 20 });
141
+ });
142
+
143
+ chartsBarPage.tests.verifyBarTooltipContentsCSSAndA11yInPreviewTab('0', barBackgroundColor[0], 'Bar 1');
144
+
145
+ chartsBarPage.tests.verifyBarTooltipContentsCSSAndA11yInPreviewTab('3', barBackgroundColor[3], 'Bar 4');
146
+
147
+ it('User should be able to edit the label a bar', () => {
148
+ chartsBarPage.steps.editBarLabelInPreviewTab(0, '2000');
149
+ chartsBarPage.steps.editBarLabelInPreviewTab(1, '2001');
150
+ });
151
+
152
+ it('CSS of preview tab contents', { tags: 'css' }, () => {
153
+ utilities.verifyCSS(chartsBarPage.previewTabToolsAddBarOrPointButton(), {
154
+ 'background-color': css.color.activeButtons
155
+ });
156
+ utilities.verifyCSS(chartsBarPage.previewTabGraphTitle(), {
157
+ 'color': css.color.text,
158
+ 'font-size': css.fontSize.default,
159
+ 'font-weight': css.fontWeight.bold
160
+ });
161
+ utilities.verifyCSS(chartsBarPage.previewTabYAxisLabelButton(), {
162
+ 'color': css.color.activeButtons,
163
+ 'font-size': css.fontSize.default,
164
+ 'font-weight': css.fontWeight.bold
165
+ });
166
+ utilities.verifyCSS(chartsBarPage.previewTabXAxisLabelButton(), {
167
+ 'color': css.color.activeButtons,
168
+ 'font-size': css.fontSize.default,
169
+ 'font-weight': css.fontWeight.bold
170
+ });
171
+ utilities.verifyCSS(chartsBarPage.previewTabBarLabel(), {
172
+ 'color': css.color.text,
173
+ 'font-size': css.fontSize.default,
174
+ 'font-weight': css.fontWeight.semibold
175
+ });
176
+ utilities.verifyCSS(chartsBarPage.previewTabYAxisCoordinate(), {
177
+ 'color': css.color.text,
163
178
  'font-size': css.fontSize.normal,
164
- 'font-weight': css.fontWeight.regular,
165
- 'background-color': css.color.tooltipBg
179
+ 'font-weight': css.fontWeight.semibold
166
180
  });
167
- utilities.triggerMouseout(chartsBarPage.previewTabToolsUndoButton());
168
- utilities.triggerMouseover(chartsBarPage.previewTabToolsResetButton());
181
+ utilities.verifyCSS(chartsBarPage.previewTabBarDragHandle().find('svg'), {
182
+ 'background-color': css.color.defaultBackground
183
+ });
184
+ utilities.verifyCSS(chartsBarPage.previewTabBarDragHandle().find('path').eq(1), {
185
+ 'fill': css.color.secondaryBtn
186
+ });
187
+ utilities.verifyCSS(chartsBarPage.previewTabBar().eq(0), {
188
+ 'background-color': barBackgroundColor[0]
189
+ });
190
+ utilities.verifyCSS(chartsBarPage.previewTabBar().eq(1), {
191
+ 'background-color': barBackgroundColor[1]
192
+ });
193
+ utilities.verifyCSS(chartsBarPage.previewTabBar().eq(2), {
194
+ 'background-color': barBackgroundColor[2]
195
+ });
196
+ utilities.verifyCSS(chartsBarPage.previewTabBar().eq(3), {
197
+ 'background-color': barBackgroundColor[3]
198
+ });
199
+ utilities.verifyCSS(chartsBarPage.barLockIcon(), {
200
+ 'background-color': css.color.defaultBackground,
201
+ });
202
+ });
203
+
204
+ it('Accessibility of preview tab contents', { tags: 'a11y' }, () => {
205
+ cy.checkAccessibility(chartsBarPage.previewTabGraphTitle().parents('[class*="ChartsPreviewstyles__PreviewWrapper"]'));
206
+ });
207
+ });
208
+ });
209
+
210
+ views.forEach((view) => {
211
+ describe(`Preview tab contents - Add and delete bar ${view}`, { tags: 'smoke' }, () => {
212
+ abortEarlySetup();
213
+ before(() => {
214
+ switch (view) {
215
+ case 'Question preview':
216
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
217
+ cy.barsPreLoaderWait();
218
+ chartsBarPage.steps.addTextInQuestionInstructionsInputField('Set the bar on the chart for the profits of the years');
219
+ chartsBarPage.steps.selectAddBarOrPointToolbarOption();
220
+ chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
221
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 1, range: 10 });
222
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 1, value: 2, range: 10 });
223
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 2, value: 3, range: 10 });
224
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 3, value: 4, range: 10 });
225
+ chartsBarPage.steps.allotPoints(10);
226
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 2, range: 10 });
227
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 1, value: 4, range: 10 });
228
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 2, value: 5, range: 10 });
229
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 3, value: 1, range: 10 });
230
+ chartsBarPage.steps.switchToPreviewTab();
231
+ break;
232
+ case 'Item view':
233
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
234
+ break;
235
+ case 'Item preview':
236
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
237
+ chartsBarPage.steps.switchToPreviewTab();
238
+ break;
239
+ case 'Student view':
240
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
241
+ break;
242
+ default:
243
+ throw new Error('Invalid view');
244
+ }
245
+ });
246
+
247
+ after(() => {
248
+ if (view === 'Question preview') {
249
+ chartsBarPage.steps.clickOnSaveQuestionButton();
250
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
251
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
252
+ }
253
+ });
254
+
255
+ it('When user hovers on the enabled add bar button, then tooltip \'Add bar\' should be displayed', () => {
256
+ chartsBarPage.previewTabToolsAddBarOrPointButton()
257
+ .verifyTooltip('Add bar');
258
+ });
259
+
260
+ it('CSS of the tooltip text', { tags: 'css' }, () => {
261
+ utilities.triggerMouseover(chartsBarPage.previewTabToolsAddBarOrPointButton());
169
262
  utilities.verifyCSS(chartsBarPage.tooltipText(), {
170
263
  'color': css.color.whiteText,
171
- 'font-size': css.fontSize.normal,
264
+ 'font-size': css.fontSize.small,
172
265
  'font-weight': css.fontWeight.regular,
173
266
  'background-color': css.color.tooltipBg
174
267
  });
175
- utilities.triggerMouseout(chartsBarPage.previewTabToolsResetButton());
268
+ utilities.triggerMouseout(chartsBarPage.previewTabToolsAddBarOrPointButton());
176
269
  });
177
270
 
178
271
  it('Accessibility of the tooltip text', { tags: 'a11y' }, () => {
179
- utilities.triggerMouseover(chartsBarPage.previewTabToolsUndoButton());
180
- utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'visible');
181
- cy.checkAccessibility(chartsBarPage.tooltipText());
182
- utilities.triggerMouseout(chartsBarPage.previewTabToolsUndoButton());
183
- utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'notExist');
184
- utilities.triggerMouseover(chartsBarPage.previewTabToolsResetButton());
272
+ utilities.triggerMouseover(chartsBarPage.previewTabToolsAddBarOrPointButton());
185
273
  utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'visible');
186
- cy.checkAccessibility(chartsBarPage.tooltipText());
187
- utilities.triggerMouseout(chartsBarPage.previewTabToolsResetButton());
274
+ cy.checkAccessibility(chartsBarPage.tooltipText().parents('[role="tooltip"]'));
275
+ utilities.triggerMouseout(chartsBarPage.previewTabToolsAddBarOrPointButton());
188
276
  utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'notExist');
189
277
  });
190
278
 
191
- it('User should be able to decrease the height of the bar in preview tab', () => {
192
- chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 0, range: 20 });
193
- });
194
-
195
279
  it('User should be able to add a bar in chart and the added bar should be displayed at 0 height with the label \'Bar 5\'', () => {
196
280
  chartsBarPage.steps.addBarOrPointInChartInPreviewTab();
197
281
  utilities.verifyElementCount(chartsBarPage.previewTabBar(), 5);
@@ -213,19 +297,121 @@ describe('Create item page: Charts - Bar - Preview contents in all views', () =>
213
297
  utilities.verifyElementDisabled(chartsBarPage.previewTabToolsAddBarOrPointButton());
214
298
  });
215
299
 
216
- it('User should be able to increase and decrease the height of the newly added bar', () => {
217
- chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 8, range: 20 });
218
- chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 3, range: 20 });
300
+ it('When user deletes a bar, then that bar should be deleted and the add bar button should be enabled again', () => {
301
+ chartsBarPage.steps.deleteBarInPreviewTab(3);
302
+ utilities.verifyElementCount(chartsBarPage.previewTabBar(), 4);
303
+ utilities.verifyElementVisibilityState(utilities.getNthElement(chartsBarPage.previewTabBarLabel(), 4), 'notExist');
304
+ utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsAddBarOrPointButton());
305
+ });
306
+
307
+ it('When user has deleted 2 bars and adds a bar, then the add bar button should still be enabled', () => {
308
+ chartsBarPage.steps.deleteBarInPreviewTab(2);
309
+ chartsBarPage.steps.addBarOrPointInChartInPreviewTab();
310
+ utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsAddBarOrPointButton());
219
311
  });
220
312
 
221
- it('User should be able to edit the label a bar', () => {
222
- chartsBarPage.steps.editBarLabelInPreviewTab(0, '2000');
223
- chartsBarPage.steps.editBarLabelInPreviewTab(1, '2001');
313
+ it('When user adds a bar again and the number of extra bars reaches the maximum set value i.e. 1, then the add bar button should be disabled', () => {
314
+ chartsBarPage.steps.addBarOrPointInChartInPreviewTab();
315
+ utilities.verifyElementDisabled(chartsBarPage.previewTabToolsAddBarOrPointButton());
316
+ });
317
+ });
318
+ });
319
+
320
+ views.forEach((view) => {
321
+ describe(`Preview tab contents - Undo, Redo and Reset buttons ${view}`, { tags: 'smoke' }, () => {
322
+ abortEarlySetup();
323
+ before(() => {
324
+ switch (view) {
325
+ case 'Question preview':
326
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
327
+ cy.barsPreLoaderWait();
328
+ chartsBarPage.steps.addTextInQuestionInstructionsInputField('Set the bar on the chart for the profits of the years');
329
+ chartsBarPage.steps.selectAddBarOrPointToolbarOption();
330
+ chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
331
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 1, range: 10 });
332
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 1, value: 2, range: 10 });
333
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 2, value: 3, range: 10 });
334
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 3, value: 4, range: 10 });
335
+ chartsBarPage.steps.setMaxBarCountValue(2);
336
+ chartsBarPage.steps.allotPoints(10);
337
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 2, range: 10 });
338
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 1, value: 4, range: 10 });
339
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 2, value: 5, range: 10 });
340
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 3, value: 1, range: 10 });
341
+ chartsBarPage.steps.switchToPreviewTab();
342
+ break;
343
+ case 'Item view':
344
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
345
+ break;
346
+ case 'Item preview':
347
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
348
+ chartsBarPage.steps.switchToPreviewTab();
349
+ break;
350
+ case 'Student view':
351
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
352
+ break;
353
+ default:
354
+ throw new Error('Invalid view');
355
+ }
356
+ });
357
+
358
+ after(() => {
359
+ if (view === 'Question preview') {
360
+ chartsBarPage.steps.clickOnSaveQuestionButton();
361
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
362
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
363
+ }
364
+ });
365
+
366
+ //Bar labels
367
+ it('When user updates a bar label, then the undo and reset button should be displayed in enabled state', () => {
368
+ chartsBarPage.steps.editBarLabelInPreviewTab(0, 'Edited bar 1');
369
+ utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
370
+ utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsResetButton());
371
+ });
372
+
373
+ it('When user hovers on the enabled undo and reset button, then tooltips \'Undo\' and \'Reset\' should be displayed', () => {
374
+ chartsBarPage.previewTabToolsUndoButton()
375
+ .verifyTooltip('Undo');
376
+ chartsBarPage.previewTabToolsResetButton()
377
+ .verifyTooltip('Reset');
378
+ });
379
+
380
+ it('CSS of the tooltip text', { tags: 'css' }, () => {
381
+ utilities.triggerMouseover(chartsBarPage.previewTabToolsUndoButton());
382
+ utilities.verifyCSS(chartsBarPage.tooltipText(), {
383
+ 'color': css.color.whiteText,
384
+ 'font-size': css.fontSize.small,
385
+ 'font-weight': css.fontWeight.regular,
386
+ 'background-color': css.color.tooltipBg
387
+ });
388
+ utilities.triggerMouseout(chartsBarPage.previewTabToolsUndoButton());
389
+ utilities.triggerMouseover(chartsBarPage.previewTabToolsResetButton());
390
+ utilities.verifyCSS(chartsBarPage.tooltipText(), {
391
+ 'color': css.color.whiteText,
392
+ 'font-size': css.fontSize.small,
393
+ 'font-weight': css.fontWeight.regular,
394
+ 'background-color': css.color.tooltipBg
395
+ });
396
+ utilities.triggerMouseout(chartsBarPage.previewTabToolsResetButton());
397
+ });
398
+
399
+ it('Accessibility of the tooltip text', { tags: 'a11y' }, () => {
400
+ utilities.triggerMouseover(chartsBarPage.previewTabToolsUndoButton());
401
+ utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'visible');
402
+ cy.checkAccessibility(chartsBarPage.tooltipText().parents('[role="tooltip"]'));
403
+ utilities.triggerMouseout(chartsBarPage.previewTabToolsUndoButton());
404
+ utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'notExist');
405
+ utilities.triggerMouseover(chartsBarPage.previewTabToolsResetButton());
406
+ utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'visible');
407
+ cy.checkAccessibility(chartsBarPage.tooltipText().parents('[role="tooltip"]'));
408
+ utilities.triggerMouseout(chartsBarPage.previewTabToolsResetButton());
409
+ utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'notExist');
224
410
  });
225
411
 
226
- it('When user clicks on the undo button, then the last performed action should be reverted', () => {
412
+ it('When user clicks on a undo button, then the previously performed action should be reverted', () => {
227
413
  chartsBarPage.steps.clickOnUndoButtonPreviewTab();
228
- chartsBarPage.steps.editBarLabelInPreviewTab(1, 'Bar 2');
414
+ utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.previewTabBarLabel(), 0), 'Bar 1');
229
415
  });
230
416
 
231
417
  it('When user has clicked on undo button, then the redo button should be enabled', () => {
@@ -241,7 +427,7 @@ describe('Create item page: Charts - Bar - Preview contents in all views', () =>
241
427
  utilities.triggerMouseover(chartsBarPage.previewTabToolsRedoButton());
242
428
  utilities.verifyCSS(chartsBarPage.tooltipText(), {
243
429
  'color': css.color.whiteText,
244
- 'font-size': css.fontSize.normal,
430
+ 'font-size': css.fontSize.small,
245
431
  'font-weight': css.fontWeight.regular,
246
432
  'background-color': css.color.tooltipBg
247
433
  });
@@ -251,22 +437,156 @@ describe('Create item page: Charts - Bar - Preview contents in all views', () =>
251
437
  it('Accessibility of the tooltip text', { tags: 'a11y' }, () => {
252
438
  utilities.triggerMouseover(chartsBarPage.previewTabToolsRedoButton());
253
439
  utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'visible');
254
- cy.checkAccessibility(chartsBarPage.tooltipText());
440
+ cy.checkAccessibility(chartsBarPage.tooltipText().parents('[role="tooltip"]'));
255
441
  utilities.triggerMouseout(chartsBarPage.previewTabToolsRedoButton());
256
442
  utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'notExist');
257
443
  });
258
444
 
259
- it('When the user clicks on redo button, then the last last reverted action should be performed and the button should be disabled again', () => {
445
+ it('When the user clicks on redo button, then the last reverted action should be performed again and the button should be disabled and undo button should be enabled', () => {
260
446
  chartsBarPage.steps.clickOnRedoButtonPreviewTab();
261
- utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.previewTabBarLabel(), 1), '2001');
447
+ utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.previewTabBarLabel(), 0), 'Edited bar 1');
262
448
  utilities.verifyElementDisabled(chartsBarPage.previewTabToolsRedoButton());
449
+ utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
263
450
  });
264
451
 
265
- it('When user deletes a bar, then that bar should be deleted and the add bar button should be enabled again', () => {
266
- chartsBarPage.steps.deleteBarInPreviewTab(4);
452
+ it('When user performs more than 1 actions and then clicks on undo button, then undo button should be enabled' ,() => {
453
+ cy.log('Pre-step: Reset the chart');
454
+ chartsBarPage.steps.clickOnResetButtonPreviewTab();
455
+ chartsBarPage.steps.confirmReset();
456
+ chartsBarPage.steps.editBarLabelInPreviewTab(0, 'Edited bar 1');
457
+ chartsBarPage.steps.editBarLabelInPreviewTab(1, 'Edited bar 2');
458
+ chartsBarPage.steps.clickOnUndoButtonPreviewTab();
459
+ utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
460
+ });
461
+
462
+ it('When the user clicks on undo button until the graph reaches its initial state, then the undo button should be disabled', () => {
463
+ chartsBarPage.steps.clickOnUndoButtonPreviewTab();
464
+ utilities.verifyElementDisabled(chartsBarPage.previewTabToolsUndoButton());
465
+ });
466
+
467
+ //Bar value/height
468
+ it('When user updates a bar value and clicks on undo button, then the previously performed action should be reverted', () => {
469
+ cy.log('Pre-step: Reset the chart');
470
+ chartsBarPage.steps.clickOnResetButtonPreviewTab();
471
+ chartsBarPage.steps.confirmReset();
472
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 4, range: 10 });
473
+ chartsBarPage.steps.clickOnUndoButtonPreviewTab();
474
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 0, barValue: 3, range: 10 });
475
+ });
476
+
477
+ it('When user has clicked on undo button, then the redo button should be enabled', () => {
478
+ utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsRedoButton());
479
+ });
480
+
481
+ it('When the user clicks on redo button, then the last reverted action should be performed again and the button should be disabled and undo button should be enabled', () => {
482
+ chartsBarPage.steps.clickOnRedoButtonPreviewTab();
483
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 0, barValue: 4, range: 10 });
484
+ utilities.verifyElementDisabled(chartsBarPage.previewTabToolsRedoButton());
485
+ utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
486
+ });
487
+
488
+ it('When user performs more than 1 actions and then clicks on undo button, then undo button should be enabled' ,() => {
489
+ cy.log('Reset the chart');
490
+ chartsBarPage.steps.clickOnResetButtonPreviewTab();
491
+ chartsBarPage.steps.confirmReset();
492
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 3, range: 10 });
493
+ chartsBarPage.steps.clickOnUndoButtonPreviewTab();
494
+ utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
495
+ });
496
+
497
+ it('When the user clicks on undo button until the graph reaches its initial state, then the undo button should be disabled', () => {
498
+ chartsBarPage.steps.clickOnUndoButtonPreviewTab();
499
+ utilities.verifyElementDisabled(chartsBarPage.previewTabToolsUndoButton());
500
+ });
501
+
502
+ //Add bar
503
+ it('When user adds a bar and and clicks on undo button, then the previously performed action should be reverted', () => {
504
+ cy.log('Pre-step: Reset the chart');
505
+ chartsBarPage.steps.clickOnResetButtonPreviewTab();
506
+ chartsBarPage.steps.confirmReset();
507
+ chartsBarPage.steps.addBarOrPointInChartInPreviewTab();
508
+ chartsBarPage.steps.clickOnUndoButtonPreviewTab();
267
509
  utilities.verifyElementCount(chartsBarPage.previewTabBar(), 4);
268
- utilities.verifyElementVisibilityState(utilities.getNthElement(chartsBarPage.previewTabBarLabel(), 4), 'notExist');
269
- utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsAddBarOrPointButton());
510
+ });
511
+
512
+ it('When user has clicked on undo button, then the redo button should be enabled', () => {
513
+ utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsRedoButton());
514
+ });
515
+
516
+ it('When the user clicks on redo button, then the last reverted action should be performed again and the button should be disabled and undo button should be enabled', () => {
517
+ chartsBarPage.steps.clickOnRedoButtonPreviewTab();
518
+ utilities.verifyElementCount(chartsBarPage.previewTabBar(), 5);
519
+ utilities.verifyElementDisabled(chartsBarPage.previewTabToolsRedoButton());
520
+ utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
521
+ });
522
+
523
+ it('When user performs more than 1 actions and then clicks on undo button, then undo button should be enabled' ,() => {
524
+ cy.log('Reset the chart');
525
+ chartsBarPage.steps.clickOnResetButtonPreviewTab();
526
+ chartsBarPage.steps.confirmReset();
527
+ chartsBarPage.steps.addBarOrPointInChartInPreviewTab();
528
+ chartsBarPage.steps.addBarOrPointInChartInPreviewTab();
529
+ chartsBarPage.steps.clickOnUndoButtonPreviewTab();
530
+ utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
531
+ });
532
+
533
+ it('When the user clicks on undo button until the graph reaches its initial state, then the undo button should be disabled', () => {
534
+ chartsBarPage.steps.clickOnUndoButtonPreviewTab();
535
+ utilities.verifyElementDisabled(chartsBarPage.previewTabToolsUndoButton());
536
+ });
537
+
538
+ //Delete bar
539
+ it('When user deletes a bar and clicks on a undo button, then the previously performed action should be reverted', () => {
540
+ cy.log('Pre-step: Reset the chart');
541
+ chartsBarPage.steps.clickOnResetButtonPreviewTab();
542
+ chartsBarPage.steps.confirmReset();
543
+ chartsBarPage.steps.deleteBarInPreviewTab(0);
544
+ chartsBarPage.steps.clickOnUndoButtonPreviewTab();
545
+ utilities.verifyElementCount(chartsBarPage.previewTabBar(), 4);
546
+ });
547
+
548
+ it('When user has clicked on undo button, then the redo button should be enabled', () => {
549
+ utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsRedoButton());
550
+ });
551
+
552
+ it('When the user clicks on redo button, then the last reverted action should be performed again and the button should be disabled and undo button should be enabled', () => {
553
+ chartsBarPage.steps.clickOnRedoButtonPreviewTab();
554
+ utilities.verifyElementCount(chartsBarPage.previewTabBar(), 3);
555
+ utilities.verifyElementDisabled(chartsBarPage.previewTabToolsRedoButton());
556
+ utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
557
+ });
558
+
559
+ it('When user performs more than 1 actions and then clicks on undo button, then undo button should be enabled' ,() => {
560
+ cy.log('Reset the chart');
561
+ chartsBarPage.steps.clickOnResetButtonPreviewTab();
562
+ chartsBarPage.steps.confirmReset();
563
+ chartsBarPage.steps.deleteBarInPreviewTab(0);
564
+ chartsBarPage.steps.deleteBarInPreviewTab(0);
565
+ chartsBarPage.steps.clickOnUndoButtonPreviewTab();
566
+ utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
567
+ });
568
+
569
+ it('When the user clicks on undo button until the graph reaches its initial state, then the undo button should be disabled', () => {
570
+ chartsBarPage.steps.clickOnUndoButtonPreviewTab();
571
+ utilities.verifyElementDisabled(chartsBarPage.previewTabToolsUndoButton());
572
+ });
573
+
574
+ //Reset button
575
+ it('When the user clicks on Reset button then reset popup should be displayed', () => {
576
+ chartsBarPage.steps.clickOnResetButtonPreviewTab();
577
+ utilities.verifyElementVisibilityState(chartsBarPage.dialogBox(), 'visible');
578
+ });
579
+
580
+ chartsBarPage.tests.verifyResetPopupContentWithCSSAndA11y('chart');
581
+
582
+ it('When user clicks on cancel button in reset popup, then reset popup should close and chart should not be reset', () => {
583
+ chartsBarPage.steps.cancelReset();
584
+ chartsBarPage.steps.editBarLabelInPreviewTab(0, '2000');
585
+ chartsBarPage.steps.editBarLabelInPreviewTab(1, '2001');
586
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 0, barValue: 20, range: 20 });
587
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 1, barValue: 2, range: 20 });
588
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 2, barValue: 0, range: 20 });
589
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 3, barValue: 4, range: 20 });
270
590
  });
271
591
 
272
592
  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', () => {
@@ -283,17 +603,13 @@ describe('Create item page: Charts - Bar - Preview contents in all views', () =>
283
603
  utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.previewTabBarLabel(), 1), 'Bar 2');
284
604
  utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.previewTabBarLabel(), 2), 'Bar 3');
285
605
  utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.previewTabBarLabel(), 3), 'Bar 4');
286
- chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 0, barValue: 1, range: 20 });
287
- chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 1, barValue: 2, range: 20 });
288
- chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 2, barValue: 3, range: 20 });
289
- chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 3, barValue: 4, range: 20 });
290
- chartsBarPage.steps.verifyBarIsLockedInPreviewTab(1);
606
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 0, barValue: 1, range: 10 });
607
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 1, barValue: 2, range: 10 });
608
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 2, barValue: 3, range: 10 });
609
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 3, barValue: 4, range: 10 });
291
610
  });
292
611
 
293
612
  it('CSS of preview tab contents', { tags: 'css' }, () => {
294
- utilities.verifyCSS(chartsBarPage.previewTabToolsAddBarOrPointButton(), {
295
- 'background-color': css.color.activeButtons
296
- });
297
613
  utilities.verifyCSS(chartsBarPage.previewTabToolsUndoButton().find('svg'), {
298
614
  'fill': css.color.secondaryBtnDisabled
299
615
  });
@@ -303,56 +619,6 @@ describe('Create item page: Charts - Bar - Preview contents in all views', () =>
303
619
  utilities.verifyCSS(chartsBarPage.previewTabToolsUndoButton().find('svg'), {
304
620
  'fill': css.color.secondaryBtnDisabled
305
621
  });
306
- utilities.verifyCSS(chartsBarPage.previewTabGraphTitle(), {
307
- 'color': css.color.text,
308
- 'font-size': css.fontSize.default,
309
- 'font-weight': css.fontWeight.bold
310
- });
311
- utilities.verifyCSS(chartsBarPage.previewTabYAxisLabelButton(), {
312
- 'color': css.color.activeButtons,
313
- 'font-size': css.fontSize.default,
314
- 'font-weight': css.fontWeight.bold
315
- });
316
- utilities.verifyCSS(chartsBarPage.previewTabXAxisLabelButton(), {
317
- 'color': css.color.activeButtons,
318
- 'font-size': css.fontSize.default,
319
- 'font-weight': css.fontWeight.bold
320
- });
321
- utilities.verifyCSS(chartsBarPage.previewTabBarLabel(), {
322
- 'color': css.color.text,
323
- 'font-size': css.fontSize.default,
324
- 'font-weight': css.fontWeight.semibold
325
- });
326
- utilities.verifyCSS(chartsBarPage.previewTabYAxisCoordinate(), {
327
- 'color': css.color.text,
328
- 'font-size': css.fontSize.normal,
329
- 'font-weight': css.fontWeight.semibold
330
- });
331
- utilities.verifyCSS(chartsBarPage.previewTabBarDragHandle().find('svg'), {
332
- 'background-color': css.color.defaultBackground
333
- });
334
- utilities.verifyCSS(chartsBarPage.previewTabBarDragHandle().find('path').eq(1), {
335
- 'fill': css.color.secondaryBtn
336
- });
337
- utilities.verifyCSS(chartsBarPage.previewTabBar().eq(0), {
338
- 'background-color': barBackgroundColor[0]
339
- });
340
- utilities.verifyCSS(chartsBarPage.previewTabBar().eq(1), {
341
- 'background-color': barBackgroundColor[1]
342
- });
343
- utilities.verifyCSS(chartsBarPage.previewTabBar().eq(2), {
344
- 'background-color': barBackgroundColor[2]
345
- });
346
- utilities.verifyCSS(chartsBarPage.previewTabBar().eq(3), {
347
- 'background-color': barBackgroundColor[3]
348
- });
349
- utilities.verifyCSS(chartsBarPage.barLockIcon(), {
350
- 'background-color': css.color.defaultBackground,
351
- });
352
- });
353
-
354
- it('Accessibility of preview tab contents', { tags: 'a11y' }, () => {
355
- cy.checkAccessibility(chartsBarPage.previewTabGraphTitle().parents('[class*="ChartsPreviewstyles__PreviewWrapper"]'));
356
622
  });
357
623
  });
358
624
  });
@@ -62,8 +62,8 @@ describe('Drag and drop into categories - Additional settings', () => {
62
62
  cy.barsPreLoaderWait();
63
63
  dragAndDropIntoCategoriesPage.steps.addTextInQuestionInstructionsInputField('Drag and drop into categories');
64
64
  dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(options);
65
- dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0, 'Eagle': 1 });
66
65
  dragAndDropIntoCategoriesPage.steps.expandAdditionalSettings();
66
+ dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0, 'Eagle': 1 });
67
67
  });
68
68
 
69
69
  Object.keys(fontSizes).forEach((option) => {