itemengine-cypress-automation 1.0.182-repoUpdate22April-92d01da.0 → 1.0.182

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
  2. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +5 -4
  3. package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +3 -64
  4. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
  5. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
  6. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
  7. package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +1 -29
  8. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
  10. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
  13. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
  18. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
  19. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -3
  20. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  21. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +0 -1
  22. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
  23. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
  24. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
  25. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
  26. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
  27. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
  28. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
  29. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
  30. package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
  31. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +0 -1
  32. package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
  33. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
  34. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
  35. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
  36. package/cypress/e2e/ILC/NumberLine/toolSettings.js +1 -2
  37. package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
  38. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +1 -49
  39. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
  40. package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
  41. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
  42. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +1 -0
  43. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +1 -0
  44. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +1 -0
  45. package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +1 -0
  46. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +1 -0
  47. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +1 -0
  48. package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +4 -5
  49. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +2 -2
  50. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
  51. package/cypress/fixtures/constants.js +1 -1
  52. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
  53. package/cypress/fixtures/theme/ilc.json +16 -16
  54. package/cypress/pages/audioPlayerPage.js +543 -55
  55. package/cypress/pages/brainingCampManipulativePage.js +1 -1
  56. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  57. package/cypress/pages/components/autoScoredStudentViewSettings.js +4 -4
  58. package/cypress/pages/components/commonComponents.js +0 -1
  59. package/cypress/pages/components/draggableOptionContainer.js +0 -1
  60. package/cypress/pages/components/equationEditorFlyout.js +2 -3
  61. package/cypress/pages/components/essayResponseCommonComponents.js +2 -8
  62. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +0 -1
  63. package/cypress/pages/components/imageCanvasComponent.js +1 -2
  64. package/cypress/pages/components/index.js +0 -1
  65. package/cypress/pages/components/optionsWrapperComponent.js +0 -11
  66. package/cypress/pages/components/toolSettingsComponent.js +0 -6
  67. package/cypress/pages/contentBlocksPage.js +2 -2
  68. package/cypress/pages/createItemPage.js +0 -29
  69. package/cypress/pages/dialogBoxBase.js +2 -2
  70. package/cypress/pages/drawingResponsePage.js +4 -23
  71. package/cypress/pages/feedbackScalePage.js +0 -3
  72. package/cypress/pages/graphingPage.js +0 -18
  73. package/cypress/pages/gridFillPage.js +2 -18
  74. package/cypress/pages/index.js +1 -1
  75. package/cypress/pages/itemPreviewSettingsPage.js +0 -4
  76. package/cypress/pages/listOrderingPage.js +647 -122
  77. package/cypress/pages/matchingPage.js +1 -1
  78. package/cypress/pages/multipleSelectionPage.js +1 -23
  79. package/cypress/pages/numberLinePage.js +59 -1196
  80. package/cypress/pages/rulerPage.js +2 -6
  81. package/cypress/pages/textSelectionPage.js +22 -460
  82. package/package.json +1 -1
  83. package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +0 -162
  84. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -216
  85. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -214
  86. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -251
  87. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +0 -52
  88. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +0 -243
  89. package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +0 -128
  90. package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +0 -176
  91. package/cypress/e2e/ILC/NumberLine/LayoutSection.js +0 -530
  92. package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +0 -119
  93. package/cypress/e2e/ILC/NumberLine/numberLineSection.js +0 -263
  94. package/cypress/e2e/ILC/TextSelection/additionalSettings.js +0 -125
  95. package/cypress/e2e/ILC/TextSelection/headerSection.js +0 -73
  96. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.smoke.js +0 -179
  97. package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +0 -89
  98. package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +0 -436
  99. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +0 -277
  100. package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +0 -222
  101. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +0 -260
  102. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +0 -380
  103. package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +0 -46
