itemengine-cypress-automation 1.0.205-8thJuneFixes-5ad148f.0 → 1.0.205

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. package/cypress/e2e/ILC/AudioPlayerNew/audioOverviewAndTranscript.js +2 -2
  2. package/cypress/e2e/ILC/ChartsBar/Scoring/addAndDeleteBarAllOrNothingScoring.js +302 -0
  3. package/cypress/e2e/ILC/ChartsBar/Scoring/manuallyAndNonScored.js +282 -0
  4. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +385 -0
  5. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +386 -0
  6. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +386 -0
  7. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +337 -0
  8. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -1
  9. package/cypress/e2e/ILC/ChartsBar/chartFunctionalitySpecifyCorrectAnswerSection.js +258 -0
  10. package/cypress/e2e/ILC/ChartsBar/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
  11. package/cypress/e2e/ILC/ChartsBar/gridSettings.js +439 -0
  12. package/cypress/e2e/ILC/ChartsBar/headerSection.js +105 -0
  13. package/cypress/e2e/ILC/ChartsBar/labelOptionsSection.js +450 -0
  14. package/cypress/e2e/ILC/ChartsBar/specifyCorrectAnswerSection.js +91 -0
  15. package/cypress/e2e/ILC/ChartsBar/toolSettings.js +73 -0
  16. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/manuallyAndNonScoredScoring.js +1 -1
  17. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +3 -2
  18. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +1 -1
  19. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +1 -1
  20. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneMinimumAndPenaltyScoring.js +6 -6
  21. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettings.js +169 -0
  22. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +1 -1
  23. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationDraggableOptionProperties.js +223 -0
  24. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationDraggableOptionsPanel.js +119 -0
  25. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationDropzoneBorderStyleProperties.js +113 -0
  26. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationDropzoneProperties.js +251 -0
  27. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationLayoutProperties.js +277 -0
  28. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +0 -2
  29. package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +1 -5
  30. package/cypress/e2e/ILC/FeedbackScaleNew/editTabBasicSection.js +1 -0
  31. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +4 -4
  32. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +1 -0
  33. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +14 -1
  34. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/styleAndLayoutCutomization.js +378 -0
  35. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +3 -3
  36. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -1
  37. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomization.js +479 -0
  38. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +3 -1
  39. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsCellShadeCountBasics.js +7 -7
  40. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingPenaltyScoring.js +1 -0
  41. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/manuallyAndNonScored.js +1 -0
  42. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +2 -2
  43. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +2 -3
  44. package/cypress/e2e/ILC/ListOrderingDropdown/minimumScoringPenaltyPointsAndRoundingDropdown.js +7 -7
  45. package/cypress/e2e/ILC/ListOrderingDropdown/studentViewSettings.js +1 -1
  46. package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +3 -4
  47. package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +10 -9
  48. package/cypress/e2e/ILC/Matching/toolSettings.js +1 -0
  49. package/cypress/e2e/ILC/MultipleSelection/additionalSettings.js +1 -0
  50. package/cypress/e2e/ILC/MultipleSelection/allOrNothingBasicForAllViews.smoke.js +36 -16
  51. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +326 -176
  52. package/cypress/e2e/ILC/MultipleSelection/blockCreateItem.js +2 -2
  53. package/cypress/e2e/ILC/MultipleSelection/manuallyAndNonScoredScoring.js +37 -15
  54. package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsBasic.js +38 -17
  55. package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsWithAlternativeAnswer.js +441 -186
  56. package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsBasic.js +33 -14
  57. package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsWithAlternativeAnswer.js +330 -164
  58. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/manuallyAndNonScored.js +1 -1
  59. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  60. package/cypress/e2e/ILC/ShortTextResponseNew/manuallyAndNonScoredScoring.js +4 -4
  61. package/cypress/e2e/ILC/SingleSelection/allOrNothingBasicForAllViews.smoke.js +20 -7
  62. package/cypress/e2e/ILC/SingleSelection/allOrNothingWithAlternativeAnswer.js +83 -66
  63. package/cypress/e2e/ILC/SingleSelection/blockCreateItem.js +2 -2
  64. package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +25 -17
  65. package/cypress/e2e/ILC/SingleSelection/trueOrFalseCreateItem.js +2 -2
  66. package/cypress/e2e/ILC/SingleSelectionGridNew/additionalSettings.js +89 -0
  67. package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +3 -3
  68. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +2 -2
  69. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +2 -2
  70. package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +2 -2
  71. package/cypress/e2e/ILC/VideoResponseNew/studentViewSettingsCompactRecorderStyle.js +0 -2
  72. package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +2 -2
  73. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingPenaltyScoring.js +1 -1
  74. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsBasic.js +15 -15
  75. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +21 -21
  76. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +17 -17
  77. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +21 -21
  78. package/cypress/e2e/ILC/chartsDotsPlot/scoring/toleranceThresholdScoring.js +1 -1
  79. package/cypress/e2e/ILC/chartsDotsPlot/selectChartTypeSection.js +8 -4
  80. package/cypress/e2e/ILC/chartsDotsPlot/toolSettings.js +0 -1
  81. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
  82. package/cypress/pages/audioResponsePage.js +1 -1
  83. package/cypress/pages/chartsBarPage.js +785 -5
  84. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -0
  85. package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
  86. package/cypress/pages/components/barAndLineChartComponent.js +180 -9
  87. package/cypress/pages/components/chartsCommonComponent.js +1 -0
  88. package/cypress/pages/components/connectorStyleStyleAndLayoutCustomizationComponent.js +77 -0
  89. package/cypress/pages/components/essayResponseCommonComponents.js +2 -3
  90. package/cypress/pages/components/figCommonStyleAndLayoutComponent.js +1 -1
  91. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +24 -7
  92. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +8 -4
  93. package/cypress/pages/components/gridQuestionCommonComponent.js +1 -1
  94. package/cypress/pages/components/imageCanvasComponent.js +112 -2
  95. package/cypress/pages/components/index.js +1 -0
  96. package/cypress/pages/components/layoutSectionComponent.js +4 -3
  97. package/cypress/pages/dragAndDropIntoCategoriesPage.js +960 -3
  98. package/cypress/pages/drawingResponsePage.js +2 -2
  99. package/cypress/pages/fillInTheGapsDragAndDropPage.js +4 -3
  100. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +18 -3
  101. package/cypress/pages/fillInTheGapsOverImageTextPage.js +65 -3
  102. package/cypress/pages/listOrderingPage.js +3 -3
  103. package/cypress/pages/multipleSelectionPage.js +77 -25
  104. package/cypress/pages/rulerPage.js +5 -0
  105. package/cypress/pages/singleSelectionPage.js +40 -1
  106. package/cypress/pages/videoResponsePage.js +1 -1
  107. package/package.json +2 -2
