itemengine-cypress-automation 1.0.256-updatingToOTKV2-5b0ef53.0 → 1.0.257-updatedRepo18thNov-483622e.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerPreviewTab.js +21 -21
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerPreviewTabSupportedFileTypes.js +6 -6
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerPreviewTabTranscript.js +4 -4
- package/cypress/e2e/ILC/CkEditorEquationEditor/equationEditorBasicFile.js +86 -5
- package/cypress/e2e/ILC/CkEditorEquationEditor/selectModeEditorBasic.js +114 -0
- package/cypress/e2e/ILC/CkEditorInsertImage/imageInfo.js +160 -0
- package/cypress/e2e/ILC/CkEditorInsertImage/insertImageBasicFile.js +83 -0
- package/cypress/e2e/ILC/CkEditorInsertImage/upload.js +53 -0
- package/cypress/e2e/ILC/CkEditorLink/linkBasic.js +85 -0
- package/cypress/e2e/ILC/CkEditorLink/linkInfoSection.js +94 -0
- package/cypress/e2e/ILC/CkEditorLink/linkPreview.js +38 -0
- package/cypress/e2e/ILC/CkEditorLink/uploadSection.js +59 -0
- package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +14 -279
- package/cypress/e2e/ILC/EssayResponse/equationEditorCategories1.js +78 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/additionalSettingsForAnswerInputFields.js +2 -2
- package/cypress/e2e/ILC/Graphing/acceptRepeatedPoints.js +75 -0
- package/cypress/e2e/ILC/TextEntryMath/additionalSettingsBasic.js +84 -0
- package/cypress/e2e/ILC/TextEntryMath/additionalSettingsForAnswerInputFields.js +286 -0
- package/cypress/e2e/ILC/TextEntryMath/customSettingsSeparators.ts +107 -0
- package/cypress/e2e/ILC/TextEntryMath/equationEditor.smoke.js +99 -0
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +336 -0
- package/cypress/pages/components/ariaLabelSectionComponent.js +1 -1
- package/cypress/pages/components/ckEditorAudioPlayerComponent.js +0 -11
- package/cypress/pages/components/ckEditorEquationEditorComponent.js +175 -7
- package/cypress/pages/components/ckEditorInsertImageComponent.js +272 -0
- package/cypress/pages/components/ckEditorLinkComponent.js +142 -0
- package/cypress/pages/components/customSettingsSeparatorsComponent.ts +97 -0
- package/cypress/pages/components/equationEditorSectionCommonComponent.js +528 -0
- package/cypress/pages/components/gradingViewEnumerationComponent.js +11 -6
- package/cypress/pages/components/index.js +2 -1
- package/cypress/pages/components/questionInstructionsComponent.js +10 -0
- package/cypress/pages/essayResponsePage.js +4 -121
- package/cypress/pages/graphingPage.js +24 -2
- package/cypress/pages/multipleSelectionPage.js +8 -0
- package/cypress/pages/textEntryMathPage.js +125 -18
- package/cypress/support/index.d.ts +7 -0
- package/cypress/tsconfig.json +11 -0
- package/package.json +1 -1
@@ -1,15 +1,11 @@
|
|
1
1
|
import { equationEditorCategoriesAndSymbols } from "../../../fixtures/equationEditorCategoriesAndSymbols ";
|
2
|
-
import { createCustomCategoryFlyout } from "../../../pages/components";
|
3
2
|
import { equationEditorFlyout } from "../../../pages/components/equationEditorFlyout";
|
4
3
|
import { essayResponsePage } from "../../../pages/essayResponsePage";
|
4
|
+
import { createCustomCategoryFlyout } from "../../../pages/components/createCustomCategoryFlyout";
|
5
5
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
6
6
|
import utilities from "../../../support/helpers/utilities";
|
7
|
-
const css = Cypress.env('css');
|
8
7
|
const grepTags = Cypress.env('grepTags');
|
9
8
|
|
10
|
-
const defaultSelectedCategories = ['Numpad', 'Intermediate', 'Primary', 'General', 'Common', 'Algebra', 'Geo', 'Compare', 'Matrices'];
|
11
|
-
const allCategories = Object.values(equationEditorCategoriesAndSymbols)
|
12
|
-
|
13
9
|
describe('Create question page - Essay Response: Equation Editor functionality', () => {
|
14
10
|
before(() => {
|
15
11
|
cy.loginAs('admin');
|
@@ -29,87 +25,7 @@ describe('Create question page - Essay Response: Equation Editor functionality',
|
|
29
25
|
utilities.verifyElementVisibilityState(essayResponsePage.previewTabToolbarOption('Equation Editor'), 'visible');
|
30
26
|
});
|
31
27
|
|
32
|
-
|
33
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
|
34
|
-
utilities.verifyElementVisibilityState(equationEditorFlyout.dialogBox(), 'visible');
|
35
|
-
});
|
36
|
-
|
37
|
-
it('Done button should be displayed at the bottom of the flyout', () => {
|
38
|
-
utilities.verifyElementVisibilityState(equationEditorFlyout.buttonOk(), 'visible');
|
39
|
-
utilities.verifyInnerText(equationEditorFlyout.buttonOk(), 'Done');
|
40
|
-
});
|
41
|
-
|
42
|
-
it('Equation Editor input field should be displayed and when user focuses in the input field should have cursor', () => {
|
43
|
-
equationEditorFlyout.steps.verifyDefaultEquationEditorInputFieldWithCursor();
|
44
|
-
});
|
45
|
-
|
46
|
-
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', () => {
|
47
|
-
equationEditorFlyout.steps.verifyEquationEditorCategoryTiles(defaultSelectedCategories);
|
48
|
-
equationEditorFlyout.steps.verifyCategoryTileSelectedInEquationEditor(equationEditorCategoriesAndSymbols['numPad'].displayName);
|
49
|
-
});
|
50
|
-
|
51
|
-
it('CSS of \'Equation Editor\' flyout', { tags: 'css' }, () => {
|
52
|
-
utilities.verifyCSS(equationEditorFlyout.dialogBoxTitle(), {
|
53
|
-
'color': css.color.flyoutTitle,
|
54
|
-
'font-size': css.fontSize.heading,
|
55
|
-
'font-weight': css.fontWeight.bold
|
56
|
-
});
|
57
|
-
cy.log('CSS of selected category')
|
58
|
-
utilities.getNthElement(equationEditorFlyout.categoryTab(), 0)
|
59
|
-
.within(() => {
|
60
|
-
utilities.verifyCSS(equationEditorFlyout.categoryTabTitle(), {
|
61
|
-
'color': css.color.activeButtons,
|
62
|
-
'font-size': css.fontSize.small,
|
63
|
-
'font-weight': css.fontWeight.regular
|
64
|
-
});
|
65
|
-
utilities.verifyCSS(equationEditorFlyout.categoryTabIcon(), {
|
66
|
-
'color': css.color.activeButtons,
|
67
|
-
'font-size': css.fontSize.default,
|
68
|
-
'font-weight': css.fontWeight.regular
|
69
|
-
});
|
70
|
-
});
|
71
|
-
cy.log('CSS of unselected category')
|
72
|
-
utilities.getNthElement(equationEditorFlyout.categoryTab(), 0)
|
73
|
-
.within(() => {
|
74
|
-
utilities.verifyCSS(equationEditorFlyout.categoryTabTitle(), {
|
75
|
-
'color': css.color.activeButtons,
|
76
|
-
'font-size': css.fontSize.small,
|
77
|
-
'font-weight': css.fontWeight.regular
|
78
|
-
});
|
79
|
-
utilities.verifyCSS(equationEditorFlyout.categoryTabIcon(), {
|
80
|
-
'color': css.color.activeButtons,
|
81
|
-
'font-size': css.fontSize.default,
|
82
|
-
'font-weight': css.fontWeight.regular
|
83
|
-
});
|
84
|
-
});
|
85
|
-
utilities.verifyCSS(equationEditorFlyout.previewInputField(), {
|
86
|
-
'background-color': css.color.defaultBackground
|
87
|
-
});
|
88
|
-
utilities.verifyCSS(equationEditorFlyout.buttonCancel(), {
|
89
|
-
'color': css.color.secondaryBtn,
|
90
|
-
'font-size': css.fontSize.default,
|
91
|
-
'font-weight': css.fontWeight.semibold,
|
92
|
-
'background-color': css.color.secondaryBtnBg,
|
93
|
-
});
|
94
|
-
utilities.verifyCSS(equationEditorFlyout.buttonOk(), {
|
95
|
-
'color': css.color.whiteText,
|
96
|
-
'font-size': css.fontSize.default,
|
97
|
-
'font-weight': css.fontWeight.semibold,
|
98
|
-
'background-color': css.color.primaryBtnBg,
|
99
|
-
});
|
100
|
-
});
|
101
|
-
|
102
|
-
//Failing due to https://redmine.zeuslearning.com/issues/564678
|
103
|
-
it('Accessibility of \'Equation Editor\' flyout', { tags: 'a11y' }, () => {
|
104
|
-
cy.checkAccessibility(equationEditorFlyout.dialogBox());
|
105
|
-
});
|
106
|
-
|
107
|
-
it('Cancel button should be displayed in the flyout and when user clicks the \'Cancel\' button then the flyout should close', () => {
|
108
|
-
utilities.verifyElementVisibilityState(equationEditorFlyout.buttonCancel(), 'visible');
|
109
|
-
utilities.verifyInnerText(equationEditorFlyout.buttonCancel(), 'Cancel');
|
110
|
-
equationEditorFlyout.steps.clickOnEquationEditorCancelButton();
|
111
|
-
utilities.verifyElementVisibilityState(equationEditorFlyout.dialogBox(), 'notExist');
|
112
|
-
});
|
28
|
+
essayResponsePage.tests.equationEditorFlyoutInPreviewTab('essay response')
|
113
29
|
});
|
114
30
|
|
115
31
|
if (!grepTags || !grepTags.includes('smoke')) {
|
@@ -124,69 +40,11 @@ describe('Create question page - Essay Response: Equation Editor functionality',
|
|
124
40
|
essayResponsePage.steps.deselectCategoryInEquationEditorSectionEditTab(equationEditorCategoriesAndSymbols['geo'].displayName);
|
125
41
|
essayResponsePage.steps.deselectCategoryInEquationEditorSectionEditTab(equationEditorCategoriesAndSymbols['compare'].displayName);
|
126
42
|
essayResponsePage.steps.deselectCategoryInEquationEditorSectionEditTab(equationEditorCategoriesAndSymbols['matrices'].displayName);
|
43
|
+
essayResponsePage.steps.deselectCategoryInEquationEditorSectionEditTab(equationEditorCategoriesAndSymbols['keyPad'].displayName);
|
127
44
|
essayResponsePage.steps.switchToPreviewTab();
|
128
45
|
});
|
129
46
|
|
130
|
-
|
131
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
|
132
|
-
utilities.verifyElementVisibilityState(equationEditorFlyout.buttonNext(), 'notExist');
|
133
|
-
utilities.verifyElementVisibilityState(equationEditorFlyout.buttonPrevious(), 'notExist');
|
134
|
-
});
|
135
|
-
|
136
|
-
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', () => {
|
137
|
-
cy.log('Pre step: Switch to Edit tab and select categories from the Equation Editor section')
|
138
|
-
essayResponsePage.steps.switchToEditTab();
|
139
|
-
//Need to remove this once https://redmine.zeuslearning.com/issues/577356 is resolved
|
140
|
-
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
141
|
-
essayResponsePage.steps.selectingCategories([`${equationEditorCategoriesAndSymbols['algebra'].displayName}`, `${equationEditorCategoriesAndSymbols['matrices'].displayName}`, `${equationEditorCategoriesAndSymbols['geo'].displayName}`, `${equationEditorCategoriesAndSymbols['compare'].displayName}`, `${equationEditorCategoriesAndSymbols['calculus'].displayName}`, `${equationEditorCategoriesAndSymbols['trig'].displayName}`, `${equationEditorCategoriesAndSymbols['delimiters'].displayName}`, `${equationEditorCategoriesAndSymbols['greek'].displayName}`, `${equationEditorCategoriesAndSymbols['measurement'].displayName}`, `${equationEditorCategoriesAndSymbols['setNotation'].displayName}`]);
|
142
|
-
cy.log('Switching to Preview tab')
|
143
|
-
essayResponsePage.steps.switchToPreviewTab()
|
144
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
|
145
|
-
utilities.verifyElementVisibilityState(equationEditorFlyout.buttonNext(), 'visible');
|
146
|
-
utilities.verifyElementVisibilityState(equationEditorFlyout.buttonPrevious(), 'visible');
|
147
|
-
});
|
148
|
-
|
149
|
-
it('CSS of \'Next button\' and \'Previous button\'', { tags: 'css' }, () => {
|
150
|
-
utilities.verifyCSS(equationEditorFlyout.buttonPrevious().find('svg'), {
|
151
|
-
'background-color': css.color.defaultBackground
|
152
|
-
});
|
153
|
-
utilities.verifyCSS(equationEditorFlyout.buttonPrevious().find('svg').find('path'), {
|
154
|
-
'fill': css.color.nextPreviousButtonFill
|
155
|
-
});
|
156
|
-
utilities.verifyCSS(equationEditorFlyout.buttonNext().find('svg'), {
|
157
|
-
'background-color': css.color.defaultBackground
|
158
|
-
});
|
159
|
-
utilities.verifyCSS(equationEditorFlyout.buttonNext().find('svg').find('path'), {
|
160
|
-
'fill': css.color.nextPreviousButtonFill
|
161
|
-
});
|
162
|
-
});
|
163
|
-
|
164
|
-
it('Accessibility of \'Next button\' and \'Previous button\'', { tags: 'a11y' }, () => {
|
165
|
-
cy.checkAccessibility(equationEditorFlyout.buttonPrevious());
|
166
|
-
cy.checkAccessibility(equationEditorFlyout.buttonNext());
|
167
|
-
});
|
168
|
-
|
169
|
-
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', () => {
|
170
|
-
utilities.verifyElementDisabled(equationEditorFlyout.buttonPrevious());
|
171
|
-
utilities.verifyElementNotDisabled(equationEditorFlyout.buttonNext());
|
172
|
-
});
|
173
|
-
|
174
|
-
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.', () => {
|
175
|
-
equationEditorFlyout.steps.clickOnEquationEditorButtonNext();
|
176
|
-
utilities.verifyElementNotDisabled(equationEditorFlyout.buttonPrevious());
|
177
|
-
utilities.verifyElementNotDisabled(equationEditorFlyout.buttonNext());
|
178
|
-
cy.log('Clicking on Next button to reach end of tablist')
|
179
|
-
equationEditorFlyout.steps.clickOnEquationEditorButtonNext()
|
180
|
-
utilities.verifyElementNotDisabled(equationEditorFlyout.buttonPrevious());
|
181
|
-
utilities.verifyElementDisabled(equationEditorFlyout.buttonNext());
|
182
|
-
});
|
183
|
-
|
184
|
-
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', () => {
|
185
|
-
equationEditorFlyout.steps.clickOnEquationEditorButtonPrevious()
|
186
|
-
equationEditorFlyout.steps.clickOnEquationEditorButtonPrevious()
|
187
|
-
utilities.verifyElementDisabled(equationEditorFlyout.buttonPrevious());
|
188
|
-
utilities.verifyElementNotDisabled(equationEditorFlyout.buttonNext());
|
189
|
-
});
|
47
|
+
essayResponsePage.tests.verifyNextAndPreviewButtonInPreviewTab('essay response')
|
190
48
|
});
|
191
49
|
}
|
192
50
|
|
@@ -197,7 +55,7 @@ describe('Create question page - Essay Response: Equation Editor functionality',
|
|
197
55
|
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
198
56
|
cy.barsPreLoaderWait();
|
199
57
|
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
200
|
-
|
58
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor']);
|
201
59
|
});
|
202
60
|
|
203
61
|
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', () => {
|
@@ -209,118 +67,18 @@ describe('Create question page - Essay Response: Equation Editor functionality',
|
|
209
67
|
utilities.verifyInnerText(createCustomCategoryFlyout.createCustomCategoryButton(), 'Create custom category');
|
210
68
|
});
|
211
69
|
|
212
|
-
|
213
|
-
essayResponsePage.steps.verifyDefaultCategoriesDisplayedInEquationEditorSectionEditTab();
|
214
|
-
});
|
215
|
-
|
216
|
-
it('When user hovers on a category with a long name, then a tooltip should be displayed.', () => {
|
217
|
-
let categoriesWithTooltip = ['Greek Symbols', 'Measurement', 'Other Symbols'];
|
218
|
-
essayResponsePage.steps.verifyTooltipsOfCategoryTilesInEquationEditorSectionEditTab(categoriesWithTooltip);
|
219
|
-
});
|
220
|
-
|
221
|
-
it(`By default, ${defaultSelectedCategories.toString()} should be selected`, () => {
|
222
|
-
defaultSelectedCategories.forEach((category) => {
|
223
|
-
essayResponsePage.steps.verifySelectedCategoryInEquationEditorSectionEditTab(category);
|
224
|
-
});
|
225
|
-
});
|
226
|
-
|
227
|
-
it('CSS of selected and deselected category', { tags: 'css' }, () => {
|
228
|
-
cy.log('CSS of selected category')
|
229
|
-
utilities.verifyCSS(utilities.getNthElement(essayResponsePage.equationEditorSectionCategories(), 0), {
|
230
|
-
'background-color': css.color.activeButtons
|
231
|
-
});
|
232
|
-
utilities.getNthElement(essayResponsePage.equationEditorSectionCategories(), 0)
|
233
|
-
.within(() => {
|
234
|
-
utilities.verifyCSS(essayResponsePage.equationEditorSectionCategoryLabel(), {
|
235
|
-
'color': css.color.primaryBtn,
|
236
|
-
'font-size': css.fontSize.small,
|
237
|
-
'font-weight': css.fontWeight.regular
|
238
|
-
});
|
239
|
-
utilities.verifyCSS(essayResponsePage.equationEditorSectionTickIcon().find('[data-name*="Icon"]'), {
|
240
|
-
'fill': css.color.activeButtons
|
241
|
-
});
|
242
|
-
utilities.verifyCSS(essayResponsePage.equationEditorSectionCategoriesDragIcon().find('path'), {
|
243
|
-
'fill': css.color.activeButtons
|
244
|
-
});
|
245
|
-
});
|
246
|
-
cy.log('CSS of deselected category')
|
247
|
-
utilities.verifyCSS(utilities.getNthElement(essayResponsePage.equationEditorSectionCategories(), 12), {
|
248
|
-
'background-color': css.color.primaryBtn
|
249
|
-
});
|
250
|
-
utilities.getNthElement(essayResponsePage.equationEditorSectionCategories(), 12)
|
251
|
-
.within(() => {
|
252
|
-
utilities.verifyCSS(essayResponsePage.equationEditorSectionCategoryLabel(), {
|
253
|
-
'color': css.color.secondaryBtn,
|
254
|
-
'font-size': css.fontSize.small,
|
255
|
-
'font-weight': css.fontWeight.regular
|
256
|
-
});
|
257
|
-
utilities.verifyCSS(essayResponsePage.equationEditorSectionCategoriesDragIcon().find('path'), {
|
258
|
-
'fill': css.color.secondaryBtn
|
259
|
-
});
|
260
|
-
});
|
261
|
-
});
|
70
|
+
essayResponsePage.tests.verifyEquationEditorSection();
|
262
71
|
|
263
|
-
|
264
|
-
cy.checkAccessibility(essayResponsePage.equationEditorSectionCategories().contains(`${equationEditorCategoriesAndSymbols['numPad'].displayName}`).parents('[class*="DraggableItemsGrid"]'))
|
265
|
-
});
|
266
|
-
|
267
|
-
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', () => {
|
268
|
-
cy.log('Selecting and deselecting a category')
|
269
|
-
essayResponsePage.steps.deselectACategoryInEquationEditorSectionEditTab(`${equationEditorCategoriesAndSymbols['numPad'].displayName}`);
|
270
|
-
essayResponsePage.steps.selectACategoryInEquationEditorSectionEditTab(`${equationEditorCategoriesAndSymbols['greek'].displayName}`);
|
271
|
-
cy.log('Switching to Preview tab')
|
272
|
-
essayResponsePage.steps.switchToPreviewTab();
|
273
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
|
274
|
-
equationEditorFlyout.steps.verifyCategoryNotDisplayedInEquationEditor(`${equationEditorCategoriesAndSymbols['numPad'].displayName}`);
|
275
|
-
equationEditorFlyout.steps.clickOnEquationEditorButtonNext()
|
276
|
-
equationEditorFlyout.steps.verifyCategoryIsDisplayedInEquationEditor(`${equationEditorCategoriesAndSymbols['greek'].displayName}`);
|
277
|
-
});
|
278
|
-
|
279
|
-
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', () => {
|
280
|
-
cy.log('Pre step: Switching to Edit tab')
|
281
|
-
essayResponsePage.steps.switchToEditTab();
|
282
|
-
//Need to remove this once https://redmine.zeuslearning.com/issues/577356 is resolved
|
283
|
-
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
284
|
-
essayResponsePage.steps.selectingCategories([`${equationEditorCategoriesAndSymbols['intermediate'].displayName}`, `${equationEditorCategoriesAndSymbols['primary'].displayName}`, `${equationEditorCategoriesAndSymbols['general'].displayName}`, `${equationEditorCategoriesAndSymbols['common'].displayName}`, `${equationEditorCategoriesAndSymbols['algebra'].displayName}`, `${equationEditorCategoriesAndSymbols['geo'].displayName}`, `${equationEditorCategoriesAndSymbols['compare'].displayName}`, `${equationEditorCategoriesAndSymbols['matrices'].displayName}`, `${equationEditorCategoriesAndSymbols['greek'].displayName}`]);
|
285
|
-
utilities.verifyInnerText(essayResponsePage.selectACategoryErrorMessage(), 'Error: Please select a category.');
|
286
|
-
cy.log('Switching to Preview tab')
|
287
|
-
essayResponsePage.steps.switchToPreviewTab();
|
288
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
|
289
|
-
utilities.verifyElementVisibilityState(equationEditorFlyout.dialogBox(), 'visible');
|
290
|
-
utilities.verifyElementVisibilityState(equationEditorFlyout.categoryTabTitle(), 'notExist');
|
291
|
-
utilities.verifyElementVisibilityState(equationEditorFlyout.categoryCharactersWrapper(), 'notExist');
|
292
|
-
cy.log('Post step: Switching to Edit tab')
|
293
|
-
essayResponsePage.steps.switchToEditTab();
|
294
|
-
//Need to remove this once https://redmine.zeuslearning.com/issues/577356 is resolved
|
295
|
-
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
296
|
-
});
|
297
|
-
|
298
|
-
//https://redmine.zeuslearning.com/issues/530205
|
299
|
-
it('CSS of error message', { tags: 'css' }, () => {
|
300
|
-
utilities.verifyCSS(essayResponsePage.selectACategoryErrorMessage(), {
|
301
|
-
'color': css.color.errorText,
|
302
|
-
'font-size': css.fontSize.small,
|
303
|
-
'font-weight': css.fontWeight.regular
|
304
|
-
});
|
305
|
-
});
|
306
|
-
|
307
|
-
it('Accessibility of error message', { tags: 'a11y' }, () => {
|
308
|
-
cy.checkAccessibility(essayResponsePage.selectACategoryErrorMessage());
|
309
|
-
});
|
310
|
-
|
311
|
-
it('When user selects any category then the error message should disappear', () => {
|
312
|
-
essayResponsePage.steps.selectACategoryInEquationEditorSectionEditTab(`${equationEditorCategoriesAndSymbols['numPad'].displayName}`);
|
313
|
-
utilities.verifyElementVisibilityState(essayResponsePage.selectACategoryErrorMessage(), 'notExist');
|
314
|
-
});
|
72
|
+
essayResponsePage.tests.verifyFunctionalityOfEquationEditorSection('essay response');
|
315
73
|
|
316
74
|
it('When user re-selects the Equation Editor icon then only the previously selected category category should appear in selected state', () => {
|
317
75
|
const deselectedCategoriesArray = Object.values(equationEditorCategoriesAndSymbols).map((category) => category.displayName).slice(1)
|
318
|
-
|
76
|
+
essayResponsePage.steps.deselectCustomizedFormattingOption(['Equation Editor']);
|
319
77
|
utilities.verifyElementVisibilityState(essayResponsePage.equationEditorSection(), 'notExist');
|
320
|
-
|
321
|
-
|
78
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor']);
|
79
|
+
essayResponsePage.steps.verifySelectedCategoryInEquationEditorSectionEditTab(`${equationEditorCategoriesAndSymbols['numPad'].displayName}`);
|
322
80
|
deselectedCategoriesArray.forEach((categoryName) => {
|
323
|
-
|
81
|
+
essayResponsePage.steps.verifyDeselectedCategoryInEquationEditorSectionEditTab(categoryName);
|
324
82
|
});
|
325
83
|
});
|
326
84
|
});
|
@@ -377,8 +135,8 @@ describe('Create question page - Essay Response: Equation Editor functionality',
|
|
377
135
|
before(() => {
|
378
136
|
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
379
137
|
cy.barsPreLoaderWait();
|
380
|
-
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion()
|
381
|
-
|
138
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion()
|
139
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor']);
|
382
140
|
essayResponsePage.steps.switchToPreviewTab();
|
383
141
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
|
384
142
|
cy.log('Adding an equation to preview input field')
|
@@ -387,30 +145,7 @@ describe('Create question page - Essay Response: Equation Editor functionality',
|
|
387
145
|
essayResponsePage.steps.verifyResponseFieldEquationText(0, 'x+5=1');
|
388
146
|
});
|
389
147
|
|
390
|
-
|
391
|
-
essayResponsePage.steps.openResponseFieldEquationContainerEquationEditor(0);
|
392
|
-
utilities.verifyElementVisibilityState(equationEditorFlyout.dialogBox(), 'visible');
|
393
|
-
});
|
394
|
-
|
395
|
-
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`, () => {
|
396
|
-
equationEditorFlyout.steps.verifyCategoryTileSelectedInEquationEditor(`${equationEditorCategoriesAndSymbols['numPad'].displayName}`);
|
397
|
-
cy.log('Adding this to focus out of input field')
|
398
|
-
equationEditorFlyout.steps.selectEquationEditorCategoryPreviewTab(`${equationEditorCategoriesAndSymbols['numPad'].displayName}`)
|
399
|
-
utilities.verifyTextContent(equationEditorFlyout.previewInputField(), 'x+5=1');
|
400
|
-
});
|
401
|
-
|
402
|
-
it('When user clicks on Cancel button the equation should be displayed in the preview input field without any changes', () => {
|
403
|
-
equationEditorFlyout.steps.clickOnEquationEditorCancelButton();
|
404
|
-
essayResponsePage.steps.verifyResponseFieldEquationText(0, 'x+5=1');
|
405
|
-
});
|
406
|
-
|
407
|
-
it('When user edits the added equation and clicks on Ok button, the edited equation should be displayed in the preview input field', () => {
|
408
|
-
essayResponsePage.steps.openResponseFieldEquationContainerEquationEditor(0);
|
409
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('{backspace}{backspace}');
|
410
|
-
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['multiply', 'zero'] }]);
|
411
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
412
|
-
essayResponsePage.steps.verifyResponseFieldEquationText(0, 'x+5×0');
|
413
|
-
});
|
148
|
+
essayResponsePage.tests.editEquationInPreviewTab('essay response');
|
414
149
|
});
|
415
150
|
}
|
416
151
|
});
|
@@ -55,6 +55,84 @@ describe('Create question page - Essay Response: Equation Editor categories', ()
|
|
55
55
|
essayResponsePage.tests.insertEquationAndVerifyInputFieldContentsAndWordCount('1+23×4÷5=78690.,', '1');
|
56
56
|
});
|
57
57
|
|
58
|
+
describe('Equation editor symbol category: Keypad', () => {
|
59
|
+
abortEarlySetup();
|
60
|
+
before(() => {
|
61
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
62
|
+
cy.barsPreLoaderWait();
|
63
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
64
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor']);
|
65
|
+
essayResponsePage.steps.checkDisplayWordCountCheckbox();
|
66
|
+
essayResponsePage.steps.switchToPreviewTab();
|
67
|
+
essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
|
68
|
+
});
|
69
|
+
|
70
|
+
equationEditorFlyout.tests.verifyEquationEditorFlyoutSymbolCategoriesTabs('keyPad');
|
71
|
+
|
72
|
+
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', () => {
|
73
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('abcd');
|
74
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.clear.ariaLabel);
|
75
|
+
utilities.verifyInnerText(equationEditorFlyout.previewInputField(), 'abc');
|
76
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.clearAll.ariaLabel);
|
77
|
+
utilities.verifyInnerText(equationEditorFlyout.previewInputField(), '');
|
78
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.capsLock.ariaLabel);
|
79
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.q.ariaLabel);
|
80
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.capsLock.ariaLabel);
|
81
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.w.ariaLabel);
|
82
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.e.ariaLabel);
|
83
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.r.ariaLabel);
|
84
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.t.ariaLabel);
|
85
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.y.ariaLabel);
|
86
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.u.ariaLabel);
|
87
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.i.ariaLabel);
|
88
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.o.ariaLabel);
|
89
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.p.ariaLabel);
|
90
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.a.ariaLabel);
|
91
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.s.ariaLabel);
|
92
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.d.ariaLabel);
|
93
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.f.ariaLabel);
|
94
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.g.ariaLabel);
|
95
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.space.ariaLabel);
|
96
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.q.ariaLabel);
|
97
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.z.ariaLabel);
|
98
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.c.ariaLabel);
|
99
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.v.ariaLabel);
|
100
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.h.ariaLabel);
|
101
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.moveLeft.ariaLabel);
|
102
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.j.ariaLabel);
|
103
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.moveRight.ariaLabel);
|
104
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.k.ariaLabel);
|
105
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.l.ariaLabel);
|
106
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.b.ariaLabel);
|
107
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.n.ariaLabel);
|
108
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.m.ariaLabel);
|
109
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.comma.ariaLabel);
|
110
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.decimal.ariaLabel);
|
111
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.explanationMark.ariaLabel);
|
112
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.questionMark.ariaLabel);
|
113
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.seven.ariaLabel);
|
114
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.eight.ariaLabel);
|
115
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.nine.ariaLabel);
|
116
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.add.ariaLabel);
|
117
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.four.ariaLabel);
|
118
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.multiply.ariaLabel);
|
119
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.five.ariaLabel);
|
120
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.six.ariaLabel);
|
121
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.subtract.ariaLabel);
|
122
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.one.ariaLabel);
|
123
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.equalTo.ariaLabel);
|
124
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.two.ariaLabel);
|
125
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.add.ariaLabel);
|
126
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.three.ariaLabel);
|
127
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.moveUp.ariaLabel);
|
128
|
+
equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.keyPad.symbols.moveDown.ariaLabel);
|
129
|
+
});
|
130
|
+
|
131
|
+
equationEditorFlyout.tests.verifyCSSAnda11yOfEquationEditorInputField('keyPad');
|
132
|
+
|
133
|
+
essayResponsePage.tests.insertEquationAndVerifyInputFieldContentsAndWordCount('Qwertyuiopasdfg qzcvjhklbnm,.!?789+4×56−1=2+3', '2');
|
134
|
+
});
|
135
|
+
|
58
136
|
describe('Equation editor input category: Intermediate', () => {
|
59
137
|
abortEarlySetup();
|
60
138
|
before(() => {
|
@@ -89,7 +89,7 @@ describe('Fill In the gaps with text - Additional settings : Placeholder text, G
|
|
89
89
|
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
90
90
|
cy.barsPreLoaderWait();
|
91
91
|
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }]);
|
92
|
-
|
92
|
+
//fillInTheGapsTextPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
93
93
|
fillInTheGapsTextPage.steps.expandAdditionalSettings();
|
94
94
|
});
|
95
95
|
|
@@ -201,7 +201,7 @@ describe('Fill In the gaps with text - Additional settings : Placeholder text, G
|
|
201
201
|
});
|
202
202
|
|
203
203
|
it('Accessibility of input field in preview tab when custom \'ARIA label\' is set', { tags: 'a11y' }, () => {
|
204
|
-
cy.checkAccessibility(fillInTheGapsTextPage.answerInputFieldPreviewTab().parents('
|
204
|
+
cy.checkAccessibility(fillInTheGapsTextPage.answerInputFieldPreviewTab().parents('.edit-question-preview-wrapper'));
|
205
205
|
});
|
206
206
|
|
207
207
|
it('When the user clears the set value in the \'ARIA label\' input field, then the default aria labels should be present for the answer input fields in the preview tab', () => {
|
@@ -0,0 +1,75 @@
|
|
1
|
+
import { graphingPage } from "../../../pages";
|
2
|
+
import utilities from "../../../support/helpers/utilities";
|
3
|
+
|
4
|
+
describe('Graphing - Accept Repeated Points Functionality', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Specify Correct Answer - Accept Repeated Points Functionality', () => {
|
10
|
+
before(() => {
|
11
|
+
graphingPage.steps.navigateToCreateQuestion('Graphing');
|
12
|
+
cy.barsPreLoaderWait();
|
13
|
+
graphingPage.steps.selectToolOptions(['Parabola', 'Circle']);
|
14
|
+
});
|
15
|
+
|
16
|
+
it('When user views the Specify Correct Answer section, then user should see a toggle button for Accept Repeated Points', () => {
|
17
|
+
utilities.verifyElementVisibilityState(graphingPage.acceptRepeatedPointsLabel(), 'visible');
|
18
|
+
utilities.verifyInnerText(graphingPage.acceptRepeatedPointsLabel(), 'Accept repeated points');
|
19
|
+
utilities.verifyElementVisibilityState(graphingPage.acceptRepeatedPointsToggle(), 'exist');
|
20
|
+
});
|
21
|
+
|
22
|
+
it('By default, the Accept Repeated Points toggle should be checked', () => {
|
23
|
+
graphingPage.steps.verifyAcceptRepeatedPointsToggleChecked();
|
24
|
+
});
|
25
|
+
|
26
|
+
it('When user tries to plot multiple points at the same place with toggle off, then user should not be able to do so', () => {
|
27
|
+
graphingPage.steps.uncheckAcceptRepeatedPointsToggle();
|
28
|
+
graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 1, xRange: 20, y: 2, yRange: 20 }]);
|
29
|
+
graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 1, xRange: 20, y: 2, yRange: 20 }]);
|
30
|
+
graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Parabola');
|
31
|
+
graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 1, xRange: 20, y: 2, yRange: 20 }]);
|
32
|
+
//Remove comment once https://weldnorthed.atlassian.net/browse/IEI-4078 is resolved
|
33
|
+
// utilities.verifyElementVisibilityState(graphingPage.graphParabolaSpecifyCorrectAnswerSection(), 'notExist');
|
34
|
+
});
|
35
|
+
|
36
|
+
it('When user tries to plot multiple points at the same place with toggle on, then user should be able to do so', () => {
|
37
|
+
graphingPage.steps.checkAcceptRepeatedPointsToggle();
|
38
|
+
graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }]);
|
39
|
+
graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }]);
|
40
|
+
graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Circle');
|
41
|
+
graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }]);
|
42
|
+
utilities.verifyElementVisibilityState(graphingPage.graphCircleSpecifyCorrectAnswerSection(), 'exist');
|
43
|
+
});
|
44
|
+
});
|
45
|
+
|
46
|
+
describe('Preview Tab - Accept Repeated Points Functionality', () => {
|
47
|
+
before(() => {
|
48
|
+
graphingPage.steps.navigateToCreateQuestion('Graphing');
|
49
|
+
cy.barsPreLoaderWait();
|
50
|
+
graphingPage.steps.selectToolOptions(['Parabola', 'Circle']);
|
51
|
+
});
|
52
|
+
|
53
|
+
it('When user tries to plot multiple points at the same place with toggle off, then user should not be able to do so', () => {
|
54
|
+
graphingPage.steps.uncheckAcceptRepeatedPointsToggle();
|
55
|
+
graphingPage.steps.switchToPreviewTab();
|
56
|
+
graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 1, xRange: 20, y: 2, yRange: 20 }]);
|
57
|
+
graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 1, xRange: 20, y: 2, yRange: 20 }]);
|
58
|
+
graphingPage.steps.selectGraphToolOptionPreviewTab('Parabola');
|
59
|
+
graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 1, xRange: 20, y: 2, yRange: 20 }]);
|
60
|
+
//Remove comment once https://weldnorthed.atlassian.net/browse/IEI-4078 is resolved
|
61
|
+
//utilities.verifyElementVisibilityState(graphingPage.graphSineAndParabolaPreviewTab(), 'notExist');
|
62
|
+
});
|
63
|
+
|
64
|
+
it('When user tries to plot multiple points at the same place with toggle on, then user should be able to do so', () => {
|
65
|
+
graphingPage.steps.switchToEditTab();
|
66
|
+
graphingPage.steps.checkAcceptRepeatedPointsToggle();
|
67
|
+
graphingPage.steps.switchToPreviewTab();
|
68
|
+
graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }]);
|
69
|
+
graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }]);
|
70
|
+
graphingPage.steps.selectGraphToolOptionPreviewTab('Circle');
|
71
|
+
graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }]);
|
72
|
+
utilities.verifyElementVisibilityState(graphingPage.graphCirclePreviewTab(), 'exist');
|
73
|
+
});
|
74
|
+
});
|
75
|
+
});
|
@@ -0,0 +1,84 @@
|
|
1
|
+
import { textEntryMathPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
const fontSizes = { 'Tiny': '12px', 'Small': '14px', 'Default': '16px', 'Normal': '18px', 'Big': '22px', 'Huge': '26px' };
|
7
|
+
|
8
|
+
describe('Text Entry Math - Additional settings', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Additional settings accordion', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
17
|
+
});
|
18
|
+
|
19
|
+
textEntryMathPage.tests.verifyAdditionalSettingsAccordionProperties();
|
20
|
+
});
|
21
|
+
|
22
|
+
describe('Additional settings: Font size - Contents in edit tab', () => {
|
23
|
+
abortEarlySetup();
|
24
|
+
before(() => {
|
25
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
26
|
+
cy.barsPreLoaderWait();
|
27
|
+
textEntryMathPage.steps.expandAdditionalSettings();
|
28
|
+
});
|
29
|
+
|
30
|
+
textEntryMathPage.tests.verifyFontSizeSectionContents();
|
31
|
+
});
|
32
|
+
|
33
|
+
describe('Additional settings: Font size - functionality in preview tab', () => {
|
34
|
+
abortEarlySetup();
|
35
|
+
before(() => {
|
36
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
37
|
+
cy.barsPreLoaderWait();
|
38
|
+
textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Text Entry Math');
|
39
|
+
textEntryMathPage.steps.addInputToQuestionInputField('Lorem Ipsum');
|
40
|
+
textEntryMathPage.steps.addResponseArea();
|
41
|
+
textEntryMathPage.steps.expandAdditionalSettings();
|
42
|
+
});
|
43
|
+
|
44
|
+
Object.keys(fontSizes).forEach((option) => {
|
45
|
+
it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview tab should change to ${fontSizes[option]} accordingly`, () => {
|
46
|
+
textEntryMathPage.steps.selectFontSizeOptionFromFontSizeDropdown(option);
|
47
|
+
utilities.verifyInnerText(textEntryMathPage.fontSizeDropdown(), `${option}`);
|
48
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
49
|
+
utilities.verifyCSS(textEntryMathPage.questionInstructionsText(), {
|
50
|
+
'font-size': fontSizes[option]
|
51
|
+
});
|
52
|
+
utilities.verifyCSS(textEntryMathPage.responseFieldPreviewTab(), {
|
53
|
+
'font-size': fontSizes[option]
|
54
|
+
});
|
55
|
+
utilities.verifyCSS(textEntryMathPage.responseFieldWrapperPreviewTab(), {
|
56
|
+
'font-size': fontSizes[option]
|
57
|
+
});
|
58
|
+
textEntryMathPage.steps.switchToEditTab();
|
59
|
+
});
|
60
|
+
});
|
61
|
+
});
|
62
|
+
|
63
|
+
describe('Additional settings: Accessibility section', () => {
|
64
|
+
abortEarlySetup();
|
65
|
+
before(() => {
|
66
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
67
|
+
cy.barsPreLoaderWait();
|
68
|
+
textEntryMathPage.steps.expandAdditionalSettings();
|
69
|
+
});
|
70
|
+
|
71
|
+
textEntryMathPage.tests.verifyAdditionalSettingsAccessibilitySection();
|
72
|
+
});
|
73
|
+
|
74
|
+
describe('Additional settings: Details section', () => {
|
75
|
+
abortEarlySetup();
|
76
|
+
before(() => {
|
77
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
78
|
+
cy.barsPreLoaderWait();
|
79
|
+
textEntryMathPage.steps.expandAdditionalSettings();
|
80
|
+
});
|
81
|
+
|
82
|
+
textEntryMathPage.tests.verifyDetailsSection();
|
83
|
+
});
|
84
|
+
});
|