itemengine-cypress-automation 1.0.105 → 1.0.107

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) 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/responseEvaluationMethodsAndCustomSettings.js +3 -3
  57. package/cypress/fixtures/specialAndMathCharacters.js +2 -0
  58. package/cypress/fixtures/theme/ilc.json +4 -2
  59. package/cypress/pages/audioResponsePage.js +326 -165
  60. package/cypress/pages/components/additionalSettingsPanel.js +1 -1
  61. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +1 -1
  62. package/cypress/pages/components/backgroundImageUploadComponent.js +162 -2
  63. package/cypress/pages/components/colorPopupComponent.js +115 -26
  64. package/cypress/pages/components/customizeMathCharacterComponent.js +133 -0
  65. package/cypress/pages/components/customizeSpecialCharacterComponent.js +74 -4
  66. package/cypress/pages/components/editCategoryFlyout.js +164 -2
  67. package/cypress/pages/components/equationEditorFlyout.js +36 -1
  68. package/cypress/pages/components/essayResponseCommonComponents.js +0 -2
  69. package/cypress/pages/components/figOverImageCanvasComponent.js +587 -134
  70. package/cypress/pages/components/index.js +2 -1
  71. package/cypress/pages/components/playbackControlsBaseComponent.js +137 -2
  72. package/cypress/pages/correctAnswerViewPage.js +12 -1
  73. package/cypress/pages/drawingResponsePage.js +26 -151
  74. package/cypress/pages/essayResponseMathPage.js +28 -16
  75. package/cypress/pages/essayResponsePage.js +187 -7
  76. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +78 -14
  77. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +178 -221
  78. package/cypress/pages/fillInTheGapsOverImageTextPage.js +79 -0
  79. package/cypress/pages/multipleSelectionPage.js +1 -1
  80. package/cypress/pages/readingRulerPage.js +219 -104
  81. package/cypress/pages/singleSelectionPage.js +1 -0
  82. package/cypress/pages/textEntryMathPage.js +17 -6
  83. package/cypress/pages/videoResponsePage.js +0 -8
  84. package/package.json +1 -1
  85. package/scripts/sorry-cypress.mjs +1 -1
@@ -3,10 +3,7 @@ import utilities from "../../../support/helpers/utilities";
3
3
  import abortEarlySetup from "../../../support/helpers/abortEarly";
4
4
  const css = Cypress.env('css');
5
5
 
6
- const alignmentOptions = ['Top left', 'Center', 'Top right'];
7
- const dropzonePointerStyles = ['none', 'bottom', 'bottom right', 'right', 'top right', 'top', 'top left', 'left', 'bottom left'];
8
- const labels = [fillInTheGapsOverImageDragAndDropPage.selectedColorLabel, fillInTheGapsOverImageDragAndDropPage.hexLabel]
9
- const inputFields = [fillInTheGapsOverImageDragAndDropPage.hexInputField];
6
+ const dropzonePointerStyles = ['None', 'Bottom', 'Bottom right', 'Right', 'Top right', 'Top', 'Top left', 'Left', 'Bottom left'];
10
7
 