@@ -1,263 +0,0 @@
1
- import { numberLinePage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- import utilities from "../../../support/helpers/utilities";
4
- const css = Cypress.env('css');
5
- const displayNumbersOptions = ["Below line", "Above line"];
6
-
7
- describe('Number line: Number line section', () => {
8
- before(() => {
9
- cy.loginAs('admin');
10
- });
11
-
12
- describe('Number line section - Contents', () => {
13
- abortEarlySetup();
14
- before(() => {
15
- numberLinePage.steps.navigateToCreateQuestion('Number line');
16
- cy.barsPreLoaderWait();
17
- });
18
-
19
- it('Number line title and number line should be displayed', () => {
20
- utilities.verifyInnerText(numberLinePage.numberLineTitleNumberLineSection(), 'Number line title');
21
- utilities.verifyElementVisibilityState(numberLinePage.numberLineTitleNumberLineSection(), 'visible');
22
- utilities.verifyElementVisibilityState(numberLinePage.numberLineNumberLineSection(), 'visible');
23
- });
24
-
25
- it('Min label and input field should be displayed and by default, input field should have \'-10\' pre-filled in it', () => {
26
- utilities.verifyInnerText(numberLinePage.minLabel(), 'Min');
27
- utilities.verifyElementVisibilityState(numberLinePage.minLabel(), 'visible');
28
- utilities.verifyElementVisibilityState(numberLinePage.minInputField(), 'visible');
29
- numberLinePage.steps.verifyTextInMinInputField(-10);
30
- });
31
-
32
- it('Max label and input field should be displayed and by default, input field should have \'10\' pre-filled in it', () => {
33
- utilities.verifyInnerText(numberLinePage.maxLabel(), 'Max');
34
- utilities.verifyElementVisibilityState(numberLinePage.maxLabel(), 'visible');
35
- utilities.verifyElementVisibilityState(numberLinePage.maxInputField(), 'visible');
36
- numberLinePage.steps.verifyTextInMaxInputField(10);
37
- });
38
-
39
- it('Interval label and input field should be displayed and by default, input field should have \'1\' pre-filled in it', () => {
40
- utilities.verifyInnerText(numberLinePage.intervalLabel(), 'Interval');
41
- utilities.verifyElementVisibilityState(numberLinePage.intervalLabel(), 'visible');
42
- utilities.verifyElementVisibilityState(numberLinePage.intervalInputField(), 'visible');
43
- numberLinePage.steps.verifyTextInIntervalInputField(1);
44
- });
45
-
46
- it('Annotate every label and input field should be displayed and by default, input field should have \'1\' pre-filled in it', () => {
47
- utilities.verifyInnerText(numberLinePage.annotateEveryLabel(), 'Annotate every');
48
- utilities.verifyElementVisibilityState(numberLinePage.annotateEveryLabel(), 'visible');
49
- utilities.verifyElementVisibilityState(numberLinePage.annotateEveryInputField(), 'visible');
50
- numberLinePage.steps.verifyTextInAnnotateEveryInputField(1);
51
- });
52
-
53
- it(`Display numbers label and 2 options ${displayNumbersOptions} should be displayed and by default, ${displayNumbersOptions[0]} should be selected`, () => {
54
- utilities.verifyInnerText(numberLinePage.displayNumbersLabel(), 'Display numbers');
55
- utilities.verifyElementVisibilityState(numberLinePage.displayNumbersLabel(), 'visible');
56
- utilities.verifyElementVisibilityState(numberLinePage.displayNumbersToggleButton(), 'visible');
57
- utilities.verifyElementCount(numberLinePage.displayNumbersToggleButton(), 2);
58
- displayNumbersOptions.forEach((label, index) => {
59
- utilities.verifyInnerText(numberLinePage.displayNumbersToggleButton(label), label);
60
- utilities.verifyElementVisibilityState(numberLinePage.displayNumbersToggleButton(label), 'visible');
61
- });
62
- numberLinePage.steps.verifyDisplayNumbersToggleButtonSelected(displayNumbersOptions[0]);
63
- });
64
-
65
- it('CSS of number line section', { tags: 'css' }, () => {
66
- utilities.verifyCSS(numberLinePage.numberLineTitleNumberLineSection(), {
67
- 'color': css.color.activeButtons,
68
- 'font-size': css.fontSize.heading,
69
- 'font-weight': css.fontWeight.bold
70
- });
71
- utilities.verifyCSS(numberLinePage.intervalLabel(), {
72
- 'color': css.color.labels,
73
- 'font-size': css.fontSize.normal,
74
- 'font-weight': css.fontWeight.semibold
75
- });
76
- utilities.verifyCSS(numberLinePage.intervalInputField(), {
77
- 'color': css.color.text,
78
- 'font-size': css.fontSize.default,
79
- 'font-weight': css.fontWeight.regular
80
- });
81
- utilities.verifyCSS(numberLinePage.displayNumbersLabel(), {
82
- 'color': css.color.labels,
83
- 'font-size': css.fontSize.normal,
84
- 'font-weight': css.fontWeight.semibold
85
- });
86
- utilities.verifyCSS(numberLinePage.displayNumbersToggleButton(displayNumbersOptions[0]), {
87
- 'background-color': css.color.activeButtons,
88
- 'color':css.color.primaryBtn,
89
- 'font-size': css.fontSize.normal,
90
- 'font-weight': css.fontWeight.bold
91
- });
92
- utilities.verifyCSS(numberLinePage.displayNumbersToggleButton(displayNumbersOptions[1]), {
93
- 'background-color': css.color.transparent,
94
- 'color':css.color.closeIcon,
95
- 'font-size': css.fontSize.normal,
96
- 'font-weight': css.fontWeight.bold
97
- });
98
- });
99
-
100
- it('Accessibility of number line section contents', { tags: 'a11y' }, () => {
101
- cy.checkAccessibility(numberLinePage.numberLineNumberLineSection().parents('.number-line-grid-setting'));
102
- });
103
- });
104
-
105
- describe('Number line section - Edit tab', () => {
106
- abortEarlySetup();
107
- before(() => {
108
- numberLinePage.steps.navigateToCreateQuestion('Number line');
109
- cy.barsPreLoaderWait();
110
- });
111
-
112
- it('When the user clicks on the \'Number line title\' a popup with title \'Number line title\' and \'Add label\' label with input field should be displayed along with \'Save\' and \'Cancel\' button', () => {
113
- numberLinePage.steps.clickOnNumberLineTitle();
114
- utilities.verifyInnerText(numberLinePage.dialogBoxTitle(), 'Number line title');
115
- utilities.verifyInnerText(numberLinePage.titlePopupAddLabelLabel(), 'Add title');
116
- utilities.verifyElementVisibilityState(numberLinePage.titlePopupAddLabelInputField(), 'visible');
117
- utilities.verifyInnerText(numberLinePage.titlePopupSaveButton(), 'Save');
118
- utilities.verifyInnerText(numberLinePage.titlePopupCancelButton(), 'Cancel');
119
- });
120
-
121
- it('The input field should be prefilled with \'Number line title\' and the user should be able to edit it', () => {
122
- numberLinePage.steps.verifyTextInTitlePopupAddLabelInputField('Number line title');
123
- });
124
-
125
- it('When the user edits the Number line title and clicks on \'Cancel\' button then the changes should not be displayed in the Number line section and \'Specify correct answer\' section Number line', () => {
126
- numberLinePage.steps.enterTextInTitlePopupAddLabelInputField('Linear number scale');
127
- numberLinePage.steps.clickOnTitlePopupCancelButton();
128
- utilities.verifyInnerText(numberLinePage.numberLineTitleNumberLineSection(), 'Number line title');
129
- utilities.verifyInnerText(numberLinePage.numberLineTitleSpecifyCorrectAnswerSection(), 'Number line title');
130
- });
131
-
132
- it('When the user clicks on the \'Number line title\' then the original text should be displayed in the popup', () => {
133
- numberLinePage.steps.clickOnNumberLineTitle();
134
- numberLinePage.steps.verifyTextInTitlePopupAddLabelInputField('Number line title');
135
- });
136
-
137
- it('When the user clicks on \'Save\' after updating the input field the updated label should be displayed in the Number line section and \'Specify correct answer\' section Number line', () => {
138
- numberLinePage.steps.enterTextInTitlePopupAddLabelInputField('Linear number scale');
139
- numberLinePage.steps.clickOnTitlePopupSaveButton();
140
- utilities.verifyInnerText(numberLinePage.numberLineTitleNumberLineSection(), 'Linear number scale');
141
- utilities.verifyInnerText(numberLinePage.numberLineTitleSpecifyCorrectAnswerSection(), 'Linear number scale');
142
- });
143
-
144
- it('When user updates value in Min input field then it should be updated in Specify correct answer section', () => {
145
- numberLinePage.steps.enterTextInMinInputField(-12);
146
- numberLinePage.steps.verifyTextInMinInputField(-12);
147
- numberLinePage.steps.verifyLabelOnNumberLineNumberLineSection([{ value: -12, index: 0 }]);
148
- numberLinePage.steps.verifyLabelOnNumberLineSpecifyCorrectAnswerSection([{ value: -12, index: 0 }]);
149
- });
150
-
151
- it('When user updates value in Max input field then it should be updated in Specify correct answer section', () => {
152
- numberLinePage.steps.enterTextInMaxInputField(12);
153
- numberLinePage.steps.verifyTextInMaxInputField(12);
154
- numberLinePage.steps.verifyLabelOnNumberLineNumberLineSection([{ value: 12, index: 24 }]);
155
- numberLinePage.steps.verifyLabelOnNumberLineSpecifyCorrectAnswerSection([{ value: 12, index: 24 }]);
156
- });
157
-
158
- //Note- Can't check ticks are not annotated so adding it to manual sheet
159
- it('When user updates value in Interval input field then interval of labels and ticks should be updated in number line section and specify correct answer section', () => {
160
- numberLinePage.steps.enterTextInIntervalInputField(2);
161
- numberLinePage.steps.verifyTextInIntervalInputField(2);
162
- numberLinePage.steps.verifyLabelsVisibleOnNumberLineNumberLineSection(-12, 2);
163
- numberLinePage.steps.verifyLabelsVisibleOnNumberLineSpecifyCorrectAnswerSection(-12, 2);
164
- });
165
-
166
- //Note- Can't check ticks are not annotated so adding it to manual sheet
167
- it('When user updates value in Annotate every input field then labels should be annotated appropriately and ticks should not get annotated for the number line in the number line section and the specify correct answer section.', () => {
168
- cy.log('Changing interval input fields value to its default value');
169
- numberLinePage.steps.enterTextInIntervalInputField(1);
170
- numberLinePage.steps.enterTextInAnnotateEveryInputField(2);
171
- numberLinePage.steps.verifyTextInAnnotateEveryInputField(2);
172
- numberLinePage.steps.verifyAnnotatedLabelsOnNumberLineNumberLineSection(-12, 2);
173
- numberLinePage.steps.verifyAnnotatedLabelsOnNumberLineSpecifyCorrectAnswerSection(-12, 2);
174
- });
175
-
176
- it(`When ${displayNumbersOptions[0]} is selected then labels should be displayed below number line in the number line section and the specify correct answer section.`, () => {
177
- numberLinePage.steps.verifyDisplayNumbersToggleButtonSelected(displayNumbersOptions[0]);
178
- numberLinePage.steps.verifyDisplayNumbersOrientationNumberLineSection('Horizontal', 'Below');
179
- numberLinePage.steps.verifyDisplayNumbersOrientationSpecifyCorrectAnswerSection('Horizontal', 'Below');
180
- });
181
-
182
- it(`When user selects ${displayNumbersOptions[1]} then labels should labels should be displayed above number line in the number line section and the specify correct answer section.`, () => {
183
- numberLinePage.steps.selectDisplayNumbersToggleButton(displayNumbersOptions[1]);
184
- numberLinePage.steps.verifyDisplayNumbersOrientationNumberLineSection('Horizontal', 'Above');
185
- numberLinePage.steps.verifyDisplayNumbersOrientationSpecifyCorrectAnswerSection('Horizontal', 'Above');
186
- });
187
- });
188
-
189
- describe('Number line section - Preview tab', () => {
190
- abortEarlySetup();
191
- before(() => {
192
- numberLinePage.steps.navigateToCreateQuestion('Number line');
193
- cy.barsPreLoaderWait();
194
- });
195
-
196
- it('When the user edits the number line title and clicks on \'Cancel\' button then the changes should not be displayed in the preview tab', () => {
197
- numberLinePage.steps.clickOnNumberLineTitle();
198
- numberLinePage.steps.enterTextInTitlePopupAddLabelInputField('Linear number scale');
199
- numberLinePage.steps.clickOnTitlePopupCancelButton();
200
- numberLinePage.steps.switchToPreviewTab();
201
- utilities.verifyInnerText(numberLinePage.numberLineTitlePreviewTab(), 'Number line title');
202
- });
203
-
204
- it('When the user clicks on \'Save\' after updating the input field the updated label should be displayed in the preview tab', () => {
205
- numberLinePage.steps.switchToEditTab();
206
- numberLinePage.steps.clickOnNumberLineTitle();
207
- numberLinePage.steps.enterTextInTitlePopupAddLabelInputField('Linear number scale');
208
- numberLinePage.steps.clickOnTitlePopupSaveButton();
209
- numberLinePage.steps.switchToPreviewTab();
210
- utilities.verifyInnerText(numberLinePage.numberLineTitlePreviewTab(), 'Linear number scale');
211
- });
212
-
213
- it('When user updates value in Min input field then it should be updated in preview tab', () => {
214
- numberLinePage.steps.switchToEditTab();
215
- numberLinePage.steps.enterTextInMinInputField(-12);
216
- numberLinePage.steps.verifyTextInMinInputField(-12);
217
- numberLinePage.steps.switchToPreviewTab();
218
- numberLinePage.steps.verifyLabelOnNumberLinePreviewTab([{ value: -12, index: 0 }]);
219
- });
220
-
221
- it('When user updates value in Max input field then it should be updated in preview tab', () => {
222
- numberLinePage.steps.switchToEditTab();
223
- numberLinePage.steps.enterTextInMaxInputField(12);
224
- numberLinePage.steps.verifyTextInMaxInputField(12);
225
- numberLinePage.steps.switchToPreviewTab();
226
- numberLinePage.steps.verifyLabelOnNumberLinePreviewTab([{ value: 12, index: 24 }]);
227
- });
228
-
229
- //Note- Can't check ticks are not annotated so adding it to manual sheet
230
- it('When user updates value in Interval input field then interval of labels and ticks should be updated in preview tab', () => {
231
- numberLinePage.steps.switchToEditTab();
232
- numberLinePage.steps.enterTextInIntervalInputField(2);
233
- numberLinePage.steps.verifyTextInIntervalInputField(2);
234
- numberLinePage.steps.switchToPreviewTab();
235
- numberLinePage.steps.verifyLabelsVisibleOnNumberLinePreviewTab(-12, 2);
236
- });
237
-
238
- //Note- Can't check ticks are not annotated so adding it to manual sheet
239
- it('When user updates value in Annotate every input field then labels should be annotated appropriately for the number line and ticks should not get annotated in the preview tab.', () => {
240
- numberLinePage.steps.switchToEditTab();
241
- cy.log('Changing interval input fields value to its default value');
242
- numberLinePage.steps.enterTextInIntervalInputField(1);
243
- numberLinePage.steps.enterTextInAnnotateEveryInputField(2);
244
- numberLinePage.steps.verifyTextInAnnotateEveryInputField(2);
245
- numberLinePage.steps.switchToPreviewTab();
246
- numberLinePage.steps.verifyAnnotatedLabelsOnNumberLinePreviewTab(-12, 2);
247
- });
248
-
249
- it(`When ${displayNumbersOptions[0]} is selected then labels should be displayed below number line in the preview tab.`, () => {
250
- numberLinePage.steps.switchToEditTab();
251
- numberLinePage.steps.verifyDisplayNumbersToggleButtonSelected(displayNumbersOptions[0]);
252
- numberLinePage.steps.switchToPreviewTab();
253
- numberLinePage.steps.verifyDisplayNumbersOrientationPreviewTab('Horizontal', 'Below');
254
- });
255
-
256
- it(`When user selects ${displayNumbersOptions[1]} then labels should labels should be displayed above number line in the preview tab.`, () => {
257
- numberLinePage.steps.switchToEditTab();
258
- numberLinePage.steps.selectDisplayNumbersToggleButton(displayNumbersOptions[1]);
259
- numberLinePage.steps.switchToPreviewTab();
260
- numberLinePage.steps.verifyDisplayNumbersOrientationPreviewTab('Horizontal', 'Above');
261
- });
262
- });
263
- });
@@ -1,125 +0,0 @@
1
- import { textSelectionPage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- import utilities from "../../../support/helpers/utilities";
4
-
5
- const fontSizeDropdownOptions = ['Tiny', 'Small', 'Default', 'Normal', 'Big', 'Huge'];
6
- const fontSizes = ['12px', '14px', '16px', '18px', '22px', '26px'];
7
- const paragraphTextArray = ['All animals have a unique role to play in maintaining the balance of nature.', 'A lot of animal species exist in both, land and water. As a result, each of them has a purpose for their existence.', 'The animals divide into specific groups in biology. Amphibians are those which can live on both, land and water.', 'Mammals are ones which give birth to their offspring in the womb and have mammary glands.'];
8
-
9
- describe('Create Item page - Text selection : Additional settings', () => {
10
- before(() => {
11
- cy.loginAs('admin');
12
- });
13
-
14
- describe('Additional Settings accordion', () => {
15
- abortEarlySetup();
16
- before(() => {
17
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
18
- cy.barsPreLoaderWait();
19
- });
20
-
21
- textSelectionPage.tests.verifyAdditionalSettingsAccordionProperties();
22
- });
23
-
24
- describe('Additional settings: Font size contents', () => {
25
- abortEarlySetup();
26
- before(() => {
27
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
28
- cy.barsPreLoaderWait();
29
- textSelectionPage.steps.expandAdditionalSettings();
30
- });
31
-
32
- textSelectionPage.tests.verifyFontSizeSectionContents();
33
- });
34
-
35
- describe('Additional settings: Font size functionality edit tab', () => {
36
- abortEarlySetup();
37
- before(() => {
38
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
39
- cy.barsPreLoaderWait();
40
- textSelectionPage.steps.expandAdditionalSettings();
41
- textSelectionPage.steps.clearQuestionInputField();
42
- paragraphTextArray.forEach((paragraphText) => {
43
- textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
44
- });
45
- textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
46
- });
47
-
48
- fontSizeDropdownOptions.forEach((option, fontsIndex) => {
49
- it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the edit tab should change to ${option} accordingly`, () => {
50
- textSelectionPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontSizeDropdownOptions[fontsIndex]);
51
- utilities.verifyInnerText(textSelectionPage.fontSizeDropdown(), `${option}`);
52
- utilities.verifyCSS(textSelectionPage.specifyCorrectAnswerTextParagraphs(), {
53
- 'font-size': fontSizes[fontsIndex]
54
- });
55
- });
56
- });
57
- });
58
-
59
- describe('Additional settings: Font size functionality preview tab', () => {
60
- abortEarlySetup();
61
- before(() => {
62
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
63
- cy.barsPreLoaderWait();
64
- textSelectionPage.steps.expandAdditionalSettings();
65
- textSelectionPage.steps.clearQuestionInputField();
66
- paragraphTextArray.forEach((paragraphText) => {
67
- textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
68
- });
69
- textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
70
- textSelectionPage.steps.switchTextSelectionMode('Paragraph');
71
- textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
72
- textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[1]);
73
- textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
74
- textSelectionPage.steps.allotPoints(5);
75
- });
76
-
77
- fontSizeDropdownOptions.forEach((option, fontsIndex) => {
78
- it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview tab should change to ${option} accordingly`, () => {
79
- textSelectionPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontSizeDropdownOptions[fontsIndex]);
80
- utilities.verifyInnerText(textSelectionPage.fontSizeDropdown(), `${option}`);
81
- textSelectionPage.steps.switchToPreviewTab();
82
- utilities.verifyCSS(textSelectionPage.questionInstructionsText(), {
83
- 'font-size': fontSizes[fontsIndex]
84
- });
85
- utilities.verifyCSS(textSelectionPage.previewTabQuestionTextParagraphs(), {
86
- 'font-size': fontSizes[fontsIndex]
87
- });
88
- textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[1]);
89
- textSelectionPage.steps.switchToGradingView();
90
- utilities.verifyCSS(textSelectionPage.correctAnswersLabel(), {
91
- 'font-size': fontSizes[fontsIndex]
92
- });
93
- utilities.verifyCSS(textSelectionPage.optionCorrectAnswerSection(), {
94
- 'font-size': fontSizes[fontsIndex]
95
- });
96
- utilities.verifyCSS(textSelectionPage.correctIncorrectAnswerLabel(), {
97
- 'font-size': fontSizes[fontsIndex]
98
- });
99
- textSelectionPage.steps.switchToEditTab();
100
- });
101
- });
102
- });
103
-
104
- describe('Additional settings: Accessibility section', () => {
105
- abortEarlySetup();
106
- before(() => {
107
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
108
- cy.barsPreLoaderWait();
109
- textSelectionPage.steps.expandAdditionalSettings();
110
- });
111
-
112
- textSelectionPage.tests.verifyAdditionalSettingsAccessibilitySection();
113
- });
114
-
115
- describe('Additional Settings: Details section', () => {
116
- abortEarlySetup();
117
- before(() => {
118
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
119
- cy.barsPreLoaderWait();
120
- textSelectionPage.steps.expandAdditionalSettings();
121
- });
122
-
123
- textSelectionPage.tests.verifyDetailsSection();
124
- });
125
- });
@@ -1,73 +0,0 @@
1
- import abortEarlySetup from "../../../support/helpers/abortEarly";
2
- import { dialogBoxBase, textSelectionPage } from "../../../pages";
3
- const options = ['Bat', 'Eagle'];
4
-
5
- describe('Create item page - Text selection: Header section and Saving question', () => {
6
- before(() => {
7
- cy.loginAs('admin');
8
- });
9
-
10
- describe('Header section contents', () => {
11
- abortEarlySetup();
12
- before(() => {
13
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
14
- });
15
-
16
- textSelectionPage.tests.verifyCreateQuestionPageQuestionTypeHeader('Text selection');
17
- });
18
-
19
- describe('Tabs section', () => {
20
- abortEarlySetup();
21
- before(() => {
22
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
23
- });
24
-
25
- textSelectionPage.tests.verifyTabsSection();
26
- });
27
-
28
- describe('Cancel button', () => {
29
- abortEarlySetup();
30
- before(() => {
31
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
32
- });
33
-
34
- textSelectionPage.tests.verifyCancelButton('text selection')
35
- });
36
-
37
- describe('Save Question button', () => {
38
- abortEarlySetup();
39
- before(() => {
40
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
41
- cy.barsPreLoaderWait();
42
- });
43
-
44
- describe('Validation error messages', () => {
45
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
46
-
47
- it('Validation error messages should be displayed below required input fields', () => {
48
- textSelectionPage.steps.verifyQuestionInstructionsErrorMessage();
49
- textSelectionPage.steps.verifyPointsFieldErrorMessage();
50
- textSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
51
- textSelectionPage.steps.verifySpecifyCorrectAnswerErrorMessage();
52
- });
53
-
54
- it('Validation error messages should disappear when required input fields are filled', () => {
55
- textSelectionPage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
56
- textSelectionPage.steps.selectOptionInSpecifyPossibleOptionsSection('Custom', 'Lorem');
57
- textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection('Lorem');
58
- textSelectionPage.steps.allotPoints(10);
59
- textSelectionPage.steps.verifyErrorMessageIsNotDisplayed();
60
- textSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
61
- });
62
-
63
- textSelectionPage.tests.verifyCreateItemWrapperContentsA11y();
64
- });
65
-
66
- describe('Saving a question', () => {
67
- it('Clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
68
- textSelectionPage.steps.saveAQuestionAndVerifySnackbar();
69
- });
70
- textSelectionPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
71
- });
72
- });
73
- });
@@ -1,179 +0,0 @@
1
- import { textSelectionPage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- import utilities from "../../../support/helpers/utilities";
4
- const css = Cypress.env('css');
5
- const grepTags = Cypress.env('grepTags');
6
-
7
- describe('Create Item page - Text selection: Question Instructions and Question section', () => {
8
- before(() => {
9
- cy.loginAs('admin');
10
- });
11
-
12
- describe('Question Instructions input field - Edit tab', () => {
13
- abortEarlySetup();
14
- before(() => {
15
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
16
- cy.barsPreLoaderWait();
17
- });
18
-
19
- textSelectionPage.tests.verifyQuestionInstructionsInputFieldEditTab();
20
- });
21
-
22
- describe('Question Instructions input field - Preview tab', () => {
23
- abortEarlySetup();
24
- before(() => {
25
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
26
- cy.barsPreLoaderWait();
27
- });
28
-
29
- textSelectionPage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
30
- });
31
-
32
- describe('Question input field - Edit tab', () => {
33
- abortEarlySetup();
34
- before(() => {
35
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
36
- cy.barsPreLoaderWait();
37
- });
38
-
39
- it('\'Question\' label and input field should be displayed and by default in the question input field, sample \'Lorem Ipsum\' text should be present', () => {
40
- utilities.verifyInnerText(textSelectionPage.questionLabel(), 'Question');
41
- utilities.verifyInnerText(textSelectionPage.questionInputField(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\n\n\n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n\n\n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
42
- });
43
-
44
- it('The default sample \'Lorem Ipsum\' text in the question input field should also be displayed in specify possible options section and specify correct answer section in the edit tab.', () => {
45
- utilities.verifyInnerText(textSelectionPage.specifyPossibleOptionsTextFieldWrapper(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\n \n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n \n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
46
- utilities.verifyInnerText(textSelectionPage.specifyCorrectAnswerTextWrapper(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\n \n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n \n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
47
- });
48
-
49
- it('When the user removes all the text from the question input field and focuses out of it, an error message \'Error: Question is required.\' should be displayed', () => {
50
- textSelectionPage.steps.clearQuestionInputField();
51
- textSelectionPage.steps.focusOutOfQuestionInputField();
52
- utilities.verifyInnerText(textSelectionPage.errorMessage(), 'Error: Question is required.');
53
- textSelectionPage.steps.verifyErroredStateOfQuestionInputField();
54
- });
55
-
56
- textSelectionPage.tests.verifyErrorMessageCSSAndA11y();
57
-
58
- it('The user should be able to give input in the question input field, then the error message should disappear', () => {
59
- cy.log('Add Image to Question input field')
60
- textSelectionPage.steps.focusInQuestionInputField();
61
- textSelectionPage.steps.selectImageOptionFromCKEditorToolbar();
62
- textSelectionPage.steps.addImageToInputField();
63
- textSelectionPage.steps.verifyImageAndAltTextInQuestionInputField();
64
- textSelectionPage.steps.addInputToQuestionInputField('{enter}');
65
- cy.log('Add equation to Question input field')
66
- textSelectionPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
67
- textSelectionPage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
68
- textSelectionPage.steps.verifyEquationInQuestionInputField();
69
- textSelectionPage.steps.addInputToQuestionInputField('{rightarrow}{enter}');
70
- cy.log('Add bold text to input field')
71
- textSelectionPage.steps.focusInQuestionInputField();
72
- textSelectionPage.steps.selectBoldOptionFromCKEditorToolbar();
73
- textSelectionPage.steps.addInputToQuestionInputField('This is Bold text input.');
74
- textSelectionPage.steps.verifyBoldTextInQuestionInputField();
75
- textSelectionPage.steps.addInputToQuestionInputField('{enter}');
76
- cy.log('Add link to Question input field')
77
- textSelectionPage.steps.selectLinkOptionFromCKEditorToolbar();
78
- textSelectionPage.steps.addLinkToInputField();
79
- textSelectionPage.steps.verifyLinkInQuestionInputField();
80
- utilities.verifyElementVisibilityState(textSelectionPage.errorMessage(), 'notExist');
81
- textSelectionPage.steps.focusOutOfQuestionInputField();
82
- });
83
-
84
- it('CSS of Question label and Question input field contents', { tags: 'css' }, () => {
85
- utilities.verifyCSS(textSelectionPage.questionLabel(), {
86
- 'color': css.color.sectionHeading,
87
- 'font-size': css.fontSize.normal,
88
- 'font-weight': css.fontWeight.semibold
89
- });
90
- utilities.verifyCSS(textSelectionPage.questionInputField(), {
91
- 'color': css.color.text,
92
- 'font-size': css.fontSize.default,
93
- 'font-weight': css.fontWeight.regular,
94
- 'border': `1px solid ${css.color.figDefaultComponentBorder}`
95
- });
96
- utilities.verifyCSS(textSelectionPage.questionInputField().find('a'), {
97
- 'color': css.color.linkText,
98
- 'font-size': css.fontSize.default,
99
- 'font-weight': css.fontWeight.bold
100
- });
101
- });
102
-
103
- it('Image, equation, bold text and link added in Question input field should be properly displayed in specify possible options section', () => {
104
- textSelectionPage.steps.verifyImageAndAltTextInSpecifyPossibleOptionsSection();
105
- textSelectionPage.steps.verifyEquationInSpecifyPossibleOptionsSection();
106
- textSelectionPage.steps.verifyBoldTextInSpecifyPossibleOptionsSection();
107
- textSelectionPage.steps.verifyLinkInSpecifyPossibleOptionsSection();
108
- });
109
-
110
- it('Image, equation, bold text and link added in Question input field should be properly displayed in specify correct answer section', () => {
111
- textSelectionPage.steps.verifyImageAndAltTextInSpecifyCorrectAnswerSection();
112
- textSelectionPage.steps.verifyEquationInSpecifyCorrectAnswerSection();
113
- textSelectionPage.steps.verifyBoldTextInSpecifyCorrectAnswerSection();
114
- textSelectionPage.steps.verifyLinkInSpecifyCorrectAnswerSection();
115
- });
116
- });
117
-
118
- describe('Question field - Preview tab', () => {
119
- abortEarlySetup();
120
- before(() => {
121
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
122
- cy.barsPreLoaderWait();
123
- });
124
-
125
- it('In Preview tab, the sample \'Lorem Ipsum\' text should be displayed in the question field', () => {
126
- textSelectionPage.steps.switchToPreviewTab()
127
- utilities.verifyInnerText(textSelectionPage.questionTextWrapperPreviewTab(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\n \n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n \n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
128
- });
129
-
130
- it('The user should be able to edit text in the question input field and the updated question should be displayed in the preview tab', () => {
131
- cy.log('Switching to edit tab')
132
- textSelectionPage.steps.switchToEditTab();
133
- textSelectionPage.steps.clearQuestionInputField();
134
- cy.log('Add Image to Question input field')
135
- textSelectionPage.steps.focusInQuestionInputField();
136
- textSelectionPage.steps.selectImageOptionFromCKEditorToolbar();
137
- textSelectionPage.steps.addImageToInputField();
138
- textSelectionPage.steps.verifyImageAndAltTextInQuestionInputField();
139
- textSelectionPage.steps.addInputToQuestionInputField('{enter}');
140
- cy.log('Add equation to Question input field')
141
- textSelectionPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
142
- textSelectionPage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
143
- textSelectionPage.steps.verifyEquationInQuestionInputField();
144
- textSelectionPage.steps.addInputToQuestionInputField('{rightarrow}{enter}');
145
- cy.log('Add bold text to input field')
146
- textSelectionPage.steps.focusInQuestionInputField();
147
- textSelectionPage.steps.selectBoldOptionFromCKEditorToolbar();
148
- textSelectionPage.steps.addInputToQuestionInputField('This is Bold text input.');
149
- textSelectionPage.steps.verifyBoldTextInQuestionInputField();
150
- textSelectionPage.steps.addInputToQuestionInputField('{enter}');
151
- cy.log('Add link to Question input field')
152
- textSelectionPage.steps.selectLinkOptionFromCKEditorToolbar();
153
- textSelectionPage.steps.addLinkToInputField();
154
- textSelectionPage.steps.verifyLinkInQuestionInputField();
155
- utilities.verifyElementVisibilityState(textSelectionPage.errorMessage(), 'notExist');
156
- textSelectionPage.steps.focusOutOfQuestionInputField();
157
- cy.log('Switching to preview tab')
158
- textSelectionPage.steps.switchToPreviewTab();
159
- textSelectionPage.steps.verifyImageAndAltTextInPreviewTab();
160
- textSelectionPage.steps.verifyEquationInPreviewTab();
161
- textSelectionPage.steps.verifyBoldTextInPreviewTab();
162
- textSelectionPage.steps.verifyLinkInPreviewTab();
163
- });
164
-
165
- //Failing due to https://redmine.zeuslearning.com/issues/537907
166
- it('CSS of \'Preview tab\' when image, equation, bold text and link are added', { tags: 'css' }, () => {
167
- utilities.verifyCSS(textSelectionPage.questionTextWrapperPreviewTab().find('strong'), {
168
- 'color': css.color.text,
169
- 'font-size': css.fontSize.default,
170
- 'font-weight': css.fontWeight.bold
171
- });
172
- utilities.verifyCSS(textSelectionPage.questionTextWrapperPreviewTab().find('a'), {
173
- 'color': css.color.linkText,
174
- 'font-size': css.fontSize.default,
175
- 'font-weight': css.fontWeight.bold
176
- });
177
- });
178
- });
179
- });