itemengine-cypress-automation 1.0.105 → 1.0.106

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +129 -0
  2. package/cypress/e2e/ILC/AudioResponseNew/minimalRecorderStyle.js +482 -0
  3. package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +123 -0
  4. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.js +554 -0
  5. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +1 -41
  6. package/cypress/e2e/ILC/EditTabSettingPage/ItemPreviewSettingsTabContent.js +5 -3
  7. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +284 -0
  8. package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +412 -0
  9. package/cypress/e2e/ILC/EssayResponse/equationEditorCategories1.js +203 -0
  10. package/cypress/e2e/ILC/EssayResponse/equationEditorCategories2.js +340 -0
  11. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
  12. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
  13. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +336 -0
  14. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +332 -0
  15. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +522 -0
  16. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +253 -0
  17. package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +266 -0
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +57 -640
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +1 -2
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +209 -0
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +209 -0
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +303 -0
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingPenaltyScoring.js +68 -0
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsBasic.js +149 -0
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +218 -0
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +191 -0
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +219 -0
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +240 -0
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +124 -0
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +107 -0
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/manuallyAndNonScored.js +1 -1
  32. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +0 -2
  33. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +408 -0
  34. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +2 -2
  35. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
  36. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +2 -2
  37. package/cypress/e2e/ILC/MultipleSelection/headerSection.js +1 -0
  38. package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +0 -6
  39. package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +242 -0
  40. package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +99 -0
  41. package/cypress/e2e/ILC/Passage/passageEditTab.js +241 -0
  42. package/cypress/e2e/ILC/Passage/passageHeaderSection.js +73 -0
  43. package/cypress/e2e/ILC/Passage/passagePreviewTab.js +246 -0
  44. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +138 -33
  45. package/cypress/e2e/ILC/ReadingRuler/readingRulerHeaderSection.js +30 -6
  46. package/cypress/e2e/ILC/ReadingRuler/readingRulerPreviewTab.js +167 -101
  47. package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +1 -1
  48. package/cypress/e2e/ILC/SingleSelection/headerSection.js +20 -5
  49. package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +1 -0
  50. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +12 -7
  51. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +1336 -0
  52. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +419 -0
  53. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +443 -0
  54. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +411 -0
  55. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +411 -0
  56. package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +45 -0
  57. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +3 -3
  58. package/cypress/fixtures/specialAndMathCharacters.js +2 -0
  59. package/cypress/fixtures/theme/ilc.json +4 -2
  60. package/cypress/pages/audioResponsePage.js +326 -165
  61. package/cypress/pages/components/additionalSettingsPanel.js +1 -1
  62. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +1 -1
  63. package/cypress/pages/components/backgroundImageUploadComponent.js +162 -2
  64. package/cypress/pages/components/colorPopupComponent.js +115 -26
  65. package/cypress/pages/components/customizeMathCharacterComponent.js +133 -0
  66. package/cypress/pages/components/customizeSpecialCharacterComponent.js +74 -4
  67. package/cypress/pages/components/editCategoryFlyout.js +164 -2
  68. package/cypress/pages/components/equationEditorFlyout.js +36 -1
  69. package/cypress/pages/components/essayResponseCommonComponents.js +0 -2
  70. package/cypress/pages/components/figOverImageCanvasComponent.js +587 -134
  71. package/cypress/pages/components/index.js +2 -1
  72. package/cypress/pages/components/playbackControlsBaseComponent.js +137 -2
  73. package/cypress/pages/correctAnswerViewPage.js +12 -1
  74. package/cypress/pages/drawingResponsePage.js +26 -151
  75. package/cypress/pages/essayResponseMathPage.js +28 -16
  76. package/cypress/pages/essayResponsePage.js +187 -7
  77. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +78 -14
  78. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +178 -221
  79. package/cypress/pages/fillInTheGapsOverImageTextPage.js +79 -0
  80. package/cypress/pages/multipleSelectionPage.js +1 -1
  81. package/cypress/pages/readingRulerPage.js +219 -104
  82. package/cypress/pages/singleSelectionPage.js +1 -0
  83. package/cypress/pages/textEntryMathPage.js +17 -6
  84. package/cypress/pages/videoResponsePage.js +0 -8
  85. package/package.json +1 -1
  86. package/scripts/sorry-cypress.mjs +1 -1