11
8
  describe('Create item page - Fill in the gaps: Question instructions, Options section', () => {
12
9
  before(() => {
@@ -40,143 +37,9 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
40
37
  cy.barsPreLoaderWait();
41
38
  });
42
39
 
43
- it('\'Background image\' label should be visible', () => {
44
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.backgroundImageLabel(), 'Background image');
45
- })
40
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyBackgroundImageSectionContentWithCSSAndA11y();
46
41
 
47
- it('\'Upload\' label and \'Choose file\' button should be displayed', () => {
48
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.uploadLabel(), 'Upload');
49
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.uploadLabel(), 'visible');
50
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.chooseFileButton(), 'Choose file');
51
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.chooseFileButton(), 'visible');
52
- });
53
-
54
- it('\'File name\' label should be displayed and by default \'No file chosen\' text should be displayed below the \'File name\' label.', () => {
55
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.fileNameLabel(), 'File name');
56
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.fileNameLabel(), 'visible');
57
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.noFileChosenLabel(), 'No file chosen');
58
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.noFileChosenLabel(), 'visible');
59
- });
60
-
61
- it('CSS of upload section', { tags: 'css' }, () => {
62
- utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.uploadLabel(), {
63
- 'color': css.color.labels,
64
- 'font-size': css.fontSize.normal,
65
- 'font-weight': css.fontWeight.semibold
66
- });
67
- utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.chooseFileButton(), {
68
- 'color': css.color.secondaryBtn,
69
- 'font-size': css.fontSize.default,
70
- 'font-weight': css.fontWeight.regular,
71
- 'border-bottom-color': css.color.titleContainerBorder
72
- });
73
- utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.fileNameLabel(), {
74
- 'color': css.color.labels,
75
- 'font-size': css.fontSize.normal,
76
- 'font-weight': css.fontWeight.semibold
77
- });
78
- utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.noFileChosenLabel(), {
79
- 'color': css.color.panelLabel,
80
- 'font-size': css.fontSize.default,
81
- 'font-weight': css.fontWeight.regular
82
- });
83
- });
84
-
85
- it('Accessibility of Upload section before uploading image', { tags: 'a11y' }, () => {
86
- cy.checkAccessibility(fillInTheGapsOverImageDragAndDropPage.uploadLabel().parents('.edit-question-edit-tab-wrapper'));
87
- });
88
-
89
- it('When the user adds the image file and file upload is inprogress, file name and progress bar should be displayed below \'File name\' label. Progress bar should disappear once file is uploaded and uploaded image should be displayed', () => {
90
- fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
91
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.uploadImageProgressBar(), 'visible');
92
- fillInTheGapsOverImageDragAndDropPage.steps.verifyFileNameLabel('highlightImage.jpg');
93
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.canvasImage(), 'visible');
94
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.uploadImageProgressBar(), 'notExist');
95
- fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
96
- });
97
-
98
- it('Delete button should appear beside uploaded file\'s name', () => {
99
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.deleteImageIcon(), 'visible');
100
- });
101
-
102
- it('When user clicks on \'Choose file\' button again and upload another image file, previously uploaded image file should get replaced with new image file', () => {
103
- fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('sample1.jpg');
104
- fillInTheGapsOverImageDragAndDropPage.steps.verifyFileNameLabel('sample1.jpg');
105
- });
106
-
107
- it('When the user hovers on \'Delete\' button, \'Delete image\' text should be displayed in tooltip', () => {
108
- fillInTheGapsOverImageDragAndDropPage.deleteImageIcon()
109
- .verifyTooltip('Delete image');
110
- });
111
-
112
- it('CSS of tooltip', { tags: 'css' }, () => {
113
- fillInTheGapsOverImageDragAndDropPage.deleteImageIcon()
114
- .trigger('mouseover');
115
- utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.tooltipText(), {
116
- 'color': css.color.whiteText,
117
- 'font-size': css.fontSize.normal,
118
- 'font-weight': css.fontWeight.regular,
119
- 'background-color': css.color.tooltipBg
120
- });
121
- });
122
-
123
- it('When user clicks on the \'Delete\' button, then \'Delete\' popup should be displayed', () => {
124
- fillInTheGapsOverImageDragAndDropPage.steps.deleteImage();
125
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dialogBox(), 'visible');
126
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.dialogBoxTitle(), 'Delete');
127
- });
128
-
129
- it('The pop up should be displayed with the message \'Are you sure you want to delete the image?\'', () => {
130
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.dialogBoxContent(), 'Are you sure you want to delete the image?');
131
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.deleteImagePopupButtonDelete(), 'Delete image');
132
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.deleteImagePopupButtonCancel(), 'Cancel');
133
- });
134
-
135
- it('CSS of popup', { tags: 'css' }, () => {
136
- utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.dialogBox(), {
137
- 'background-color': css.color.defaultBackground,
138
- });
139
- utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.dialogBoxContent().find('[class*="UploadImagestyles__DeletePopupWrapper"]'), {
140
- 'color': css.color.sectionHeading,
141
- 'font-size': css.fontSize.default,
142
- 'font-weight': css.fontWeight.regular
143
- });
144
- utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.deleteImagePopupButtonDelete(), {
145
- 'color': css.color.primaryBtn,
146
- 'font-size': css.fontSize.default,
147
- 'font-weight': css.fontWeight.semibold
148
- });
149
- utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.deleteImagePopupButtonCancel(), {
150
- 'color': css.color.secondaryBtn,
151
- 'font-size': css.fontSize.default,
152
- 'font-weight': css.fontWeight.semibold,
153
- 'background-color': css.color.defaultBackground
154
- });
155
- });
156
-
157
- it('Accessibility of the popup', () => {
158
- cy.checkAccessibility(fillInTheGapsOverImageDragAndDropPage.dialogBox());
159
- });
160
-
161
- it('When user clicks on \'Cancel\' button, then popup should close and user should remain on the edit interface of the question', () => {
162
- fillInTheGapsOverImageDragAndDropPage.steps.clickOnCancelButtonInDeleteImagePopup();
163
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dialogBox(), 'notExist');
164
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.uploadedFileNameLabel(), 'sample1.jpg');
165
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.canvasImage(), 'visible');
166
- });
167
-
168
- it('When user clicks on \'Delete image\' button, then popup should close and image inside the canvas should be deleted', () => {
169
- fillInTheGapsOverImageDragAndDropPage.steps.deleteImage();
170
- fillInTheGapsOverImageDragAndDropPage.steps.clickOnDeleteButtonInDeleteImagePopup();
171
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dialogBox(), 'notExist');
172
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.noFileChosenLabel(), 'No file chosen');
173
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasImageNotExist();
174
- });
175
-
176
- it('When user has deleted image, then error message \'Error:Image is required\' should be displayed below \'Upload\' button', () => {
177
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'visible');
178
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'Error: Image is required.');
179
- });
42
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyDeleteImagePopupContentAndFunctionality();
180
43
  });
181
44
 
182
45
  describe('Canvas section - Edit tab', () => {
@@ -186,59 +49,30 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
186
49
  cy.barsPreLoaderWait();
187
50
  });
188
51
 
189
- it('\'Canvas\' label and canvas should be displayed', () => {
190
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.canvasLabel(), 'Canvas');
191
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.canvasLabel(), 'visible');
192
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.canvas(), 'visible');
193
- });
194
-
195
- it('When user uploads background image for canvas, then it should be displayed', () => {
196
- fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
197
- fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
198
- });
52
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyCanvasLabelAndCanvas();
199
53
 
200
54
  it('Select dropzone, Insert dropzone and Insert text buttons should be displayed.', () => {
201
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.selectDropzoneButton(), 'visible');
202
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.insertDropzoneButton(), 'visible');
203
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.insertTextButton(), 'visible');
55
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.selectResponseAreaButton(), 'visible');
56
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.insertResponseAreaButton(), 'visible');
57
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.insertTextAreaButton(), 'visible');
204
58
  });
205
59
 
206
60
  it('When \'Insert dropzone\' button is selected, then \'Insert dropzone\' label should be displayed inside canvas', () => {
207
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasMenuButtonSelected();
61
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasMenuButtonSelected('Insert dropzone');
208
62
  fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasSelectedMenuText('Insert dropzone');
209
63
  });
210
64
 
211
65
  it('When user hovers over select dropzone button, then \'Select dropzone\' tooltip should be displayed', () => {
212
- fillInTheGapsOverImageDragAndDropPage.steps.verifyTooltipInnerText(fillInTheGapsOverImageDragAndDropPage.selectDropzoneButton, 'Select dropzone');
66
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyTooltipInnerText(fillInTheGapsOverImageDragAndDropPage.selectResponseAreaButton, 'Select dropzone');
213
67
  });
214
68
 
215
69
  it('When user hovers over insert dropzone button, then \'Insert dropzone\' tooltip should be displayed', () => {
216
- fillInTheGapsOverImageDragAndDropPage.steps.verifyTooltipInnerText(fillInTheGapsOverImageDragAndDropPage.insertDropzoneButton, 'Insert dropzone');
217
- });
218
-
219
- it('When user hovers over insert text button, then \'Insert text\' tooltip should be displayed', () => {
220
- fillInTheGapsOverImageDragAndDropPage.steps.verifyTooltipInnerText(fillInTheGapsOverImageDragAndDropPage.insertTextButton, 'Insert text');
221
- });
222
-
223
- it('Undo, redo and clear all buttons should be displayed', () => {
224
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.undoButton(), 'visible');
225
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.redoButton(), 'visible');
226
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.clearAllButton(), 'visible');
227
- });
228
-
229
- it('When user hovers over undo button, then \'Undo\' tooltip should be displayed', () => {
230
- utilities.hoverAwayFromElement(fillInTheGapsOverImageDragAndDropPage.canvasSelectedMenuText());
231
- fillInTheGapsOverImageDragAndDropPage.steps.verifyTooltipInnerText(fillInTheGapsOverImageDragAndDropPage.undoButton, 'Undo');
70
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyTooltipInnerText(fillInTheGapsOverImageDragAndDropPage.insertResponseAreaButton, 'Insert dropzone');
232
71
  });
