itemengine-cypress-automation 1.0.105 → 1.0.107

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +129 -0
  2. package/cypress/e2e/ILC/AudioResponseNew/minimalRecorderStyle.js +482 -0
  3. package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +123 -0
  4. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.js +554 -0
  5. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +1 -41
  6. package/cypress/e2e/ILC/EditTabSettingPage/ItemPreviewSettingsTabContent.js +5 -3
  7. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +284 -0
  8. package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +412 -0
  9. package/cypress/e2e/ILC/EssayResponse/equationEditorCategories1.js +203 -0
  10. package/cypress/e2e/ILC/EssayResponse/equationEditorCategories2.js +340 -0
  11. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
  12. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
  13. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +336 -0
  14. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +332 -0
  15. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +522 -0
  16. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +253 -0
  17. package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +266 -0
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +57 -640
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +1 -2
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +209 -0
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +209 -0
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +303 -0
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingPenaltyScoring.js +68 -0
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsBasic.js +149 -0
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +218 -0
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +191 -0
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +219 -0
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +240 -0
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +124 -0
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +107 -0
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/manuallyAndNonScored.js +1 -1
  32. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +0 -2
  33. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +408 -0
  34. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +2 -2
  35. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
  36. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +2 -2
  37. package/cypress/e2e/ILC/MultipleSelection/headerSection.js +1 -0
  38. package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +0 -6
  39. package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +242 -0
  40. package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +99 -0
  41. package/cypress/e2e/ILC/Passage/passageEditTab.js +241 -0
  42. package/cypress/e2e/ILC/Passage/passageHeaderSection.js +73 -0
  43. package/cypress/e2e/ILC/Passage/passagePreviewTab.js +246 -0
  44. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +138 -33
  45. package/cypress/e2e/ILC/ReadingRuler/readingRulerHeaderSection.js +30 -6
  46. package/cypress/e2e/ILC/ReadingRuler/readingRulerPreviewTab.js +167 -101
  47. package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +1 -1
  48. package/cypress/e2e/ILC/SingleSelection/headerSection.js +20 -5
  49. package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +1 -0
  50. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +12 -7
  51. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +1336 -0
  52. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +419 -0
  53. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +443 -0
  54. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +411 -0
  55. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +411 -0
  56. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +3 -3
  57. package/cypress/fixtures/specialAndMathCharacters.js +2 -0
  58. package/cypress/fixtures/theme/ilc.json +4 -2
  59. package/cypress/pages/audioResponsePage.js +326 -165
  60. package/cypress/pages/components/additionalSettingsPanel.js +1 -1
  61. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +1 -1
  62. package/cypress/pages/components/backgroundImageUploadComponent.js +162 -2
  63. package/cypress/pages/components/colorPopupComponent.js +115 -26
  64. package/cypress/pages/components/customizeMathCharacterComponent.js +133 -0
  65. package/cypress/pages/components/customizeSpecialCharacterComponent.js +74 -4
  66. package/cypress/pages/components/editCategoryFlyout.js +164 -2
  67. package/cypress/pages/components/equationEditorFlyout.js +36 -1
  68. package/cypress/pages/components/essayResponseCommonComponents.js +0 -2
  69. package/cypress/pages/components/figOverImageCanvasComponent.js +587 -134
  70. package/cypress/pages/components/index.js +2 -1
  71. package/cypress/pages/components/playbackControlsBaseComponent.js +137 -2
  72. package/cypress/pages/correctAnswerViewPage.js +12 -1
  73. package/cypress/pages/drawingResponsePage.js +26 -151
  74. package/cypress/pages/essayResponseMathPage.js +28 -16
  75. package/cypress/pages/essayResponsePage.js +187 -7
  76. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +78 -14
  77. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +178 -221
  78. package/cypress/pages/fillInTheGapsOverImageTextPage.js +79 -0
  79. package/cypress/pages/multipleSelectionPage.js +1 -1
  80. package/cypress/pages/readingRulerPage.js +219 -104
  81. package/cypress/pages/singleSelectionPage.js +1 -0
  82. package/cypress/pages/textEntryMathPage.js +17 -6
  83. package/cypress/pages/videoResponsePage.js +0 -8
  84. package/package.json +1 -1
  85. package/scripts/sorry-cypress.mjs +1 -1