@@ -0,0 +1,450 @@
1
+ import { chartsBarPage, dialogBoxBase } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ describe('Create item: Charts- Bar : Select chart type', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Select chart type - Label options and Tick/Interval position section : Contents', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
15
+ chartsBarPage.steps.addTextInQuestionInstructionsInputField('Bar chart');
16
+ cy.barsPreLoaderWait();
17
+ });
18
+
19
+ it('Label options label should be displayed', () => {
20
+ utilities.verifyInnerText(chartsBarPage.labelOptionsLabel(), 'Label options');
21
+ utilities.verifyElementVisibilityState(chartsBarPage.labelOptionsLabel(), 'visible');
22
+ });
23
+
24
+ it('Allow students to edit label should be displayed', () => {
25
+ utilities.verifyInnerText(chartsBarPage.allowStudentsToEditLabel(), 'Allow students to edit');
26
+ utilities.verifyElementVisibilityState(chartsBarPage.allowStudentsToEditLabel(), 'visible');
27
+ });
28
+
29
+ it('Y Axis, X Axis and Bar labels labels and checkboxes should be displayed and by default, all the checkboxes should be checked', () => {
30
+ utilities.verifyInnerText(chartsBarPage.yAxisLabelSelectChartType(), 'Y Axis');
31
+ utilities.verifyElementVisibilityState(chartsBarPage.yAxisLabelSelectChartType(), 'visible');
32
+ chartsBarPage.steps.verifyYAxisCheckboxChecked();
33
+ utilities.verifyInnerText(chartsBarPage.xAxisLabelSelectChartType(), 'X Axis');
34
+ utilities.verifyElementVisibilityState(chartsBarPage.xAxisLabelSelectChartType(), 'visible');
35
+ chartsBarPage.steps.verifyXAxisCheckboxChecked();
36
+ utilities.verifyInnerText(chartsBarPage.barLabelsLabel(), 'Bar labels');
37
+ utilities.verifyElementVisibilityState(chartsBarPage.barLabelsLabel(), 'visible');
38
+ chartsBarPage.steps.verifyBarLabelsCheckboxChecked();
39
+ });
40
+
41
+ it('\'New bar label\' label and input field should be displayed and input field should be pre-filled by \'Bar\'', () => {
42
+ utilities.verifyInnerText(chartsBarPage.newBarLabelLabel(), 'New bar label');
43
+ utilities.verifyElementVisibilityState(chartsBarPage.newBarLabelLabel(), 'visible');
44
+ chartsBarPage.steps.verifyNewBarLabelInputFieldValue('Bar');
45
+ });
46
+
47
+ it('Tick/Interval position label should be displayed', () => {
48
+ utilities.verifyInnerText(chartsBarPage.tickIntervalPositionLabel(), 'Tick/Interval position');
49
+ utilities.verifyElementVisibilityState(chartsBarPage.tickIntervalPositionLabel(), 'visible');
50
+ });
51
+
52
+ it('Label location label should be displayed', () => {
53
+ utilities.verifyInnerText(chartsBarPage.labelLocationLabel(), 'Label location');
54
+ utilities.verifyElementVisibilityState(chartsBarPage.labelLocationLabel(), 'visible');
55
+ });
56
+
57
+ it('Centered and At interval labels and radio buttons should be displayed and by default Centered radio button should be selected', () => {
58
+ utilities.verifyInnerText(chartsBarPage.centeredLabel(), 'Centered');
59
+ utilities.verifyElementVisibilityState(chartsBarPage.centeredLabel(), 'visible');
60
+ utilities.verifyInnerText(chartsBarPage.atIntervalLabel(), 'At interval');
61
+ utilities.verifyElementVisibilityState(chartsBarPage.atIntervalLabel(), 'visible');
62
+ chartsBarPage.steps.verifyCenteredRadioButtonSelected();
63
+ });
64
+
65
+ it('CSS of Label options and Tick/Interval position section', { tags: 'css' }, () => {
66
+ utilities.verifyCSS(chartsBarPage.labelOptionsLabel(), {
67
+ 'color': css.color.labels,
68
+ 'font-size': css.fontSize.default,
69
+ 'font-weight': css.fontWeight.semibold
70
+ });
71
+ utilities.verifyCSS(chartsBarPage.allowStudentsToEditLabel(), {
72
+ 'color': css.color.labels,
73
+ 'font-size': css.fontSize.normal,
74
+ 'font-weight': css.fontWeight.semibold
75
+ });
76
+ utilities.verifyCSS(chartsBarPage.yAxisLabel(), {
77
+ 'color': css.color.labels,
78
+ 'font-size': css.fontSize.normal,
79
+ 'font-weight': css.fontWeight.regular
80
+ });
81
+ utilities.verifyCSS(chartsBarPage.yAxisCheckbox().parents('span').find('.checkbox-icon-border-rect'), {
82
+ 'fill': css.color.activeButtons
83
+ });
84
+ utilities.verifyCSS(chartsBarPage.xAxisLabelSelectChartType(), {
85
+ 'color': css.color.labels,
86
+ 'font-size': css.fontSize.normal,
87
+ 'font-weight': css.fontWeight.regular
88
+ });
89
+ utilities.verifyCSS(chartsBarPage.xAxisCheckbox().parents('span').find('.checkbox-icon-border-rect'), {
90
+ 'fill': css.color.activeButtons
91
+ });
92
+ utilities.verifyCSS(chartsBarPage.barLabelsLabel(), {
93
+ 'color': css.color.labels,
94
+ 'font-size': css.fontSize.normal,
95
+ 'font-weight': css.fontWeight.regular
96
+ });
97
+ utilities.verifyCSS(chartsBarPage.barLabelsCheckbox().parents('span').find('.checkbox-icon-border-rect'), {
98
+ 'fill': css.color.activeButtons
99
+ });
100
+ utilities.verifyCSS(chartsBarPage.newBarLabelLabel(), {
101
+ 'color': css.color.labels,
102
+ 'font-size': css.fontSize.normal,
103
+ 'font-weight': css.fontWeight.semibold
104
+ });
105
+ utilities.verifyCSS(chartsBarPage.newBarLabelInputField(), {
106
+ 'color': css.color.text,
107
+ 'font-size': css.fontSize.default,
108
+ 'font-weight': css.fontWeight.regular
109
+ });
110
+ utilities.verifyCSS(chartsBarPage.tickIntervalPositionLabel(), {
111
+ 'color': css.color.labels,
112
+ 'font-size': css.fontSize.default,
113
+ 'font-weight': css.fontWeight.semibold
114
+ });
115
+ utilities.verifyCSS(chartsBarPage.labelLocationLabel(), {
116
+ 'color': css.color.labels,
117
+ 'font-size': css.fontSize.normal,
118
+ 'font-weight': css.fontWeight.semibold
119
+ });
120
+ utilities.verifyCSS(chartsBarPage.centeredLabel(), {
121
+ 'color': css.color.labels,
122
+ 'font-size': css.fontSize.normal,
123
+ 'font-weight': css.fontWeight.regular
124
+ });
125
+ utilities.verifyCSS(chartsBarPage.atIntervalLabel(), {
126
+ 'color': css.color.labels,
127
+ 'font-size': css.fontSize.normal,
128
+ 'font-weight': css.fontWeight.regular
129
+ });
130
+ utilities.verifyCSS(chartsBarPage.centeredRadioButton().parents('span').find('[data-name="Radio button - Selected"]'), {
131
+ 'fill': css.color.activeButtons
132
+ });
133
+ utilities.verifyCSS(chartsBarPage.atIntervalRadioButton().parents('span').find('.radio-btn-deselected'), {
134
+ 'fill': css.color.uncheckedCheckbox
135
+ });
136
+ });
137
+
138
+ it('Accessibility of grid section', { tags: 'a11y' }, () => {
139
+ cy.checkAccessibility(chartsBarPage.labelOptionsLabel().parents('.ngie-charts-authoring'));
140
+ });
141
+ });
142
+
143
+ describe('Select chart type - Label options : Edit tab functionality', () => {
144
+ abortEarlySetup();
145
+ before(() => {
146
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
147
+ chartsBarPage.steps.addTextInQuestionInstructionsInputField('Bar chart');
148
+ cy.barsPreLoaderWait();
149
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 2, range: 10 });
150
+ chartsBarPage.steps.selectAddBarOrPointToolbarOption();
151
+ });
152
+
153
+ it('When Bar labels checkbox is checked and user selects a bar and clicks on bar label button then popup should be displayed with title \'Bar label\' and \'Add label\' label with input field should be displayed along with \'Save\' and \'Cancel\' button', () => {
154
+ utilities.triggerMouseover(utilities.getNthElement(chartsBarPage.specifyCorrectAnswerBar(), 0));
155
+ chartsBarPage.steps.clickOnBarTooltipBarLabelButton();
156
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
157
+ utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'Bar label');
158
+ utilities.verifyInnerText(chartsBarPage.titlePopupAddLabelLabel(), 'Add label');
159
+ utilities.verifyElementVisibilityState(chartsBarPage.titlePopupAddLabelInputField(), 'visible');
160
+ utilities.verifyInnerText(chartsBarPage.titlePopupSaveButton(), 'Save');
161
+ utilities.verifyInnerText(chartsBarPage.titlePopupCancelButton(), 'Cancel');
162
+ });
163
+
164
+ it('The input field should be prefilled with \'Bar #\'', () => {
165
+ chartsBarPage.steps.verifyTextInTitlePopupAddLabelInputField('Bar 1');
166
+ });
167
+
168
+ it('When the user edits the Bar label and clicks on \'Cancel\' button then the changes should not be displayed in the preview tab', () => {
169
+ chartsBarPage.steps.enterTextInTitlePopupAddLabelInputField('Day 1');
170
+ chartsBarPage.steps.clickOnTitlePopupCancelButton();
171
+ utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.specifyCorrectAnswerBarLabel(), 0), 'Bar 1');
172
+ });
173
+
174
+ it('When the user clicks on the \'Bar label\' then the original text should be displayed in the popup', () => {
175
+ utilities.triggerMouseover(utilities.getNthElement(chartsBarPage.specifyCorrectAnswerBar(), 0));
176
+ utilities.verifyInnerText(chartsBarPage.barAndPointTooltipLabelButton(), 'Bar 1');
177
+ chartsBarPage.steps.clickOnBarTooltipBarLabelButton();
178
+ chartsBarPage.steps.verifyTextInTitlePopupAddLabelInputField('Bar 1');
179
+ });
180
+
181
+ it('When the user clicks on \'Save\' after updating the input field the updated label should be displayed in the Preview tab', () => {
182
+ chartsBarPage.steps.enterTextInTitlePopupAddLabelInputField('Day 1');
183
+ chartsBarPage.steps.clickOnTitlePopupSaveButton();
184
+ utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.specifyCorrectAnswerBarLabel(), 0), 'Day 1');
185
+ });
186
+
187
+ it('Changes made to the bar label in the specify correct answer should not reflect for the charts in the Select chart type section and preview tab chart', () => {
188
+ utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.selectChartTypeBarLabel(), 0), 'Bar 1');
189
+ chartsBarPage.steps.switchToPreviewTab();
190
+ utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.previewTabBarLabel(), 0), 'Bar 1');
191
+ chartsBarPage.steps.switchToEditTab();
192
+ });
193
+
194
+ it('When user unchecks Bar labels checkbox, then on clicking on the bar label button for a bar, popup should not be displayed', () => {
195
+ chartsBarPage.steps.uncheckBarLabelsCheckbox();
196
+ utilities.triggerMouseover(utilities.getNthElement(chartsBarPage.specifyCorrectAnswerBar(), 0));
197
+ utilities.verifyElementVisibilityState(chartsBarPage.barAndPointTooltipLabelButton(), 'notExist');
198
+ });
199
+
200
+ it('When New bar label input field has \'Bar\' by default then \'Bar #\' labels in select chart type and specify correct answer section', () => {
201
+ chartsBarPage.steps.selectControlOptionSpecifyCorrectAnswer('Reset');
202
+ chartsBarPage.steps.confirmReset();
203
+ chartsBarPage.steps.verifyBarLabelSpecifyCorrectAnswer(0, 'Bar 1');
204
+ chartsBarPage.steps.verifyBarLabelSelectChartType(0, 'Bar 1');
205
+ });
206
+
207
+ it('When user updates the text in New bar label input field and adds a bar then added bar should have newly updated label and previously added bars should not be affected in select chart type and specify correct answer section', () => {
208
+ chartsBarPage.steps.updateNewBarLabelInputFieldValue('Day')
209
+ chartsBarPage.steps.addBarOrPointInChartInSpecifyCorrectAnswerSection();
210
+ chartsBarPage.steps.verifyBarLabelSpecifyCorrectAnswer(0, 'Bar 1');
211
+ chartsBarPage.steps.verifyBarLabelSelectChartType(0, 'Bar 1');
212
+ chartsBarPage.steps.verifyBarLabelSpecifyCorrectAnswer(1, 'Bar 2');
213
+ chartsBarPage.steps.verifyBarLabelSelectChartType(1, 'Bar 2');
214
+ chartsBarPage.steps.verifyBarLabelSpecifyCorrectAnswer(2, 'Bar 3');
215
+ chartsBarPage.steps.verifyBarLabelSelectChartType(2, 'Bar 3');
216
+ chartsBarPage.steps.verifyBarLabelSpecifyCorrectAnswer(3, 'Day 1');
217
+ });
218
+ });
219
+
220
+ describe('Select chart type - Label options : Preview tab functionality', () => {
221
+ abortEarlySetup();
222
+ before(() => {
223
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
224
+ chartsBarPage.steps.addTextInQuestionInstructionsInputField('Bar chart');
225
+ cy.barsPreLoaderWait();
226
+ });
227
+
228
+ it('When Y Axis checkbox is checked in edit tab and user clicks on Y axis label in preview tab then popup should be displayed with title \'Y axis label\' and \'Add label\' label with input field should be displayed along with \'Save\' and \'Cancel\' button', () => {
229
+ chartsBarPage.steps.clickOnXAxisLabelButtonInPreviewTab();
230
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
231
+ utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'Y axis label');
232
+ utilities.verifyInnerText(chartsBarPage.titlePopupAddLabelLabel(), 'Add label');
233
+ utilities.verifyElementVisibilityState(chartsBarPage.titlePopupAddLabelInputField(), 'visible');
234
+ utilities.verifyInnerText(chartsBarPage.titlePopupSaveButton(), 'Save');
235
+ utilities.verifyInnerText(chartsBarPage.titlePopupCancelButton(), 'Cancel');
236
+ });
237
+
238
+ it('The input field should be prefilled with \'Label\'', () => {
239
+ chartsBarPage.steps.verifyTextInTitlePopupAddLabelInputField('Label');
240
+ });
241
+
242
+ it('When the user edits the Y axis label and clicks on \'Cancel\' button then the changes should not be displayed in the preview tab', () => {
243
+ chartsBarPage.steps.enterTextInTitlePopupAddLabelInputField('Profit');
244
+ chartsBarPage.steps.clickOnTitlePopupCancelButton();
245
+ utilities.verifyInnerText(chartsBarPage.previewTabYAxisLabelButton(), 'Label');
246
+ });
247
+
248
+ it('When the user clicks on the \'Y axis label\' then the original text should be displayed in the popup', () => {
249
+ chartsBarPage.steps.clickOnXAxisLabelButtonInPreviewTab();
250
+ chartsBarPage.steps.verifyTextInTitlePopupAddLabelInputField('Label');
251
+ });
252
+
253
+ it('When the user clicks on \'Save\' after updating the input field the updated label should be displayed in the Preview tab', () => {
254
+ chartsBarPage.steps.enterTextInTitlePopupAddLabelInputField('Profit');
255
+ chartsBarPage.steps.clickOnTitlePopupSaveButton();
256
+ utilities.verifyInnerText(chartsBarPage.previewTabYAxisLabelButton(), 'Profit');
257
+ });
258
+
259
+ it('Changes made to the y axis label in the preview tab should not reflect for the charts in the edit tab', () => {
260
+ chartsBarPage.steps.switchToEditTab();
261
+ utilities.verifyInnerText(chartsBarPage.selectChartTypeYAxisLabelButton(), 'Label');
262
+ utilities.verifyInnerText(chartsBarPage.yAxisLabelSpecifyCorrectAnswer(), 'Label');
263
+ });
264
+
265
+ it('When user revisits preview tab, then previously made changes in Y axis label should no longer exist', () => {
266
+ chartsBarPage.steps.switchToPreviewTab();
267
+ utilities.verifyInnerText(chartsBarPage.previewTabYAxisLabelButton(), 'Label');
268
+ });
269
+
270
+ it('When user unchecks Y Axis label checkbox in edit tab, then on clicking on the x axis label, popup should not be displayed', () => {
271
+ chartsBarPage.steps.switchToEditTab();
272
+ chartsBarPage.steps.uncheckYAxisCheckbox();
273
+ chartsBarPage.steps.switchToPreviewTab();
274
+ chartsBarPage.steps.clickOnYAxisLabelButtonInPreviewTab();
275
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
276
+ });
277
+
278
+ it('When X Axis checkbox is checked in edit tab and user clicks on X axis label in preview tab then popup should be displayed with title \'X axis label\' and \'Add label\' label with input field should be displayed along with \'Save\' and \'Cancel\' button', () => {
279
+ chartsBarPage.steps.clickOnXAxisLabelButtonInPreviewTab();
280
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
281
+ utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'X axis label');
282
+ utilities.verifyInnerText(chartsBarPage.titlePopupAddLabelLabel(), 'Add label');
283
+ utilities.verifyElementVisibilityState(chartsBarPage.titlePopupAddLabelInputField(), 'visible');
284
+ utilities.verifyInnerText(chartsBarPage.titlePopupSaveButton(), 'Save');
285
+ utilities.verifyInnerText(chartsBarPage.titlePopupCancelButton(), 'Cancel');
286
+ });
287
+
288
+ it('The input field should be prefilled with \'Label\'', () => {
289
+ chartsBarPage.steps.verifyTextInTitlePopupAddLabelInputField('Label');
290
+ });
291
+
292
+ it('When the user edits the X axis label and clicks on \'Cancel\' button then the changes should not be displayed in the preview tab', () => {
293
+ chartsBarPage.steps.enterTextInTitlePopupAddLabelInputField('Days');
294
+ chartsBarPage.steps.clickOnTitlePopupCancelButton();
295
+ utilities.verifyInnerText(chartsBarPage.previewTabXAxisLabelButton(), 'Label');
296
+ });
297
+
298
+ it('When the user clicks on the \'X axis label\' then the original text should be displayed in the popup', () => {
299
+ chartsBarPage.steps.clickOnXAxisLabelButtonInPreviewTab();
300
+ chartsBarPage.steps.verifyTextInTitlePopupAddLabelInputField('Label');
301
+ });
302
+
303
+ it('When the user clicks on \'Save\' after updating the input field the updated label should be displayed in the Preview tab', () => {
304
+ chartsBarPage.steps.enterTextInTitlePopupAddLabelInputField('Days');
305
+ chartsBarPage.steps.clickOnTitlePopupSaveButton();
306
+ utilities.verifyInnerText(chartsBarPage.previewTabXAxisLabelButton(), 'Days');
307
+ });
308
+
309
+ it('Changes made to the x axis label in the preview tab should not reflect for the charts in the edit tab', () => {
310
+ chartsBarPage.steps.switchToEditTab();
311
+ utilities.verifyInnerText(chartsBarPage.xAxisLabelSpecifyCorrectAnswer(), 'Label');
312
+ utilities.verifyInnerText(chartsBarPage.xAxisLabel(), 'Label');
313
+ });
314
+
315
+ it('When user revisits preview tab, then previously made changes in x axis label should no longer exist', () => {
316
+ chartsBarPage.steps.switchToPreviewTab();
317
+ utilities.verifyInnerText(chartsBarPage.previewTabXAxisLabelButton(), 'Label');
318
+ });
319
+
320
+ it('When user unchecks X Axis label checkbox in edit tab, then on clicking on the x axis label, popup should not be displayed', () => {
321
+ chartsBarPage.steps.switchToEditTab();
322
+ chartsBarPage.steps.uncheckXAxisCheckbox();
323
+ chartsBarPage.steps.switchToPreviewTab();
324
+ chartsBarPage.steps.clickOnXAxisLabelButtonInPreviewTab();
325
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
326
+ });
327
+
328
+ it('When Bar labels checkbox is checked and user selects a bar and clicks on bar label button then popup should be displayed with title \'Bar label\' and \'Add label\' label with input field should be displayed along with \'Save\' and \'Cancel\' button', () => {
329
+ chartsBarPage.steps.switchToPreviewTab();
330
+ utilities.triggerMouseover(utilities.getNthElement(chartsBarPage.previewTabBar(), 0));
331
+ chartsBarPage.steps.clickOnBarTooltipBarLabelButton();
332
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
333
+ utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'Bar label');
334
+ utilities.verifyInnerText(chartsBarPage.titlePopupAddLabelLabel(), 'Add label');
335
+ utilities.verifyElementVisibilityState(chartsBarPage.titlePopupAddLabelInputField(), 'visible');
336
+ utilities.verifyInnerText(chartsBarPage.titlePopupSaveButton(), 'Save');
337
+ utilities.verifyInnerText(chartsBarPage.titlePopupCancelButton(), 'Cancel');
338
+ });
339
+
340
+ it('The input field should be prefilled with \'Bar #\'', () => {
341
+ chartsBarPage.steps.verifyTextInTitlePopupAddLabelInputField('Bar 1');
342
+ });
343
+
344
+ it('When the user edits the Bar label and clicks on \'Cancel\' button then the changes should not be displayed in the preview tab', () => {
345
+ chartsBarPage.steps.enterTextInTitlePopupAddLabelInputField('Day 1');
346
+ chartsBarPage.steps.clickOnTitlePopupCancelButton();
347
+ utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.previewTabBarLabel(), 0), 'Bar 1');
348
+ });
349
+
350
+ it('When the user clicks on the \'Bar label\' then the original text should be displayed in the popup', () => {
351
+ utilities.triggerMouseover(utilities.getNthElement(chartsBarPage.previewTabBar(), 0));
352
+ utilities.verifyInnerText(chartsBarPage.barAndPointTooltipLabelButton(), 'Bar 1');
353
+ chartsBarPage.steps.clickOnBarTooltipBarLabelButton();
354
+ chartsBarPage.steps.verifyTextInTitlePopupAddLabelInputField('Bar 1');
355
+ });
356
+
357
+ it('When the user clicks on \'Save\' after updating the input field the updated label should be displayed in the Preview tab', () => {
358
+ chartsBarPage.steps.enterTextInTitlePopupAddLabelInputField('Day 1');
359
+ chartsBarPage.steps.clickOnTitlePopupSaveButton();
360
+ utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.previewTabBarLabel(), 0), 'Day 1');
361
+ });
362
+
363
+ it('Changes made to the Bar label in the preview tab should not reflect for the charts in the edit tab', () => {
364
+ chartsBarPage.steps.switchToEditTab();
365
+ utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.selectChartTypeBarLabel(), 0), 'Bar 1');
366
+ utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.specifyCorrectAnswerBarLabel(), 0), 'Bar 1');
367
+ });
368
+
369
+ it('When user revisits preview tab, then previously made changes in Bar label should no longer exist', () => {
370
+ chartsBarPage.steps.switchToPreviewTab();
371
+ utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.previewTabBarLabel(), 0), 'Bar 1');
372
+ });
373
+
374
+ it('When user unchecks Bar label label checkbox in edit tab, then on clicking on the Bar label, popup should not be displayed', () => {
375
+ chartsBarPage.steps.switchToEditTab();
376
+ chartsBarPage.steps.uncheckBarLabelsCheckbox();
377
+ chartsBarPage.steps.switchToPreviewTab();
378
+ utilities.triggerMouseover(utilities.getNthElement(chartsBarPage.previewTabBar(), 0));
379
+ utilities.verifyElementVisibilityState(chartsBarPage.barAndPointTooltipLabelButton(), 'notExist');
380
+ });
381
+
382
+ it('When New bar label input field has \'Bar\' by default then \'Bar #\' labels in preview tab', () => {
383
+ utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.previewTabBarLabel(), 0), 'Bar 1');
384
+ });
385
+
386
+ it('When user updates the text in New bar label input field and adds a bar then added bar should have newly updated label in preview tab', () => {
387
+ chartsBarPage.steps.switchToEditTab();
388
+ chartsBarPage.steps.updateNewBarLabelInputFieldValue('Day');
389
+ chartsBarPage.steps.switchToPreviewTab();
390
+ chartsBarPage.steps.addBarOrPointInChartInPreviewTab();
391
+ utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.previewTabBarLabel(), 3), 'Day 1');
392
+ });
393
+ });
394
+
395
+ describe('Select chart type - Tick/Interval position : Edit tab functionality', () => {
396
+ abortEarlySetup();
397
+ before(() => {
398
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
399
+ chartsBarPage.steps.addTextInQuestionInstructionsInputField('Bar chart');
400
+ cy.barsPreLoaderWait();
401
+ });
402
+
403
+ it('When Centered radio button is selected then label location should be center in select chart type and specify correct answer section', () => {
404
+ chartsBarPage.steps.verifyCenteredRadioButtonSelected();
405
+ chartsBarPage.steps.verifyBarLabelCenteredSelectChartType();
406
+ chartsBarPage.steps.verifyBarLabelCenteredSpecifyCorrectAnswer();
407
+ });
408
+
409
+ it('When user selects At interval radio button, then label location should be at interval in select chart type and specify correct answer section', () => {
410
+ chartsBarPage.steps.selectAtIntervalRadioButton();
411
+ chartsBarPage.steps.verifyBarLabelAtIntervalSelectChartType();
412
+ chartsBarPage.steps.verifyBarLabelAtIntervalSpecifyCorrectAnswer();
413
+ });
414
+
415
+ it('When user selects Centered radio button again, then label location should change to center in select chart type and specify correct answer section', () => {
416
+ chartsBarPage.steps.selectCenteredRadioButton();
417
+ chartsBarPage.steps.verifyBarLabelCenteredSelectChartType();
418
+ chartsBarPage.steps.verifyBarLabelCenteredSpecifyCorrectAnswer();
419
+ });
420
+ });
421
+
422
+ describe('Select chart type - Tick/Interval position : Preview tab functionality', () => {
423
+ abortEarlySetup();
424
+ before(() => {
425
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
426
+ chartsBarPage.steps.addTextInQuestionInstructionsInputField('Bar chart');
427
+ cy.barsPreLoaderWait();
428
+ });
429
+
430
+ it('When Centered radio button is selected then label location should be center in preview tab', () => {
431
+ chartsBarPage.steps.verifyCenteredRadioButtonSelected();
432
+ chartsBarPage.steps.switchToPreviewTab();
433
+ chartsBarPage.steps.verifyBarLabelCenteredPreviewTab();
434
+ });
435
+
436
+ it('When user selects At interval radio button, then label location should be at interval in preview tab', () => {
437
+ chartsBarPage.steps.switchToEditTab();
438
+ chartsBarPage.steps.selectAtIntervalRadioButton();
439
+ chartsBarPage.steps.switchToPreviewTab();
440
+ chartsBarPage.steps.verifyBarLabelCenteredPreviewTab();
441
+ });
442
+
443
+ it('When user selects Centered radio button again, then label location should change to center in preview tab', () => {
444
+ chartsBarPage.steps.switchToEditTab();
445
+ chartsBarPage.steps.selectCenteredRadioButton();
446
+ chartsBarPage.steps.switchToPreviewTab();
447
+ chartsBarPage.steps.verifyBarLabelCenteredPreviewTab();
448
+ });
449
+ });
450
+ });
@@ -0,0 +1,91 @@
1
+ import { chartsBarPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ describe('Create Item page - Charts - Bar chart: Specify correct answer, Alternative correct answer', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Specify correct answer section - \'Correct\' accordion', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
15
+ chartsBarPage.steps.addTextInQuestionInstructionsInputField('Bar chart');
16
+ cy.barsPreLoaderWait();
17
+ });
18
+
19
+ chartsBarPage.tests.verifyAutoScoredSpecifyCorrectAnswerHeaderSectionContents('charts');
20
+
21
+ chartsBarPage.tests.verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
22
+ });
23
+
24
+ describe('Specify correct answer section - \'Alternative\' accordion', () => {
25
+ abortEarlySetup();
26
+ before(() => {
27
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
28
+ cy.barsPreLoaderWait();
29
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 2, range: 10 });
30
+ chartsBarPage.steps.lockBar(0);
31
+ });
32
+
33
+ it('\'+ Add alternative answer\' button should be present', () => {
34
+ utilities.verifyInnerText(chartsBarPage.alternativeAnswerButton(), 'Add alternative answer');
35
+ utilities.verifyElementVisibilityState(chartsBarPage.alternativeAnswerButton(), 'visible');
36
+ chartsBarPage.alternativeAnswerButton().verifyPseudoClassBeforeProperty('content', '""');
37
+ });
38
+
39
+ it('CSS of \'Add Alternative answer\' button', { tags: 'css' }, () => {
40
+ utilities.verifyCSS(chartsBarPage.alternativeAnswerButton().find('p'), {
41
+ 'color': css.color.activeButtons,
42
+ 'font-size': css.fontSize.default,
43
+ 'font-weight': css.fontWeight.regular
44
+ });
45
+ chartsBarPage.alternativeAnswerButton()
46
+ .verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
47
+ });
48
+
49
+ it('When user have not set correct answer in correct accordion, and clicks on \'+ Add alternative answer\' button then alternative accordion should be added and error message should not be displayed', () => {
50
+ chartsBarPage.steps.addAlternativeAnswerAccordion(1);
51
+ utilities.verifyElementVisibilityState(chartsBarPage.errorMessage(), 'notExist');
52
+ utilities.verifyElementVisibilityState(chartsBarPage.dialogBox(), 'notExist');
53
+ });
54
+
55
+ it('When user has added an alternative answer accordion, then the newly added alternative answer accordion should be in expanded state and the correct answer accordion should be in collapsed state', () => {
56
+ chartsBarPage.steps.verifyCorrectAnswerAccordionIsCollapsed();
57
+ chartsBarPage.steps.verifyAlternateAnswerAccordionIsExpanded(0);
58
+ });
59
+
60
+ chartsBarPage.tests.verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Alternative');
61
+
62
+ it('Locked dot column should be displayed in alternative accordion', () => {
63
+ chartsBarPage.steps.verifyLockedBarInSpecifyCorrectAnswer({ barIndex: 0, barValue: 2, range: 10 });
64
+ chartsBarPage.steps.verifyLockedBarIsUneditableInSpecifyCorrectAnswer(0);
65
+ });
66
+
67
+ it('User should be able to add another alternative answer for the question using \'Add alternative answer\' button and the label for this new accordion should be \'Alternative 2\'', () => {
68
+ chartsBarPage.steps.addAlternativeAnswerAccordion(1);
69
+ });
70
+
71
+ it('User should be able to remove alternative correct answer by clicking on the \'Delete\' icon button alongside alternative answer accordion and the label of the alternative answer accordions should get updated accordingly', () => {
72
+ cy.log('Set correct answer and points in alternative 2 accordion, then switch to alternative 1 accordion and click delete icon button');
73
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 1, value: 2, range: 10 })
74
+ chartsBarPage.steps.allotPoints(5);
75
+ chartsBarPage.steps.deleteAlternativeAnswerAccordion(0);
76
+ chartsBarPage.steps.verifyAlternativeAnswerAccordionNotExists(1);
77
+ chartsBarPage.steps.verifyAlternativeAnswerAccordionLabel(0);
78
+ });
79
+
80
+ it('When correct answers and points are set in alternative answer and user clicks on correct answer accordion, then correct answer accordion should be expanded and the alternative answer accordion should be collapsed', () => {
81
+ chartsBarPage.steps.expandCorrectAnswerAccordion();
82
+ chartsBarPage.steps.verifyAlternateAnswerAccordionIsCollapsed(0);
83
+ });
84
+
85
+ it('When user deletes a bar in correct accordion then it should be deleted and bars in alternate accordion should remain the same', () => {
86
+ chartsBarPage.steps.deleteBarInSpecifyCorrectAnswer(0);
87
+ chartsBarPage.steps.expandAlternativeAnswerAccordion(0);
88
+ utilities.verifyElementCount(chartsBarPage.specifyCorrectAnswerBar(), 3);
89
+ });
90
+ });
91
+ });
@@ -0,0 +1,73 @@
1
+ import { toolSettingsComponent } from "../../../pages/components";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ import { dialogBoxBase, chartsBarPage, rulerPage } from "../../../pages";
5
+
6
+ const css = Cypress.env('css');
7
+
8
+ describe('Create Item page: Tool settings', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Tool settings: Contents', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
17
+ });
18
+
19
+ toolSettingsComponent.tests.verifyToolSettingsContent();
20
+ });
21
+
22
+ describe('Tool settings: Edit tool settings', () => {
23
+ abortEarlySetup();
24
+ before(() => {
25
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
26
+ toolSettingsComponent.steps.expandToolSettingsAccordion();
27
+ });
28
+
29
+ it('When user clicks on edit icon for ruler tool, then popup for ruler tool settings should be displayed', () => {
30
+ toolSettingsComponent.steps.clickOnToolEditIcon(0);
31
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
32
+ });
33
+
34
+ it('When user modifies the settings for the ruler tool and clicks the \'Ok\' button, then ruler tool should enter selected state.', () => {
35
+ rulerPage.steps.expandUnitOfMeasurementDropdown();
36
+ rulerPage.steps.selectOptionFromUnitOfMeasurementDropdown('Inch');
37
+ rulerPage.steps.selectOptionFromLengthOfRulerOptions('12 in');
38
+ rulerPage.steps.selectColorBlock(1);
39
+ rulerPage.steps.expandRotationDropdown();
40
+ rulerPage.steps.selectOptionFromRotationDropdown('Allow rotation and display angle');
41
+ rulerPage.steps.enterInputToOpacityInputField(60);
42
+ rulerPage.steps.checkAddShowHideButtonCheckbox();
43
+ toolSettingsComponent.steps.clickOnOkButton();
44
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
45
+ toolSettingsComponent.steps.verifyToolSelectedState(0);
46
+ });
47
+
48
+ it('When user has made changes for ruler tool in edit tab then changes should be reflected in the ruler tool in the preview tab', () => {
49
+ cy.log('Switching to Preview Tab');
50
+ rulerPage.steps.switchToPreviewTab();
51
+ rulerPage.steps.verifyPreviewTabRulerVisibilityButtonLabel('Show');
52
+ rulerPage.steps.clickOnRulerVisibilityButton();
53
+ utilities.verifyElementVisibilityState(rulerPage.rulerPreviewTab(), 'visible');
54
+ rulerPage.steps.verifyLengthOfRulerInPreview('12in');
55
+ rulerPage.steps.verifyColorOfRulerInPreview(1);
56
+ rulerPage.steps.verifyRulerOpacityInPreview('0.6');
57
+ rulerPage.steps.verifyRotationButtonWithDegreeVisible();
58
+ });
59
+
60
+ it('CSS of the \'Hide ruler\' button', { tags: 'css' }, () => {
61
+ utilities.verifyCSS(rulerPage.rulerVisibilityButtonPreviewTab(), {
62
+ 'border': `1px solid ${css.color.activeButtons}`,
63
+ 'background-color': css.color.defaultBackground,
64
+ 'font-size': css.fontSize.normal,
65
+ 'font-weight': css.fontWeight.semibold
66
+ });
67
+ });
68
+
69
+ it('Accessibility of \'Hide ruler\' button', { tags: 'a11y' }, () => {
70
+ cy.checkAccessibility(rulerPage.rulerVisibilityButtonPreviewTab().parents('[class*="ItemEnginestyles__MainWrapper"]'));
71
+ });
72
+ });
73
+ });
@@ -127,7 +127,7 @@ describe('Create Item Page: drag and drop into categories: Preview tab', () => {
127
127
  dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(5);
128
128
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(6);
129
129
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
130
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotExists();
130
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale']], ['1', '2', '3', '4', '5']);
131
131
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
132
132
  });