233
72
 
234
- it('When user hovers over clear all button, then \'Clear all\' tooltip should be displayed', () => {
235
- fillInTheGapsOverImageDragAndDropPage.steps.verifyTooltipInnerText(fillInTheGapsOverImageDragAndDropPage.clearAllButton, 'Clear all');
236
- });
73
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyInsertTextTooltip();
237
74
 
238
- it('When user hovers over redo button, then \'Redo\' tooltip should be displayed', () => {
239
- utilities.hoverAwayFromElement(fillInTheGapsOverImageDragAndDropPage.undoButton());
240
- fillInTheGapsOverImageDragAndDropPage.steps.verifyTooltipInnerText(fillInTheGapsOverImageDragAndDropPage.redoButton, 'Redo');
241
- });
75
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyUndoRedoClearAllButtons();
242
76
  });
243
77
 
244
78
  describe('Canvas : Insert dropzone, Delete, Undo, Redo - Specify correct answer section', () => {
@@ -257,7 +91,7 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
257
91
  });
258
92
 
259
93
  it('When user deletes a dropzone in canvas, then dropzone should be removed from specify correct answer section and remaining dropzones should be numbered appropriately', () => {
260
- fillInTheGapsOverImageDragAndDropPage.steps.removeDropzone(1);
94
+ fillInTheGapsOverImageDragAndDropPage.steps.removeResponseArea(1);
261
95
  fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneCountInSpecifyCorrectAnswerSection(2);
262
96
  for (let i = 0; i < 2; i++) {
263
97
  utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.dropzoneLabelSpecifyCorrectAnswerSection(), i), `Dropzone ${i + 1}`);
@@ -311,40 +145,34 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
311
145
  });
312
146
 
313
147
  it(`When user selects dropzone, then 9 options ${dropzonePointerStyles} should be displayed and by default ${dropzonePointerStyles[7]} should be selected`, () => {
314
- fillInTheGapsOverImageDragAndDropPage.steps.selectDropzone(1);
315
- utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzoneStyle(), 9);
316
- fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzonePointerStyle(dropzonePointerStyles[7], 1);
148
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseArea(1);
149
+ utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.responseAreaStyle(), 9);
150
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaPointerStyle(dropzonePointerStyles[7], 1);
317
151
  });
318
152
 
319
153
  it('CSS of dropzones', { tags: 'css' }, () => {
320
- utilities.verifyCSS(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.dropzone(), 1), {
154
+ utilities.verifyCSS(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.responseArea(), 1), {
321
155
  'border': `2px solid ${css.color.activeComponentBorder}`
322
156
  });
323
- utilities.verifyCSS(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.dropzone(), 0), {
157
+ utilities.verifyCSS(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.responseArea(), 0), {
324
158
  'border': `2px dashed ${css.color.activeComponentBorder}`
325
159
  });
326
160
  });
327
161
 
328
162
  it(`When user hovers over the pointer styles, then ${dropzonePointerStyles} tooltip should be displayed`, () => {
329
- dropzonePointerStyles.forEach((dropzonePointer, index) => {
330
- cy.log('Clicking on canvas Selected Menu Text to hover away from select dropzone button');
331
- fillInTheGapsOverImageDragAndDropPage.steps.clickOnCanvasSelectedMenuText();
332
- fillInTheGapsOverImageDragAndDropPage.dropzoneStyle()
333
- .eq(index)
334
- .verifyTooltip(dropzonePointer);
335
- });
163
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyPointerStyleTooltip();
336
164
  });
337
165
 
338
166
  it(`When the user has selected a dropzone and chooses ${dropzonePointerStyles[0]}, then selected drop zone should have the specified effect applied, and the other drop zones should remain unaffected.`, () => {
339
- fillInTheGapsOverImageDragAndDropPage.steps.selectDropzonePointerStyle(dropzonePointerStyles[0]);
340
- fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzonePointerStyle(dropzonePointerStyles[0], 1);
341
- fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzonePointerStyle(dropzonePointerStyles[7], 0);
167
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseAreaPointerStyle(dropzonePointerStyles[0]);
168
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaPointerStyle(dropzonePointerStyles[0], 1);
169
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaPointerStyle(dropzonePointerStyles[7], 0);
342
170
  });
343
171
 
344
172
  it(`When the user chooses ${dropzonePointerStyles[1]}, then selected drop zone should have the specified effect applied, and the other drop zones should remain unaffected.`, () => {
345
- fillInTheGapsOverImageDragAndDropPage.steps.selectDropzonePointerStyle(dropzonePointerStyles[1]);
346
- fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzonePointerStyle(dropzonePointerStyles[1], 1);
347
- fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzonePointerStyle(dropzonePointerStyles[7], 0);
173
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseAreaPointerStyle(dropzonePointerStyles[1]);
174
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaPointerStyle(dropzonePointerStyles[1], 1);
175
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaPointerStyle(dropzonePointerStyles[7], 0);
348
176
  });
349
177
  });
350
178
 
@@ -357,42 +185,9 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
357
185
  fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
358
186
  });
359
187
 
360
- it('When user clicks inside canvas, then one dropzone should be added with pointer, close button and numeration.', () => {
361
- fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(80);
362
- utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzoneWrapper(), 1);
363
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzone(), 'visible');
364
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzonePointer(), 'visible');
365
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.removeDropzoneButton(), 'visible');
366
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.dropzoneNumerationText(), '1');
367
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzoneNumerationText(), 'visible');
368
- });
369
-
370
- it('When user clicks on close button for dropzone, then dropzone should be removed from canvas and error message \'Error: Please insert a dropzone.\' should be displayed', () => {
371
- fillInTheGapsOverImageDragAndDropPage.steps.removeDropzone(0);
372
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzoneWrapper(), 'notExist');
373
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'Error: Please insert a dropzone.');
374
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'visible');
375
- });
188
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyCanvasResponseAreaContents();
376
189
 