@@ -0,0 +1,336 @@
1
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
2
+ import { essayResponsePage } from "../../../pages";
3
+ const css = Cypress.env('css');
4
+ const grepTags = Cypress.env('grepTags');
5
+
6
+ const formattingOptions = ['Bold', 'Italic', 'Underline', 'Division', 'Superscript', 'Bulleted List', 'Numbered List', 'Insert Hyperlink', 'Insert Image', 'Special Characters', 'Insert Table', 'Equation Editor', 'Division', 'Code Inline', 'Code Editor', 'Strikethrough', 'Background Color', 'Text Color', 'Subscript', 'Remove Format', 'Division', 'Align Left', 'Align Center', 'Align Right', 'Align Justify', 'Division', 'Increase Indent', 'Decrease Indent', 'Division', 'Text direction left to right', 'Text direction right to left', 'Insert Horizontal Line', 'Block Quote', 'Math characters', 'Division', 'Undo', 'Redo', 'Division'];
7
+ const defaultSelectedFormattingOptions = ['Bold', 'Italic', 'Underline', 'Division', 'Superscript', 'Bulleted List', 'Numbered List', 'Insert Hyperlink', 'Insert Image', 'Special Characters', 'Insert Table'];
8
+ const defaultFormattingOptionsPreviewTab = ['Bold (Ctrl+B)', 'Italic (Ctrl+I)', 'Underline (Ctrl+U)', 'Superscript', 'Insert/Remove Bulleted List', 'Insert/Remove Numbered List', 'Insert Hyperlink', 'Insert Image', 'Special characters', 'Insert Table'];
9
+ const formattingOptionsPreviewTab = ['Bold (Ctrl+B)', 'Italic (Ctrl+I)', 'Underline (Ctrl+U)', 'Superscript', 'Insert/Remove Bulleted List', 'Insert/Remove Numbered List', 'Insert Hyperlink', 'Insert Image', 'Special characters', 'Insert Table', 'Equation Editor', 'Code Inline', 'Code Editor', 'Strikethrough', 'Background Color', 'Text Color', 'Subscript', 'Remove Format', 'Align Left', 'Align Center', 'Align Right', 'Align Justify', 'Increase Indent', 'Decrease Indent', 'Text direction left to right', 'Text direction right to left', 'Insert Horizontal Line', 'Block Quote', 'Math characters', 'Undo (Ctrl+Z)', 'Redo (Ctrl+Y)'];
10
+ describe('Create question page - Essay Response: Customize formatting options (for student player) accordion contents, toolbar options', () => {
11
+ before(() => {
12
+ cy.loginAs('admin');
13
+ });
14
+
15
+ //Failing due to https://redmine.zeuslearning.com/issues/530059, https://redmine.zeuslearning.com/issues/525223
16
+ describe('Customize formatting options (for student player) accordion contents', { tags: 'smoke' }, () => {
17
+ abortEarlySetup();
18
+ before(() => {
19
+ essayResponsePage.steps.navigateToCreateQuestion('essay response');
20
+ });
21
+
22
+ it('By default \'Customize formatting options (for student player)\' accordion should be collapsed and by clicking on the \'Customize formatting options (for student player)\' accordion, user should be able to expand the accordion', () => {
23
+ essayResponsePage.customizeFormattingOptionsAccordion()
24
+ .verifyInnerText('Customize formatting options (for student player)')
25
+ .should('have.attr', 'aria-expanded', 'false');
26
+ essayResponsePage.customizeFormattingOptionsAccordion()
27
+ .click()
28
+ .should('have.attr', 'aria-expanded', 'true');
29
+ });
30
+
31
+ it('CSS of \'Customize formatting options (for student player)\' accordion and contents', { tags: 'css' }, () => {
32
+ cy.log('CSS of accordion label and chevron icon')
33
+ essayResponsePage.customizeFormattingOptionsAccordionLabel()
34
+ .verifyCSS(css.color.accordionLabel, css.fontSize.default, css.fontWeight.bold);
35
+ essayResponsePage.customizeFormattingOptionsAccordion()
36
+ .find('svg')
37
+ .should('have.css', 'fill', css.color.activeButtons);
38
+ cy.log('CSS of selected toolbar formatting option')
39
+ essayResponsePage.customizeFormattingOptionsTiles('Bold')
40
+ .should('have.css', 'background-color', css.color.primaryBtnBg)
41
+ cy.log('CSS of tick icon of selected toolbar formatting option')
42
+ essayResponsePage.customizeFormattingOptionsTiles('Bold')
43
+ .find('[data-name="Icon feather-check"]')
44
+ .should('have.css', 'fill', css.color.activeButtons);
45
+ cy.log('CSS of background of tick icon of selected toolbar formatting option')
46
+ essayResponsePage.customizeFormattingOptionsTiles('Bold')
47
+ .find('[data-name*="Rectangle"]')
48
+ .should('have.css', 'fill', css.color.defaultBackground);
49
+ cy.log('CSS of icon of selected toolbar formatting option')
50
+ essayResponsePage.customizeFormattingOptionsTiles('Bold')
51
+ .find('.drag-item-flex-wrapper svg')
52
+ .should('have.css', 'fill', css.color.primaryBtn);
53
+ cy.log('CSS of drag handle of selected toolbar formatting option')
54
+ essayResponsePage.customizeFormattingOptionsTiles('Bold')
55
+ .find('.drag-icon-button-custom-format svg path')
56
+ .eq(1)
57
+ .should('have.css', 'color', css.color.activeButtons);
58
+ cy.log('CSS of unselected toolbar formatting option')
59
+ essayResponsePage.customizeFormattingOptionsTiles('Code Inline')
60
+ .should('have.css', 'background-color', css.color.secondaryBtnBg);
61
+ cy.log('CSS of icon of unselected toolbar formatting option')
62
+ essayResponsePage.customizeFormattingOptionsTiles('Code Inline')
63
+ .find('.drag-item-flex-wrapper path')
64
+ .eq(1)
65
+ .should('have.css', 'fill', css.color.secondaryBtn);
66
+ cy.log('CSS of drag handle of unselected toolbar formatting option')
67
+ essayResponsePage.customizeFormattingOptionsTiles('Code Inline')
68
+ .find('.drag-icon-button-custom-format svg path')
69
+ .eq(1)
70
+ .should('have.css', 'fill', css.color.secondaryBtn);
71
+ });
72
+
73
+ it('Accessibility of \'Customize formatting options (for student player)\' accordion and contents', { tags: 'a11y' }, () => {
74
+ cy.checkAccessibility(essayResponsePage.customizeFormattingOptionsAccordion().parents('.Mui-expanded'));
75
+ });
76
+
77
+ 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
+ formattingOptions.forEach((optionName, count) => {
79
+ cy.get('.icon-button-custom-format')
80
+ .eq(count)
81
+ .should('have.attr', 'title', optionName)
82
+ .within(() => {
83
+ essayResponsePage.customizeFormattingOptionsdragHandleButton()
84
+ .should('be.visible');
85
+ });
86
+ });
87
+ });
88
+
89
+ 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 - \'Bold, Italic, Underline, Division, Superscript, Bulleted list, Numbered list, Link, Insert Image, Special Characterss, Table\'. All the other options should be in unselected state.', () => {
90
+ defaultSelectedFormattingOptions.forEach((option, count) => {
91
+ cy.get('.icon-button-custom-format')
92
+ .eq(count)
93
+ .should('have.attr', 'data-aria-pressed', 'true');
94
+ });
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
+ });
101
+
102
+ 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.customizeFormattingOptionsTiles('Superscript')
104
+ .click()
105
+ .should('have.attr', 'data-aria-pressed', 'false');
106
+ essayResponsePage.customizeFormattingOptionsTiles('Strikethrough')
107
+ .click()
108
+ .should('have.attr', 'data-aria-pressed', 'true');
109
+ essayResponsePage.steps.switchToPreviewTab();
110
+ essayResponsePage.previewTabToolbarOption('Strikethrough')
111
+ .should('be.visible');
112
+ essayResponsePage.previewTabToolbarOption('Superscript')
113
+ .should('not.exist');
114
+ });
115
+
116
+ 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
+ cy.log('Switching to edit tab')
118
+ essayResponsePage.steps.switchToEditTab();
119
+ essayResponsePage.customizeFormattingOptionsTiles('Equation Editor')
120
+ .click()
121
+ .should('have.attr', 'data-aria-pressed', 'true');
122
+ essayResponsePage.equationEditorOptionsWrapper()
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');
129
+ });
130
+
131
+ it('User should be able to collapse \'Customize formatting options (for student player)\' accordion.', () => {
132
+ essayResponsePage.customizeFormattingOptionsAccordion()
133
+ .click()
134
+ .should('have.attr', 'aria-expanded', 'false');
135
+ });
136
+ });
137
+
138
+ describe('Customize formatting options (for student player) - Preview tab contents', { tags: 'smoke' }, () => {
139
+ abortEarlySetup();
140
+ before(() => {
141
+ essayResponsePage.steps.navigateToCreateQuestion('essay response');
142
+ cy.barsPreLoaderWait();
143
+ essayResponsePage.steps.switchToPreviewTab();
144
+ });
145
+
146
+ it('When the user switches to Preview tab, then the following options should be displayed in the response field toolbar - \'Bold, Italic, Underline, Superscript, Bulleted list, Numbered list, Link, Insert Image, Special Characters, Table\' along with a separator after \'Underline\' option', () => {
147
+ essayResponsePage.previewTabToolbarWrapper()
148
+ .within(() => {
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');
160
+ });
161
+
162
+ it('When the user selects all formatting options from the \'Customize formatting options (for student player)\' accordion, all formatting options should appear in the preview tab along with separator after \'Underline\', \'Equation Editor\', \'Remove Format\', \'Justify\', \'Decrease indent\', \'Math characters\' options', () => {
163
+ let separatorInToolbarContents = ['Underline (Ctrl+U)', 'Equation Editor', 'Remove Format', 'Align Justify', 'Decrease Indent', 'Math characters']
164
+ essayResponsePage.steps.switchToEditTab()
165
+ essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
166
+ for (let index = 11; index < formattingOptions.length; index++) {
167
+ cy.get('.icon-button-custom-format')
168
+ .eq(index)
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');
187
+ });
188
+ });
189
+
190
+ it('In the customized formatting options menu, if the user has selected a divider line at the end, then that line should not be present in the essay response toolbar', () => {
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', () => {
196
+ let disabledOptions = ['Decrease Indent', 'Undo (Ctrl+Z)', 'Redo (Ctrl+Y)']
197
+ disabledOptions.forEach((optionName) => {
198
+ essayResponsePage.previewTabToolbarOption(optionName)
199
+ .should('have.attr', 'aria-disabled', 'true');
200
+ });
201
+ });
202
+
203
+ it('CSS of formatting options in Preview tab', { tags: 'css' }, () => {
204
+ essayResponsePage.previewTabToolbarOption('Bold (Ctrl+B)')
205
+ .find('.cke_button_icon')
206
+ .should('have.css', 'color', css.color.activeButtons);
207
+ });
208
+
209
+ it('Accessibility of formatting options in Preview tab', { tags: 'a11y' }, () => {
210
+ cy.checkAccessibility(essayResponsePage.previewTabToolbarWrapper())
211
+ });
212
+ });
213
+
214
+ if (!grepTags || !grepTags.includes('smoke')) {
215
+ describe('Bold, Italic, Underline, Strikethrough formatting options - Preview tab', () => {
216
+ abortEarlySetup();
217
+ before(() => {
218
+ essayResponsePage.steps.navigateToCreateQuestion('essay response');
219
+ cy.barsPreLoaderWait();
220
+ essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
221
+ essayResponsePage.steps.selectCustomizedFormattingOption(['Strikethrough', 'Undo', 'Redo']);
222
+ essayResponsePage.steps.switchToPreviewTab();
223
+ });
224
+
225
+ beforeEach(() => {
226
+ essayResponsePage.steps.resetPreviewTabResponseField();
227
+ });
228
+
229
+ 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
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Bold (Ctrl+B)');
231
+ essayResponsePage.responseField()
232
+ .type('Lorem Ipsum')
233
+ .verifyInnerHTML('<p><strong>​​​​​​​Lorem Ipsum</strong><br></p>');
234
+ essayResponsePage.steps.deselectPreviewTabToolbarOption('Bold (Ctrl+B)');
235
+ essayResponsePage.responseField()
236
+ .type(' dolor')
237
+ .verifyInnerHTML('<p><strong>Lorem Ipsum</strong>​​​​​​​ dolor<br></p>');
238
+ });
239
+
240
+ 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.responseField()
242
+ .type('Lorem Ipsum{selectAll}');
243
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Bold (Ctrl+B)');
244
+ essayResponsePage.responseField()
245
+ .verifyInnerHTML('<p><strong>Lorem Ipsum</strong></p>');
246
+ essayResponsePage.steps.deselectPreviewTabToolbarOption('Bold (Ctrl+B)');
247
+ essayResponsePage.responseField()
248
+ .verifyInnerHTML('<p>Lorem Ipsum</p>');
249
+ });
250
+
251
+ essayResponsePage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Bold (Ctrl+B)');
252
+
253
+ 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
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Italic (Ctrl+I)');
255
+ essayResponsePage.responseField()
256
+ .type('Lorem Ipsum')
257
+ .verifyInnerHTML('<p><em>​​​​​​​Lorem Ipsum</em><br></p>');
258
+ essayResponsePage.steps.deselectPreviewTabToolbarOption('Italic (Ctrl+I)');
259
+ essayResponsePage.responseField()
260
+ .type(' dolor')
261
+ .verifyInnerHTML('<p><em>Lorem Ipsum</em>​​​​​​​ dolor<br></p>');
262
+ });
263
+
264
+ 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.responseField()
266
+ .type('Lorem Ipsum{selectAll}');
267
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Italic (Ctrl+I)');
268
+ essayResponsePage.responseField()
269
+ .verifyInnerHTML('<p><em>Lorem Ipsum</em></p>');
270
+ essayResponsePage.steps.deselectPreviewTabToolbarOption('Italic (Ctrl+I)');
271
+ essayResponsePage.responseField()
272
+ .verifyInnerHTML('<p>Lorem Ipsum</p>');
273
+ });
274
+
275
+ essayResponsePage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Italic (Ctrl+I)');
276
+
277
+ 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
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Underline (Ctrl+U)');
279
+ essayResponsePage.responseField()
280
+ .type('Lorem Ipsum')
281
+ .verifyInnerHTML('<p><u>​​​​​​​Lorem Ipsum</u><br></p>');
282
+ essayResponsePage.steps.deselectPreviewTabToolbarOption('Underline (Ctrl+U)');
283
+ essayResponsePage.responseField()
284
+ .type(' dolor')
285
+ .verifyInnerHTML('<p><u>Lorem Ipsum</u>​​​​​​​ dolor<br></p>');
286
+ });
287
+
288
+ 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.responseField()
290
+ .type('Lorem Ipsum{selectAll}');
291
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Underline (Ctrl+U)');
292
+ essayResponsePage.responseField()
293
+ .verifyInnerHTML('<p><u>Lorem Ipsum</u></p>');
294
+ essayResponsePage.steps.deselectPreviewTabToolbarOption('Underline (Ctrl+U)');
295
+ essayResponsePage.responseField()
296
+ .verifyInnerHTML('<p>Lorem Ipsum</p>');
297
+ });
298
+
299
+ essayResponsePage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Underline (Ctrl+U)');
300
+
301
+ 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
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Strikethrough');
303
+ essayResponsePage.responseField()
304
+ .type('Lorem Ipsum')
305
+ .verifyInnerHTML('<p><s>​​​​​​​Lorem Ipsum</s><br></p>');
306
+ essayResponsePage.steps.deselectPreviewTabToolbarOption('Strikethrough');
307
+ essayResponsePage.responseField()
308
+ .type(' dolor')
309
+ .verifyInnerHTML('<p><s>Lorem Ipsum</s>​​​​​​​ dolor<br></p>');
310
+ });
311
+
312
+ 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.responseField()
314
+ .type('Lorem Ipsum{selectAll}');
315
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Strikethrough');
316
+ essayResponsePage.responseField()
317
+ .verifyInnerHTML('<p><s>Lorem Ipsum</s></p>');
318
+ essayResponsePage.steps.deselectPreviewTabToolbarOption('Strikethrough');
319
+ essayResponsePage.responseField()
320
+ .verifyInnerHTML('<p>Lorem Ipsum</p>');
321
+ });
322
+
323
+ essayResponsePage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Strikethrough');
324
+
325
+ 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.responseField()
327
+ .type('Lorem Ipsum{selectAll}');
328
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Bold (Ctrl+B)');
329
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Italic (Ctrl+I)');
330
+ essayResponsePage.steps.selectPreviewTabToolbarOption('Underline (Ctrl+U)');
331
+ essayResponsePage.responseField()
332
+ .verifyInnerHTML('<p><u><em><strong>Lorem Ipsum</strong></em></u></p>');
333
+ });
334
+ });
335
+ }
336
+ });