133
133
 
@@ -23,14 +23,15 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
23
23
  dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Flying squirrel': 0, 'Eagle': 1, 'Peacock': 1, 'Ostrich': 3, 'Platypus': 4, 'Octopus': 5 });
24
24
  dragAndDropIntoCategoriesPage.steps.allotPoints(5);
25
25
  dragAndDropIntoCategoriesPage.steps.verifyPointsLabelAndPointsOnAnswerAccordion(1, '30');
26
- //dragAndDropIntoCategoriesPage.steps.checkAllowStudentToCheckAnswerCheckbox();
26
+ //dragAndDropIntoCategoriesPage.steps.checkAllowStudentToCheckAnswerCheckbox();
27
27
  dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
28
28
  });
29
29
 
30
30
  it('When the user selects \'Grading\' view without attempting the question, dropzone numeration and correct answer section with correct answers from the alternative accordion and respective dropzone numeration should be displayed', () => {
31
31
  dragAndDropIntoCategoriesPage.steps.switchToGradingView();
32
32
  dragAndDropIntoCategoriesPage.steps.verifyDropzoneCellNumeration(['1', '2', '3', '4', '5', '6']);
33
- dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'incorrect': 0, 'incorrect': 1, 'correct': 2, 'incorrect': 3, 'incorrect': 4, 'incorrect': 5 });
33
+ //Failing due to https://redmine.zeuslearning.com/issues/574339
34
+ // dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'incorrect': 0, 'incorrect': 1, 'correct': 2, 'incorrect': 3, 'incorrect': 4, 'incorrect': 5 });
34
35
  dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(0, 30);
35
36
  dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus']], ['1', '2', '4', '5', '6']);
36
37
  });