377
- it('When user adds dropzone, then error message should disappear', () => {
378
- fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(80);
379
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'notExist');
380
- });
381
-
382
- it('User should be able to add maximum 20 multiple dropzones inside canvas', () => {
383
- for (let i = 0; i < 21; i++) {
384
- fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(i * 2);
385
- }
386
- utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzoneWrapper(), 20);
387
- });
388
-
389
- it('When user clicks on close button for a dropzone, then dropzone should disappear and numeration for existing dropzones should be changed appropriately', () => {
390
- fillInTheGapsOverImageDragAndDropPage.steps.removeDropzone(0);
391
- utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzoneWrapper(), 19);
392
- for (let i = 0; i < 19; i++) {
393
- utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.dropzoneNumerationText(), i), `${i + 1}`);
394
- }
395
- });
190
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyInsertAndDeleteResponseAreaFunctionality('dropzone');
396
191
  });
397
192
 
398
193
  describe('Canvas : Undo, Redo, Clear all - Edit tab canvas section functionality', () => {
@@ -404,63 +199,7 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
404
199
  fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
405
200
  });
406
201
 
407
- it('When the user has not made any changes in the canvas, the \'Undo\' and \'Redo\' button should be in disabled state', () => {
408
- fillInTheGapsOverImageDragAndDropPage.steps.verifyUndoButtonDisabled();
409
- fillInTheGapsOverImageDragAndDropPage.steps.verifyRedoButtonDisabled();
410
- });
411
-
412
- it('When user adds dropzone inside canvas, the \'Undo\' button should get enabled but the \'Redo\' button should continue to stay in disabled state', () => {
413
- fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(80);
414
- fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(20);
415
- fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(30);
416
- fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(40);
417
- fillInTheGapsOverImageDragAndDropPage.steps.verifyUndoButtonEnabled();
418
- fillInTheGapsOverImageDragAndDropPage.steps.verifyRedoButtonDisabled();
419
- });
420
-
421
- it('When the user clicks on the \'Undo\' button, then previous action should be reversed and redo button should be in enabled state', () => {
422
- fillInTheGapsOverImageDragAndDropPage.steps.undoAction();
423
- utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzone(), 3);
424
- fillInTheGapsOverImageDragAndDropPage.steps.verifyRedoButtonEnabled();
425
- });
426
-
427
- it('When the user clicks on the redo button, then previous action should be reinstated and redo button should be disabled', () => {
428
- fillInTheGapsOverImageDragAndDropPage.steps.redoAction()
429
- utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzone(), 4);
430
- fillInTheGapsOverImageDragAndDropPage.steps.verifyRedoButtonDisabled();
431
- });
432
-
433
- it('When the user reaches the initial state by performing undo actions, the \'Undo\' button should get disabled and error message \'Error: Please insert a dropzone.\' should be displayed', () => {
434
- for (var i = 0; i < 4; i++) {
435
- fillInTheGapsOverImageDragAndDropPage.steps.undoAction();
436
- }
437
- utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzone(), 0);
438
- fillInTheGapsOverImageDragAndDropPage.steps.verifyUndoButtonDisabled();
439
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'Error: Please insert a dropzone.');
440
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'visible');
441
- });
442
-
443
- it('When the user reaches the latest state by performing redo actions, the \'Redo\' button should get disabled and error message should disappear', () => {
444
- for (var i = 0; i < 4; i++) {
445
- fillInTheGapsOverImageDragAndDropPage.steps.redoAction();
446
- }
447
- utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzone(), 4);
448
- fillInTheGapsOverImageDragAndDropPage.steps.verifyRedoButtonDisabled();
449
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'notExist');
450
- });
451
-
452
- it('When user clicks on \'Clear all\' button, then all dropzones should be deleted and error message \'Error: Please insert a dropzone.\' should be displayed', () => {
453
- fillInTheGapsOverImageDragAndDropPage.steps.clearAll();
454
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzoneWrapper(), 'notExist');
455
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'Error: Please insert a dropzone.');
456
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'visible');
457
- });
458
-
459
- it('When user clicks on undo button, then previously added dropzones should be restored and error message should disappear', () => {
460
- fillInTheGapsOverImageDragAndDropPage.steps.undoAction();
461
- utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzone(), 4);
462
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'notExist');
463
- });
202
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyUndoRedoClearAllButtonFunctionality('dropzone');
464
203
  });
465
204
 
466
205
  describe('Canvas : Insert text - Edit tab canvas section functionality', () => {
@@ -472,136 +211,22 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
472
211
  fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
473
212
  });
474
213
 
475
- it('When user clicks on \'Insert text\' button, then \'Text\' menu label and \'Text color\' icon should be displayed.', () => {
476
- fillInTheGapsOverImageDragAndDropPage.steps.selectCanvasMenuButton('Insert text');
477
- cy.log('Clicking on canvas Selected Menu Text to hover away from select dropzone button');
478
- fillInTheGapsOverImageDragAndDropPage.steps.clickOnCanvasSelectedMenuText();
479
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasSelectedMenuText('Text');
480
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzoneStyle(), 'visible');
481
- });
482
-
483
- it('\'Text color\' button should be in disabled state.', () => {
484
- utilities.verifyElementDisabled(fillInTheGapsOverImageDragAndDropPage.dropzoneStyle());
485
- });
486
-
487
- it('When user hovers over \'Text color\' button, then \'Text color\' tooltip should be displayed.', () => {
488
- fillInTheGapsOverImageDragAndDropPage.steps.verifyTooltipInnerText(fillInTheGapsOverImageDragAndDropPage.dropzoneStyle, 'Text color');
489
- });
490
-
491
- it('When user clicks inside the canvas, then text box should be displayed and \'Text color\' button should be enabled', () => {
492
- fillInTheGapsOverImageDragAndDropPage.steps.insertTextArea(80, 'Inserted text');
493
- fillInTheGapsOverImageDragAndDropPage.steps.verifyTextOfTextBox('Inserted text');
494
- utilities.verifyElementNotDisabled(fillInTheGapsOverImageDragAndDropPage.dropzoneStyle());
495
- });
496
-
497
- it('Text color of text inside text box should be black by default', () => {
498
- fillInTheGapsOverImageDragAndDropPage.steps.verifyTextColorOfTextBox('rgb(0, 0, 46)');
499
- });
214
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyInsertTextAndTextColorButton();
500
215
 
