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,11 +1,11 @@
|
|
1
1
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
2
|
import { essayResponseBasicPage } from "../../../pages";
|
3
|
-
import
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
4
|
const css = Cypress.env('css');
|
5
5
|
|
6
|
-
const
|
7
|
-
const
|
8
|
-
const
|
6
|
+
const customizeOptions = ['Bold', 'Italic', 'Underline', 'Bulleted List', 'Special Characters', 'Remove Format', 'Increase Indent', 'Decrease Indent'];
|
7
|
+
const stateOfFormattingOption = ['true', 'true', 'true', 'false', 'false', 'false', 'false', 'false'];
|
8
|
+
const customizeOptionsPreviewTab = ['Bold (Ctrl+B)', 'Italic (Ctrl+I)', 'Underline (Ctrl+U)', 'Insert/Remove Bulleted List', 'Special characters', 'Remove Format', 'Increase Indent', 'Decrease Indent'];
|
9
9
|
|
10
10
|
describe('Create question page - Essay Response - Basic: Customize formatting options (for student player) section contents, toolbar options', () => {
|
11
11
|
before(() => {
|
@@ -18,41 +18,46 @@ describe('Create question page - Essay Response - Basic: Customize formatting op
|
|
18
18
|
essayResponseBasicPage.steps.navigateToCreateQuestion('essay response - basic');
|
19
19
|
});
|
20
20
|
|
21
|
-
it('
|
22
|
-
essayResponseBasicPage.
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
.verifyInnerText(formattingOptionLabel[count])
|
30
|
-
.and('have.class', stateOfFormattingOption[count]);
|
31
|
-
});
|
21
|
+
it('User should be able to expand customize formatting options accordion', () => {
|
22
|
+
essayResponseBasicPage.steps.expandCustomizeFormattingOptionsAccordion();
|
23
|
+
});
|
24
|
+
|
25
|
+
it('\'Customize formatting options (for student player)\' label should be displayed and expand collapse icon should be displayed beside the label. By default, following options should be in selected state - \'Bold, Italic, Underline\'. Other options should be in unselected state', () => {
|
26
|
+
utilities.verifyInnerText(essayResponseBasicPage.customizeFormattingOptionsAccordionLabel(), 'Customize toolbar options and controls');
|
27
|
+
utilities.verifyElementVisibilityState(essayResponseBasicPage.customizeFormattingOptionsSectionExpandIcon(), 'exist');
|
28
|
+
essayResponseBasicPage.steps.verifyCustomizeFormattingOptionsAndSelectedState(customizeOptions, stateOfFormattingOption);
|
32
29
|
});
|
33
30
|
|
34
31
|
it('CSS of \'Customize formatting options (for student player)\' label and contents', { tags: 'css' }, () => {
|
35
32
|
cy.log('CSS of Customize formatting options (for student player) label');
|
36
|
-
essayResponseBasicPage.
|
37
|
-
|
33
|
+
utilities.verifyCSS(essayResponseBasicPage.customizeFormattingOptionsAccordionLabel(), {
|
34
|
+
'color': css.color.activeButtons,
|
35
|
+
'font-size': css.fontSize.default,
|
36
|
+
'font-weight': css.fontWeight.bold
|
37
|
+
});
|
38
|
+
utilities.verifyCSS(essayResponseBasicPage.customizeFormattingOptionsTiles('Bold'), {
|
39
|
+
'background-color': css.color.activeButtons
|
40
|
+
});
|
38
41
|
cy.log('CSS of selected toolbar formatting option')
|
39
|
-
essayResponseBasicPage.
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
essayResponseBasicPage.
|
51
|
-
|
52
|
-
.
|
53
|
-
|
54
|
-
|
55
|
-
|
42
|
+
utilities.verifyCSS(essayResponseBasicPage.tickIcon().eq(0), {
|
43
|
+
'color': css.color.defaultBackground
|
44
|
+
});
|
45
|
+
utilities.verifyCSS(essayResponseBasicPage.customizeFormattingOptionsTiles('Bold').find('svg'), {
|
46
|
+
'color': css.color.defaultBackground
|
47
|
+
});
|
48
|
+
utilities.verifyCSS(essayResponseBasicPage.customizeFormattingOptionsLabel().eq(0), {
|
49
|
+
'color': css.color.primaryBtn,
|
50
|
+
'font-size': css.fontSize.normal,
|
51
|
+
'font-weight': css.fontWeight.bold
|
52
|
+
});
|
53
|
+
utilities.verifyCSS(essayResponseBasicPage.customizeFormattingOptionsLabel().eq(3), {
|
54
|
+
'color': css.color.secondaryBtn,
|
55
|
+
'font-size': css.fontSize.normal,
|
56
|
+
'font-weight': css.fontWeight.bold,
|
57
|
+
});
|
58
|
+
utilities.verifyCSS(essayResponseBasicPage.customizeFormattingOptionsTiles('Special Characters'), {
|
59
|
+
'background-color': css.color.secondaryBtnBg
|
60
|
+
});
|
56
61
|
});
|
57
62
|
|
58
63
|
it('Accessibility of \'Customize formatting options (for student player)\' label and contents', { tags: 'a11y' }, () => {
|
@@ -72,136 +77,117 @@ describe('Create question page - Essay Response - Basic: Customize formatting op
|
|
72
77
|
essayResponseBasicPage.steps.resetPreviewTabResponseField();
|
73
78
|
});
|
74
79
|
|
75
|
-
it('When the user switches to Preview tab, then the following options should be displayed in the response field toolbar - \'
|
76
|
-
essayResponseBasicPage.
|
77
|
-
|
78
|
-
formattingOptionLabel.slice(0, 2).forEach((optionName, count) => {
|
79
|
-
cy.get('.cke_button')
|
80
|
-
.eq(count)
|
81
|
-
.should('have.attr', 'title', optionName)
|
82
|
-
.and('be.visible');
|
83
|
-
});
|
84
|
-
essayResponseBasicPage.previewTabToolbarOption('Special Characters')
|
85
|
-
.should('not.exist');
|
86
|
-
});
|
80
|
+
it('When the user switches to Preview tab, then the following options should be displayed in the response field toolbar - \'Bold, Italic, Underline\'', () => {
|
81
|
+
essayResponseBasicPage.steps.verifyPreviewTabToolbarOptions(customizeOptionsPreviewTab.slice(0, 2));
|
82
|
+
utilities.verifyElementVisibilityState(essayResponseBasicPage.previewTabToolbarOption('Special Characters'), 'notExist');
|
87
83
|
});
|
88
84
|
|
89
85
|
it('When the user selects all formatting options from the \'Customize formatting options (for student player)\' section, all formatting options should appear in the preview tab and all options should be in enabled sate', () => {
|
90
86
|
cy.log('Switching to edit tab')
|
91
|
-
essayResponseBasicPage.steps.switchToEditTab()
|
92
|
-
essayResponseBasicPage.
|
93
|
-
|
94
|
-
essayResponseBasicPage.specialCharacterCustomizeFormattingOption()
|
95
|
-
.should('have.class', 'ngie-toggle-button-selected');
|
87
|
+
essayResponseBasicPage.steps.switchToEditTab();
|
88
|
+
essayResponseBasicPage.steps.expandCustomizeFormattingOptionsAccordion();
|
89
|
+
essayResponseBasicPage.steps.selectCustomizedFormattingOption(['Bulleted List', 'Special Characters', 'Remove Format', 'Increase Indent', 'Decrease Indent']);
|
96
90
|
essayResponseBasicPage.steps.switchToPreviewTab();
|
97
|
-
essayResponseBasicPage.
|
98
|
-
.within(() => {
|
99
|
-
formattingOptionLabel.forEach((optionName, count) => {
|
100
|
-
cy.get('.cke_button')
|
101
|
-
.eq(count)
|
102
|
-
.should('have.attr', 'title', optionName)
|
103
|
-
.and('be.visible');
|
104
|
-
});
|
105
|
-
});
|
91
|
+
essayResponseBasicPage.steps.verifyPreviewTabToolbarOptions(customizeOptionsPreviewTab);
|
106
92
|
});
|
107
93
|
|
108
94
|
it('CSS of formatting options in Preview tab', { tags: 'css' }, () => {
|
109
|
-
essayResponseBasicPage.previewTabToolbarOption('
|
110
|
-
|
111
|
-
|
95
|
+
utilities.verifyCSS(essayResponseBasicPage.previewTabToolbarOption('Bold (Ctrl+B)').find('.cke_button_icon'), {
|
96
|
+
'color': css.color.activeButtons,
|
97
|
+
'font-size': css.fontSize.default,
|
98
|
+
'font-weight': css.fontWeight.regular
|
99
|
+
});
|
112
100
|
});
|
113
101
|
|
114
102
|
it('Accessibility of formatting options in Preview tab', { tags: 'a11y' }, () => {
|
115
|
-
cy.checkAccessibility(essayResponseBasicPage.previewTabToolbarWrapper())
|
103
|
+
cy.checkAccessibility(essayResponseBasicPage.previewTabToolbarWrapper());
|
116
104
|
});
|
117
105
|
|
118
106
|
it('When the user deselects an option from \'Customize formatting options (for student player)\' section, then that option should not be displayed in the preview tab toolbar.', () => {
|
119
107
|
cy.log('Switching to edit tab')
|
120
|
-
essayResponseBasicPage.steps.switchToEditTab()
|
121
|
-
essayResponseBasicPage.
|
122
|
-
.click()
|
123
|
-
.should('have.class', 'ngie-toggle-button-not-selected');
|
108
|
+
essayResponseBasicPage.steps.switchToEditTab();
|
109
|
+
essayResponseBasicPage.steps.deselectCustomizedFormattingOption(['Bold']);
|
124
110
|
essayResponseBasicPage.steps.switchToPreviewTab();
|
125
|
-
|
126
|
-
essayResponseBasicPage.previewTabToolbarWrapper()
|
127
|
-
.within(() => {
|
128
|
-
essayResponseBasicPage.previewTabToolbarOption('Cut')
|
129
|
-
.should('not.exist');
|
130
|
-
});
|
111
|
+
utilities.verifyElementVisibilityState(essayResponseBasicPage.previewTabToolbarOption('Bold'), 'notExist');
|
131
112
|
});
|
132
113
|
});
|
133
114
|
|
134
|
-
describe('
|
115
|
+
describe('Bold, Italic, Underline formatting options - Preview tab', () => {
|
135
116
|
abortEarlySetup();
|
136
117
|
before(() => {
|
137
118
|
essayResponseBasicPage.steps.navigateToCreateQuestion('essay response - basic');
|
138
119
|
cy.barsPreLoaderWait();
|
139
|
-
essayResponseBasicPage.steps.
|
140
|
-
cy.log('Selecting \'Special Characters\' formatting option from Edit tab');
|
141
|
-
essayResponseBasicPage.specialCharacterCustomizeFormattingOption()
|
142
|
-
.click()
|
120
|
+
essayResponseBasicPage.steps.expandCustomizeFormattingOptionsAccordion();
|
143
121
|
essayResponseBasicPage.steps.switchToPreviewTab();
|
144
|
-
cy.barsPreLoaderWait();
|
145
122
|
});
|
146
123
|
|
147
|
-
|
124
|
+
beforeEach(() => {
|
148
125
|
essayResponseBasicPage.steps.resetPreviewTabResponseField();
|
149
126
|
});
|
150
127
|
|
151
|
-
it('When the user selects the text
|
152
|
-
essayResponseBasicPage.
|
153
|
-
|
154
|
-
essayResponseBasicPage.steps.
|
155
|
-
essayResponseBasicPage.
|
156
|
-
|
157
|
-
essayResponseBasicPage.steps.
|
158
|
-
});
|
159
|
-
|
160
|
-
it('When the user
|
161
|
-
essayResponseBasicPage.
|
162
|
-
|
163
|
-
essayResponseBasicPage.steps.
|
164
|
-
essayResponseBasicPage.
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
essayResponseBasicPage.
|
173
|
-
|
174
|
-
essayResponseBasicPage.steps.
|
175
|
-
essayResponseBasicPage.steps.
|
176
|
-
essayResponseBasicPage.
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
essayResponseBasicPage.steps.
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
essayResponseBasicPage.
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
essayResponseBasicPage.steps.
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
essayResponseBasicPage.
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
essayResponseBasicPage.
|
201
|
-
|
202
|
-
essayResponseBasicPage.steps.
|
203
|
-
essayResponseBasicPage.
|
128
|
+
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', () => {
|
129
|
+
essayResponseBasicPage.steps.selectPreviewTabToolbarOption('Bold (Ctrl+B)');
|
130
|
+
essayResponseBasicPage.steps.enterInputInResponseField('Lorem Ipsum');
|
131
|
+
essayResponseBasicPage.steps.verifyResponseFieldHTML('<p><strong>Lorem Ipsum</strong><br></p>');
|
132
|
+
essayResponseBasicPage.steps.deselectPreviewTabToolbarOption('Bold (Ctrl+B)');
|
133
|
+
essayResponseBasicPage.steps.enterInputInResponseField(' dolor');
|
134
|
+
essayResponseBasicPage.steps.verifyResponseFieldHTML('<p><strong>Lorem Ipsum</strong> dolor<br></p>');
|
135
|
+
});
|
136
|
+
|
137
|
+
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', () => {
|
138
|
+
essayResponseBasicPage.steps.enterInputInResponseField('Lorem Ipsum{selectAll}');
|
139
|
+
essayResponseBasicPage.steps.selectPreviewTabToolbarOption('Bold (Ctrl+B)');
|
140
|
+
essayResponseBasicPage.steps.verifyResponseFieldHTML('<p><strong>Lorem Ipsum</strong></p>');
|
141
|
+
essayResponseBasicPage.steps.deselectPreviewTabToolbarOption('Bold (Ctrl+B)');
|
142
|
+
essayResponseBasicPage.steps.verifyResponseFieldHTML('<p>Lorem Ipsum</p>');
|
143
|
+
});
|
144
|
+
|
145
|
+
essayResponseBasicPage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Bold (Ctrl+B)');
|
146
|
+
|
147
|
+
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', () => {
|
148
|
+
essayResponseBasicPage.steps.selectPreviewTabToolbarOption('Italic (Ctrl+I)');
|
149
|
+
essayResponseBasicPage.steps.enterInputInResponseField('Lorem Ipsum');
|
150
|
+
essayResponseBasicPage.steps.verifyResponseFieldHTML('<p><em>Lorem Ipsum</em><br></p>');
|
151
|
+
essayResponseBasicPage.steps.deselectPreviewTabToolbarOption('Italic (Ctrl+I)');
|
152
|
+
essayResponseBasicPage.steps.enterInputInResponseField(' dolor');
|
153
|
+
essayResponseBasicPage.steps.verifyResponseFieldHTML('<p><em>Lorem Ipsum</em> dolor<br></p>');
|
154
|
+
});
|
155
|
+
|
156
|
+
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', () => {
|
157
|
+
essayResponseBasicPage.steps.enterInputInResponseField('Lorem Ipsum{selectAll}');
|
158
|
+
essayResponseBasicPage.steps.selectPreviewTabToolbarOption('Italic (Ctrl+I)');
|
159
|
+
essayResponseBasicPage.steps.verifyResponseFieldHTML('<p><em>Lorem Ipsum</em></p>');
|
160
|
+
essayResponseBasicPage.steps.deselectPreviewTabToolbarOption('Italic (Ctrl+I)');
|
161
|
+
essayResponseBasicPage.steps.verifyResponseFieldHTML('<p>Lorem Ipsum</p>');
|
162
|
+
});
|
163
|
+
|
164
|
+
essayResponseBasicPage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Italic (Ctrl+I)');
|
165
|
+
|
166
|
+
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', () => {
|
167
|
+
essayResponseBasicPage.steps.selectPreviewTabToolbarOption('Underline (Ctrl+U)');
|
168
|
+
essayResponseBasicPage.steps.enterInputInResponseField('Lorem Ipsum');
|
169
|
+
essayResponseBasicPage.steps.verifyResponseFieldHTML('<p><u>Lorem Ipsum</u><br></p>');
|
170
|
+
essayResponseBasicPage.steps.deselectPreviewTabToolbarOption('Underline (Ctrl+U)');
|
171
|
+
essayResponseBasicPage.steps.enterInputInResponseField(' dolor');
|
172
|
+
essayResponseBasicPage.steps.verifyResponseFieldHTML('<p><u>Lorem Ipsum</u> dolor<br></p>');
|
173
|
+
});
|
174
|
+
|
175
|
+
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', () => {
|
176
|
+
essayResponseBasicPage.steps.enterInputInResponseField('Lorem Ipsum{selectAll}');
|
177
|
+
essayResponseBasicPage.steps.selectPreviewTabToolbarOption('Underline (Ctrl+U)');
|
178
|
+
essayResponseBasicPage.steps.verifyResponseFieldHTML('<p><u>Lorem Ipsum</u></p>');
|
179
|
+
essayResponseBasicPage.steps.deselectPreviewTabToolbarOption('Underline (Ctrl+U)');
|
180
|
+
essayResponseBasicPage.steps.verifyResponseFieldHTML('<p>Lorem Ipsum</p>');
|
181
|
+
});
|
182
|
+
|
183
|
+
essayResponseBasicPage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Underline (Ctrl+U)');
|
184
|
+
|
185
|
+
it('The user should be able to add a combination of \'Bold, Italic, Underline\' formatting options to the text in the response field', () => {
|
186
|
+
essayResponseBasicPage.steps.enterInputInResponseField('Lorem Ipsum{selectAll}');
|
187
|
+
essayResponseBasicPage.steps.selectPreviewTabToolbarOption('Bold (Ctrl+B)');
|
188
|
+
essayResponseBasicPage.steps.selectPreviewTabToolbarOption('Italic (Ctrl+I)');
|
189
|
+
essayResponseBasicPage.steps.selectPreviewTabToolbarOption('Underline (Ctrl+U)');
|
190
|
+
essayResponseBasicPage.steps.verifyResponseFieldHTML('<p><u><em><strong>Lorem Ipsum</strong></em></u></p>');
|
204
191
|
});
|
205
192
|
});
|
206
|
-
//TO DO- Special characters flyout cases are pending
|
207
193
|
});
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { essayResponseMathPage } from "../../../pages";
|
2
|
+
|
3
|
+
describe('Create question page - Essay response - math', () => {
|
4
|
+
before(() => {
|
5
|
+
cy.loginAs('admin');
|
6
|
+
essayResponseMathPage.steps.navigateToCreateQuestion('essay response - math');
|
7
|
+
});
|
8
|
+
|
9
|
+
it('\'Essay response - math\' label should be displayed', () => {
|
10
|
+
essayResponseMathPage.tests.verifyCreateQuestionPageQuestionTypeHeader('Essay response - math');
|
11
|
+
});
|
12
|
+
|
13
|
+
it('When the user expands the \'Customize formatting options (for student player)\' accordion, the \'Equation Editor\' formatting option should be selected by default', () => {
|
14
|
+
essayResponseMathPage.steps.expandCustomizeFormattingOptionsAccordion();
|
15
|
+
essayResponseMathPage.steps.verifyCustomizeFormattingOptionIsSelected('Equation Editor');
|
16
|
+
});
|
17
|
+
});
|
@@ -0,0 +1,203 @@
|
|
1
|
+
import { essayResponseMathPage } from "../../../pages";
|
2
|
+
import { mathCharacters } from "../../../fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
import utilities from "../../../support/helpers/utilities";
|
5
|
+
const mathCharacterCategories = Object.values(mathCharacters.map((icon) => icon.categoryName));
|
6
|
+
const css = Cypress.env('css');
|
7
|
+
|
8
|
+
describe('Essay response math: Customize math characters', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Customize math characters', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
cy.log('Navigating to essay response - math question type');
|
17
|
+
essayResponseMathPage.steps.navigateToCreateQuestion('essay response - math');
|
18
|
+
cy.barsPreLoaderWait();
|
19
|
+
essayResponseMathPage.steps.expandCustomizeFormattingOptionsAccordion();
|
20
|
+
essayResponseMathPage.steps.selectCustomizedFormattingOption(['Math Characters']);
|
21
|
+
});
|
22
|
+
|
23
|
+
it('When user checks the \'Customize math characters\' checkbox, then \'Select math character languages\' label should be displayed. A \'Preview\' hyperlink should be displayed next to the label', () => {
|
24
|
+
essayResponseMathPage.steps.checkCustomizeMathCharactersCheckbox();
|
25
|
+
utilities.verifyElementVisibilityState(essayResponseMathPage.selectMathCharacterCategoryLabel(), 'visible');
|
26
|
+
utilities.verifyInnerText(essayResponseMathPage.selectMathCharacterCategoryLabel(), 'Select math character languages');
|
27
|
+
utilities.verifyElementVisibilityState(essayResponseMathPage.customizeMathCharactersPreviewButton(), 'visible');
|
28
|
+
utilities.verifyInnerText(essayResponseMathPage.customizeMathCharactersPreviewButton(), 'Preview');
|
29
|
+
});
|
30
|
+
|
31
|
+
it(`A total of ${mathCharacterCategories.length} options should be displayed - ${mathCharacterCategories.join('')}. By default all language options should be in selected state`, () => {
|
32
|
+
essayResponseMathPage.steps.verifyCustomizeMathCharactersCategoryTiles(mathCharacterCategories);
|
33
|
+
essayResponseMathPage.steps.verifySelectedCustomizeMathCharactersCategoryTiles(mathCharacterCategories);
|
34
|
+
});
|
35
|
+
|
36
|
+
it('When the user clicks on the \'Preview\' hyperlink, a math characters popup should be displayed with all the math characters segregated according to all the language options. The user should be able to close the popup by clicking on the \'Close[X]\' button', () => {
|
37
|
+
essayResponseMathPage.steps.clickOnCustomizeMathCharactersPreviewButton();
|
38
|
+
//Add this verification once https://redmine.zeuslearning.com/issues/555008 is resolved
|
39
|
+
// essayResponseMathPage.steps.verifyMathCharactersPreviewPopupInEditTab(mathCharacters);
|
40
|
+
cy.log('Post-step: Closing preview popup')
|
41
|
+
essayResponseMathPage.steps.closeWarningPopup();
|
42
|
+
});
|
43
|
+
|
44
|
+
it('When the user deselects any language option and opens the math characters popup by clicking on the \'Preview\' hyperlink, then the popup contents should get updated accordingly', () => {
|
45
|
+
let newSelectedCategoryList = mathCharacters.slice(1);
|
46
|
+
essayResponseMathPage.steps.clickOnMathCharactersCategoryTile(mathCharacters[0].categoryName);
|
47
|
+
essayResponseMathPage.steps.verifyMathCharacterCategoryTileIsNotSelected(mathCharacters[0].categoryName);
|
48
|
+
essayResponseMathPage.steps.clickOnCustomizeMathCharactersPreviewButton();
|
49
|
+
//Add this verification once https://redmine.zeuslearning.com/issues/555008 is resolved
|
50
|
+
// essayResponseMathPage.steps.verifyMathCharactersPreviewPopupInEditTab(newSelectedCategoryList);
|
51
|
+
cy.log('Post-step: Closing preview popup');
|
52
|
+
essayResponseMathPage.steps.closeWarningPopup();
|
53
|
+
});
|
54
|
+
|
55
|
+
it('When the user has deselected any language option and opens the math characters popup in the preview tab, then the popup contents should get updated accordingly', () => {
|
56
|
+
let newSelectedCategoryList = mathCharacters.slice(1);
|
57
|
+
essayResponseMathPage.steps.switchToPreviewTab();
|
58
|
+
essayResponseMathPage.steps.selectPreviewTabToolbarOption('Math characters');
|
59
|
+
essayResponseMathPage.steps.verifyMathCharactersPopupCategoriesAndSymbols(newSelectedCategoryList);
|
60
|
+
cy.log('Post-step: Switching to edit tab');
|
61
|
+
essayResponseMathPage.steps.switchToEditTab();
|
62
|
+
});
|
63
|
+
|
64
|
+
it('CSS of Customize math characters', { tags: 'css' }, () => {
|
65
|
+
utilities.verifyCSS(essayResponseMathPage.customizeMathCharactersLabel(), {
|
66
|
+
'color': css.color.labels,
|
67
|
+
'font-size': css.fontSize.normal,
|
68
|
+
'font-weight': css.fontWeight.semibold
|
69
|
+
});
|
70
|
+
//checked state of customize math characters checkbox
|
71
|
+
utilities.verifyCSS(essayResponseMathPage.customizeMathCharactersCheckbox().parents('[data-ngie-testid="customize-math-characters-checkbox"]').find('rect').eq(1), {
|
72
|
+
'fill': css.color.activeButtons
|
73
|
+
});
|
74
|
+
utilities.verifyCSS(essayResponseMathPage.selectSpecialCharacterLanguagesLabel(), {
|
75
|
+
'color': css.color.labels,
|
76
|
+
'font-size': css.fontSize.normal,
|
77
|
+
'font-weight': css.fontWeight.semibold
|
78
|
+
});
|
79
|
+
//Category tiles in selected state
|
80
|
+
utilities.verifyCSS(essayResponseMathPage.mathCharacterTileIcon().eq(1).find('svg'), {
|
81
|
+
'fill': css.color.defaultBackground
|
82
|
+
});
|
83
|
+
utilities.verifyCSS(essayResponseMathPage.customizeMathCharactersTickIcon().last().find('path[data-name*="Rectangle"]'), {
|
84
|
+
'fill': css.color.defaultBackground
|
85
|
+
});
|
86
|
+
utilities.verifyCSS(essayResponseMathPage.customizeMathCharactersTickIcon().last().find('path[data-name*="feather-check"]'), {
|
87
|
+
'fill': css.color.activeButtons
|
88
|
+
});
|
89
|
+
utilities.verifyCSS(essayResponseMathPage.mathCharacterTileSectionCategoriesDragIcon().eq(1).find('path'), {
|
90
|
+
'fill': css.color.activeButtons
|
91
|
+
});
|
92
|
+
utilities.verifyCSS(essayResponseMathPage.mathCharacterTileSectionCategoriesDragIcon().eq(1).parent(), {
|
93
|
+
'background-color': css.color.defaultBackground
|
94
|
+
});
|
95
|
+
utilities.verifyCSS(essayResponseMathPage.mathCharacterTileCategoryName().eq(1), {
|
96
|
+
'color': css.color.whiteText,
|
97
|
+
'font-size': css.fontSize.small,
|
98
|
+
'font-weight': css.fontWeight.regular
|
99
|
+
});
|
100
|
+
utilities.verifyCSS(essayResponseMathPage.mathCharacterTiles().eq(1), {
|
101
|
+
'background-color': css.color.primaryBtnBg
|
102
|
+
});
|
103
|
+
//Category tiles in de-selected state
|
104
|
+
utilities.verifyCSS(essayResponseMathPage.mathCharacterTileSectionCategoriesDragIcon().eq(0).find('svg path'), {
|
105
|
+
'fill': css.color.secondaryBtn
|
106
|
+
});
|
107
|
+
utilities.verifyCSS(essayResponseMathPage.mathCharacterTileCategoryName().eq(0), {
|
108
|
+
'color': css.color.secondaryBtn,
|
109
|
+
'font-size': css.fontSize.small,
|
110
|
+
'font-weight': css.fontWeight.regular
|
111
|
+
});
|
112
|
+
utilities.verifyCSS(essayResponseMathPage.mathCharacterTiles().eq(0), {
|
113
|
+
'background-color': css.color.defaultBackground
|
114
|
+
});
|
115
|
+
cy.log('Opening preview popup');
|
116
|
+
essayResponseMathPage.steps.clickOnCustomizeMathCharactersPreviewButton();
|
117
|
+
utilities.verifyCSS(essayResponseMathPage.dialogBoxTitle(), {
|
118
|
+
'color': css.color.flyoutTitle,
|
119
|
+
'font-size': css.fontSize.heading,
|
120
|
+
'font-weight': css.fontWeight.semibold
|
121
|
+
});
|
122
|
+
utilities.verifyCSS(essayResponseMathPage.mathCharactersPreviewPopupCategoryLabel().eq(0), {
|
123
|
+
'color': css.color.text,
|
124
|
+
'font-size': css.fontSize.normal,
|
125
|
+
'font-weight': css.fontWeight.semibold
|
126
|
+
});
|
127
|
+
});
|
128
|
+
|
129
|
+
it('Accessibility of Customize special characters', { tags: 'a11y' }, () => {
|
130
|
+
cy.checkAccessibility(essayResponseMathPage.dialogBox());
|
131
|
+
cy.log('Closing preview popup');
|
132
|
+
essayResponseMathPage.steps.closeWarningPopup();
|
133
|
+
cy.checkAccessibility(essayResponseMathPage.customizeMathCharactersLabel().parent());
|
134
|
+
});
|
135
|
+
});
|
136
|
+
|
137
|
+
describe('Preview tab - toolbar option - \'Math characters\' - content and functionality', { tags: 'smoke' }, () => {
|
138
|
+
abortEarlySetup();
|
139
|
+
before(() => {
|
140
|
+
cy.log('Navigating to drawing response question type');
|
141
|
+
essayResponseMathPage.steps.navigateToCreateQuestion('essay response - math');
|
142
|
+
cy.barsPreLoaderWait();
|
143
|
+
});
|
144
|
+
|
145
|
+
it(`When Math characters option is not selected in edit tab, then in preview tab the Math characters toolbar option should not be displayed`, () => {
|
146
|
+
essayResponseMathPage.steps.switchToPreviewTab();
|
147
|
+
utilities.verifyElementVisibilityState(essayResponseMathPage.previewTabToolbarOption('Math characters'), 'notExist');
|
148
|
+
});
|
149
|
+
|
150
|
+
it(`When Math characters additional option is selected in edit tab, then in preview tab the Math characters toolbar option should be displayed`, () => {
|
151
|
+
essayResponseMathPage.steps.switchToEditTab();
|
152
|
+
essayResponseMathPage.steps.expandCustomizeFormattingOptionsAccordion();
|
153
|
+
essayResponseMathPage.steps.selectCustomizedFormattingOption(['Math Characters']);
|
154
|
+
essayResponseMathPage.steps.switchToPreviewTab();
|
155
|
+
utilities.verifyElementVisibilityState(essayResponseMathPage.previewTabToolbarOption('Math characters'), 'visible');
|
156
|
+
});
|
157
|
+
|
158
|
+
it('By default the \'Math characters\' toolbar option should be in deselected state', () => {
|
159
|
+
//Add here once https://redmine.zeuslearning.com/issues/554508 is resolved
|
160
|
+
});
|
161
|
+
|
162
|
+
it('When user clicks on \'Math characters\' toolbar option, then the \'Math characters\' popup should be displayed with \'Math characters\' title and a \'Close\' button', () => {
|
163
|
+
essayResponseMathPage.steps.selectPreviewTabToolbarOption('Math characters');
|
164
|
+
utilities.verifyElementVisibilityState(essayResponseMathPage.dialogBox(), 'visible');
|
165
|
+
utilities.verifyInnerText(essayResponseMathPage.dialogBoxTitle(), 'Math characters');
|
166
|
+
utilities.verifyElementVisibilityState(essayResponseMathPage.mathCharactersPopupCloseButton(), 'visible');
|
167
|
+
});
|
168
|
+
|
169
|
+
it('All categories and their respective title and symbols should be displayed in the popup', () => {
|
170
|
+
essayResponseMathPage.steps.verifyMathCharactersPopupCategoriesAndSymbols(mathCharacters);
|
171
|
+
});
|
172
|
+
|
173
|
+
it('When user clicks on any category icon, then the category flyout should stay open', () => {
|
174
|
+
essayResponseMathPage.steps.clickOnCharacterPopupSymbol(mathCharacters[0].symbols[0]);
|
175
|
+
utilities.verifyElementVisibilityState(essayResponseMathPage.dialogBox(), 'visible');
|
176
|
+
});
|
177
|
+
|
178
|
+
it('CSS of \'Math characters\' popup', { tags: 'css' }, () => {
|
179
|
+
utilities.verifyCSS(essayResponseMathPage.dialogBoxTitle(), {
|
180
|
+
'color': css.color.flyoutTitle,
|
181
|
+
'font-size': css.fontSize.heading,
|
182
|
+
'font-weight': css.fontWeight.semibold,
|
183
|
+
});
|
184
|
+
utilities.verifyCSS(essayResponseMathPage.mathCharactersPopupCategoryTitle(), {
|
185
|
+
'color': css.color.text,
|
186
|
+
'font-size': css.fontSize.normal,
|
187
|
+
'font-weight': css.fontWeight.semibold,
|
188
|
+
});
|
189
|
+
utilities.verifyCSS(essayResponseMathPage.mathCharactersPopupCharacterSymbol().find('path'), {
|
190
|
+
'fill': css.color.activeButtons
|
191
|
+
});
|
192
|
+
});
|
193
|
+
|
194
|
+
it('Accessibility of Customize special characters', { tags: 'a11y' }, () => {
|
195
|
+
cy.checkAccessibility(essayResponseMathPage.dialogBox());
|
196
|
+
});
|
197
|
+
|
198
|
+
it('When user clicks on the \'Close\' button then the \'Math characters\' popup should be closed', () => {
|
199
|
+
essayResponseMathPage.steps.clickOnMathCharacterCloseButton();
|
200
|
+
utilities.verifyElementVisibilityState(essayResponseMathPage.dialogBox(), 'notExist');
|
201
|
+
});
|
202
|
+
});
|
203
|
+
});
|