itemengine-cypress-automation 1.0.113 → 1.0.114
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.js +489 -0
- package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.js +482 -0
- package/cypress/e2e/ILC/AudioResponseNew/customizePlaybackControls.js +488 -0
- package/cypress/e2e/ILC/AudioResponseNew/editAndPreviewTabScoringSection.js +92 -0
- package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +229 -0
- package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/headerSection.js +67 -0
- package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.js +11 -11
- package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +529 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +108 -190
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +83 -155
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +104 -315
- package/cypress/e2e/ILC/EssayResponseBasic/essayResponseBasicCustomizeFormattingOptions.js +121 -135
- package/cypress/e2e/ILC/EssayResponseMath/createItem.js +17 -0
- package/cypress/e2e/ILC/EssayResponseMath/mathCharacters.js +203 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/manuallyAndNonScored.js +121 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +236 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsBasic.js +255 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +237 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +236 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/ShortTextResponseNew/additionalSettings.js +43 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +187 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingWithAlternativeAnswer.js +245 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/checkAnswerFunctionalityForAllViews.smoke.js +99 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabScoringSection.js +97 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/headerSection.js +74 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/manuallyAndNonScoredScoring.js +83 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/previewContentsForAllViews.smoke.js +109 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/specifyCorrectAnswerSection.js +66 -0
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +326 -0
- package/cypress/e2e/ILC/TextEntryMath/checkAnswerFunctionalityForAllViews.smoke.js +163 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +3 -3
- package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +154 -0
- package/cypress/pages/audioResponsePage.js +523 -66
- package/cypress/pages/components/autoScoredScoringPreviewTab.js +2 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +6 -5
- package/cypress/pages/components/equationEditorFlyout.js +11 -0
- package/cypress/pages/components/essayResponseCommonComponents.js +290 -19
- package/cypress/pages/components/maximumRecorderLengthComponent.js +32 -15
- package/cypress/pages/components/playbackControlsBaseComponent.js +9 -1
- package/cypress/pages/components/questionInputFieldComponent.js +0 -7
- package/cypress/pages/essayResponseBasicPage.js +1 -26
- package/cypress/pages/essayResponsePage.js +21 -284
- package/cypress/pages/shortTextResponsePage.js +142 -103
- package/cypress/pages/textEntryMathPage.js +58 -7
- package/package.json +1 -1
@@ -1,137 +1,113 @@
|
|
1
1
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
2
|
import { essayResponsePage } from "../../../pages";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
import { equationEditorFlyout } from "../../../pages/components";
|
3
5
|
const css = Cypress.env('css');
|
4
6
|
const grepTags = Cypress.env('grepTags');
|
5
7
|
|
6
|
-
const formattingOptions = ['Bold', 'Italic', 'Underline', '
|
7
|
-
const defaultSelectedFormattingOptions = ['Bold', 'Italic', 'Underline', '
|
8
|
-
const defaultFormattingOptionsPreviewTab = ['Bold (Ctrl+B)', 'Italic (Ctrl+I)', 'Underline (Ctrl+U)', '
|
9
|
-
const formattingOptionsPreviewTab = ['Bold (Ctrl+B)', 'Italic (Ctrl+I)', 'Underline (Ctrl+U)', '
|
8
|
+
const formattingOptions = ['Bold', 'Italic', 'Underline', 'Bulleted List', 'Numbered List', 'Insert Table', 'Increase Indent', 'Decrease Indent', 'Equation Editor', 'Insert Image', 'Strikethrough', 'Subscript', 'Superscript', 'Special Characters', 'Math Characters', 'Insert Hyperlink', 'Block Quote', 'Remove Format', 'Code Inline', 'Code Editor', 'Align Left', 'Align Center', 'Align Right', 'Align Justify', 'Text direction left to right', 'Text direction right to left', 'Insert Horizontal Line', 'Font size', 'Font Color', 'Highlight Text'];
|
9
|
+
const defaultSelectedFormattingOptions = ['Bold', 'Italic', 'Underline', 'Bulleted List', 'Numbered List', 'Insert Table', 'Increase Indent', 'Decrease Indent'];
|
10
|
+
const defaultFormattingOptionsPreviewTab = ['Bold (Ctrl+B)', 'Italic (Ctrl+I)', 'Underline (Ctrl+U)', 'Insert/Remove Bulleted List', 'Insert/Remove Numbered List', 'Insert Table', 'Increase Indent', 'Decrease Indent'];
|
11
|
+
const formattingOptionsPreviewTab = ['Bold (Ctrl+B)', 'Italic (Ctrl+I)', 'Underline (Ctrl+U)', 'Insert/Remove Bulleted List', 'Insert/Remove Numbered List', 'Insert Table', 'Increase Indent', 'Decrease Indent', 'Equation Editor', 'Insert Image', 'Strikethrough', 'Subscript', 'Superscript', 'Special characters', 'Math characters', 'Insert Hyperlink', 'Block Quote', 'Remove Format', 'Code Inline', 'Code Editor', 'Align Left', 'Align Center', 'Align Right', 'Align Justify', 'Text direction left to right', 'Text direction right to left', 'Insert Horizontal Line', 'Font Size', 'Text Color', 'Highlight Text', 'Undo (Ctrl+Z)', 'Redo (Ctrl+Y)'];
|
12
|
+
|
10
13
|
describe('Create question page - Essay Response: Customize formatting options (for student player) accordion contents, toolbar options', () => {
|
11
14
|
before(() => {
|
12
15
|
cy.loginAs('admin');
|
13
16
|
});
|
14
17
|
|
15
|
-
|
16
|
-
describe('Customize formatting options (for student player) accordion contents', { tags: 'smoke' }, () => {
|
18
|
+
describe('Customize formatting options accordion contents', { tags: 'smoke' }, () => {
|
17
19
|
abortEarlySetup();
|
18
20
|
before(() => {
|
19
21
|
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
20
22
|
});
|
21
23
|
|
22
|
-
it('By default \'Customize formatting options
|
23
|
-
essayResponsePage.
|
24
|
-
|
25
|
-
|
26
|
-
essayResponsePage.customizeFormattingOptionsAccordion()
|
27
|
-
.click()
|
28
|
-
.should('have.attr', 'aria-expanded', 'true');
|
24
|
+
it('By default \'Customize formatting options\' accordion should be collapsed and by clicking on the \'Customize formatting options (for student player)\' accordion, user should be able to expand the accordion', () => {
|
25
|
+
utilities.verifyInnerText(essayResponsePage.customizeFormattingOptionsAccordionLabel(), 'Customize toolbar options and controls');
|
26
|
+
utilities.verifyElementVisibilityState(essayResponsePage.customizeFormattingOptionsSectionExpandIcon(), 'exist');
|
27
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
29
28
|
});
|
30
29
|
|
31
30
|
it('CSS of \'Customize formatting options (for student player)\' accordion and contents', { tags: 'css' }, () => {
|
32
31
|
cy.log('CSS of accordion label and chevron icon')
|
33
|
-
essayResponsePage.customizeFormattingOptionsAccordionLabel()
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
32
|
+
utilities.verifyCSS(essayResponsePage.customizeFormattingOptionsAccordionLabel(), {
|
33
|
+
'color': css.color.accordionLabel,
|
34
|
+
'font-size': css.fontSize.default,
|
35
|
+
'font-weight': css.fontWeight.bold
|
36
|
+
});
|
37
|
+
utilities.verifyCSS(essayResponsePage.customizeFormattingOptionsAccordion().find('svg'), {
|
38
|
+
'fill': css.color.activeButtons
|
39
|
+
});
|
38
40
|
cy.log('CSS of selected toolbar formatting option')
|
39
|
-
essayResponsePage.customizeFormattingOptionsTiles('Bold')
|
40
|
-
|
41
|
+
utilities.verifyCSS(essayResponsePage.customizeFormattingOptionsTiles('Bold'), {
|
42
|
+
'background-color': css.color.primaryBtnBg
|
43
|
+
});
|
41
44
|
cy.log('CSS of tick icon of selected toolbar formatting option')
|
42
|
-
essayResponsePage.customizeFormattingOptionsTiles('Bold')
|
43
|
-
|
44
|
-
|
45
|
+
utilities.verifyCSS(essayResponsePage.customizeFormattingOptionsTiles('Bold').find('[data-name="Icon feather-check"]'), {
|
46
|
+
'fill': css.color.activeButtons
|
47
|
+
});
|
45
48
|
cy.log('CSS of background of tick icon of selected toolbar formatting option')
|
46
|
-
essayResponsePage.customizeFormattingOptionsTiles('Bold')
|
47
|
-
|
48
|
-
|
49
|
+
utilities.verifyCSS(essayResponsePage.customizeFormattingOptionsTiles('Bold').find('[data-name*="Rectangle"]'), {
|
50
|
+
'fill': css.color.defaultBackground
|
51
|
+
});
|
49
52
|
cy.log('CSS of icon of selected toolbar formatting option')
|
50
|
-
essayResponsePage.customizeFormattingOptionsTiles('Bold')
|
51
|
-
|
52
|
-
|
53
|
+
utilities.verifyCSS(essayResponsePage.customizeFormattingOptionsTiles('Bold').find('.drag-item-flex-wrapper svg'), {
|
54
|
+
'fill': css.color.primaryBtn
|
55
|
+
});
|
53
56
|
cy.log('CSS of drag handle of selected toolbar formatting option')
|
54
|
-
essayResponsePage.customizeFormattingOptionsTiles('Bold')
|
55
|
-
|
56
|
-
|
57
|
-
.should('have.css', 'color', css.color.activeButtons);
|
57
|
+
utilities.verifyCSS(essayResponsePage.customizeFormattingOptionsTiles('Bold').find('.drag-icon-button-custom-format svg path').eq(1), {
|
58
|
+
'color': css.color.activeButtons
|
59
|
+
});
|
58
60
|
cy.log('CSS of unselected toolbar formatting option')
|
59
|
-
essayResponsePage.customizeFormattingOptionsTiles('Code Inline')
|
60
|
-
|
61
|
+
utilities.verifyCSS(essayResponsePage.customizeFormattingOptionsTiles('Code Inline'), {
|
62
|
+
'background-color': css.color.secondaryBtnBg
|
63
|
+
});
|
61
64
|
cy.log('CSS of icon of unselected toolbar formatting option')
|
62
|
-
essayResponsePage.customizeFormattingOptionsTiles('Code Inline')
|
63
|
-
|
64
|
-
|
65
|
-
.should('have.css', 'fill', css.color.secondaryBtn);
|
65
|
+
utilities.verifyCSS(essayResponsePage.customizeFormattingOptionsTiles('Code Inline').find('.drag-item-flex-wrapper path').eq(1), {
|
66
|
+
'fill': css.color.secondaryBtn
|
67
|
+
});
|
66
68
|
cy.log('CSS of drag handle of unselected toolbar formatting option')
|
67
|
-
essayResponsePage.customizeFormattingOptionsTiles('Code Inline')
|
68
|
-
|
69
|
-
|
70
|
-
.should('have.css', 'fill', css.color.secondaryBtn);
|
69
|
+
utilities.verifyCSS(essayResponsePage.customizeFormattingOptionsTiles('Code Inline').find('.drag-icon-button-custom-format svg path').eq(1), {
|
70
|
+
'fill': css.color.secondaryBtn
|
71
|
+
});
|
71
72
|
});
|
72
73
|
|
73
74
|
it('Accessibility of \'Customize formatting options (for student player)\' accordion and contents', { tags: 'a11y' }, () => {
|
74
|
-
cy.checkAccessibility(essayResponsePage.
|
75
|
+
cy.checkAccessibility(essayResponsePage.customizeFormattingOptionsWrapper());
|
75
76
|
});
|
76
77
|
|
77
78
|
it('When \'Customize formatting options (for student player)\' accordion is in expanded state, then all the formatting options should be displayed along with drag handle.', () => {
|
78
|
-
|
79
|
-
|
80
|
-
.eq(count)
|
81
|
-
.should('have.attr', 'title', optionName)
|
82
|
-
.within(() => {
|
83
|
-
essayResponsePage.customizeFormattingOptionsdragHandleButton()
|
84
|
-
.should('be.visible');
|
85
|
-
});
|
86
|
-
});
|
79
|
+
essayResponsePage.steps.verifyCustomizeToolbarOptions(formattingOptions);
|
80
|
+
utilities.verifyElementCount(essayResponsePage.customizeFormattingOptionsDragHandleButton(), 30);
|
87
81
|
});
|
88
82
|
|
89
|
-
it(
|
90
|
-
defaultSelectedFormattingOptions.forEach((option
|
91
|
-
|
92
|
-
|
93
|
-
|
83
|
+
it(`When the \'Customize formatting options (for student player)\' accordion is in expanded state, then the following options should be in selected state by default - ${defaultSelectedFormattingOptions}. All the other options should be in unselected state.`, () => {
|
84
|
+
defaultSelectedFormattingOptions.forEach((option) => {
|
85
|
+
essayResponsePage.steps.verifyCustomizeFormattingOptionIsSelected(option);
|
86
|
+
});
|
87
|
+
formattingOptions.splice(8, formattingOptions.length).forEach((option) => {
|
88
|
+
essayResponsePage.steps.verifyCustomizeFormattingOptionNotSelected(option);
|
94
89
|
});
|
95
|
-
for (let index = 11; index < formattingOptions.length; index++) {
|
96
|
-
cy.get('.icon-button-custom-format')
|
97
|
-
.eq(index)
|
98
|
-
.should('have.attr', 'data-aria-pressed', 'false');
|
99
|
-
};
|
100
90
|
});
|
101
91
|
|
102
92
|
it('User should be able to unselect any default selected formatting option and should be able to select any default unselected formatting option and the changes should be reflected in the toolbar in the preview tab', () => {
|
103
|
-
essayResponsePage.
|
104
|
-
|
105
|
-
.should('have.attr', 'data-aria-pressed', 'false');
|
106
|
-
essayResponsePage.customizeFormattingOptionsTiles('Strikethrough')
|
107
|
-
.click()
|
108
|
-
.should('have.attr', 'data-aria-pressed', 'true');
|
93
|
+
essayResponsePage.steps.deselectCustomizedFormattingOption(['Increase Indent']);
|
94
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Strikethrough']);
|
109
95
|
essayResponsePage.steps.switchToPreviewTab();
|
110
|
-
essayResponsePage.previewTabToolbarOption('Strikethrough')
|
111
|
-
|
112
|
-
essayResponsePage.previewTabToolbarOption('Superscript')
|
113
|
-
.should('not.exist');
|
96
|
+
utilities.verifyElementVisibilityState(essayResponsePage.previewTabToolbarOption('Strikethrough'), 'visible');
|
97
|
+
utilities.verifyElementVisibilityState(essayResponsePage.previewTabToolbarOption('Increase Indent'), 'notExist');
|
114
98
|
});
|
115
99
|
|
116
100
|
it('When the user selects the \'Equation editor\' formatting option, the \'Equation editor\' section should be displayed below the formatting options. On deselecting \'Equation editor\' formatting option, \'Equation editor\' section should disappear', () => {
|
117
101
|
cy.log('Switching to edit tab')
|
118
102
|
essayResponsePage.steps.switchToEditTab();
|
119
|
-
essayResponsePage.
|
120
|
-
|
121
|
-
|
122
|
-
essayResponsePage.
|
123
|
-
.should('be.visible');
|
124
|
-
essayResponsePage.customizeFormattingOptionsTiles('Equation Editor')
|
125
|
-
.click()
|
126
|
-
.should('have.attr', 'data-aria-pressed', 'false');
|
127
|
-
essayResponsePage.equationEditorOptionsWrapper()
|
128
|
-
.should('not.exist');
|
103
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Equation Editor']);
|
104
|
+
utilities.verifyElementVisibilityState(essayResponsePage.equationEditorSectionCategories(), 'visible');
|
105
|
+
essayResponsePage.steps.deselectCustomizedFormattingOption(['Equation Editor']);
|
106
|
+
utilities.verifyElementVisibilityState(essayResponsePage.equationEditorSectionWrapper(), 'notExist');
|
129
107
|
});
|
130
108
|
|
131
109
|
it('User should be able to collapse \'Customize formatting options (for student player)\' accordion.', () => {
|
132
|
-
essayResponsePage.
|
133
|
-
.click()
|
134
|
-
.should('have.attr', 'aria-expanded', 'false');
|
110
|
+
essayResponsePage.steps.collapseCustomizeFormattingOptionsAccordion();
|
135
111
|
});
|
136
112
|
});
|
137
113
|
|
@@ -139,71 +115,35 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
139
115
|
abortEarlySetup();
|
140
116
|
before(() => {
|
141
117
|
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
142
|
-
cy.barsPreLoaderWait();
|
143
|
-
essayResponsePage.steps.switchToPreviewTab();
|
144
118
|
});
|
145
119
|
|
146
|
-
it(
|
147
|
-
essayResponsePage.
|
148
|
-
|
149
|
-
defaultFormattingOptionsPreviewTab.forEach((optionName, count) => {
|
150
|
-
cy.get('.cke_button')
|
151
|
-
.eq(count)
|
152
|
-
.should('have.attr', 'title', optionName)
|
153
|
-
.and('be.visible');
|
154
|
-
});
|
155
|
-
});
|
156
|
-
essayResponsePage.previewTabToolbarOption('Underline (Ctrl+U)')
|
157
|
-
.next()
|
158
|
-
.should('have.attr', 'role', 'separator')
|
159
|
-
.should('be.visible');
|
120
|
+
it(`When the user switches to Preview tab, then the following options should be displayed in the response field toolbar - ${defaultFormattingOptionsPreviewTab}`, () => {
|
121
|
+
essayResponsePage.steps.switchToPreviewTab();
|
122
|
+
essayResponsePage.steps.verifyPreviewTabToolbarOptions(defaultFormattingOptionsPreviewTab);
|
160
123
|
});
|
161
124
|
|
162
|
-
it('When the user selects all formatting options from the \'Customize formatting options
|
163
|
-
|
164
|
-
essayResponsePage.steps.switchToEditTab()
|
125
|
+
it('When the user selects all formatting options from the \'Customize formatting options\' accordion, all formatting options should appear in the preview tab', () => {
|
126
|
+
essayResponsePage.steps.switchToEditTab();
|
165
127
|
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
.click()
|
170
|
-
.should('have.attr', 'data-aria-pressed', 'true');
|
171
|
-
};
|
172
|
-
essayResponsePage.steps.switchToPreviewTab();
|
173
|
-
essayResponsePage.previewTabToolbarWrapper()
|
174
|
-
.within(() => {
|
175
|
-
formattingOptionsPreviewTab.forEach((optionName, count) => {
|
176
|
-
cy.get('.cke_button')
|
177
|
-
.eq(count)
|
178
|
-
.should('have.attr', 'title', optionName)
|
179
|
-
.and('be.visible');
|
180
|
-
});
|
181
|
-
});
|
182
|
-
separatorInToolbarContents.forEach((toolbarOption) => {
|
183
|
-
essayResponsePage.previewTabToolbarOption(toolbarOption)
|
184
|
-
.next()
|
185
|
-
.should('have.attr', 'role', 'separator')
|
186
|
-
.should('be.visible');
|
128
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(formattingOptions.splice(8, formattingOptions.length));
|
129
|
+
formattingOptions.forEach((option) => {
|
130
|
+
essayResponsePage.steps.verifyCustomizeFormattingOptionIsSelected(option);
|
187
131
|
});
|
132
|
+
essayResponsePage.steps.switchToPreviewTab();
|
133
|
+
essayResponsePage.steps.verifyPreviewTabToolbarOptions(formattingOptionsPreviewTab);
|
188
134
|
});
|
189
135
|
|
190
|
-
it('
|
191
|
-
essayResponsePage.previewTabToolbarSeperator()
|
192
|
-
.should('have.length', 6);
|
193
|
-
});
|
194
|
-
|
195
|
-
it('All options should be in enabled state except \'Left indent\', \'Undo\', \'Redo\' options which should be in disabled state', () => {
|
136
|
+
it('All options should be in enabled state except \'Decrease Indent\', \'Undo\', \'Redo\' options which should be in disabled state', () => {
|
196
137
|
let disabledOptions = ['Decrease Indent', 'Undo (Ctrl+Z)', 'Redo (Ctrl+Y)']
|
197
138
|
disabledOptions.forEach((optionName) => {
|
198
|
-
essayResponsePage.
|
199
|
-
.should('have.attr', 'aria-disabled', 'true');
|
139
|
+
essayResponsePage.steps.verifyPreviewTabToolbarOptionDisabled(optionName)
|
200
140
|
});
|
201
141
|
});
|
202
142
|
|
203
143
|
it('CSS of formatting options in Preview tab', { tags: 'css' }, () => {
|
204
|
-
essayResponsePage.previewTabToolbarOption('Bold (Ctrl+B)')
|
205
|
-
|
206
|
-
|
144
|
+
utilities.verifyCSS(essayResponsePage.previewTabToolbarOption('Bold (Ctrl+B)'), {
|
145
|
+
'color': css.color.activeButtons
|
146
|
+
});
|
207
147
|
});
|
208
148
|
|
209
149
|
it('Accessibility of formatting options in Preview tab', { tags: 'a11y' }, () => {
|
@@ -218,7 +158,7 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
218
158
|
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
219
159
|
cy.barsPreLoaderWait();
|
220
160
|
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
221
|
-
essayResponsePage.steps.selectCustomizedFormattingOption(['Strikethrough'
|
161
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Strikethrough']);
|
222
162
|
essayResponsePage.steps.switchToPreviewTab();
|
223
163
|
});
|
224
164
|
|
@@ -228,108 +168,86 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
228
168
|
|
229
169
|
it('When the user selects the \'Bold\' toolbar option and enters text in the response field, then the text should be displayed in bold and if the user deselects the \'Bold\' toolbar option and continues to types, then the entered text should be displayed in default format', () => {
|
230
170
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Bold (Ctrl+B)');
|
231
|
-
essayResponsePage.
|
232
|
-
|
233
|
-
.verifyInnerHTML('<p><strong>Lorem Ipsum</strong><br></p>');
|
171
|
+
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
172
|
+
essayResponsePage.steps.verifyResponseFieldHTML('<p><strong>Lorem Ipsum</strong><br></p>');
|
234
173
|
essayResponsePage.steps.deselectPreviewTabToolbarOption('Bold (Ctrl+B)');
|
235
|
-
essayResponsePage.
|
236
|
-
|
237
|
-
.verifyInnerHTML('<p><strong>Lorem Ipsum</strong> dolor<br></p>');
|
174
|
+
essayResponsePage.steps.enterInputInResponseField(' dolor');
|
175
|
+
essayResponsePage.steps.verifyResponseFieldHTML('<p><strong>Lorem Ipsum</strong> dolor<br></p>');
|
238
176
|
});
|
239
177
|
|
240
178
|
it('When the user enters text in the response field, selects the text and then selects the \'Bold\' toolbar option, then the should be displayed in bold and if the user deselects the \'Bold\' toolbar option, then the entered text should be displayed in default format', () => {
|
241
|
-
essayResponsePage.
|
242
|
-
.type('Lorem Ipsum{selectAll}');
|
179
|
+
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum{selectAll}');
|
243
180
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Bold (Ctrl+B)');
|
244
|
-
essayResponsePage.
|
245
|
-
.verifyInnerHTML('<p><strong>Lorem Ipsum</strong></p>');
|
181
|
+
essayResponsePage.steps.verifyResponseFieldHTML('<p><strong>Lorem Ipsum</strong></p>');
|
246
182
|
essayResponsePage.steps.deselectPreviewTabToolbarOption('Bold (Ctrl+B)');
|
247
|
-
essayResponsePage.
|
248
|
-
.verifyInnerHTML('<p>Lorem Ipsum</p>');
|
183
|
+
essayResponsePage.steps.verifyResponseFieldHTML('<p>Lorem Ipsum</p>');
|
249
184
|
});
|
250
185
|
|
251
186
|
essayResponsePage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Bold (Ctrl+B)');
|
252
187
|
|
253
188
|
it('When the user selects the \'Italic\' toolbar option and enters text in the response field, then the text should be displayed in italic and if the user deselects the \'Italic\' toolbar option and continues to types, then the entered text should be displayed in default format', () => {
|
254
189
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Italic (Ctrl+I)');
|
255
|
-
essayResponsePage.
|
256
|
-
|
257
|
-
.verifyInnerHTML('<p><em>Lorem Ipsum</em><br></p>');
|
190
|
+
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
191
|
+
essayResponsePage.steps.verifyResponseFieldHTML('<p><em>Lorem Ipsum</em><br></p>');
|
258
192
|
essayResponsePage.steps.deselectPreviewTabToolbarOption('Italic (Ctrl+I)');
|
259
|
-
essayResponsePage.
|
260
|
-
|
261
|
-
.verifyInnerHTML('<p><em>Lorem Ipsum</em> dolor<br></p>');
|
193
|
+
essayResponsePage.steps.enterInputInResponseField(' dolor');
|
194
|
+
essayResponsePage.steps.verifyResponseFieldHTML('<p><em>Lorem Ipsum</em> dolor<br></p>');
|
262
195
|
});
|
263
196
|
|
264
197
|
it('When the user enters text in the response field, selects the text and then selects the \'Italic\' toolbar option, then the should be displayed in italic and if the user deselects the \'Italic\' toolbar option, then the entered text should be displayed in default format', () => {
|
265
|
-
essayResponsePage.
|
266
|
-
.type('Lorem Ipsum{selectAll}');
|
198
|
+
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum{selectAll}');
|
267
199
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Italic (Ctrl+I)');
|
268
|
-
essayResponsePage.
|
269
|
-
.verifyInnerHTML('<p><em>Lorem Ipsum</em></p>');
|
200
|
+
essayResponsePage.steps.verifyResponseFieldHTML('<p><em>Lorem Ipsum</em></p>');
|
270
201
|
essayResponsePage.steps.deselectPreviewTabToolbarOption('Italic (Ctrl+I)');
|
271
|
-
essayResponsePage.
|
272
|
-
.verifyInnerHTML('<p>Lorem Ipsum</p>');
|
202
|
+
essayResponsePage.steps.verifyResponseFieldHTML('<p>Lorem Ipsum</p>');
|
273
203
|
});
|
274
204
|
|
275
205
|
essayResponsePage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Italic (Ctrl+I)');
|
276
206
|
|
277
207
|
it('When the user selects the \'Underline\' toolbar option and enters text in the response field, then the text should get underlined and if the user deselects the \'Underline\' toolbar option and continues to types, then the entered text should be displayed in default format', () => {
|
278
208
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Underline (Ctrl+U)');
|
279
|
-
essayResponsePage.
|
280
|
-
|
281
|
-
.verifyInnerHTML('<p><u>Lorem Ipsum</u><br></p>');
|
209
|
+
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
210
|
+
essayResponsePage.steps.verifyResponseFieldHTML('<p><u>Lorem Ipsum</u><br></p>');
|
282
211
|
essayResponsePage.steps.deselectPreviewTabToolbarOption('Underline (Ctrl+U)');
|
283
|
-
essayResponsePage.
|
284
|
-
|
285
|
-
.verifyInnerHTML('<p><u>Lorem Ipsum</u> dolor<br></p>');
|
212
|
+
essayResponsePage.steps.enterInputInResponseField(' dolor');
|
213
|
+
essayResponsePage.steps.verifyResponseFieldHTML('<p><u>Lorem Ipsum</u> dolor<br></p>');
|
286
214
|
});
|
287
215
|
|
288
216
|
it('When the user enters text in the response field, selects the text and then selects the \'Underline\' toolbar option, then the should get underlined and if the user deselects the \'Underline\' toolbar option, then the entered text should be displayed in default format', () => {
|
289
|
-
essayResponsePage.
|
290
|
-
.type('Lorem Ipsum{selectAll}');
|
217
|
+
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum{selectAll}');
|
291
218
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Underline (Ctrl+U)');
|
292
|
-
essayResponsePage.
|
293
|
-
.verifyInnerHTML('<p><u>Lorem Ipsum</u></p>');
|
219
|
+
essayResponsePage.steps.verifyResponseFieldHTML('<p><u>Lorem Ipsum</u></p>');
|
294
220
|
essayResponsePage.steps.deselectPreviewTabToolbarOption('Underline (Ctrl+U)');
|
295
|
-
essayResponsePage.
|
296
|
-
.verifyInnerHTML('<p>Lorem Ipsum</p>');
|
221
|
+
essayResponsePage.steps.verifyResponseFieldHTML('<p>Lorem Ipsum</p>');
|
297
222
|
});
|
298
223
|
|
299
224
|
essayResponsePage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Underline (Ctrl+U)');
|
300
225
|
|
301
226
|
it('When the user selects the \'Strikethrough\' toolbar option and enters text in the response field, then the text should get striked through and if the user deselects the \'Strikethrough\' toolbar option and continues to types, then the entered text should be displayed in default format', () => {
|
302
227
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Strikethrough');
|
303
|
-
essayResponsePage.
|
304
|
-
|
305
|
-
.verifyInnerHTML('<p><s>Lorem Ipsum</s><br></p>');
|
228
|
+
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
229
|
+
essayResponsePage.steps.verifyResponseFieldHTML('<p><s>Lorem Ipsum</s><br></p>');
|
306
230
|
essayResponsePage.steps.deselectPreviewTabToolbarOption('Strikethrough');
|
307
|
-
essayResponsePage.
|
308
|
-
|
309
|
-
.verifyInnerHTML('<p><s>Lorem Ipsum</s> dolor<br></p>');
|
231
|
+
essayResponsePage.steps.enterInputInResponseField(' dolor');
|
232
|
+
essayResponsePage.steps.verifyResponseFieldHTML('<p><s>Lorem Ipsum</s> dolor<br></p>');
|
310
233
|
});
|
311
234
|
|
312
235
|
it('When the user enters text in the response field, selects the text and then selects the \'Strikethrough\' toolbar option, then the should get striked through and if the user deselects the \'Strikethrough\' toolbar option, then the entered text should be displayed in default format', () => {
|
313
|
-
essayResponsePage.
|
314
|
-
.type('Lorem Ipsum{selectAll}');
|
236
|
+
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum{selectAll}');
|
315
237
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Strikethrough');
|
316
|
-
essayResponsePage.
|
317
|
-
.verifyInnerHTML('<p><s>Lorem Ipsum</s></p>');
|
238
|
+
essayResponsePage.steps.verifyResponseFieldHTML('<p><s>Lorem Ipsum</s></p>');
|
318
239
|
essayResponsePage.steps.deselectPreviewTabToolbarOption('Strikethrough');
|
319
|
-
essayResponsePage.
|
320
|
-
.verifyInnerHTML('<p>Lorem Ipsum</p>');
|
240
|
+
essayResponsePage.steps.verifyResponseFieldHTML('<p>Lorem Ipsum</p>');
|
321
241
|
});
|
322
242
|
|
323
243
|
essayResponsePage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Strikethrough');
|
324
244
|
|
325
245
|
it('The user should be able to add a combination of \'Bold, Italic, Underline\' formatting options to the text in the response field', () => {
|
326
|
-
essayResponsePage.
|
327
|
-
.type('Lorem Ipsum{selectAll}');
|
246
|
+
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum{selectAll}');
|
328
247
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Bold (Ctrl+B)');
|
329
248
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Italic (Ctrl+I)');
|
330
249
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Underline (Ctrl+U)');
|
331
|
-
essayResponsePage.
|
332
|
-
.verifyInnerHTML('<p><u><em><strong>Lorem Ipsum</strong></em></u></p>');
|
250
|
+
essayResponsePage.steps.verifyResponseFieldHTML('<p><u><em><strong>Lorem Ipsum</strong></em></u></p>');
|
333
251
|
});
|
334
252
|
});
|
335
253
|
}
|