501
- it('When user clicks on \'Text color\' button, \'Text color\' popup should be displayed.', () => {
502
- fillInTheGapsOverImageDragAndDropPage.steps.clickOnTextColorButton();
503
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.textColorPopupWrapper(), 'visible');
504
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.textColorLabelInTextColorPopup(), 'Text color');
505
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.textColorLabelInTextColorPopup(), 'visible');
506
- });
507
-
508
- it('\'Edit color\' label and Black color block should be displayed in selected state in the popup', () => {
509
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.editColorLabel(), 'Edit color');
510
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.editColorLabel(), 'visible');
511
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.selectedColorBlockInTextColorPopup(), 'visible');
512
- fillInTheGapsOverImageDragAndDropPage.steps.verifyColorBlock('rgb(0, 0, 46)');
513
- fillInTheGapsOverImageDragAndDropPage.steps.verifyColorBlockSelectedState();
514
- });
216
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyTextColorPopupFunctionality();
515
217
 
516
218
  it('When the user clicks on the \'Edit color\' present in an \'Text color\' popup, then a select color popup should be displayed', () => {
517
219
  fillInTheGapsOverImageDragAndDropPage.steps.clickOnEditColorButton();
518
220
  fillInTheGapsOverImageDragAndDropPage.steps.verifyColorPopupIsDisplayed();
519
221
  });
520
222
 
521
- it('A title \'Select color\' should be displayed on the color popup', () => {
522
- fillInTheGapsOverImageDragAndDropPage.steps.verifyColorPopupSelectColorTitle();
523
- });
223
+ fillInTheGapsOverImageDragAndDropPage.tests. verifyColorPopupSelectColorTitle();
224
+
225
+ fillInTheGapsOverImageDragAndDropPage.tests.verifySaturationAndOpacityGradientPalette('rgb(0, 0, 46)');
524
226
 
525
- it('A \'Color saturation palette\' should be displayed on the color popup along with a color picker and the color picker should be set on the selected color', () => {
526
- fillInTheGapsOverImageDragAndDropPage.steps.verifyColorSaturationPaletteAndPicker();
527
- fillInTheGapsOverImageDragAndDropPage.steps.verifySaturationPaletteColor('rgb(0, 0, 46)');
528
- });
227
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyColorHuePaletteAndHexInputField('rgb(0, 0, 255)', '#00002E');
529
228
 
530
- it('A \'Color hue palette\' should be displayed on the color popup along with a color picker and the color picker should be set on the selected color', () => {
531
- fillInTheGapsOverImageDragAndDropPage.steps.verifyColorHuePaletteAndPicker();
532
- fillInTheGapsOverImageDragAndDropPage.steps.verifyHuePaletteColor('rgb(0, 0, 255)');
533
- });
534
-
535
- it('A \'Opacity gradient hue palette\' should be displayed on the color popup along with a Opacity gradient picker and the color picker should be set on the selected color', () => {
536
- fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityGradientHuePaletteAndPicker();
537
- fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityGradientPaletteColor('rgb(0, 0, 46)');
538
- });
539
-
540
- it('A \'Selected color\' label and color block displaying the selected color should be displayed', () => {
541
- fillInTheGapsOverImageDragAndDropPage.steps.verifySelectedColorLabelAndSelectedColorBlock();
542
- });
543
-
544
- it('A \'Hex\' label and input field with pre-filled hex code value of the selected color should be displayed', () => {
545
- fillInTheGapsOverImageDragAndDropPage.steps.verifyHexLabelAndInputField();
546
- fillInTheGapsOverImageDragAndDropPage.steps.verifyHexValue('#00002E');
547
- });
548
-
549
- it('\'Cancel\' and \'Ok\' buttons should be displayed', () => {
550
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.cancelButton(), 'Cancel');
551
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.cancelButton(), 'visible');
552
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.okButton(), 'OK');
553
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.okButton(), 'visible');
554
- });
555
-
556
- it('CSS of color popup contents', { tags: 'css' }, () => {
557
- labels.forEach(label => {
558
- utilities.verifyCSS(label(), {
559
- 'color': css.color.labels,
560
- 'font-size': css.fontSize.normal,
561
- 'font-weight': css.fontWeight.semibold
562
- });
563
- });
564
- inputFields.forEach(inputField => {
565
- utilities.verifyCSS(inputField(), {
566
- 'color': css.color.text,
567
- 'font-size': css.fontSize.default,
568
- 'font-weight': css.fontWeight.regular
569
- });
570
- });
571
- utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.okButton(), {
572
- 'color': css.color.whiteText,
573
- 'font-size': css.fontSize.default,
574
- 'font-weight': css.fontWeight.regular,
575
- 'background-color': css.color.activeButtons
576
- });
577
- utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.cancelButton(), {
578
- 'color': css.color.secondaryBtn,
579
- 'font-size': css.fontSize.default,
580
- 'font-weight': css.fontWeight.semibold,
581
- 'background-color': css.color.transparent
582
- });
583
- });
584
-
585
- //Failing due to https://redmine.zeuslearning.com/issues/539391
586
- it('Accessibility of color popup contents', { tags: 'a11y' }, () => {
587
- cy.checkAccessibility(fillInTheGapsOverImageDragAndDropPage.dialogBox());
588
- });
589
-
590
- it('When the user changes the color using hex code, the color in color saturation palette and color hue palette should change', () => {
591
- fillInTheGapsOverImageDragAndDropPage.steps.addInputToHexInputField('#ff0000');
592
- fillInTheGapsOverImageDragAndDropPage.steps.verifyHexValue('#ff0000');
593
- fillInTheGapsOverImageDragAndDropPage.steps.verifySaturationPaletteColor('rgb(255, 0, 0)');
594
- fillInTheGapsOverImageDragAndDropPage.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
595
- });
596
-
597
- it('When the user changes the color opacity using opacity gradient hue, then opacity of color should change in selected color block and hex color code should remain unchanged', () => {
598
- fillInTheGapsOverImageDragAndDropPage.steps.clickOnOpacityGradientHuePalette();
599
- fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityGradientPaletteColor('rgba(255, 0, 0, 0.5)');
600
- fillInTheGapsOverImageDragAndDropPage.steps.verifySelectedColorBlock('rgba(255, 0, 0, 0.5)');
601
- fillInTheGapsOverImageDragAndDropPage.steps.verifyHexValue('#ff0000');
602
- fillInTheGapsOverImageDragAndDropPage.steps.verifySaturationPaletteColor('rgb(255, 0, 0)');
603
- fillInTheGapsOverImageDragAndDropPage.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
604
- });
229
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyColorPopupFunctionality();
605
230
 