@@ -0,0 +1,412 @@
1
+ import { equationEditorCategoriesAndSymbols } from "../../../fixtures/equationEditorCategoriesAndSymbols ";
2
+ import { commonComponents, createCustomCategoryFlyout } from "../../../pages/components";
3
+ import { equationEditorFlyout } from "../../../pages/components/equationEditorFlyout";
4
+ import { essayResponsePage } from "../../../pages/essayResponsePage";
5
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
6
+ import utilities from "../../../support/helpers/utilities";
7
+ const css = Cypress.env('css');
8
+ const grepTags = Cypress.env('grepTags');
9
+
10
+ const defaultSelectedCategories = ['Keypad', 'Basic', 'Greek', 'Operators', 'Relationships', 'Arrows', 'Delimiters', 'Misc'];
11
+ const allCategories = Object.values(equationEditorCategoriesAndSymbols)
12
+
13
+ describe('Create question page - Essay Response: Equation Editor functionality', () => {
14
+ before(() => {
15
+ cy.loginAs('admin');
16
+ });
17
+
18
+ describe('Preview tab \'Equation Editor\' flyout', { tags: 'smoke' }, () => {
19
+ abortEarlySetup();
20
+ before(() => {
21
+ essayResponsePage.steps.navigateToCreateQuestion('essay response');
22
+ cy.barsPreLoaderWait();
23
+ essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
24
+ essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor']);
25
+ essayResponsePage.steps.switchToPreviewTab();
26
+ });
27
+
28
+ it('The \'Equation Editor\' icon should be displayed in the preview tab toolbar', () => {
29
+ utilities.verifyElementVisibilityState(essayResponsePage.previewTabToolbarOption('Equation Editor'), 'visible');
30
+ });
31
+
32
+ it('When user clicks on \'Equation Editor\' icon in preview tab toolbar, then Equation Editor flyout should appear with the title \'Equation editor\'', () => {
33
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
34
+ utilities.verifyElementVisibilityState(equationEditorFlyout.dialogBox(), 'visible');
35
+ utilities.verifyElementVisibilityState(equationEditorFlyout.dialogBoxTitle(), 'visible');
36
+ utilities.verifyInnerText(equationEditorFlyout.dialogBoxTitle(), 'Equation editor');
37
+ });
38
+
39
+ it('Ok button should be displayed at the bottom of the flyout', () => {
40
+ utilities.verifyElementVisibilityState(equationEditorFlyout.buttonOk(), 'visible');
41
+ utilities.verifyInnerText(equationEditorFlyout.buttonOk(), 'Ok');
42
+ });
43
+
44
+ it('Equation Editor input field should be displayed and should have cursor by default', () => {
45
+ equationEditorFlyout.steps.verifyDefaultEquationEditorInputFieldWithCursor();
46
+ });
47
+
48
+ it('All the default selected categories in the \'Equation Editor\' section should be displayed and first category must be selected by default in the \'Equation Editor\' flyout', () => {
49
+ equationEditorFlyout.steps.verifyEquationEditorCategoryTiles(defaultSelectedCategories);
50
+ equationEditorFlyout.steps.verifyCategoryTileSelectedInEquationEditor('Keypad')
51
+ });
52
+
53
+ it('CSS of \'Equation Editor\' flyout', { tags: 'css' }, () => {
54
+ utilities.verifyCSS(equationEditorFlyout.dialogBoxTitle(), {
55
+ 'color': css.color.flyoutTitle,
56
+ 'font-size': css.fontSize.heading,
57
+ 'font-weight': css.fontWeight.semibold
58
+ });
59
+ cy.log('CSS of selected category')
60
+ utilities.getNthElement(equationEditorFlyout.categoryTab(), 0)
61
+ .within(() => {
62
+ utilities.verifyCSS(equationEditorFlyout.categoryTabTitle(), {
63
+ 'color': css.color.activeButtons,
64
+ 'font-size': css.fontSize.small,
65
+ 'font-weight': css.fontWeight.regular
66
+ });
67
+ utilities.verifyCSS(equationEditorFlyout.categoryTabIcon(), {
68
+ 'color': css.color.activeButtons,
69
+ 'font-size': css.fontSize.default,
70
+ 'font-weight': css.fontWeight.regular
71
+ });
72
+ });
73
+ cy.log('CSS of unselected category')
74
+ utilities.getNthElement(equationEditorFlyout.categoryTab(), 0)
75
+ .within(() => {
76
+ utilities.verifyCSS(equationEditorFlyout.categoryTabTitle(), {
77
+ 'color': css.color.secondaryBtn,
78
+ 'font-size': css.fontSize.small,
79
+ 'font-weight': css.fontWeight.regular
80
+ });
81
+ utilities.verifyCSS(equationEditorFlyout.categoryTabIcon(), {
82
+ 'color': css.color.secondaryBtn,
83
+ 'font-size': css.fontSize.default,
84
+ 'font-weight': css.fontWeight.regular
85
+ });
86
+ });
87
+ utilities.verifyCSS(equationEditorFlyout.previewInputField(), {
88
+ 'background-color': css.color.transparent
89
+ });
90
+ utilities.verifyCSS(equationEditorFlyout.buttonCancel(), {
91
+ 'color': css.color.secondaryBtn,
92
+ 'font-size': css.fontSize.default,
93
+ 'font-weight': css.fontWeight.semibold,
94
+ 'background-color': css.color.secondaryBtnBg,
95
+ });
96
+ utilities.verifyCSS(equationEditorFlyout.buttonOk(), {
97
+ 'color': css.color.whiteText,
98
+ 'font-size': css.fontSize.default,
99
+ 'font-weight': css.fontWeight.semibold,
100
+ 'background-color': css.color.primaryBtnBg,
101
+ });
102
+ });
103
+
104
+ it('Accessibility of \'Equation Editor\' flyout', { tags: 'a11y' }, () => {
105
+ cy.checkAccessibility(equationEditorFlyout.dialogBox())
106
+ });
107
+
108
+ it('Cancel button should be displayed in the flyout and when user clicks the \'Cancel\' button then the flyout should close', () => {
109
+ utilities.verifyElementVisibilityState(equationEditorFlyout.buttonCancel(), 'visible');
110
+ utilities.verifyInnerText(equationEditorFlyout.buttonCancel(), 'Cancel');
111
+ equationEditorFlyout.steps.clickOnEquationEditorCancelButton();
112
+ utilities.verifyElementVisibilityState(equationEditorFlyout.dialogBox(), 'notExist');
113
+ });
114
+ });
115
+
116
+ if (!grepTags || !grepTags.includes('smoke')) {
117
+ describe('Equation Editor: Next and Previous button', () => {
118
+ abortEarlySetup();
119
+ before(() => {
120
+ essayResponsePage.steps.navigateToCreateQuestion('essay response');
121
+ cy.barsPreLoaderWait();
122
+ essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
123
+ essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor']);
124
+ essayResponsePage.steps.deselectCategoryInEquationEditorSectionEditTab('Misc');
125
+ essayResponsePage.steps.switchToPreviewTab();
126
+ });
127
+
128
+ it('When the selected number of equation categories fit the dialog box width then \'Next button\' and \'Previous button\' should not be displayed in the equation editor flyout', () => {
129
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
130
+ utilities.verifyElementVisibilityState(equationEditorFlyout.buttonNext(), 'notExist');
131
+ utilities.verifyElementVisibilityState(equationEditorFlyout.buttonPrevious(), 'notExist');
132
+ });
133
+
134
+ it('When the selected number of equation categories do not fit the dialog box width then \'Next button\' and \'Previous button\' should be displayed in the equation editor flyout', () => {
135
+ cy.log('Pre step: Switch to Edit tab and select all categories from the Equation Editor section')
136
+ essayResponsePage.steps.switchToEditTab();
137
+ essayResponsePage.steps.selectingCategories([`${equationEditorCategoriesAndSymbols['misc'].displayName}`, `${equationEditorCategoriesAndSymbols['matrices'].displayName}`, `${equationEditorCategoriesAndSymbols['trigonometry'].displayName}`, `${equationEditorCategoriesAndSymbols['units'].displayName}`, `${equationEditorCategoriesAndSymbols['calculus'].displayName}`, `${equationEditorCategoriesAndSymbols['geometry'].displayName}`]);
138
+ cy.log('Switching to Preview tab')
139
+ essayResponsePage.steps.switchToPreviewTab()
140
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
141
+ utilities.verifyElementVisibilityState(equationEditorFlyout.buttonNext(), 'visible');
142
+ utilities.verifyElementVisibilityState(equationEditorFlyout.buttonPrevious(), 'visible');
143
+ });
144
+
145
+ it('CSS of \'Next button\' and \'Previous button\'', { tags: 'css' }, () => {
146
+ utilities.verifyCSS(equationEditorFlyout.buttonPrevious().find('svg'), {
147
+ 'background-color': css.color.defaultBackground
148
+ });
149
+ utilities.verifyCSS(equationEditorFlyout.buttonPrevious().find('svg').find('path'), {
150
+ 'fill': css.color.nextPreviousButtonFill
151
+ });
152
+ utilities.verifyCSS(equationEditorFlyout.buttonNext().find('svg'), {
153
+ 'background-color': css.color.defaultBackground
154
+ });
155
+ utilities.verifyCSS(equationEditorFlyout.buttonNext().find('svg').find('path'), {
156
+ 'fill': css.color.nextPreviousButtonFill
157
+ });
158
+ });
159
+
160
+ it('Accessibility of \'Next button\' and \'Previous button\'', { tags: 'a11y' }, () => {
161
+ cy.checkAccessibility(equationEditorFlyout.buttonPrevious());
162
+ cy.checkAccessibility(equationEditorFlyout.buttonNext());
163
+ });
164
+
165
+ it('By default, the \'Previous button\' should be disabled and \'Next button\' should be enabled on opening the flyout as user is at the beginning of the tablist', () => {
166
+ utilities.verifyElementDisabled(equationEditorFlyout.buttonPrevious());
167
+ utilities.verifyElementNotDisabled(equationEditorFlyout.buttonNext());
168
+ });
169
+
170
+ it('When user clicks on the \'Next button\', the \'Previous button\' and the \'Next button\' both should get enabled, When the user reaches end of the tablist the \'Next button\' should get disabled and \'Previous button\' should remain enabled.', () => {
171
+ equationEditorFlyout.steps.clickOnEquationEditorButtonNext();
172
+ utilities.verifyElementNotDisabled(equationEditorFlyout.buttonPrevious());
173
+ utilities.verifyElementNotDisabled(equationEditorFlyout.buttonNext());
174
+ cy.log('Clicking on Next button to reach end of tablist')
175
+ equationEditorFlyout.steps.clickOnEquationEditorButtonNext()
176
+ utilities.verifyElementNotDisabled(equationEditorFlyout.buttonPrevious());
177
+ utilities.verifyElementDisabled(equationEditorFlyout.buttonNext());
178
+ });
179
+
180
+ it('When user clicks on the \'Previous button\', and reaches the beginning of the tablist \'Previous button\' should become disabled and \'Next button\' should become enabled', () => {
181
+ equationEditorFlyout.steps.clickOnEquationEditorButtonPrevious()
182
+ equationEditorFlyout.steps.clickOnEquationEditorButtonPrevious()
183
+ utilities.verifyElementDisabled(equationEditorFlyout.buttonPrevious());
184
+ utilities.verifyElementNotDisabled(equationEditorFlyout.buttonNext());
185
+ });
186
+ });
187
+ }
188
+
189
+ if (!grepTags || !grepTags.includes('smoke')) {
190
+ describe('Edit tab Equation Editor section', () => {
191
+ abortEarlySetup();
192
+ before(() => {
193
+ essayResponsePage.steps.navigateToCreateQuestion('essay response');
194
+ cy.barsPreLoaderWait();
195
+ essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
196
+ essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
197
+ });
198
+
199
+ it('The \'Equation Editor\' should be displayed along with helper text \'Select the categories to display to the students in the equation editor.\' and \'Create custom category\' button should be displayed', () => {
200
+ utilities.verifyElementVisibilityState(essayResponsePage.equationEditorSectionTitle(), 'visible');
201
+ utilities.verifyInnerText(essayResponsePage.equationEditorSectionTitle(), 'Equation editor');
202
+ utilities.verifyElementVisibilityState(essayResponsePage.equationEditorSectionHelperText(), 'visible');
203
+ utilities.verifyInnerText(essayResponsePage.equationEditorSectionHelperText(), 'Select the categories to display to the students in the equation editor.');
204
+ utilities.verifyElementVisibilityState(createCustomCategoryFlyout.createCustomCategoryButton(), 'visible');
205
+ utilities.verifyInnerText(createCustomCategoryFlyout.createCustomCategoryButton(), 'Create custom category');
206
+ });
207
+
208
+ it('All the categories should be displayed with a drag icon should and an Edit icon should be displayed below all the categories irrespective of their selected state', () => {
209
+ essayResponsePage.steps.verifyDefaultCategoriesDisplayedInEquationEditorSectionEditTab();
210
+ });
211
+
212
+ it('When user hovers on a category with a long name, then a tooltip should be displayed.', () => {
213
+ let categoriesWithTooltip = [`${equationEditorCategoriesAndSymbols['relationships'].displayName}`, `${equationEditorCategoriesAndSymbols['trigonometry'].displayName}`, `${equationEditorCategoriesAndSymbols['calculus'].displayName}`, `${equationEditorCategoriesAndSymbols['geometry'].displayName}`];
214
+ essayResponsePage.steps.verifyTooltipsOfCategoryTilesInEquationEditorSectionEditTab(categoriesWithTooltip);
215
+ });
216
+
217
+ it(`By default, ${defaultSelectedCategories.toString()} should be selected`, () => {
218
+ defaultSelectedCategories.forEach((category) => {
219
+ essayResponsePage.steps.verifySelectedCategoryInEquationEditorSectionEditTab(category);
220
+ });
221
+ });
222
+
223
+ it('CSS of selected and deselected category', { tags: 'css' }, () => {
224
+ cy.log('CSS of selected category')
225
+ utilities.verifyCSS(utilities.getNthElement(essayResponsePage.equationEditorSectionCategories(), 0), {
226
+ 'background-color': css.color.activeButtons
227
+ });
228
+ utilities.verifyCSS(utilities.getNthElement(essayResponsePage.equationEditorSectionCategories(), 0))
229
+ .within(() => {
230
+ utilities.verifyCSS(essayResponsePage.equationEditorSectionCategoryLabel(), {
231
+ 'color': css.color.primaryBtn,
232
+ 'font-size': css.fontSize.small,
233
+ 'font-weight': css.fontWeight.regular
234
+ });
235
+ utilities.verifyCSS(essayResponsePage.equationEditorSectionTickIcon().find('[data-name*="Icon"]'), {
236
+ 'fill': css.color.activeButtons
237
+ });
238
+ utilities.verifyCSS(essayResponsePage.equationEditorSectionCategoriesDragIcon().find('path'), {
239
+ 'fill': css.color.activeButtons
240
+ });
241
+ });
242
+ cy.log('CSS of deselected category')
243
+ utilities.verifyCSS(utilities.getNthElement(essayResponsePage.equationEditorSectionCategories(), 12), {
244
+ 'background-color': css.color.primaryBtn
245
+ });
246
+ utilities.verifyCSS(utilities.getNthElement(essayResponsePage.equationEditorSectionCategories(), 12))
247
+ .within(() => {
248
+ utilities.verifyCSS(essayResponsePage.equationEditorSectionCategoryLabel(), {
249
+ 'color': css.color.secondaryBtn,
250
+ 'font-size': css.fontSize.small,
251
+ 'font-weight': css.fontWeight.regular
252
+ });
253
+ utilities.verifyCSS(essayResponsePage.equationEditorSectionCategoriesDragIcon().find('path'), {
254
+ 'fill': css.color.secondaryBtn
255
+ });
256
+ });
257
+ });
258
+
259
+ it('Accessibility of selected and deselected category', { tags: 'a11y' }, () => {
260
+ cy.checkAccessibility(essayResponsePage.equationEditorSectionCategories().contains(`${equationEditorCategoriesAndSymbols['keypad'].displayName}`).parents('[class*="DraggableItemsGrid"]'))
261
+ });
262
+
263
+ it('User should be able select and deselect a category and it should be reflected in the Equation Editor flyout and the first category should be selected by default', () => {
264
+ cy.log('Selecting and deselecting a category')
265
+ essayResponsePage.steps.deselectACategoryInEquationEditorSectionEditTab(`${equationEditorCategoriesAndSymbols['keypad'].displayName}`);
266
+ essayResponsePage.steps.selectACategoryInEquationEditorSectionEditTab(`${equationEditorCategoriesAndSymbols['geometry'].displayName}`);
267
+ cy.log('Switching to Preview tab')
268
+ essayResponsePage.steps.switchToPreviewTab();
269
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
270
+ equationEditorFlyout.steps.verifyCategoryNotDisplayedInEquationEditor(`${equationEditorCategoriesAndSymbols['keypad'].displayName}`);
271
+ equationEditorFlyout.steps.verifyCategoryTileSelectedInEquationEditor(`${equationEditorCategoriesAndSymbols['basic'].displayName}`);
272
+ equationEditorFlyout.steps.clickOnEquationEditorButtonNext()
273
+ equationEditorFlyout.steps.verifyCategoryIsDisplayedInEquationEditor(`${equationEditorCategoriesAndSymbols['geometry'].displayName}`);
274
+ });
275
+
276
+ it('On deselecting all the categories an error message should be displayed \'Error: Please select a category.\' and the preview tab Equation Editor flyout should be empty', () => {
277
+ cy.log('Pre step: Switching to Edit tab')
278
+ essayResponsePage.steps.switchToEditTab();
279
+ essayResponsePage.steps.selectingCategories([`${equationEditorCategoriesAndSymbols['basic'].displayName}`, `${equationEditorCategoriesAndSymbols['greek'].displayName}`, `${equationEditorCategoriesAndSymbols['operators'].displayName}`, `${equationEditorCategoriesAndSymbols['relationships'].displayName}`, `${equationEditorCategoriesAndSymbols['arrows'].displayName}`, `${equationEditorCategoriesAndSymbols['delimiters'].displayName}`, `${equationEditorCategoriesAndSymbols['misc'].displayName}`, `${equationEditorCategoriesAndSymbols['geometry'].displayName}`]);
280
+ utilities.verifyInnerText(essayResponsePage.selectACategoryErrorMessage(), 'Error: Please select a category.');
281
+ cy.log('Switching to Preview tab')
282
+ essayResponsePage.steps.switchToPreviewTab();
283
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
284
+ utilities.verifyElementVisibilityState(equationEditorFlyout.dialogBox(), 'visible');
285
+ utilities.verifyElementVisibilityState(equationEditorFlyout.categoryTabTitle(), 'notExist');
286
+ utilities.verifyElementVisibilityState(equationEditorFlyout.categoryCharactersWrapper(), 'notExist');
287
+ cy.log('Post step: Switching to Edit tab')
288
+ essayResponsePage.steps.switchToEditTab();
289
+ });
290
+
291
+ //https://redmine.zeuslearning.com/issues/530205
292
+ it('CSS of error message', { tags: 'css' }, () => {
293
+ utilities.verifyCSS(essayResponsePage.selectACategoryErrorMessage(), {
294
+ 'color': css.color.errorText,
295
+ 'font-size': css.fontSize.small,
296
+ 'font-weight': css.fontWeight.regular
297
+ });
298
+ });
299
+
300
+ it('Accessibility of error message', { tags: 'a11y' }, () => {
301
+ cy.checkAccessibility(essayResponsePage.selectACategoryErrorMessage());
302
+ });
303
+
304
+ it('When user selects any category then the error message should disappear', () => {
305
+ essayResponsePage.steps.selectACategoryInEquationEditorSectionEditTab(`${equationEditorCategoriesAndSymbols['keypad'].displayName}`);
306
+ utilities.verifyElementVisibilityState(essayResponsePage.selectACategoryErrorMessage(), 'notExist');
307
+ });
308
+
309
+ it('When user re-selects the Equation Editor icon then only the previously selected category category should appear in selected state', () => {
310
+ const deselectedCategoriesArray = Object.values(equationEditorCategoriesAndSymbols).map((category) => category.displayName).slice(1)
311
+ essayResponsePage.steps.deselectCustomizedFormattingOption(['Equation Editor']);
312
+ utilities.verifyElementVisibilityState(essayResponsePage.equationEditorSection(), 'notExist');
313
+ essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor']);
314
+ essayResponsePage.steps.verifySelectedCategoryInEquationEditorSectionEditTab(`${equationEditorCategoriesAndSymbols['keypad'].displayName}`);
315
+ deselectedCategoriesArray.forEach((categoryName) => {
316
+ essayResponsePage.steps.verifyDeselectedCategoryInEquationEditorSectionEditTab(categoryName);
317
+ });
318
+ });
319
+ });
320
+ }
321
+
322
+ if (!grepTags || !grepTags.includes('smoke')) {
323
+ describe('Adding and deleting equations', () => {
324
+ abortEarlySetup();
325
+ before(() => {
326
+ essayResponsePage.steps.navigateToCreateQuestion('essay response');
327
+ cy.barsPreLoaderWait();
328
+ essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
329
+ essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor']);
330
+ essayResponsePage.steps.checkDisplayWordCountCheckbox();
331
+ essayResponsePage.steps.switchToPreviewTab();
332
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
333
+ });
334
+
335
+ it('When user enters an equation in the Preview input field the word count should increase by 1 and the entered equation should have focus', () => {
336
+ cy.log('Adding an equation using Basic and Greek category')
337
+ equationEditorFlyout.steps.enterEquation([{ categoryName: `${equationEditorCategoriesAndSymbols['basic'].displayName}`, symbolAriaLabel: [`${equationEditorCategoriesAndSymbols.basic.symbols.x.ariaLabel}`, `${equationEditorCategoriesAndSymbols.basic.symbols.square.ariaLabel}`, `${equationEditorCategoriesAndSymbols.basic.symbols.equalTo.ariaLabel}`] },
338
+ { categoryName: `${equationEditorCategoriesAndSymbols['greek'].displayName}`, symbolAriaLabel: [`${equationEditorCategoriesAndSymbols.greek.symbols.piUpper.ariaLabel}`] }]);
339
+ cy.log('Clicking on Ok button to add the equation to Preview input field and checking word count')
340
+ equationEditorFlyout.steps.clickOnOkButton();
341
+ essayResponsePage.steps.verifyWordCount(1);
342
+ });
343
+
344
+ it('When user enters another equation in the preview input field without adding any space the word count should remain the same', () => {
345
+ cy.log('Prestep: Clicking on Equation editor button')
346
+ essayResponsePage.steps.enterInputInResponseField('{rightarrow}');
347
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
348
+ equationEditorFlyout.steps.enterEquation([{ categoryName: `${equationEditorCategoriesAndSymbols['arrows'].displayName}`, symbolAriaLabel: [`${equationEditorCategoriesAndSymbols.arrows.symbols.leftHarpoonBarbUp.ariaLabel}`, `${equationEditorCategoriesAndSymbols.arrows.symbols.leftRightHarpoons.ariaLabel}`] }]);
349
+ equationEditorFlyout.steps.clickOnOkButton();
350
+ essayResponsePage.steps.verifyWordCount(1);
351
+ });
352
+
353
+ it('When user enters another equation in the preview input field after adding a space the word count should increase by 1', () => {
354
+ essayResponsePage.steps.enterInputInResponseField('{rightarrow} ');
355
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
356
+ equationEditorFlyout.steps.enterEquation([{ categoryName: `${equationEditorCategoriesAndSymbols['keypad'].displayName}`, symbolAriaLabel: [`${equationEditorCategoriesAndSymbols.keypad.symbols.add.ariaLabel}`, `${equationEditorCategoriesAndSymbols.keypad.symbols.two.ariaLabel}`] }]);
357
+ equationEditorFlyout.steps.clickOnOkButton();
358
+ essayResponsePage.steps.verifyWordCount(2);
359
+ });
360
+
361
+ it('When user clicks backspace the entered equation should get deleted and the word count should decrease by 1', () => {
362
+ essayResponsePage.steps.enterInputInResponseField('{backspace}{backspace}');
363
+ essayResponsePage.steps.verifyWordCount(1);
364
+ });
365
+ });
366
+ }
367
+
368
+ if (!grepTags || !grepTags.includes('smoke')) {
369
+ describe('Edit equation', () => {
370
+ abortEarlySetup();
371
+ before(() => {
372
+ essayResponsePage.steps.navigateToCreateQuestion('essay response');
373
+ cy.barsPreLoaderWait();
374
+ essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
375
+ essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
376
+ essayResponsePage.steps.switchToPreviewTab();
377
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
378
+ cy.log('Adding an equation to preview input field')
379
+ equationEditorFlyout.steps.enterEquation([{ categoryName: `${equationEditorCategoriesAndSymbols['relationships'].displayName}`, symbolAriaLabel: [`${equationEditorCategoriesAndSymbols.relationships.symbols.simultaneousEquations.ariaLabel}`] }]);
380
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('a');
381
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['b', 'c', 'd']);
382
+ equationEditorFlyout.steps.clickOnOkButton();
383
+ essayResponsePage.steps.verifyResponseFieldEquationText(0, 'a+b=c+d=');
384
+ });
385
+
386
+ it('When user double clicks on an added equation in preview input field, the Equation editor flyout should open', () => {
387
+ essayResponsePage.steps.openResponseFieldEquationContainerEquationEditor(0);
388
+ utilities.verifyElementVisibilityState(equationEditorFlyout.dialogBox(), 'visible');
389
+ });
390
+
391
+ it(`In the equation editor flyout the ${allCategories[0].displayName} should be selected by default and the Equation editor input field should be prefilled with the added equation`, () => {
392
+ equationEditorFlyout.steps.verifyCategoryTileSelectedInEquationEditor(`${equationEditorCategoriesAndSymbols['keypad'].displayName}`);
393
+ utilities.verifyTextContent(equationEditorFlyout.previewInputField(), 'a+b=c+d=');
394
+ });
395
+
396
+ it('When user clicks on Cancel button the equation should be displayed in the preview input field without any changes', () => {
397
+ equationEditorFlyout.steps.clickOnEquationEditorCancelButton();
398
+ essayResponsePage.steps.verifyResponseFieldEquationText(0, 'a+b=c+d=');
399
+ });
400
+
401
+ it('When user edits the added equation and clicks on Ok button, the edited equation should be displayed in the preview input field', () => {
402
+ essayResponsePage.steps.openResponseFieldEquationContainerEquationEditor(0);
403
+ equationEditorFlyout.steps.enterTextInPreviewInputField('{backspace}{backspace}');
404
+ equationEditorFlyout.steps.enterEquation([{ categoryName: `${equationEditorCategoriesAndSymbols['delimiters'].displayName}`, symbolAriaLabel: [`${equationEditorCategoriesAndSymbols.delimiters.symbols.singleSquareOpen.ariaLabel}`] }]);
405
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('a{rightarrow}');
406
+ equationEditorFlyout.steps.enterEquation([{ categoryName: `${equationEditorCategoriesAndSymbols['delimiters'].displayName}`, symbolAriaLabel: [`${equationEditorCategoriesAndSymbols.delimiters.symbols.singleSquareClose.ariaLabel}`] }]);
407
+ equationEditorFlyout.steps.clickOnOkButton();
408
+ essayResponsePage.steps.verifyResponseFieldEquationText(0, '[a]');
409
+ });
410
+ });
411
+ }
412
+ });
@@ -0,0 +1,203 @@
1
+ import { equationEditorCategoriesAndSymbols } from "../../../fixtures/equationEditorCategoriesAndSymbols ";
2
+ import { equationEditorFlyout } from "../../../pages/components/equationEditorFlyout";
3
+ import { essayResponsePage } from "../../../pages/essayResponsePage";
4
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
5
+ const css = Cypress.env('css');
6
+
7
+ describe('Create question page - Essay Response: Equation Editor categories', () => {
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ describe('Equation editor symbol category: Keypad', () => {
13
+ abortEarlySetup();
14
+ before(() => {
15
+ essayResponsePage.steps.navigateToCreateQuestion('essay response');
16
+ cy.barsPreLoaderWait();
17
+ essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
18
+ essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
19
+ essayResponsePage.steps.switchToPreviewTab();
20
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
21
+ });
22
+
23
+ equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('keypad');
24
+
25
+ essayResponsePage.tests.verifyEquationEditorFlyoutSymbolCategoriesFunctionality('keypad', '1/10000');
26
+ });
27
+
28
+ describe('Equation editor input category: Basic', () => {
29
+ abortEarlySetup();
30
+ before(() => {
31
+ essayResponsePage.steps.navigateToCreateQuestion('essay response');
32
+ cy.barsPreLoaderWait();
33
+ essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
34
+ essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
35
+ essayResponsePage.steps.switchToPreviewTab();
36
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor')
37
+ });
38
+
39
+ equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('basic');
40
+
41
+ it('On clicking the symbols it should be displayed in the input field of Equation editor and user should be able to form meaningful equations using the category', () => {
42
+ equationEditorFlyout.steps.enterTextInPreviewInputField('8');
43
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.lowerExponent.ariaLabel);
44
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('3{rightarrow}');
45
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.add.ariaLabel);
46
+ equationEditorFlyout.steps.enterTextInPreviewInputField('2');
47
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.upperExponent.ariaLabel);
48
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('3{rightarrow}');
49
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.subtract.ariaLabel);
50
+ equationEditorFlyout.steps.enterTextInPreviewInputField('2');
51
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.square.ariaLabel);
52
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.plusMinus.ariaLabel);
53
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.fraction.ariaLabel);
54
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('5');
55
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['15{rightarrow}']);
56
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.minusPlus.ariaLabel);
57
+ equationEditorFlyout.steps.enterTextInPreviewInputField('3');
58
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.mixedFraction.ariaLabel);
59
+ equationEditorFlyout.steps.enterTextInPreviewInputField('4');
60
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['5{rightarrow}']);
61
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.equalTo.ariaLabel);
62
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.letterN.ariaLabel);
63
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.comma.ariaLabel);
64
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.groupInParenthesis.ariaLabel);
65
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.sqrt.ariaLabel);
66
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('25{rightarrow}{rightarrow}');
67
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.dotMultiplier.ariaLabel);
68
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.cubeRoot.ariaLabel);
69
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('27{rightarrow}');
70
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.multiply.ariaLabel);
71
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.nRoot.ariaLabel);
72
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('4');
73
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['16{rightarrow}']);
74
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.colonRatio.ariaLabel);
75
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.groupInBrackets.ariaLabel);
76
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('3');
77
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.longDivision.ariaLabel);
78
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('36{rightarrow}{rightarrow}');
79
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.comma.ariaLabel);
80
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.groupInBraces.ariaLabel);
81
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.letterP.ariaLabel);
82
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.divide.ariaLabel);
83
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.letterZ.ariaLabel);
84
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('{rightarrow}{rightarrow}{rightarrow}10');
85
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.function.ariaLabel);
86
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.absoluteValue.ariaLabel);
87
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('9')
88
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.angleBracket.ariaLabel);
89
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('10');
90
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.dollar.ariaLabel);
91
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.asterisk.ariaLabel);
92
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('{rightarrow}{rightarrow}50');
93
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.cents.ariaLabel);
94
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.binomialCoefficient.ariaLabel);
95
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('4');
96
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['3{rightarrow}']);
97
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.matrix.ariaLabel);
98
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('2');
99
+ for (let i = 1; i < 3; i++) {
100
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox([i]);
101
+ }
102
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['4{rightarrow}{rightarrow}{rightarrow}']);
103
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.therefore.ariaLabel);
104
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.because.ariaLabel);
105
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.summation.ariaLabel);
106
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['1']);
107
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['4{rightarrow}']);
108
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.product.ariaLabel);
109
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['1']);
110
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['4{rightarrow}']);
111
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.coProduct.ariaLabel);
112
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['1']);
113
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['4{rightarrow}']);
114
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.integral.ariaLabel);
115
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['1']);
116
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['4{rightarrow}']);
117
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('{rightarrow}{rightarrow}');
118
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.letterR.ariaLabel);
119
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.letterC.ariaLabel);
120
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.letterH.ariaLabel);
121
+ });
122
+
123
+ equationEditorFlyout.tests.verifyCSSAnda11yOfEquationEditorInputField('basic');
124
+
125
+ essayResponsePage.tests.insertEquationAndVerifyInputFieldContentsAndWordCount('83+23−22±515∓345=N,(25)·273×164:[336],{P÷Z}10f|9⟨10$∗50¢(43)2124⟩|∴∵∑14∏14∐14∫41RCH', '1/10000');
126
+ });
127
+
128
+ describe('Equation editor symbol category: Greek', () => {
129
+ abortEarlySetup();
130
+ before(() => {
131
+ essayResponsePage.steps.navigateToCreateQuestion('essay response');
132
+ cy.barsPreLoaderWait();
133
+ essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
134
+ essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
135
+ essayResponsePage.steps.switchToPreviewTab();
136
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
137
+ });
138
+
139
+ equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('greek');
140
+
141
+ essayResponsePage.tests.verifyEquationEditorFlyoutSymbolCategoriesFunctionality('greek', '1/10000');
142
+ });
143
+
144
+ describe('Equation editor symbol category: Operators', () => {
145
+ abortEarlySetup();
146
+ before(() => {
147
+ essayResponsePage.steps.navigateToCreateQuestion('essay response');
148
+ cy.barsPreLoaderWait();
149
+ essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
150
+ essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor']);
151
+ essayResponsePage.steps.switchToPreviewTab();
152
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor')
153
+ });
154
+ equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('operators');
155
+
156
+ essayResponsePage.tests.verifyEquationEditorFlyoutSymbolCategoriesFunctionality('operators', '1/10000');
157
+ });
158
+
159
+ describe('Equation editor input category: Relationships', () => {
160
+ abortEarlySetup();
161
+ before(() => {
162
+ essayResponsePage.steps.navigateToCreateQuestion('essay response');
163
+ cy.barsPreLoaderWait();
164
+ essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
165
+ essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
166
+ essayResponsePage.steps.switchToPreviewTab();
167
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor')
168
+ });
169
+
170
+ equationEditorFlyout.tests.verifyEquationEditorFlyoutCategoryTooltip('relationships');
171
+
172
+ equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('relationships');
173
+
174
+ it('On clicking the symbols it should be displayed in the input field of Equation editor and user should be able to form meaningful equations using the category', () => {
175
+ equationEditorFlyout.steps.selectAllCategories();
176
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('a');
177
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['b']);
178
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['c']);
179
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['d']);
180
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['4a+4b']);
181
+ });
182
+
183
+ equationEditorFlyout.tests.verifyCSSAnda11yOfEquationEditorInputField('relationships');
184
+
185
+ essayResponsePage.tests.insertEquationAndVerifyInputFieldContentsAndWordCount('⊦<>≡≅~∉≠∝≈≤≥∈∋∌⊂⊃⊄⊅⊆⊇⊈⊉⊨≺≻≼≽≃∣≪≫∥⋈⊏⊐⌣⊑⊒≐⌢⊦⊣∃∅≁≇≮≯{a+b=c+d=4a+4b', '1/10000');
186
+ });
187
+
188
+ describe('Equation editor symbol category: Arrows', () => {
189
+ abortEarlySetup();
190
+ before(() => {
191
+ essayResponsePage.steps.navigateToCreateQuestion('essay response');
192
+ cy.barsPreLoaderWait();
193
+ essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
194
+ essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
195
+ essayResponsePage.steps.switchToPreviewTab();
196
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor')
197
+ });
198
+
199
+ equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('arrows');
200
+
201
+ essayResponsePage.tests.verifyEquationEditorFlyoutSymbolCategoriesFunctionality('arrows', '1/10000');
202
+ });
203
+ });