itemengine-cypress-automation 1.0.18 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +555 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCreateCustomCategory.js +932 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.js +333 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +332 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +522 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseEditCategoryFlyout.js +402 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseEditTabBasicSections.js +558 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.js +1346 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseHeaderSection.js +80 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseMathCharacters.js +38 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseMathCreateItem.js +243 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponsePreviewAddTable.js +412 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponsePreviewEditTable.js +659 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponsePreviewHyperlink.js +318 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseScoringSection.js +59 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +33 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAdditionalSettingsBasic.js +255 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAllOrNothingWithAlternateAnswer.js +731 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAutoScoredScoring.js +0 -719
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridOptionsAdditionalSettings.js +351 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialDifferentWeights.js +0 -930
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialDifferentWeightsWithAlternateAnswer.js +942 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialEqualWeights.js +0 -852
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialEqualWeightsWithAlternateAnswer.js +864 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridQuestionStemAdditionalSettings.js +261 -0
- package/package.json +1 -1
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAdditionalSettings.js +0 -830
|
@@ -0,0 +1,1346 @@
|
|
|
1
|
+
import { equationEditorCategoriesAndSymbols } from "../../../fixtures/equationEditorCategoriesAndSymbols ";
|
|
2
|
+
import { commonComponents } from "../../../pages/components";
|
|
3
|
+
import { equationEditorFlyout } from "../../../pages/components/equationEditorFlyout";
|
|
4
|
+
import { essayResponsePage } from "../../../pages/essayResponsePage";
|
|
5
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
6
|
+
const css = Cypress.env('css');
|
|
7
|
+
|
|
8
|
+
const defaultSelectedCategories = ['Keypad', 'Basic', 'Greek', 'Operators', 'Relationships', 'Arrows', 'Delimiters', 'Misc'];
|
|
9
|
+
const allCategories = Object.values(equationEditorCategoriesAndSymbols)
|
|
10
|
+
|
|
11
|
+
describe('Create question page - Essay Response: Equation Editor functionality', () => {
|
|
12
|
+
before(() => {
|
|
13
|
+
cy.loginAs('admin');
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
describe('Preview tab \'Equation Editor\' flyout', () => {
|
|
17
|
+
abortEarlySetup();
|
|
18
|
+
before(() => {
|
|
19
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
|
20
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
21
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
22
|
+
cy.barsPreLoaderWait();
|
|
23
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('The \'Equation Editor\' icon should be displayed in the preview tab toolbar', () => {
|
|
27
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
28
|
+
.should('have.attr', 'title', 'Equation Editor')
|
|
29
|
+
.and('be.visible');
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it('On hovering over the icon \'Insert Equation\' tooltip should be displayed and on clicking it a flyout should appear', () => {
|
|
33
|
+
//TODO: Need to work on the tooltip for Insert equation
|
|
34
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
35
|
+
.click();
|
|
36
|
+
equationEditorFlyout.dialogBox()
|
|
37
|
+
.should('be.visible');
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it('The flyout should have title \'Equation Editor\'', () => {
|
|
41
|
+
equationEditorFlyout.dialogBoxTitle()
|
|
42
|
+
.verifyInnerText('Equation editor');
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('Ok button should be displayed at the bottom of the flyout', () => {
|
|
46
|
+
equationEditorFlyout.dialogBox()
|
|
47
|
+
.within(() => {
|
|
48
|
+
equationEditorFlyout.buttonOk()
|
|
49
|
+
.verifyInnerText('Ok')
|
|
50
|
+
.should('be.visible');
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('Equation Editor input field should be displayed and should have cursor by default', () => {
|
|
55
|
+
equationEditorFlyout.previewInputField()
|
|
56
|
+
.verifyInnerText('')
|
|
57
|
+
.should('be.visible')
|
|
58
|
+
.and('have.class', 'mq-focused');
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
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', () => {
|
|
62
|
+
const equationCategoriesArray = Object.values(equationEditorCategoriesAndSymbols)
|
|
63
|
+
equationEditorFlyout.categoryTab()
|
|
64
|
+
.each(($el, index) => {
|
|
65
|
+
cy.wrap($el)
|
|
66
|
+
.verifyInnerText(equationCategoriesArray[index].displayName)
|
|
67
|
+
.within(() => {
|
|
68
|
+
equationEditorFlyout.categoryTabIcon()
|
|
69
|
+
.should('exist');
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
equationEditorFlyout.categoryTab()
|
|
73
|
+
.eq(0)
|
|
74
|
+
.within(() => {
|
|
75
|
+
equationEditorFlyout.categoryTabTitle()
|
|
76
|
+
.should('have.class', 'selected-tool-content-color')
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it('CSS of \'Equation Editor\' flyout', { tags: 'css' }, () => {
|
|
81
|
+
equationEditorFlyout.dialogBoxTitle()
|
|
82
|
+
.verifyCSS(css.color.secondaryBtn, css.fontSize.heading, css.fontWeight.bold);
|
|
83
|
+
cy.log('CSS of selected category')
|
|
84
|
+
equationEditorFlyout.categoryTab()
|
|
85
|
+
.eq(0)
|
|
86
|
+
.within(() => {
|
|
87
|
+
equationEditorFlyout.categoryTabTitle()
|
|
88
|
+
.verifyCSS(css.color.activeButtons, css.fontSize.small, css.fontWeight.regular);
|
|
89
|
+
equationEditorFlyout.categoryTabIcon()
|
|
90
|
+
.verifyCSS(css.color.activeButtons, css.fontSize.default, css.fontWeight.regular);
|
|
91
|
+
});
|
|
92
|
+
cy.log('CSS of unselected category')
|
|
93
|
+
equationEditorFlyout.categoryTab()
|
|
94
|
+
.eq(1)
|
|
95
|
+
.within(() => {
|
|
96
|
+
equationEditorFlyout.categoryTabTitle()
|
|
97
|
+
.verifyCSS(css.color.secondaryBtn, css.fontSize.small, css.fontWeight.regular);
|
|
98
|
+
equationEditorFlyout.categoryTabIcon()
|
|
99
|
+
.verifyCSS(css.color.secondaryBtn, css.fontSize.default, css.fontWeight.regular);
|
|
100
|
+
});
|
|
101
|
+
equationEditorFlyout.previewInputField()
|
|
102
|
+
.should('have.css', 'background-color', css.color.defaultBackground);
|
|
103
|
+
equationEditorFlyout.buttonCancel()
|
|
104
|
+
.verifyCSS(css.color.secondaryBtn, css.fontSize.default, css.fontWeight.semibold)
|
|
105
|
+
.should('have.css', 'background-color', css.color.secondaryBtnBg)
|
|
106
|
+
.and('have.css', 'border', `1px solid ${css.color.secondaryBtnBorder}`)
|
|
107
|
+
equationEditorFlyout.buttonOk()
|
|
108
|
+
.verifyCSS(css.color.primaryBtn, css.fontSize.default, css.fontWeight.semibold)
|
|
109
|
+
.should('have.css', 'background-color', css.color.primaryBtnBg)
|
|
110
|
+
.and('have.css', 'border', `1px solid ${css.color.primaryBtnBorder}`)
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
it('Accessibility of \'Equation Editor\' flyout', { tags: 'a11y' }, () => {
|
|
114
|
+
cy.checkAccessibility(equationEditorFlyout.dialogBox())
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
it('Cancel button should be displayed in the flyout and when user clicks the \'Cancel\' button then the flyout should close', () => {
|
|
118
|
+
equationEditorFlyout.buttonCancel()
|
|
119
|
+
.click();
|
|
120
|
+
equationEditorFlyout.dialogBox()
|
|
121
|
+
.should('not.exist');
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
describe('Equation Editor: Next and Previous button', () => {
|
|
126
|
+
abortEarlySetup();
|
|
127
|
+
before(() => {
|
|
128
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
|
129
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
130
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
131
|
+
cy.barsPreLoaderWait();
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
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', () => {
|
|
135
|
+
cy.log('Pre step: Deselect one category from Equation Editor section')
|
|
136
|
+
essayResponsePage.equationEditorSectionCategories()
|
|
137
|
+
.contains(`${equationEditorCategoriesAndSymbols['keypad'].displayName}`)
|
|
138
|
+
.click();
|
|
139
|
+
cy.log('Switching to Preview tab')
|
|
140
|
+
essayResponsePage.steps.switchToPreviewTab()
|
|
141
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
142
|
+
.click();
|
|
143
|
+
equationEditorFlyout.buttonNext()
|
|
144
|
+
.should('not.exist');
|
|
145
|
+
equationEditorFlyout.buttonPrevious()
|
|
146
|
+
.should('not.exist');
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
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', () => {
|
|
150
|
+
cy.log('Pre step: Switch to Edit tab and select all categories from the Equation Editor section')
|
|
151
|
+
essayResponsePage.steps.switchToEditTab();
|
|
152
|
+
essayResponsePage.steps.selectingCategories([`${equationEditorCategoriesAndSymbols['keypad'].displayName}`, `${equationEditorCategoriesAndSymbols['matrices'].displayName}`, `${equationEditorCategoriesAndSymbols['trigonometry'].displayName}`, `${equationEditorCategoriesAndSymbols['units'].displayName}`, `${equationEditorCategoriesAndSymbols['calculus'].displayName}`, `${equationEditorCategoriesAndSymbols['geometry'].displayName}`]);
|
|
153
|
+
cy.log('Switching to Preview tab')
|
|
154
|
+
essayResponsePage.steps.switchToPreviewTab()
|
|
155
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
156
|
+
.click();
|
|
157
|
+
equationEditorFlyout.buttonNext()
|
|
158
|
+
.should('be.visible');
|
|
159
|
+
equationEditorFlyout.buttonPrevious()
|
|
160
|
+
.should('be.visible');
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
it('CSS of \'Next button\' and \'Previous button\'', { tags: 'css' }, () => {
|
|
164
|
+
equationEditorFlyout.buttonPrevious()
|
|
165
|
+
.find('svg')
|
|
166
|
+
.should('have.css', 'background-color', css.color.defaultBackground)
|
|
167
|
+
.find('path')
|
|
168
|
+
.should('have.css', 'fill', css.color.nextPreviousButtonFill);
|
|
169
|
+
equationEditorFlyout.buttonNext()
|
|
170
|
+
.find('svg')
|
|
171
|
+
.should('have.css', 'background-color', css.color.defaultBackground)
|
|
172
|
+
.find('path')
|
|
173
|
+
.should('have.css', 'fill', css.color.nextPreviousButtonFill);
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
it('Accessibility of \'Next button\' and \'Previous button\'', { tags: 'a11y' }, () => {
|
|
177
|
+
cy.checkAccessibility(equationEditorFlyout.buttonPrevious());
|
|
178
|
+
cy.checkAccessibility(equationEditorFlyout.buttonNext());
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
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', () => {
|
|
182
|
+
equationEditorFlyout.buttonPrevious()
|
|
183
|
+
.should('have.class', 'disabled')
|
|
184
|
+
.and('be.disabled');
|
|
185
|
+
equationEditorFlyout.buttonNext()
|
|
186
|
+
.should('not.have.class', 'disabled')
|
|
187
|
+
.and('be.enabled');
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
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.', () => {
|
|
191
|
+
equationEditorFlyout.buttonNext()
|
|
192
|
+
.click();
|
|
193
|
+
equationEditorFlyout.buttonNext()
|
|
194
|
+
.should('not.have.class', 'disabled')
|
|
195
|
+
.and('be.enabled');
|
|
196
|
+
equationEditorFlyout.buttonPrevious()
|
|
197
|
+
.should('not.have.class', 'disabled')
|
|
198
|
+
.and('be.enabled');
|
|
199
|
+
cy.log('Clicking on Next button to reach end of tablist')
|
|
200
|
+
equationEditorFlyout.buttonNext()
|
|
201
|
+
.click();
|
|
202
|
+
equationEditorFlyout.buttonPrevious()
|
|
203
|
+
.should('not.have.class', 'disabled')
|
|
204
|
+
.and('be.enabled');
|
|
205
|
+
equationEditorFlyout.buttonNext()
|
|
206
|
+
.should('have.class', 'disabled')
|
|
207
|
+
.and('be.disabled');
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
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', () => {
|
|
211
|
+
equationEditorFlyout.buttonPrevious()
|
|
212
|
+
.dblclick();
|
|
213
|
+
equationEditorFlyout.buttonPrevious()
|
|
214
|
+
.should('have.class', 'disabled')
|
|
215
|
+
.and('be.disabled');
|
|
216
|
+
equationEditorFlyout.buttonNext()
|
|
217
|
+
.should('not.have.class', 'disabled')
|
|
218
|
+
.and('be.enabled');
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
describe('Equation editor symbol category: Keypad', () => {
|
|
223
|
+
abortEarlySetup();
|
|
224
|
+
before(() => {
|
|
225
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
|
226
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
227
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
228
|
+
cy.barsPreLoaderWait();
|
|
229
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
230
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
231
|
+
.click();
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('keypad');
|
|
235
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesFunctionality('keypad', '1/10000');
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
describe('Equation editor input category: Basic', () => {
|
|
239
|
+
abortEarlySetup();
|
|
240
|
+
before(() => {
|
|
241
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
|
242
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
243
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
244
|
+
cy.barsPreLoaderWait();
|
|
245
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
246
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
247
|
+
.click();
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('basic');
|
|
251
|
+
|
|
252
|
+
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', () => {
|
|
253
|
+
equationEditorFlyout.previewInputField()
|
|
254
|
+
.type('8');
|
|
255
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.lowerExponent.ariaLabel)
|
|
256
|
+
.click()
|
|
257
|
+
equationEditorFlyout.inputFieldCursor()
|
|
258
|
+
.type('3{rightarrow}');
|
|
259
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.add.ariaLabel)
|
|
260
|
+
.click();
|
|
261
|
+
equationEditorFlyout.previewInputField()
|
|
262
|
+
.type('2');
|
|
263
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.upperExponent.ariaLabel)
|
|
264
|
+
.click();
|
|
265
|
+
equationEditorFlyout.inputFieldCursor()
|
|
266
|
+
.type('3{rightarrow}');
|
|
267
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.subtract.ariaLabel)
|
|
268
|
+
.click();
|
|
269
|
+
equationEditorFlyout.previewInputField()
|
|
270
|
+
.type('2');
|
|
271
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.square.ariaLabel)
|
|
272
|
+
.click();
|
|
273
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.plusMinus.ariaLabel)
|
|
274
|
+
.click();
|
|
275
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.fraction.ariaLabel)
|
|
276
|
+
.click();
|
|
277
|
+
equationEditorFlyout.inputFieldCursor()
|
|
278
|
+
.type('5');
|
|
279
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
280
|
+
.type('15{rightarrow}');
|
|
281
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.minusPlus.ariaLabel)
|
|
282
|
+
.click();
|
|
283
|
+
equationEditorFlyout.previewInputField()
|
|
284
|
+
.type('3');
|
|
285
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.mixedFraction.ariaLabel)
|
|
286
|
+
.click();
|
|
287
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
288
|
+
.type('4');
|
|
289
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
290
|
+
.type('5{rightarrow}');
|
|
291
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.equalTo.ariaLabel)
|
|
292
|
+
.click();
|
|
293
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.letterN.ariaLabel)
|
|
294
|
+
.click();
|
|
295
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.comma.ariaLabel)
|
|
296
|
+
.click();
|
|
297
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.groupInParenthesis.ariaLabel)
|
|
298
|
+
.click();
|
|
299
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.sqrt.ariaLabel)
|
|
300
|
+
.click();
|
|
301
|
+
equationEditorFlyout.inputFieldCursor()
|
|
302
|
+
.type('25{rightarrow}{rightarrow}');
|
|
303
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.dotMultiplier.ariaLabel)
|
|
304
|
+
.click();
|
|
305
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.cubeRoot.ariaLabel)
|
|
306
|
+
.click();
|
|
307
|
+
equationEditorFlyout.inputFieldCursor()
|
|
308
|
+
.type('27{rightarrow}');
|
|
309
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.multiply.ariaLabel)
|
|
310
|
+
.click();
|
|
311
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.nRoot.ariaLabel)
|
|
312
|
+
.click();
|
|
313
|
+
equationEditorFlyout.inputFieldCursor()
|
|
314
|
+
.type('4');
|
|
315
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
316
|
+
.type('16{rightarrow}');
|
|
317
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.colonRatio.ariaLabel)
|
|
318
|
+
.click();
|
|
319
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.groupInBrackets.ariaLabel)
|
|
320
|
+
.click();
|
|
321
|
+
equationEditorFlyout.inputFieldCursor()
|
|
322
|
+
.type('3');
|
|
323
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.longDivision.ariaLabel)
|
|
324
|
+
.click();
|
|
325
|
+
equationEditorFlyout.inputFieldCursor()
|
|
326
|
+
.type('36{rightarrow}{rightarrow}');
|
|
327
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.comma.ariaLabel)
|
|
328
|
+
.click();
|
|
329
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.groupInBraces.ariaLabel)
|
|
330
|
+
.click();
|
|
331
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.letterP.ariaLabel)
|
|
332
|
+
.click();
|
|
333
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.divide.ariaLabel)
|
|
334
|
+
.click();
|
|
335
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.letterZ.ariaLabel)
|
|
336
|
+
.click();
|
|
337
|
+
equationEditorFlyout.inputFieldCursor()
|
|
338
|
+
.type('{rightarrow}{rightarrow}{rightarrow}10');
|
|
339
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.function.ariaLabel)
|
|
340
|
+
.click();
|
|
341
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.absoluteValue.ariaLabel)
|
|
342
|
+
.click();
|
|
343
|
+
equationEditorFlyout.inputFieldCursor()
|
|
344
|
+
.type('9')
|
|
345
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.angleBracket.ariaLabel)
|
|
346
|
+
.click();
|
|
347
|
+
equationEditorFlyout.inputFieldCursor()
|
|
348
|
+
.type('10');
|
|
349
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.dollar.ariaLabel)
|
|
350
|
+
.click();
|
|
351
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.asterisk.ariaLabel)
|
|
352
|
+
.click();
|
|
353
|
+
equationEditorFlyout.inputFieldCursor()
|
|
354
|
+
.type('{rightarrow}{rightarrow}50');
|
|
355
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.cents.ariaLabel)
|
|
356
|
+
.click();
|
|
357
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.binomialCoefficient.ariaLabel)
|
|
358
|
+
.click();
|
|
359
|
+
equationEditorFlyout.inputFieldCursor()
|
|
360
|
+
.type('4');
|
|
361
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
362
|
+
.type('3{rightarrow}');
|
|
363
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.matrix.ariaLabel)
|
|
364
|
+
.click();
|
|
365
|
+
equationEditorFlyout.inputFieldCursor()
|
|
366
|
+
.type('2');
|
|
367
|
+
for (let i = 1; i < 3; i++) {
|
|
368
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
369
|
+
.type(i);
|
|
370
|
+
}
|
|
371
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
372
|
+
.type('4{rightarrow}{rightarrow}{rightarrow}');
|
|
373
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.therefore.ariaLabel)
|
|
374
|
+
.click();
|
|
375
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.because.ariaLabel)
|
|
376
|
+
.click();
|
|
377
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.summation.ariaLabel)
|
|
378
|
+
.click();
|
|
379
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
380
|
+
.type('1');
|
|
381
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
382
|
+
.type('4{rightarrow}');
|
|
383
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.product.ariaLabel)
|
|
384
|
+
.click();
|
|
385
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
386
|
+
.type('1');
|
|
387
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
388
|
+
.type('4{rightarrow}');
|
|
389
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.coProduct.ariaLabel)
|
|
390
|
+
.click();
|
|
391
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
392
|
+
.type('1');
|
|
393
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
394
|
+
.type('4{rightarrow}');
|
|
395
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.integral.ariaLabel)
|
|
396
|
+
.click();
|
|
397
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
398
|
+
.type('1');
|
|
399
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
400
|
+
.type('4{rightarrow}');
|
|
401
|
+
equationEditorFlyout.inputFieldCursor()
|
|
402
|
+
.type('{rightarrow}{rightarrow}');
|
|
403
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.letterR.ariaLabel)
|
|
404
|
+
.click();
|
|
405
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.letterC.ariaLabel)
|
|
406
|
+
.click();
|
|
407
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.letterH.ariaLabel)
|
|
408
|
+
.click();
|
|
409
|
+
});
|
|
410
|
+
|
|
411
|
+
equationEditorFlyout.tests.verifyCSSAnda11yOfEquationEditorInputField('basic')
|
|
412
|
+
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');
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
describe('Equation editor symbol category: Greek', () => {
|
|
416
|
+
abortEarlySetup();
|
|
417
|
+
before(() => {
|
|
418
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
|
419
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
420
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
421
|
+
cy.barsPreLoaderWait();
|
|
422
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
423
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
424
|
+
.click();
|
|
425
|
+
});
|
|
426
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('greek');
|
|
427
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesFunctionality('greek', '1/10000');
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
describe('Equation editor symbol category: Operators', () => {
|
|
431
|
+
abortEarlySetup();
|
|
432
|
+
before(() => {
|
|
433
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
|
434
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
435
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
436
|
+
cy.barsPreLoaderWait();
|
|
437
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
438
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
439
|
+
.click();
|
|
440
|
+
});
|
|
441
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('operators');
|
|
442
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesFunctionality('operators', '1/10000');
|
|
443
|
+
});
|
|
444
|
+
|
|
445
|
+
describe('Equation editor input category: Relationships', () => {
|
|
446
|
+
abortEarlySetup();
|
|
447
|
+
before(() => {
|
|
448
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
|
449
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
450
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
451
|
+
cy.barsPreLoaderWait();
|
|
452
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
453
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
454
|
+
.click();
|
|
455
|
+
});
|
|
456
|
+
|
|
457
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutCategoryTooltip('relationships');
|
|
458
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('relationships');
|
|
459
|
+
|
|
460
|
+
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', () => {
|
|
461
|
+
equationEditorFlyout.categoryCharacters()
|
|
462
|
+
.each(($el) => {
|
|
463
|
+
cy.wrap($el)
|
|
464
|
+
.click();
|
|
465
|
+
});
|
|
466
|
+
equationEditorFlyout.inputFieldCursor()
|
|
467
|
+
.type('a');
|
|
468
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
469
|
+
.type('b');
|
|
470
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
471
|
+
.type('c');
|
|
472
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
473
|
+
.type('d');
|
|
474
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
475
|
+
.type('4a+4b');
|
|
476
|
+
});
|
|
477
|
+
|
|
478
|
+
equationEditorFlyout.tests.verifyCSSAnda11yOfEquationEditorInputField('relationships')
|
|
479
|
+
essayResponsePage.tests.insertEquationAndVerifyInputFieldContentsAndWordCount('⊦<>≡≅~∉≠∝≈≤≥∈∋∌⊂⊃⊄⊅⊆⊇⊈⊉⊨≺≻≼≽≃∣≪≫∥⋈⊏⊐⌣⊑⊒≐⌢⊦⊣∃∅≁≇≮≯{a+b=c+d=4a+4b', '1/10000');
|
|
480
|
+
});
|
|
481
|
+
|
|
482
|
+
describe('Equation editor symbol category: Arrows', () => {
|
|
483
|
+
abortEarlySetup();
|
|
484
|
+
before(() => {
|
|
485
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
|
486
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
487
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
488
|
+
cy.barsPreLoaderWait();
|
|
489
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
490
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
491
|
+
.click();
|
|
492
|
+
});
|
|
493
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('arrows');
|
|
494
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesFunctionality('arrows', '1/10000');
|
|
495
|
+
});
|
|
496
|
+
|
|
497
|
+
describe('Equation editor input category: Delimiters', () => {
|
|
498
|
+
abortEarlySetup();
|
|
499
|
+
before(() => {
|
|
500
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
|
501
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
502
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
503
|
+
cy.barsPreLoaderWait();
|
|
504
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
505
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
506
|
+
.click();
|
|
507
|
+
});
|
|
508
|
+
|
|
509
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('delimiters');
|
|
510
|
+
|
|
511
|
+
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', () => {
|
|
512
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.delimiters.symbols.lFloor.ariaLabel)
|
|
513
|
+
.click();
|
|
514
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.delimiters.symbols.rFloor.ariaLabel)
|
|
515
|
+
.click();
|
|
516
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.delimiters.symbols.lCeil.ariaLabel)
|
|
517
|
+
.click();
|
|
518
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.delimiters.symbols.rCeil.ariaLabel)
|
|
519
|
+
.click();
|
|
520
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.delimiters.symbols.forwardSlash.ariaLabel)
|
|
521
|
+
.click();
|
|
522
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.delimiters.symbols.openCurlBracket.ariaLabel)
|
|
523
|
+
.click();
|
|
524
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.delimiters.symbols.closedCurlBracket.ariaLabel)
|
|
525
|
+
.click();
|
|
526
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.delimiters.symbols.groupInParathesis.ariaLabel)
|
|
527
|
+
.click();
|
|
528
|
+
equationEditorFlyout.inputFieldCursor()
|
|
529
|
+
.type('a{rightarrow}');
|
|
530
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.delimiters.symbols.groupInBrackets.ariaLabel)
|
|
531
|
+
.click();
|
|
532
|
+
equationEditorFlyout.inputFieldCursor()
|
|
533
|
+
.type('a{rightarrow}');
|
|
534
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.delimiters.symbols.squareRoundBrackets.ariaLabel)
|
|
535
|
+
.click();
|
|
536
|
+
equationEditorFlyout.inputFieldCursor()
|
|
537
|
+
.type('a{rightarrow}');
|
|
538
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.delimiters.symbols.roundSquareBrackets.ariaLabel)
|
|
539
|
+
.click();
|
|
540
|
+
equationEditorFlyout.inputFieldCursor()
|
|
541
|
+
.type('a{rightarrow}');
|
|
542
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.delimiters.symbols.angleBracket.ariaLabel)
|
|
543
|
+
.click();
|
|
544
|
+
equationEditorFlyout.inputFieldCursor()
|
|
545
|
+
.type('a{rightarrow}');
|
|
546
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.delimiters.symbols.singleSquareOpen.ariaLabel)
|
|
547
|
+
.click();
|
|
548
|
+
equationEditorFlyout.inputFieldCursor()
|
|
549
|
+
.type('a{rightarrow}');
|
|
550
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.delimiters.symbols.singleSquareClose.ariaLabel)
|
|
551
|
+
.click();
|
|
552
|
+
});
|
|
553
|
+
|
|
554
|
+
equationEditorFlyout.tests.verifyCSSAnda11yOfEquationEditorInputField('delimiters')
|
|
555
|
+
essayResponsePage.tests.insertEquationAndVerifyInputFieldContentsAndWordCount('⌊⌋⌈⌉/{}(a)[a][a)(a]⟨a⟩[a]', '2/10000');
|
|
556
|
+
});
|
|
557
|
+
|
|
558
|
+
describe('Equation editor input category: Misc', () => {
|
|
559
|
+
abortEarlySetup();
|
|
560
|
+
before(() => {
|
|
561
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
|
562
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
563
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
564
|
+
cy.barsPreLoaderWait();
|
|
565
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
566
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
567
|
+
.click();
|
|
568
|
+
});
|
|
569
|
+
|
|
570
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('misc');
|
|
571
|
+
|
|
572
|
+
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', () => {
|
|
573
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.forAll.ariaLabel)
|
|
574
|
+
.click();
|
|
575
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.dotsBottom.ariaLabel)
|
|
576
|
+
.click();
|
|
577
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.horizontalDots.ariaLabel)
|
|
578
|
+
.click();
|
|
579
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.verticalDots.ariaLabel)
|
|
580
|
+
.click();
|
|
581
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.diagonalDots.ariaLabel)
|
|
582
|
+
.click();
|
|
583
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.sqrt.ariaLabel)
|
|
584
|
+
.click();
|
|
585
|
+
equationEditorFlyout.inputFieldCursor()
|
|
586
|
+
.type('4{rightarrow}');
|
|
587
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.triangle.ariaLabel)
|
|
588
|
+
.click();
|
|
589
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.ell.ariaLabel)
|
|
590
|
+
.click();
|
|
591
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.top.ariaLabel)
|
|
592
|
+
.click();
|
|
593
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.flat.ariaLabel)
|
|
594
|
+
.click();
|
|
595
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.natural.ariaLabel)
|
|
596
|
+
.click();
|
|
597
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.sharp.ariaLabel)
|
|
598
|
+
.click();
|
|
599
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.elliptic.ariaLabel)
|
|
600
|
+
.click();
|
|
601
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.perpendicularTo.ariaLabel)
|
|
602
|
+
.click();
|
|
603
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.clubSuit.ariaLabel)
|
|
604
|
+
.click();
|
|
605
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.diamondSuit.ariaLabel)
|
|
606
|
+
.click();
|
|
607
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.heartSuit.ariaLabel)
|
|
608
|
+
.click();
|
|
609
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.spadeSuit.ariaLabel)
|
|
610
|
+
.click();
|
|
611
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.exponent.ariaLabel)
|
|
612
|
+
.click();
|
|
613
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.underscore.ariaLabel)
|
|
614
|
+
.click();
|
|
615
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.backSlash.ariaLabel)
|
|
616
|
+
.click();
|
|
617
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.forwardSlash.ariaLabel)
|
|
618
|
+
.click();
|
|
619
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.vert.ariaLabel)
|
|
620
|
+
.click();
|
|
621
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.nabla.ariaLabel)
|
|
622
|
+
.click();
|
|
623
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.planck.ariaLabel)
|
|
624
|
+
.click();
|
|
625
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.angstrom.ariaLabel)
|
|
626
|
+
.click();
|
|
627
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.circle.ariaLabel)
|
|
628
|
+
.click();
|
|
629
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.bullet.ariaLabel)
|
|
630
|
+
.click();
|
|
631
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.not.ariaLabel)
|
|
632
|
+
.click();
|
|
633
|
+
equationEditorFlyout.categoryCharacters(` ${equationEditorCategoriesAndSymbols.misc.symbols.real.ariaLabel}`)
|
|
634
|
+
.click();
|
|
635
|
+
equationEditorFlyout.categoryCharacters(` ${equationEditorCategoriesAndSymbols.misc.symbols.imaginary.ariaLabel}`)
|
|
636
|
+
.click();
|
|
637
|
+
equationEditorFlyout.categoryCharacters(` ${equationEditorCategoriesAndSymbols.misc.symbols.partialDerivative.ariaLabel}`)
|
|
638
|
+
.click();
|
|
639
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.infinity.ariaLabel)
|
|
640
|
+
.click();
|
|
641
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.alpeh.ariaLabel)
|
|
642
|
+
.click();
|
|
643
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.degree.ariaLabel)
|
|
644
|
+
.click();
|
|
645
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.misc.symbols.angle.ariaLabel)
|
|
646
|
+
.click();
|
|
647
|
+
});
|
|
648
|
+
|
|
649
|
+
equationEditorFlyout.tests.verifyCSSAnda11yOfEquationEditorInputField('misc')
|
|
650
|
+
essayResponsePage.tests.insertEquationAndVerifyInputFieldContentsAndWordCount('∀…⋯⋮⋱√4△ℓ⊤♭♮♯℘⊥♧♢♡♤^_\\/|∇ℏÅ∘•¬ℜℑ∂∞ℵ°∠', '1/10000');
|
|
651
|
+
});
|
|
652
|
+
|
|
653
|
+
describe('Equation editor input category: Matrices', () => {
|
|
654
|
+
abortEarlySetup();
|
|
655
|
+
before(() => {
|
|
656
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
|
657
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
658
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
659
|
+
essayResponsePage.steps.selectingCategories([`${equationEditorCategoriesAndSymbols['matrices'].displayName}`]);
|
|
660
|
+
cy.barsPreLoaderWait();
|
|
661
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
662
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
663
|
+
.click();
|
|
664
|
+
});
|
|
665
|
+
|
|
666
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('matrices');
|
|
667
|
+
|
|
668
|
+
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', () => {
|
|
669
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.matrices.symbols.matrix.ariaLabel)
|
|
670
|
+
.click();
|
|
671
|
+
equationEditorFlyout.inputFieldCursor()
|
|
672
|
+
.type('5');
|
|
673
|
+
for (let i = 1; i < 4; i++) {
|
|
674
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
675
|
+
.type(i);
|
|
676
|
+
}
|
|
677
|
+
equationEditorFlyout.inputFieldCursor()
|
|
678
|
+
.type('{rightarrow}{rightarrow}');
|
|
679
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.matrices.symbols.twoByTwoMatrixBoundedBrackets.ariaLabel)
|
|
680
|
+
.click();
|
|
681
|
+
equationEditorFlyout.inputFieldCursor()
|
|
682
|
+
.type('5');
|
|
683
|
+
for (let i = 1; i < 4; i++) {
|
|
684
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
685
|
+
.type(i);
|
|
686
|
+
}
|
|
687
|
+
equationEditorFlyout.inputFieldCursor()
|
|
688
|
+
.type('{rightarrow}{rightarrow}');
|
|
689
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.matrices.symbols.matrixBoundedParenthesis.ariaLabel)
|
|
690
|
+
.click();
|
|
691
|
+
equationEditorFlyout.inputFieldCursor()
|
|
692
|
+
.type('5');
|
|
693
|
+
for (let i = 1; i < 4; i++) {
|
|
694
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
695
|
+
.type(i);
|
|
696
|
+
}
|
|
697
|
+
equationEditorFlyout.inputFieldCursor()
|
|
698
|
+
.type('{rightarrow}{rightarrow}');
|
|
699
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.matrices.symbols.matrixBoundedBraces.ariaLabel)
|
|
700
|
+
.click();
|
|
701
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.matrices.symbols.singleMatrixBoundedBrackets.ariaLabel)
|
|
702
|
+
.click();
|
|
703
|
+
equationEditorFlyout.inputFieldCursor()
|
|
704
|
+
.type('5');
|
|
705
|
+
for (let i = 1; i < 4; i++) {
|
|
706
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
707
|
+
.type(i);
|
|
708
|
+
}
|
|
709
|
+
equationEditorFlyout.inputFieldCursor()
|
|
710
|
+
.type('{rightarrow}{rightarrow}');
|
|
711
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.matrices.symbols.matrixBoundedVerticalLines.ariaLabel)
|
|
712
|
+
.click();
|
|
713
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.matrices.symbols.insertColumnInMatrix.ariaLabel)
|
|
714
|
+
.click();
|
|
715
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.matrices.symbols.insertRowInMatrix.ariaLabel)
|
|
716
|
+
.click();
|
|
717
|
+
for (let i = 1; i < 10; i++) {
|
|
718
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
719
|
+
.type(i);
|
|
720
|
+
}
|
|
721
|
+
equationEditorFlyout.inputFieldCursor()
|
|
722
|
+
.type('{rightarrow}{rightarrow}');
|
|
723
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.matrices.symbols.matrixBoundedDoubleVerticalLines.ariaLabel)
|
|
724
|
+
.click();
|
|
725
|
+
equationEditorFlyout.inputFieldCursor()
|
|
726
|
+
.type('5');
|
|
727
|
+
for (let i = 1; i < 4; i++) {
|
|
728
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
729
|
+
.type(i);
|
|
730
|
+
}
|
|
731
|
+
equationEditorFlyout.inputFieldCursor()
|
|
732
|
+
.type('{rightarrow}{rightarrow}');
|
|
733
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.matrices.symbols.threeByThreeMatrixBoundedBrackets.ariaLabel)
|
|
734
|
+
.click();
|
|
735
|
+
equationEditorFlyout.inputFieldCursor()
|
|
736
|
+
.type('5');
|
|
737
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.matrices.symbols.subscript.ariaLabel)
|
|
738
|
+
.click();
|
|
739
|
+
equationEditorFlyout.inputFieldCursor()
|
|
740
|
+
.type('2');
|
|
741
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
742
|
+
.type('2');
|
|
743
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.matrices.symbols.superscript.ariaLabel)
|
|
744
|
+
.click();
|
|
745
|
+
equationEditorFlyout.inputFieldCursor()
|
|
746
|
+
.type('2')
|
|
747
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
748
|
+
.type('3');
|
|
749
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.matrices.symbols.factorial.ariaLabel)
|
|
750
|
+
.click();
|
|
751
|
+
for (let i = 1; i < 7; i++) {
|
|
752
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
753
|
+
.type(i);
|
|
754
|
+
}
|
|
755
|
+
equationEditorFlyout.inputFieldCursor()
|
|
756
|
+
.type('{rightarrow}{rightarrow}');
|
|
757
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.matrices.symbols.dotsBottom.ariaLabel)
|
|
758
|
+
.click();
|
|
759
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.matrices.symbols.dotsMiddle.ariaLabel)
|
|
760
|
+
.click();
|
|
761
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.matrices.symbols.verticalDots.ariaLabel)
|
|
762
|
+
.click();
|
|
763
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.matrices.symbols.diagonalDots.ariaLabel)
|
|
764
|
+
.click();
|
|
765
|
+
});
|
|
766
|
+
|
|
767
|
+
equationEditorFlyout.tests.verifyCSSAnda11yOfEquationEditorInputField('matrices')
|
|
768
|
+
essayResponsePage.tests.insertEquationAndVerifyInputFieldContentsAndWordCount('5123[5123](5123){[5]123}|123456789|‖5123‖[52223!123456]…⋯⋮⋱', '1/10000')
|
|
769
|
+
});
|
|
770
|
+
|
|
771
|
+
describe('Equation editor symbol category: Trigonometric Functions', () => {
|
|
772
|
+
abortEarlySetup();
|
|
773
|
+
before(() => {
|
|
774
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
|
775
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
776
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
777
|
+
essayResponsePage.steps.selectingCategories([`${equationEditorCategoriesAndSymbols['trigonometry'].displayName}`]);
|
|
778
|
+
cy.barsPreLoaderWait();
|
|
779
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
780
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
781
|
+
.click();
|
|
782
|
+
});
|
|
783
|
+
|
|
784
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutCategoryTooltip('trigonometry');
|
|
785
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('trigonometry', '1/10000');
|
|
786
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesFunctionality('trigonometry', '1/10000');
|
|
787
|
+
});
|
|
788
|
+
|
|
789
|
+
describe('Equation editor symbol category: Units', () => {
|
|
790
|
+
abortEarlySetup();
|
|
791
|
+
before(() => {
|
|
792
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
|
793
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
794
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
795
|
+
essayResponsePage.steps.selectingCategories([`${equationEditorCategoriesAndSymbols['units'].displayName}`]);
|
|
796
|
+
cy.barsPreLoaderWait();
|
|
797
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
798
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
799
|
+
.click();
|
|
800
|
+
});
|
|
801
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('units');
|
|
802
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesFunctionality('units', '2/10000');
|
|
803
|
+
});
|
|
804
|
+
|
|
805
|
+
describe('Equation editor input category: Calculus Symbols', () => {
|
|
806
|
+
abortEarlySetup();
|
|
807
|
+
before(() => {
|
|
808
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
|
809
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
810
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
811
|
+
essayResponsePage.steps.selectingCategories([`${equationEditorCategoriesAndSymbols['calculus'].displayName}`]);
|
|
812
|
+
cy.barsPreLoaderWait();
|
|
813
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
814
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
815
|
+
.click();
|
|
816
|
+
});
|
|
817
|
+
|
|
818
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutCategoryTooltip('calculus');
|
|
819
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('calculus');
|
|
820
|
+
|
|
821
|
+
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', () => {
|
|
822
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.limit.ariaLabel)
|
|
823
|
+
.click();
|
|
824
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.epsilon.ariaLabel)
|
|
825
|
+
.click();
|
|
826
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.eulersNumber.ariaLabel)
|
|
827
|
+
.click();
|
|
828
|
+
equationEditorFlyout.previewInputField()
|
|
829
|
+
.click();
|
|
830
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.deltaUppercase.ariaLabel)
|
|
831
|
+
.click();
|
|
832
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.derivative.ariaLabel)
|
|
833
|
+
.click();
|
|
834
|
+
equationEditorFlyout.inputFieldCursor()
|
|
835
|
+
.type('2y');
|
|
836
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.secondDerivative.ariaLabel)
|
|
837
|
+
.click();
|
|
838
|
+
equationEditorFlyout.inputFieldCursor()
|
|
839
|
+
.type('2xy');
|
|
840
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.integral.ariaLabel)
|
|
841
|
+
.click();
|
|
842
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
843
|
+
.type('2')
|
|
844
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
845
|
+
.type('3{rightarrow}{rightarrow}{rightarrow}')
|
|
846
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.nDerivative.ariaLabel)
|
|
847
|
+
.click();
|
|
848
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
849
|
+
.type('3')
|
|
850
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
851
|
+
.type('3');
|
|
852
|
+
equationEditorFlyout.previewInputField()
|
|
853
|
+
.click();
|
|
854
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.doubleIntegral.ariaLabel)
|
|
855
|
+
.click();
|
|
856
|
+
equationEditorFlyout.inputFieldCursor()
|
|
857
|
+
.type('2{rightarrow}{rightarrow}{rightarrow}');
|
|
858
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.partialDerivative.ariaLabel)
|
|
859
|
+
.click();
|
|
860
|
+
equationEditorFlyout.inputFieldCursor()
|
|
861
|
+
.type('2');
|
|
862
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.timeDerivative.ariaLabel)
|
|
863
|
+
.click();
|
|
864
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.tripleIntegral.ariaLabel)
|
|
865
|
+
.click();
|
|
866
|
+
equationEditorFlyout.inputFieldCursor()
|
|
867
|
+
.type('1{rightarrow}');
|
|
868
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.timeSecondDerivative.ariaLabel)
|
|
869
|
+
.click();
|
|
870
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.lineIntegral.ariaLabel)
|
|
871
|
+
.click();
|
|
872
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.vector.ariaLabel)
|
|
873
|
+
.click();
|
|
874
|
+
equationEditorFlyout.inputFieldCursor()
|
|
875
|
+
.type('x{rightarrow}');
|
|
876
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.closedSurfaceIntegral.ariaLabel)
|
|
877
|
+
.click();
|
|
878
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.unitVector.ariaLabel)
|
|
879
|
+
.click();
|
|
880
|
+
equationEditorFlyout.inputFieldCursor()
|
|
881
|
+
.type('x{rightarrow}');
|
|
882
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.closedVolumeIntegral.ariaLabel)
|
|
883
|
+
.click();
|
|
884
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.underSim.ariaLabel)
|
|
885
|
+
.click();
|
|
886
|
+
equationEditorFlyout.inputFieldCursor()
|
|
887
|
+
.type('x{rightarrow}{rightarrow}');
|
|
888
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.summation.ariaLabel)
|
|
889
|
+
.click();
|
|
890
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
891
|
+
.type('3');
|
|
892
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
893
|
+
.type('4{rightarrow}');
|
|
894
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.absoluteValue.ariaLabel)
|
|
895
|
+
.click();
|
|
896
|
+
equationEditorFlyout.inputFieldCursor()
|
|
897
|
+
.type('5{rightarrow}');
|
|
898
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.infinity.ariaLabel)
|
|
899
|
+
.click();
|
|
900
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.calculus.symbols.nabla.ariaLabel)
|
|
901
|
+
.click();
|
|
902
|
+
});
|
|
903
|
+
|
|
904
|
+
equationEditorFlyout.tests.verifyCSSAnda11yOfEquationEditorInputField('calculus')
|
|
905
|
+
essayResponsePage.tests.insertEquationAndVerifyInputFieldContentsAndWordCount('limx→ϵeΔdydx2yd2ydx22xy∫32d3ydx3∬2∂y∂x2y˙∭1y¨∮x→∯x^∰x~∑34|5|∞∇', '3/10000')
|
|
906
|
+
});
|
|
907
|
+
|
|
908
|
+
describe('Equation editor input category: Geometric Symbols', () => {
|
|
909
|
+
abortEarlySetup();
|
|
910
|
+
before(() => {
|
|
911
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
|
912
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
913
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
914
|
+
essayResponsePage.steps.selectingCategories([`${equationEditorCategoriesAndSymbols['geometry'].displayName}`]);
|
|
915
|
+
cy.barsPreLoaderWait();
|
|
916
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
917
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
918
|
+
.click();
|
|
919
|
+
});
|
|
920
|
+
|
|
921
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutCategoryTooltip('geometry');
|
|
922
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('geometry');
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
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', () => {
|
|
926
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.circle.ariaLabel)
|
|
927
|
+
.click();
|
|
928
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.square.ariaLabel)
|
|
929
|
+
.click();
|
|
930
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.triangle.ariaLabel)
|
|
931
|
+
.click();
|
|
932
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.parallelogram.ariaLabel)
|
|
933
|
+
.click();
|
|
934
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.perpendicularTo.ariaLabel)
|
|
935
|
+
.click();
|
|
936
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.similarTo.ariaLabel)
|
|
937
|
+
.click();
|
|
938
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.congruentTo.ariaLabel)
|
|
939
|
+
.click();
|
|
940
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.parallelTo.ariaLabel)
|
|
941
|
+
.click();
|
|
942
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.notParallel.ariaLabel)
|
|
943
|
+
.click();
|
|
944
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.pi.ariaLabel)
|
|
945
|
+
.click();
|
|
946
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.dotMultiplier.ariaLabel)
|
|
947
|
+
.click();
|
|
948
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.degree.ariaLabel)
|
|
949
|
+
.click();
|
|
950
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.prime.ariaLabel)
|
|
951
|
+
.click();
|
|
952
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.doublePrime.ariaLabel)
|
|
953
|
+
.click();
|
|
954
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.angle.ariaLabel)
|
|
955
|
+
.click();
|
|
956
|
+
equationEditorFlyout.inputFieldCursor()
|
|
957
|
+
.type('45');
|
|
958
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.measureOfAngle.ariaLabel)
|
|
959
|
+
.click();
|
|
960
|
+
equationEditorFlyout.inputFieldCursor()
|
|
961
|
+
.type('30');
|
|
962
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.arc.ariaLabel)
|
|
963
|
+
.click();
|
|
964
|
+
equationEditorFlyout.inputFieldCursor()
|
|
965
|
+
.type('2{rightarrow}');
|
|
966
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.topLineSegment.ariaLabel)
|
|
967
|
+
.click();
|
|
968
|
+
equationEditorFlyout.inputFieldCursor()
|
|
969
|
+
.type('2{rightarrow}');
|
|
970
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.vector.ariaLabel)
|
|
971
|
+
.click();
|
|
972
|
+
equationEditorFlyout.inputFieldCursor()
|
|
973
|
+
.type('2{rightarrow}');
|
|
974
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.topDoubleSidedArrow.ariaLabel)
|
|
975
|
+
.click();
|
|
976
|
+
equationEditorFlyout.inputFieldCursor()
|
|
977
|
+
.type('2{rightarrow}');
|
|
978
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.topLeftArrow.ariaLabel)
|
|
979
|
+
.click();
|
|
980
|
+
equationEditorFlyout.inputFieldCursor()
|
|
981
|
+
.type('2{rightarrow}');
|
|
982
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.topRightArrow.ariaLabel)
|
|
983
|
+
.click();
|
|
984
|
+
equationEditorFlyout.inputFieldCursor()
|
|
985
|
+
.type('2{rightarrow}');
|
|
986
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.geometry.symbols.recurringDecimal.ariaLabel)
|
|
987
|
+
.click();
|
|
988
|
+
equationEditorFlyout.inputFieldCursor()
|
|
989
|
+
.type('2{rightarrow}');
|
|
990
|
+
});
|
|
991
|
+
|
|
992
|
+
equationEditorFlyout.tests.verifyCSSAnda11yOfEquationEditorInputField('geometry')
|
|
993
|
+
essayResponsePage.tests.insertEquationAndVerifyInputFieldContentsAndWordCount('◯□△▱⊥~≅∥∦π·°′″∠45m∠302⌒2―2→2↔2←2→2˙', '1/10000');
|
|
994
|
+
});
|
|
995
|
+
|
|
996
|
+
describe('Edit tab Equation Editor section', () => {
|
|
997
|
+
abortEarlySetup();
|
|
998
|
+
before(() => {
|
|
999
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
|
1000
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
1001
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
1002
|
+
});
|
|
1003
|
+
|
|
1004
|
+
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', () => {
|
|
1005
|
+
essayResponsePage.equationEditorSectionTitle()
|
|
1006
|
+
.verifyInnerText('Equation editor')
|
|
1007
|
+
.should('be.visible');
|
|
1008
|
+
essayResponsePage.equationEditorSectionHelperText()
|
|
1009
|
+
.verifyInnerText('Select the categories to display to the students in the equation editor.')
|
|
1010
|
+
.should('be.visible');
|
|
1011
|
+
essayResponsePage.createCustomCategoryButton()
|
|
1012
|
+
.verifyInnerText('Create custom category')
|
|
1013
|
+
.should('be.visible');
|
|
1014
|
+
});
|
|
1015
|
+
|
|
1016
|
+
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', () => {
|
|
1017
|
+
essayResponsePage.equationEditorSectionCategories()
|
|
1018
|
+
.each(($el, index) => {
|
|
1019
|
+
cy.wrap($el)
|
|
1020
|
+
.invoke('text')
|
|
1021
|
+
.then((textContent) => {
|
|
1022
|
+
const expectedValue = allCategories[index].displayName;
|
|
1023
|
+
expect(textContent.toLowerCase()).to.equal(expectedValue.toLowerCase())
|
|
1024
|
+
});
|
|
1025
|
+
cy.wrap($el)
|
|
1026
|
+
.parents('[id*="DraggableItem"]')
|
|
1027
|
+
.within(() => {
|
|
1028
|
+
essayResponsePage.equationEditorSectionCategoriesDragIcon()
|
|
1029
|
+
.should('be.visible');
|
|
1030
|
+
essayResponsePage.equationEditorSectionCategoriesEditIcon()
|
|
1031
|
+
.should('be.visible');
|
|
1032
|
+
});
|
|
1033
|
+
});
|
|
1034
|
+
|
|
1035
|
+
});
|
|
1036
|
+
|
|
1037
|
+
it('When user hovers on a category with a long name, then a tooltip should be displayed.', () => {
|
|
1038
|
+
let categoriesWithTooltip = [`${equationEditorCategoriesAndSymbols['relationships'].displayName}`, `${equationEditorCategoriesAndSymbols['trigonometry'].displayName}`, `${equationEditorCategoriesAndSymbols['calculus'].displayName}`, `${equationEditorCategoriesAndSymbols['geometry'].displayName}`];
|
|
1039
|
+
categoriesWithTooltip.forEach((categoryTooltipName) => {
|
|
1040
|
+
essayResponsePage.equationEditorSectionCategories()
|
|
1041
|
+
.contains(categoryTooltipName, { matchCase: false })
|
|
1042
|
+
.realHover();
|
|
1043
|
+
commonComponents.tooltipText()
|
|
1044
|
+
.verifyInnerText(categoryTooltipName);
|
|
1045
|
+
essayResponsePage.equationEditorSectionCategories()
|
|
1046
|
+
.contains(categoryTooltipName, { matchCase: false })
|
|
1047
|
+
.trigger('mouseout');
|
|
1048
|
+
commonComponents.tooltipText()
|
|
1049
|
+
.should('not.exist');
|
|
1050
|
+
});
|
|
1051
|
+
});
|
|
1052
|
+
|
|
1053
|
+
it(`By default, ${defaultSelectedCategories.toString()} should be selected`, () => {
|
|
1054
|
+
defaultSelectedCategories.forEach((category) => {
|
|
1055
|
+
essayResponsePage.equationEditorSectionCategories()
|
|
1056
|
+
.contains(category)
|
|
1057
|
+
.parents('.icon-button-custom-format')
|
|
1058
|
+
.should('have.class', 'Mui-selected')
|
|
1059
|
+
.within(() => {
|
|
1060
|
+
essayResponsePage.equationEditorSectionTickIcon()
|
|
1061
|
+
.should('be.visible');
|
|
1062
|
+
});
|
|
1063
|
+
});
|
|
1064
|
+
});
|
|
1065
|
+
|
|
1066
|
+
it('CSS of selected and deselected category', { tags: 'css' }, () => {
|
|
1067
|
+
cy.log('CSS of selected category')
|
|
1068
|
+
essayResponsePage.equationEditorSectionCategories()
|
|
1069
|
+
.first()
|
|
1070
|
+
.should('have.css', 'background-color', css.color.activeButtons)
|
|
1071
|
+
.within(() => {
|
|
1072
|
+
essayResponsePage.equationEditorSectionCategoryLabel()
|
|
1073
|
+
.verifyCSS(css.color.primaryBtn, css.fontSize.small, css.fontWeight.regular);
|
|
1074
|
+
essayResponsePage.equationEditorSectionTickIcon()
|
|
1075
|
+
.find('[data-name*="Icon"]')
|
|
1076
|
+
.should('have.css', 'fill', css.color.activeButtons);
|
|
1077
|
+
essayResponsePage.equationEditorSectionCategoriesDragIcon()
|
|
1078
|
+
.find('path')
|
|
1079
|
+
.should('have.css', 'fill', css.color.activeButtons);
|
|
1080
|
+
});
|
|
1081
|
+
cy.log('CSS of deselected category')
|
|
1082
|
+
essayResponsePage.equationEditorSectionCategories()
|
|
1083
|
+
.last()
|
|
1084
|
+
.should('have.css', 'background-color', css.color.primaryBtn)
|
|
1085
|
+
.within(() => {
|
|
1086
|
+
essayResponsePage.equationEditorSectionCategoryLabel()
|
|
1087
|
+
.verifyCSS(css.color.secondaryBtn, css.fontSize.small, css.fontWeight.regular);
|
|
1088
|
+
essayResponsePage.equationEditorSectionCategoriesDragIcon()
|
|
1089
|
+
.find('path')
|
|
1090
|
+
.should('have.css', 'fill', css.color.secondaryBtn)
|
|
1091
|
+
});
|
|
1092
|
+
});
|
|
1093
|
+
|
|
1094
|
+
it('Accessibility of selected and deselected category', { tags: 'a11y' }, () => {
|
|
1095
|
+
cy.checkAccessibility(essayResponsePage.equationEditorSectionCategories().contains(`${equationEditorCategoriesAndSymbols['keypad'].displayName}`).parents('[class*="DraggableItemsGrid"]'))
|
|
1096
|
+
});
|
|
1097
|
+
|
|
1098
|
+
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', () => {
|
|
1099
|
+
cy.log('Seelecting and deselecting a category')
|
|
1100
|
+
essayResponsePage.equationEditorSectionCategories()
|
|
1101
|
+
.contains(`${equationEditorCategoriesAndSymbols['keypad'].displayName}`)
|
|
1102
|
+
.click();
|
|
1103
|
+
essayResponsePage.equationEditorSectionCategories()
|
|
1104
|
+
.contains(`${equationEditorCategoriesAndSymbols['geometry'].displayName}`, { matchCase: false })
|
|
1105
|
+
.click();
|
|
1106
|
+
cy.log('Switching to Preview tab')
|
|
1107
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
1108
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
1109
|
+
.click();
|
|
1110
|
+
equationEditorFlyout.categoryTab()
|
|
1111
|
+
.should('not.have.text', 'Keypad');
|
|
1112
|
+
equationEditorFlyout.categoryTab()
|
|
1113
|
+
.eq(0)
|
|
1114
|
+
.within(() => {
|
|
1115
|
+
equationEditorFlyout.categoryTabTitle()
|
|
1116
|
+
.verifyInnerText('Basic')
|
|
1117
|
+
.should('have.class', 'selected-tool-content-color');
|
|
1118
|
+
});
|
|
1119
|
+
equationEditorFlyout.buttonNext()
|
|
1120
|
+
.click();
|
|
1121
|
+
equationEditorFlyout.categoryTab()
|
|
1122
|
+
.eq(7)
|
|
1123
|
+
.verifyInnerText(`${equationEditorCategoriesAndSymbols['geometry'].displayName}`);
|
|
1124
|
+
});
|
|
1125
|
+
|
|
1126
|
+
it('On deselecting all the categories an error message should be displayed \'Error: Please select a category.\' and the Equation Editor flyout should be empty', () => {
|
|
1127
|
+
cy.log('Pre step: Switching to Edit tab')
|
|
1128
|
+
essayResponsePage.steps.switchToEditTab();
|
|
1129
|
+
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}`]);
|
|
1130
|
+
essayResponsePage.selectACategoryErrorMessage()
|
|
1131
|
+
.verifyInnerText('Error: Please select a category.')
|
|
1132
|
+
cy.log('Switching to Preview tab')
|
|
1133
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
1134
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
1135
|
+
.click();
|
|
1136
|
+
equationEditorFlyout.dialogBox()
|
|
1137
|
+
.should('be.visible');
|
|
1138
|
+
equationEditorFlyout.categoryTabTitle()
|
|
1139
|
+
.should('not.exist');
|
|
1140
|
+
equationEditorFlyout.categoryCharactersWrapper()
|
|
1141
|
+
.should('not.exist');
|
|
1142
|
+
cy.log('Post step: Switching to Edit tab')
|
|
1143
|
+
essayResponsePage.steps.switchToEditTab();
|
|
1144
|
+
});
|
|
1145
|
+
|
|
1146
|
+
//https://redmine.zeuslearning.com/issues/530205
|
|
1147
|
+
it('CSS of error message', { tags: 'css' }, () => {
|
|
1148
|
+
essayResponsePage.selectACategoryErrorMessage()
|
|
1149
|
+
.verifyCSS(css.color.errorText, css.fontSize.small, css.fontWeight.regular);
|
|
1150
|
+
});
|
|
1151
|
+
|
|
1152
|
+
it('Accessibility of error message', { tags: 'a11y' }, () => {
|
|
1153
|
+
cy.checkAccessibility(essayResponsePage.selectACategoryErrorMessage());
|
|
1154
|
+
});
|
|
1155
|
+
|
|
1156
|
+
it('When user selects any category then the error message should disappear', () => {
|
|
1157
|
+
essayResponsePage.equationEditorSectionCategories()
|
|
1158
|
+
.contains(`${equationEditorCategoriesAndSymbols['keypad'].displayName}`)
|
|
1159
|
+
.click();
|
|
1160
|
+
essayResponsePage.selectACategoryErrorMessage()
|
|
1161
|
+
.should('not.exist');
|
|
1162
|
+
});
|
|
1163
|
+
|
|
1164
|
+
it('When user re-selects the Equation Editor icon then only the previously selected category category should appear in selected state', () => {
|
|
1165
|
+
essayResponsePage.customizeFormattingOptionsTiles('Equation Editor')
|
|
1166
|
+
.click();
|
|
1167
|
+
essayResponsePage.equationEditorSection()
|
|
1168
|
+
.should('not.exist');
|
|
1169
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
1170
|
+
essayResponsePage.equationEditorSectionCategories()
|
|
1171
|
+
.each(($el, index) => {
|
|
1172
|
+
if (index == 0) {
|
|
1173
|
+
cy.wrap($el)
|
|
1174
|
+
.should('have.class', 'Mui-selected');
|
|
1175
|
+
} else {
|
|
1176
|
+
cy.wrap($el)
|
|
1177
|
+
.should('not.have.class', 'Mui-selected');
|
|
1178
|
+
}
|
|
1179
|
+
});
|
|
1180
|
+
});
|
|
1181
|
+
});
|
|
1182
|
+
|
|
1183
|
+
describe('Adding and deleting equations', () => {
|
|
1184
|
+
abortEarlySetup();
|
|
1185
|
+
before(() => {
|
|
1186
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
|
1187
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
1188
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
1189
|
+
cy.barsPreLoaderWait();
|
|
1190
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
1191
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
1192
|
+
.click();
|
|
1193
|
+
});
|
|
1194
|
+
|
|
1195
|
+
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', () => {
|
|
1196
|
+
cy.log('Adding an equation using Basic and Greek category')
|
|
1197
|
+
equationEditorFlyout.categoryTab(`${equationEditorCategoriesAndSymbols['basic'].displayName}`)
|
|
1198
|
+
.parents('.tool-wrapper')
|
|
1199
|
+
.click();
|
|
1200
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.x.ariaLabel)
|
|
1201
|
+
.click();
|
|
1202
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.square.ariaLabel)
|
|
1203
|
+
.click();
|
|
1204
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.basic.symbols.equalTo.ariaLabel)
|
|
1205
|
+
.click();
|
|
1206
|
+
equationEditorFlyout.categoryTab(`${equationEditorCategoriesAndSymbols['greek'].displayName}`)
|
|
1207
|
+
.parents('.tool-wrapper')
|
|
1208
|
+
.click();
|
|
1209
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.greek.symbols.piUpper.ariaLabel)
|
|
1210
|
+
.click();
|
|
1211
|
+
cy.log('Clicking on Ok button to add the equation to Preview input field and checking word count')
|
|
1212
|
+
equationEditorFlyout.buttonOk()
|
|
1213
|
+
.click();
|
|
1214
|
+
essayResponsePage.responseField()
|
|
1215
|
+
.find('.cke_widget_wrapper')
|
|
1216
|
+
.should('have.class', 'cke_widget_focused');
|
|
1217
|
+
essayResponsePage.steps.verifyResponseFieldWordCount('1/10000')
|
|
1218
|
+
});
|
|
1219
|
+
|
|
1220
|
+
it('When user enters another equation in the preview input field without adding any space the word count should remain the same', () => {
|
|
1221
|
+
cy.log('Prestep: Clicking on Equation editor button')
|
|
1222
|
+
essayResponsePage.responseField()
|
|
1223
|
+
.type('{rightarrow}');
|
|
1224
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
1225
|
+
.click();
|
|
1226
|
+
equationEditorFlyout.categoryTab(`${equationEditorCategoriesAndSymbols['arrows'].displayName}`)
|
|
1227
|
+
.parents('.tool-wrapper')
|
|
1228
|
+
.click();
|
|
1229
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.arrows.symbols.leftArrow.ariaLabel)
|
|
1230
|
+
.click();
|
|
1231
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.arrows.symbols.leftRightHarpoons.ariaLabel)
|
|
1232
|
+
.click();
|
|
1233
|
+
equationEditorFlyout.buttonOk()
|
|
1234
|
+
.click();
|
|
1235
|
+
essayResponsePage.steps.verifyResponseFieldWordCount('1/10000')
|
|
1236
|
+
});
|
|
1237
|
+
|
|
1238
|
+
it('When user enters another equation in the preview input field after adding a space the word count should increase by 1', () => {
|
|
1239
|
+
essayResponsePage.responseField()
|
|
1240
|
+
.type('{rightarrow} ');
|
|
1241
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
1242
|
+
.click();
|
|
1243
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.keypad.symbols.one.ariaLabel)
|
|
1244
|
+
.click();
|
|
1245
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.keypad.symbols.add.ariaLabel)
|
|
1246
|
+
.click();
|
|
1247
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.keypad.symbols.two.ariaLabel)
|
|
1248
|
+
.click();
|
|
1249
|
+
equationEditorFlyout.buttonOk()
|
|
1250
|
+
.click();
|
|
1251
|
+
essayResponsePage.steps.verifyResponseFieldWordCount('2/10000')
|
|
1252
|
+
});
|
|
1253
|
+
|
|
1254
|
+
it('When user clicks backspace the entered equation should get deleted and the word count should decrease by 1', () => {
|
|
1255
|
+
essayResponsePage.responseField()
|
|
1256
|
+
.type('{backspace}{backspace}')
|
|
1257
|
+
.should('not.have.text', '1+2');
|
|
1258
|
+
essayResponsePage.steps.verifyResponseFieldWordCount('1/10000')
|
|
1259
|
+
});
|
|
1260
|
+
});
|
|
1261
|
+
|
|
1262
|
+
describe('Edit equation', () => {
|
|
1263
|
+
abortEarlySetup();
|
|
1264
|
+
before(() => {
|
|
1265
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
|
1266
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
1267
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor'])
|
|
1268
|
+
cy.barsPreLoaderWait();
|
|
1269
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
1270
|
+
essayResponsePage.previewTabToolbarOption('Equation Editor')
|
|
1271
|
+
.click();
|
|
1272
|
+
cy.log('Adding an equation to preview input field')
|
|
1273
|
+
equationEditorFlyout.categoryTab(`${equationEditorCategoriesAndSymbols['relationships'].displayName}`)
|
|
1274
|
+
.parents('.tool-wrapper')
|
|
1275
|
+
.click();
|
|
1276
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.relationships.symbols.simultaneousEquations.ariaLabel)
|
|
1277
|
+
.click();
|
|
1278
|
+
equationEditorFlyout.inputFieldCursor()
|
|
1279
|
+
.type('a');
|
|
1280
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
1281
|
+
.type('b');
|
|
1282
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
1283
|
+
.type('c');
|
|
1284
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
|
1285
|
+
.type('d');
|
|
1286
|
+
equationEditorFlyout.buttonOk()
|
|
1287
|
+
.click();
|
|
1288
|
+
essayResponsePage.responseField()
|
|
1289
|
+
.find('.cke_widget_element')
|
|
1290
|
+
.should('have.text', 'a+b=c+d=');
|
|
1291
|
+
});
|
|
1292
|
+
|
|
1293
|
+
it('When user double clicks on an added equation in the preview input field, the Equation editor flyout should open', () => {
|
|
1294
|
+
essayResponsePage.responseField()
|
|
1295
|
+
.find('.cke_widget_element')
|
|
1296
|
+
.dblclick();
|
|
1297
|
+
equationEditorFlyout.dialogBox()
|
|
1298
|
+
.should('be.visible');
|
|
1299
|
+
});
|
|
1300
|
+
|
|
1301
|
+
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`, () => {
|
|
1302
|
+
equationEditorFlyout.categoryTab(`${equationEditorCategoriesAndSymbols['keypad'].displayName}`)
|
|
1303
|
+
.parents('.tool-wrapper')
|
|
1304
|
+
.within(() => {
|
|
1305
|
+
equationEditorFlyout.categoryTabTitle()
|
|
1306
|
+
.verifyInnerText(`${equationEditorCategoriesAndSymbols['keypad'].displayName}`)
|
|
1307
|
+
.should('have.class', 'selected-tool-content-color');
|
|
1308
|
+
});
|
|
1309
|
+
equationEditorFlyout.previewInputField()
|
|
1310
|
+
.contains('a+b=c+d=');
|
|
1311
|
+
});
|
|
1312
|
+
|
|
1313
|
+
it('When user clicks on Cancel button the equation should be displayed in the preview input field without any changes', () => {
|
|
1314
|
+
equationEditorFlyout.buttonCancel()
|
|
1315
|
+
.click();
|
|
1316
|
+
essayResponsePage.responseField()
|
|
1317
|
+
.find('.cke_widget_element')
|
|
1318
|
+
.should('have.text', 'a+b=c+d=');
|
|
1319
|
+
});
|
|
1320
|
+
|
|
1321
|
+
it('When user edits the added equation and clicks on Ok button, the edited equation should be displayed in the preview input field', () => {
|
|
1322
|
+
essayResponsePage.responseField()
|
|
1323
|
+
.find('.cke_widget_element')
|
|
1324
|
+
.dblclick();
|
|
1325
|
+
equationEditorFlyout.previewInputField()
|
|
1326
|
+
.click()
|
|
1327
|
+
.type('{backspace}{backspace}');
|
|
1328
|
+
equationEditorFlyout.categoryTab(`${equationEditorCategoriesAndSymbols['delimiters'].displayName}`)
|
|
1329
|
+
.parents('.tool-wrapper')
|
|
1330
|
+
.click();
|
|
1331
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.delimiters.symbols.singleSquareOpen.ariaLabel)
|
|
1332
|
+
.click();
|
|
1333
|
+
equationEditorFlyout.inputFieldCursor()
|
|
1334
|
+
.type('a{rightarrow}');
|
|
1335
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols.delimiters.symbols.singleSquareClose.ariaLabel)
|
|
1336
|
+
.click();
|
|
1337
|
+
equationEditorFlyout.buttonOk()
|
|
1338
|
+
.click();
|
|
1339
|
+
essayResponsePage.responseField()
|
|
1340
|
+
.find('.cke_widget_element')
|
|
1341
|
+
.should('have.text', '[a]');
|
|
1342
|
+
essayResponsePage.responseField()
|
|
1343
|
+
.should('not.have.text', 'a+b=c+d=');
|
|
1344
|
+
});
|
|
1345
|
+
});
|
|
1346
|
+
});
|