606
231
  it('When the user has modified the selected color in the color popup and clicks on \'Ok\' button, then the popup should close, the color block should change to the new selected color and the modifications in the color popup should persist', () => {
607
232
  fillInTheGapsOverImageDragAndDropPage.steps.clickOnOkButton();
@@ -610,6 +235,7 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
610
235
  });
611
236
 
612
237
  it('When the user modifies the selected color in the color popup and clicks on \'Cancel\' button, then the popup should close, the color block should not change and the modifications in the color popup should not persist', () => {
238
+ fillInTheGapsOverImageDragAndDropPage.steps.clickOnTextColorButton();
613
239
  fillInTheGapsOverImageDragAndDropPage.steps.clickOnEditColorButton()
614
240
  fillInTheGapsOverImageDragAndDropPage.steps.addInputToHexInputField('#00002E');
615
241
  fillInTheGapsOverImageDragAndDropPage.steps.clickOnCancelButton();
@@ -631,13 +257,13 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
631
257
  fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(20);
632
258
  fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(90);
633
259
  fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
634
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzoneInPreviewTab(), 'visible');
260
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab(), 'visible');
635
261
  });
636
262
 
637
263
  it('When user selects a dropzone and changes dropzone pointer style in edit tab, then changes in dropzone pointer should be reflected in preview tab', () => {
638
264
  fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
639
- fillInTheGapsOverImageDragAndDropPage.steps.selectDropzone(0);
640
- fillInTheGapsOverImageDragAndDropPage.steps.selectDropzonePointerStyle(dropzonePointerStyles[1]);
265
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseArea(0);
266
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseAreaPointerStyle(dropzonePointerStyles[1]);
641
267
  fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
642
268
  fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzonePointerStyleInPreviewTab(dropzonePointerStyles[1], 0);
643
269
  fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzonePointerStyleInPreviewTab(dropzonePointerStyles[8], 1);
@@ -684,76 +310,7 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
684
310
  fillInTheGapsOverImageDragAndDropPage.steps.verifyFileNameLabel('highlightImage.jpg');
685
311
  });
686
312
 
687
- it('\'Image properties\' label should be displayed.', () => {
688
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.imagePropertiesLabel(), 'Image properties');
689
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.imagePropertiesLabel(), 'visible');
690
- });
691
-
692
- it('\'Fill image to canvas\' label and checkbox should be displayed and checkbox should be unchecked by default', () => {
693
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.fillImageToCanvasLabel(), 'visible');
694
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.fillImageToCanvasLabel(), 'Fill image to canvas');
695
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.fillImageToCanvasCheckbox(), 'exist');
696
- fillInTheGapsOverImageDragAndDropPage.steps.verifyFillImageToCanvasCheckboxUnchecked();
697
- });
698
-
699
- it('User should be able to check \'Fill image to canvas\' checkbox', () => {
700
- fillInTheGapsOverImageDragAndDropPage.steps.checkFillImageToCanvasCheckbox();
701
- });
702
-
703
- it('\'Image alignment\' label should be displayed. ', () => {
704
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.imageAlignmentLabel(), 'Image alignment');
705
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.imageAlignmentLabel(), 'visible');
706
- });
707
-
708
- it(`\'Image alignment\' section should have three options ${alignmentOptions} and ${alignmentOptions[0]} should be active selection by default`, () => {
709
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.topLeftAlignmentButton(), 'Top left');
710
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.topLeftAlignmentButton(), 'visible');
711
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.centerAlignmentButton(), 'Center');
712
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.centerAlignmentButton(), 'visible');
713
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.topRightAlignmentButton(), 'Top right');
714
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.topRightAlignmentButton(), 'visible');
715
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasImageTopLeftAligned();
716
- });
717
-
718
- it('\'Opacity\' label, slider and input field should be displayed. \'Opacity\' slider and input field should be set to 100 percent by default', () => {
719
- fillInTheGapsOverImageDragAndDropPage.steps.verifyDefaultOpacityLabelSliderAndInputField();
720
- fillInTheGapsOverImageDragAndDropPage.steps.verifyValueOfOpacitySlider(100);
721
- fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityInputFieldValue(100);
722
- });
723
-
724
- it('The maximum value of \'Opacity\' slider should be 100', () => {
725
- fillInTheGapsOverImageDragAndDropPage.steps.verifyMaxOpacitySliderValue();
726
- });
727
-
728
- it('When the user changes the opacity slider value, value in the opacity input field should also change', () => {
729
- fillInTheGapsOverImageDragAndDropPage.steps.clickActionOnOpacitySlider();
730
- fillInTheGapsOverImageDragAndDropPage.steps.verifyValueOfOpacitySlider(50);
731
- fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityInputFieldValue(50);
732
- });
733
-
734
- it('When the user changes value in the opacity input field, the slider value should also change accordingly', () => {
735
- fillInTheGapsOverImageDragAndDropPage.steps.enterInputToOpacityInputField(85);
736
- fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityInputFieldValue(85);
737
- fillInTheGapsOverImageDragAndDropPage.steps.verifyValueOfOpacitySlider(85);
738
- });
739
-
740
- fillInTheGapsOverImageDragAndDropPage.tests.verifyOpacityCSSAndA11y()
741
-
742
- it('\'Image alternative text\' label and input field should be displayed. By default input field should be empty', () => {
743
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.imageAlternativeTextLabel(), 'Image alternative text');
744
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.imageAlternativeTextLabel(), 'visible');
745
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.imageAlternativeTextInputField(), '');
746
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.imageAlternativeTextInputField(), 'exist');
747
- });
748
-
749
- it('User should be able to enter text in \'Image alternative text\' input field', () => {
750
- fillInTheGapsOverImageDragAndDropPage.steps.enterAndVerifyImageAlternativeTextInInputField('Image description');
751
- });
752
-
753
- it('\'Lock aspect ratio\' and \'Reset dimensions\' buttons should be displayed and by default \'Lock aspect ratio\' button should be locked', () => {
754
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.lockAspectRatioButton(), 'visible');
755
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.resetDimensionsButton(), 'visible');
756
- });
313
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyImagePropertiesSectionContent();
757
314
  });
758
315
 
759
316
  describe('Image properties section - Edit tab canvas section functionality', () => {
@@ -766,50 +323,12 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
766
323
  fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
767
324
  });
768
325
 
769
- it('When \'Top left\' image alignment is selected by default, then image should be aligned to top left inside the canvas', () => {
770
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasImageTopLeftAligned();
771
- });
772
-
773
- it('When user selects \'Center\' image alignment, then image should be aligned to center inside the canvas', () => {
774
- fillInTheGapsOverImageDragAndDropPage.steps.selectCenterImageAlignment();
775
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasImageCenterAligned();
776
- });
777
-
778
- it('When user selects \'Top right\' image alignment, then image should be aligned to top right inside the canvas', () => {
779
- fillInTheGapsOverImageDragAndDropPage.steps.selectTopRightImageAlignment();
780
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasImageTopRightAligned();
781
- });
782
-
783
- it('When user selects \'Top left\' image alignment again, then image should be aligned to top left inside the canvas', () => {
784
- fillInTheGapsOverImageDragAndDropPage.steps.selectTopLeftImageAlignment();
785
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasImageTopLeftAligned();
786
- });
326
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyImageAlignmentEditTabFunctionality();
787
327
 
788
- it('When opacity value is set to 100 percent by default, then opacity for image should be100 percent inside canvas', () => {
789
- fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityValueForCanvasImage(100);
790
- });
328
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyImageOpacityEditTabFunctionality();
791
329
 
792
- it('When user changes opacity slider value , then opacity for image should be updated accordingly', () => {
793
- fillInTheGapsOverImageDragAndDropPage.steps.clickActionOnOpacitySlider();
794
- fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityValueForCanvasImage(50);
795
- });
796
-
797
- it('When user changes opacity value in input field, then opacity for image should be updated accordingly', () => {
798
- fillInTheGapsOverImageDragAndDropPage.steps.enterInputToOpacityInputField(40);
799
- fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityInputFieldValue(40);
800
- fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityValueForCanvasImage(40);
801
- });
802
-
803
- it('When user checks \'Fill image to canvas\' checkbox, then image should be adjusted to fit inside the canvas', () => {
804
- fillInTheGapsOverImageDragAndDropPage.steps.checkFillImageToCanvasCheckbox();
805
- fillInTheGapsOverImageDragAndDropPage.steps.verifyImageFitsToCanvas();
806
- });
807
-
808
- // Failed due to https://redmine.zeuslearning.com/issues/556897
809
- it('When user unchecks \'Fill image to canvas\' checkbox, then image dimensions should set to default state', () => {
810
- fillInTheGapsOverImageDragAndDropPage.steps.uncheckFillImageToCanvasCheckbox();
811
- fillInTheGapsOverImageDragAndDropPage.steps.verifyImageDoesNotFitToCanvas();
812
- });
330
+ //Failed due to https://redmine.zeuslearning.com/issues/560585
331
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyFillImageToCanvasEditTabFunctionality();
813
332
  });
814
333
 
815
334
  describe('Canvas width, Canvas height, Image alternative text - Edit tab canvas section functionality', () => {
@@ -822,40 +341,9 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
822
341
  fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
823
342
  });
824
343
 
825
- it('When aspect ratio is unlocked and user changes the value in width input field, the height input field should remain unchanged and the dimensions should be updated in the image popup preview section', () => {
826
- fillInTheGapsOverImageDragAndDropPage.steps.unlockAspectRatio();
827
- fillInTheGapsOverImageDragAndDropPage.steps.updateCanvasWidth(500);
828
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasWidth(500);
829
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasHeight(432);
830
- });
831
-
832
- it('When aspect ratio is unlocked and user changes the value in height input field, then width input field should remain unchanged and the dimensions should be updated in the image popup preview section', () => {
833
- fillInTheGapsOverImageDragAndDropPage.steps.updateCanvasHeight(500);
834
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasHeight(500);
835
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasWidth(500);
836
- });
837
-
838
- it('When user locks the aspect ratio button and changes the value in the width input field, the height input field should be updated accordingly to maintain the updated aspect ratio', () => {
839
- fillInTheGapsOverImageDragAndDropPage.steps.lockAspectRatio();
840
- fillInTheGapsOverImageDragAndDropPage.steps.updateCanvasWidth(600);
841
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasHeight(600);
842
- });
843
-
844
- it('When user selects the \'Reset dimensions\' button the height and width should reset to the original values', () => {
845
- fillInTheGapsOverImageDragAndDropPage.steps.resetDimensions();
846
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasWidth(768);
847
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasHeight(432);
848
- });
849
-
850
- it('When user enters text in the \'Alternative text\' input field, then alternative text should be displayed for canvas image', () => {
851
- fillInTheGapsOverImageDragAndDropPage.steps.enterAndVerifyImageAlternativeTextInInputField('This is Alternative text for image');
852
- fillInTheGapsOverImageDragAndDropPage.steps.verifyImageAlternativeTextPresentInEditTab('This is Alternative text for image');
853
- });
344
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyAspectRatioAndResetDimensionsButtonFunctionality();
854
345
 
855
- it('When user clears text in the \'Alternative text\' input field, then alternative text should not be displayed for canvas image', () => {
856
- fillInTheGapsOverImageDragAndDropPage.steps.clearImageAlternativeTextInputFieldText();
857
- fillInTheGapsOverImageDragAndDropPage.steps.verifyNoImageAlternativeTextPresentInEditTab();
858
- });
346
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyImageAlternativeTextEditTabFunctionality();
859
347
  });
860
348
 
861
349
  describe('Image properties, Image alignment, Opacity section - Preview tab functionality', () => {
@@ -868,64 +356,12 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
868
356
  fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
869
357
  });
870
358
 
871
- it('When \'Top left\' image alignment is selected by default, then in preview tab canvas image should be aligned to top left', () => {
872
- fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
873
- fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploadedInPreviewTab();
874
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasImageTopLeftAlignedInPreviewTab();
875
- });
876
-
877
- it('When user selects \'Center\' image alignment in edit tab, then canvas image should be aligned to center in preview tab ', () => {
878
- fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
879
- fillInTheGapsOverImageDragAndDropPage.steps.selectCenterImageAlignment();
880
- fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
881
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasImageCenterAlignedInPreviewTab();
882
- });
883
-
884
- it('When user selects \'Top right\' image alignment, then canvas image should be aligned to top right in preview tab', () => {
885
- fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
886
- fillInTheGapsOverImageDragAndDropPage.steps.selectTopRightImageAlignment();
887
- fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
888
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasImageTopRightAlignedInPreviewTab();
889
- });
890
-
891
- it('When user selects \'Top left\' image alignment again, then image should be aligned to top left inside the canvas in preview tab', () => {
892
- fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
893
- fillInTheGapsOverImageDragAndDropPage.steps.selectTopLeftImageAlignment();
894
- fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
895
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasImageTopLeftAlignedInPreviewTab();
896
- });
897
-
898
- it('When opacity is 100 percent by default, then canvas image should have 100 percent opacity in preview tab ', () => {
899
- fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityValueForCanvasImageInPreviewTab(100);
900
- });
901
-
902
- it('When user changes opacity slider value in edit tab, then opacity for canvas image should change accordingly in preview tab ', () => {
903
- fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
904
- fillInTheGapsOverImageDragAndDropPage.steps.clickActionOnOpacitySlider();
905
- fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
906
- fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityValueForCanvasImageInPreviewTab(50);
907
- });
359
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyImageAlignmentPreviewTabFunctionality();
908
360
 
909
- it('When user changes opacity input field value in edit tab, then opacity for canvas image should change accordingly in preview tab ', () => {
910
- fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
911
- fillInTheGapsOverImageDragAndDropPage.steps.enterInputToOpacityInputField(40);
912
- fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
913
- fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityValueForCanvasImageInPreviewTab(40);
914
- });
915
-
916
- it('When user checks \'Fill image to canvas\' checkbox in edit tab, then image should be adjusted to fit inside the canvas in preview tab', () => {
917
- fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
918
- fillInTheGapsOverImageDragAndDropPage.steps.checkFillImageToCanvasCheckbox(); fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
919
- fillInTheGapsOverImageDragAndDropPage.steps.verifyImageFitsToCanvasInPreviewTab();
920
- });
361
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyImageOpacityPreviewTabFunctionality();
921
362
 
922
- // Failed due to https://redmine.zeuslearning.com/issues/556897
923
- it('When user unchecks \'Fill image to canvas\' checkbox, then image dimensions should set to default state in preview tab', () => {
924
- fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
925
- fillInTheGapsOverImageDragAndDropPage.steps.uncheckFillImageToCanvasCheckbox();
926
- fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
927
- fillInTheGapsOverImageDragAndDropPage.steps.verifyImageDoesNotFitToCanvas();
928
- });
363
+ //failed due to https://redmine.zeuslearning.com/issues/560585
364
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyFillImageToCanvasPreviewTabFunctionality();
929
365
  });
930
366
 
931
367
  describe('Canvas width, Canvas height, Image alternative text - Preview tab functionality', () => {
@@ -942,7 +378,7 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
942
378
  it('When the user has uploaded canvas image, then switching to the preview tab should display canvas image with same dimensions', () => {
943
379
  fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
944
380
  fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploadedInPreviewTab();
945
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.canvasImage(), 'visible');
381
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.canvasImageInPreviewTab(), 'visible');
946
382
  fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasWidthInPreviewTab(768);
947
383
  fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasHeightInPreviewTab(432);
948
384
  });
@@ -950,11 +386,11 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
950
386
  it('When user updates width and height in edit tab, then updated changes should be reflected in preview tab', () => {
951
387
  fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
952
388
  fillInTheGapsOverImageDragAndDropPage.steps.unlockAspectRatio();
953
- fillInTheGapsOverImageDragAndDropPage.steps.updateCanvasWidth(500);
954
- fillInTheGapsOverImageDragAndDropPage.steps.updateCanvasHeight(500);
389
+ fillInTheGapsOverImageDragAndDropPage.steps.updateCanvasWidth(800);
390
+ fillInTheGapsOverImageDragAndDropPage.steps.updateCanvasHeight(450);
955
391
  fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
956
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasWidthInPreviewTab(500);
957
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasHeightInPreviewTab(500);
392
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasWidthInPreviewTab(800);
393
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasHeightInPreviewTab(450);
958
394
  });
959
395
 
960
396
  it('When user resets image dimensions in edit tab, then updated changes should be reflected in preview tab', () => {
@@ -965,27 +401,8 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
965
401
  fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasHeightInPreviewTab(432);
966
402
  });
967
403
 
968
- it('When user enters text in the \'Alternative text\' input field, then alternative text should be displayed in the \'Preview tab\'', () => {
969
- fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
970
- fillInTheGapsOverImageDragAndDropPage.steps.enterAndVerifyImageAlternativeTextInInputField('This is Alternative text for image');
971
- cy.log('Switching to Preview Tab');
972
- fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
973
- fillInTheGapsOverImageDragAndDropPage.steps.verifyImageAlternativeTextInPreviewTab('This is Alternative text for image');
974
- });
975
-
976
- it('When user clears text in the \'Alternative text\' input field, then alternative text should not be displayed in the \'Preview tab\'', () => {
977
- fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
978
- fillInTheGapsOverImageDragAndDropPage.steps.clearImageAlternativeTextInputFieldText();
979
- fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
980
- fillInTheGapsOverImageDragAndDropPage.steps.verifyNoImageAlternativeTextPresentInPreviewTab();
981
- });
404
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyImageAlternativeTextPreviewTabFunctionality();
982
405
 
983
- it('When user deletes the uploaded image file in edit tab, then canvas image should not appear in preview tab', () => {
984
- fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
985
- fillInTheGapsOverImageDragAndDropPage.steps.deleteImage();
986
- fillInTheGapsOverImageDragAndDropPage.steps.clickOnDeleteButtonInDeleteImagePopup();
987
- fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
988
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.canvasImage(), 'notExist');
989
- });
406
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyImageNotExistPreviewTab();
990
407
  });
991
408
  });