itemengine-cypress-automation 1.0.211 → 1.0.212

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +5 -5
  2. package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +6 -6
  3. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +3 -1
  4. package/cypress/e2e/ILC/EssayResponse/studentViewSettings.js +146 -0
  5. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +2 -1
  6. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +2 -1
  7. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/allOrNothingForAllViews.smoke.js +2 -1
  8. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCustomization.js +700 -0
  9. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCustomizationDraggableOptionsPanel.js +127 -0
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCutomizationDraggableOptionProperties.js +253 -0
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +2 -1
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +2 -1
  13. package/cypress/e2e/ILC/FillInTheGapsTextNew/allOrNothingForAllViews.smoke.js +2 -1
  14. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +2 -1
  15. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +2 -2
  16. package/cypress/e2e/ILC/ImageHighlight/allOrNothingForAllViews.smoke.js +2 -2
  17. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +3 -6
  18. package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +3 -1
  19. package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +261 -0
  20. package/cypress/e2e/ILC/MatchingDropdown/previewContentsForAllViews.smoke.js +124 -0
  21. package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +3 -1
  22. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +3 -1
  23. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +3 -2
  24. package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +2 -2
  25. package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +2 -2
  26. package/cypress/e2e/ILC/SingleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +2 -1
  27. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +1 -1
  28. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +1 -1
  29. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +1 -0
  30. package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +7 -7
  31. package/cypress/pages/chartsDotPlotPage.js +22 -0
  32. package/cypress/pages/chartsLinePage.js +1 -0
  33. package/cypress/pages/essayResponsePage.js +73 -1
  34. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +550 -3
  35. package/cypress/pages/graphingPage.js +4 -0
  36. package/cypress/pages/matchingPage.js +189 -1
  37. package/package.json +1 -1
@@ -0,0 +1,700 @@
1
+ import { dialogBoxBase, fillInTheGapsOverImageDragAndDropPage } from "../../../pages";
2
+ import { colorPopupComponent } from "../../../pages/components";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ import utilities from "../../../support/helpers/utilities";
5
+ const css = Cypress.env('css');
6
+ const borderStyles = ["Dashed", "Dotted", "Dashed", "None"];
7
+ const connectorStyles = ["Circle", "Square", "Diamond", "None"];
8
+ const optionAlignment = ['Left', 'Center', 'Right'];
9
+ const modifiedColor = 'rgb(121, 60, 60)'
10
+
11
+ describe('Create Item page - Fill in the gaps over image with text: Style and layout customization', () => {
12
+ before(() => {
13
+ cy.loginAs('admin');
14
+ });
15
+
16
+ describe('Style and layout customization accordion', () => {
17
+ abortEarlySetup();
18
+ before(() => {
19
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
20
+ cy.barsPreLoaderWait();
21
+ });
22
+
23
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyStyleAndLayoutCustomizationAccordionProperties();
24
+ });
25
+
26
+ describe('Style and layout customization accordion: Text container section contents', () => {
27
+ abortEarlySetup();
28
+ before(() => {
29
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
30
+ cy.barsPreLoaderWait();
31
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
32
+ });
33
+
34
+ it('"Text container" label should be displayed', () => {
35
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.componentContainerLabel(), 'Dropzone');
36
+ });
37
+
38
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyFillColorSectionContents();
39
+
40
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyBorderColorSectionContents();
41
+
42
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyBorderStyleSectionContents('Dashed');
43
+
44
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyFillColorTooltips();
45
+
46
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyBorderColorTooltips();
47
+
48
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyStyleAndLayoutCustomizationAccordionContentsCSSAndA11y('Dashed');
49
+ });
50
+
51
+ describe('Fill color - Edit tab', () => {
52
+ abortEarlySetup();
53
+ before(() => {
54
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
55
+ cy.barsPreLoaderWait();
56
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
57
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
58
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
59
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
60
+ });
61
+
62
+ it('When the default color block is in selected state in the "Fill color" section, then the background color of the text containers in the canvas image should be the default selected color', () => {
63
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaOverImageFillColor(0, css.color.optionsBg);
64
+ });
65
+
66
+ it('When the user selects the "None" color block, it should get in selected state and the no background color should be present for the text containers in the canvas image', () => {
67
+ fillInTheGapsOverImageDragAndDropPage.steps.selectColorBlock(1);
68
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaOverImageFillColor(0, css.color.transparent);
69
+ });
70
+
71
+ it('When the user clicks on the "Edit color" button, modifies color for the selected color block, then the background color of the text containers in the canvas image should be the modified selected color', () => {
72
+ fillInTheGapsOverImageDragAndDropPage.steps.editColor(0);
73
+ colorPopupComponent.steps.clickInColorSaturationPalette();
74
+ colorPopupComponent.steps.clickOnOkButton();
75
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaOverImageFillColor(0, modifiedColor);
76
+ });
77
+
78
+ it('When the adds a new text container, then the background color of the newly added text container should be the modified selected color', () => {
79
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(60);
80
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaOverImageFillColor(0, modifiedColor);
81
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaOverImageFillColor(1, modifiedColor);
82
+ });
83
+ });
84
+
85
+ describe('Border color - Edit tab', () => {
86
+ abortEarlySetup();
87
+ before(() => {
88
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
89
+ cy.barsPreLoaderWait();
90
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
91
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
92
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
93
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
94
+ });
95
+
96
+ it('When the default color block is in selected state in the "Fill color" section, then the background color of the text containers in the canvas image should be the default selected color', () => {
97
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaOverImageBorderColor(0, `2px dashed ${css.color.activeComponentBorder}`);
98
+ });
99
+
100
+ it('When the user selects the "None" color block, it should get in selected state and the no background color should be present for the text containers in the canvas image', () => {
101
+ fillInTheGapsOverImageDragAndDropPage.steps.selectColorBlock(3);
102
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaOverImageBorderColor(0, `2px dashed ${css.color.transparent}`);
103
+ });
104
+
105
+ it('When the user clicks on the "Edit color" button, modifies color for the selected color block, then the background color of the text containers in the canvas image should be the modified selected color', () => {
106
+ fillInTheGapsOverImageDragAndDropPage.steps.editColor(1);
107
+ colorPopupComponent.steps.clickInColorSaturationPalette();
108
+ colorPopupComponent.steps.clickOnOkButton();
109
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaOverImageBorderColor(0, `2px dashed ${modifiedColor}`);
110
+ });
111
+
112
+ it('When the adds a new text container, then the background color of the newly added text container should be the modified selected color', () => {
113
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(60);
114
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaOverImageBorderColor(0, `2px dashed ${modifiedColor}`);
115
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaOverImageBorderColor(1, `2px dashed ${modifiedColor}`);
116
+ });
117
+ });
118
+
119
+ describe('Border color - Preview tab', () => {
120
+ abortEarlySetup();
121
+ before(() => {
122
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
123
+ cy.barsPreLoaderWait();
124
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
125
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
126
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
127
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
128
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
129
+ });
130
+
131
+ it('When the default color block is in selected state in the "Fill color" section, then the background color of the text containers in the preview tab should be the default selected color', () => {
132
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneBorderColor(0, `2px dashed ${css.color.activeComponentBorder}`);
133
+ });
134
+
135
+ it('When the user selects the "None" color block, it should get in selected state and the no background color should be present for the text containers in the preview tab', () => {
136
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
137
+ fillInTheGapsOverImageDragAndDropPage.steps.selectColorBlock(3);
138
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
139
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneBorderColor(0, `2px dashed ${css.color.defaultBackground}`);
140
+ });
141
+
142
+ it('When the user clicks on the "Edit color" button, modifies color for the selected color block, then the color block should get updated accordingly', () => {
143
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
144
+ fillInTheGapsOverImageDragAndDropPage.steps.editColor(1);
145
+ colorPopupComponent.steps.clickInColorSaturationPalette();
146
+ colorPopupComponent.steps.clickOnOkButton();
147
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
148
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneBorderColor(0, `2px dashed ${modifiedColor}`);
149
+ });
150
+
151
+ it('The background color of the text containers in the preview tab should be the modified selected color', () => {
152
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
153
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(60);
154
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
155
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneBorderColor(0, `2px dashed ${modifiedColor}`);
156
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneBorderColor(1, `2px dashed ${modifiedColor}`);
157
+ });
158
+ });
159
+
160
+ describe('Color popup functionality', () => {
161
+ abortEarlySetup();
162
+ before(() => {
163
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
164
+ cy.barsPreLoaderWait();
165
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
166
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
167
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
168
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
169
+ });
170
+
171
+ it('When the user clicks on the \'Edit color\' present in an \'Text color\' popup, then a select color popup should be displayed', () => {
172
+ fillInTheGapsOverImageDragAndDropPage.steps.editColor(0);
173
+ colorPopupComponent.steps.verifyColorPopupIsDisplayed();
174
+ });
175
+
176
+ colorPopupComponent.tests.verifyColorPopupSelectColorTitle();
177
+
178
+ colorPopupComponent.tests.verifySaturationAndOpacityGradientPalette('rgb(255, 255, 255)');
179
+
180
+ colorPopupComponent.tests.verifyColorHuePaletteAndHexInputField('rgb(255, 0, 0)', '#ffffff');
181
+
182
+ colorPopupComponent.tests.verifyColorPopupFunctionality();
183
+ });
184
+
185
+ describe('Color popup - Updating the selected color', () => {
186
+ abortEarlySetup();
187
+ before(() => {
188
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
189
+ cy.barsPreLoaderWait();
190
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
191
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
192
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
193
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
194
+ });
195
+
196
+ it('When the user moves the color picker in the color saturation palette, color in the selected color block and the hex code should change, color in the hue color palette and the opacity value should not change', () => {
197
+ fillInTheGapsOverImageDragAndDropPage.steps.editColor(0);
198
+ colorPopupComponent.steps.clickInColorSaturationPalette();
199
+ colorPopupComponent.steps.verifySelectedColorBlock('rgb(121, 60, 60)');
200
+ colorPopupComponent.steps.verifySaturationPaletteColor('rgb(119, 60, 60)');
201
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
202
+ colorPopupComponent.steps.verifyHexValue('#793c3c');
203
+ colorPopupComponent.steps.verifyOpacityGradientPaletteColor('rgb(119, 60, 60)');
204
+ });
205
+
206
+ it('When the user moves the color picker in the color hue palette, color in the selected color block, the hex code and the saturation color palette should change and the opacity value should not change', () => {
207
+ colorPopupComponent.steps.clickInColorHuePalette();
208
+ colorPopupComponent.steps.verifySelectedColorBlock('rgb(60, 121, 121)');
209
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(0, 255, 255)');
210
+ colorPopupComponent.steps.verifyHexValue('#3c7979');
211
+ colorPopupComponent.steps.verifyOpacityGradientPaletteColor('rgb(60, 119, 119)');
212
+ });
213
+
214
+ it('When the user changes the color using hex code, the color in color saturation palette and color hue palette should change and the opacity value should not change', () => {
215
+ colorPopupComponent.steps.addInputToHexInputField('#ff0000');
216
+ colorPopupComponent.steps.verifyHexValue('#ff0000');
217
+ colorPopupComponent.steps.verifySaturationPaletteColor('rgb(255, 0, 0)');
218
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
219
+ colorPopupComponent.steps.verifyOpacityGradientPaletteColor('rgb(255, 0, 0)');
220
+ });
221
+ });
222
+
223
+ describe('Color popup - \'Cancel\' and \'Ok\' buttons', () => {
224
+ abortEarlySetup();
225
+ before(() => {
226
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
227
+ cy.barsPreLoaderWait();
228
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
229
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
230
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
231
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
232
+ });
233
+
234
+ 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', () => {
235
+ fillInTheGapsOverImageDragAndDropPage.steps.editColor(0);
236
+ colorPopupComponent.steps.addInputToHexInputField('#ff0000');
237
+ colorPopupComponent.steps.clickOnOpacityGradientHuePalette();
238
+ colorPopupComponent.steps.clickOnCancelButton();
239
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
240
+ colorPopupComponent.steps.verifyColorBlockInOptionAccordion(0, 'rgb(245, 248, 255)');
241
+ });
242
+
243
+ it('When the user modifies 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', () => {
244
+ cy.log('Pre-step: clicking on the edit color button')
245
+ fillInTheGapsOverImageDragAndDropPage.steps.editColor(0);
246
+ colorPopupComponent.steps.addInputToHexInputField('#ff0000');
247
+ colorPopupComponent.steps.clickOnOpacityGradientHuePalette();
248
+ colorPopupComponent.steps.clickOnOkButton();
249
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
250
+ colorPopupComponent.steps.verifyColorBlockInOptionAccordion(0, 'rgba(255, 0, 0, 0.5)');
251
+ });
252
+ });
253
+
254
+ describe('Border style - Edit tab', () => {
255
+ abortEarlySetup();
256
+ before(() => {
257
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
258
+ cy.barsPreLoaderWait();
259
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
260
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
261
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
262
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
263
+ });
264
+
265
+ it('When the "Dashed" border style is in selected state, then the border style of the text containers in the canvas image should be "Dashed"', () => {
266
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaOverImageBorderStyle(0, 'dashed');
267
+ });
268
+
269
+ borderStyles.forEach((style) => {
270
+ it(`When the user selects ${style}, then the border style of the text containers in the canvas image should update to ${style}`, () => {
271
+ fillInTheGapsOverImageDragAndDropPage.steps.selectBorderStyleToggleButton(style);
272
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaOverImageBorderStyle(0, style);
273
+ });
274
+ })
275
+ });
276
+
277
+ describe('Border style - Preview tab', () => {
278
+ abortEarlySetup();
279
+ before(() => {
280
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
281
+ cy.barsPreLoaderWait();
282
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
283
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
284
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
285
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
286
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
287
+ });
288
+
289
+ it('When the "Dashed" border style is in selected state, then the border style of the text containers in the preview tab should be "Dashed"', () => {
290
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaOverImageBorderStyle(0, 'dashed');
291
+ });
292
+
293
+ borderStyles.forEach((style) => {
294
+ it(`When the user selects ${style}, then the border style of the text containers in the preview tab should update to ${style}`, () => {
295
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
296
+ fillInTheGapsOverImageDragAndDropPage.steps.selectBorderStyleToggleButton(style);
297
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
298
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaOverImageBorderStyle(0, style);
299
+ });
300
+ })
301
+ });
302
+
303
+ describe('Word wrap - Edit tab contents and functionality', () => {
304
+ abortEarlySetup();
305
+ before(() => {
306
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
307
+ cy.barsPreLoaderWait();
308
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
309
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
310
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
311
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
312
+ fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(['orci a scelerisque purus semper eget duis at tellus at urna', 'condimentum mattis pellentesque id nibh tortor id aliquet lectus']);
313
+ fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'orci a scelerisque purus semper eget duis at tellus at urna': 0 });
314
+ });
315
+
316
+ it('Word wrap label and checkbox should be displayed and by default it should be unchecked', () => {
317
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.wordWrapLabel(), 'Word wrap');
318
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.wordWrapLabel(), 'visible');
319
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyWordWrapCheckboxIsUnchecked();
320
+ });
321
+
322
+ it('When word wrap is unchecked then the options in the dropzone should have ellipses', () => {
323
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionInDropzoneNotWrapped();
324
+ });
325
+
326
+ it('When the user checks the word wrap checkbox then the options should be without ellipses and an expand button should be displayed in the dropzone', () => {
327
+ fillInTheGapsOverImageDragAndDropPage.steps.checkWordWrapCheckbox();
328
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionInDropzoneWrapped();
329
+ });
330
+
331
+ it('When the user clicks on the expand button then the entire option text should be displayed and a close button should be displayed', () => {
332
+ fillInTheGapsOverImageDragAndDropPage.steps.expandOptionInDropzone();
333
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.expandPopupDraggableOption(), 'orci a scelerisque purus semper eget duis at tellus at urna', 'condimentum mattis pellentesque id nibh tortor id aliquet lectus');
334
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.expandPopupCloseButton(), 'visible');
335
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.expandPopupCloseButton(), 'Close');
336
+ });
337
+
338
+ it('When the user clicks on the close button the expanded option should be minimized and the expand icon should be displayed again on the dropzone', () => {
339
+ fillInTheGapsOverImageDragAndDropPage.steps.closeExpandOptionPopup();
340
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.expandIconButton(), 'visible');
341
+ });
342
+ });
343
+
344
+ describe('Word wrap - Preview tab functionality', () => {
345
+ abortEarlySetup();
346
+ before(() => {
347
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
348
+ cy.barsPreLoaderWait();
349
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
350
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
351
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
352
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
353
+ fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(['orci a scelerisque purus semper eget duis at tellus at urna', 'condimentum mattis pellentesque id nibh tortor id aliquet lectus']);
354
+ fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'orci a scelerisque purus semper eget duis at tellus at urna': 0 });
355
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
356
+ });
357
+
358
+ it('When word wrap is unchecked then the options in the dropzone should have ellipses', () => {
359
+ fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'orci a scelerisque purus semper eget duis at tellus at urna': 0 });
360
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionInDropzoneNotWrapped();
361
+ });
362
+
363
+ it('When the user checks the word wrap checkbox then the options should be without ellipses and an expand button should be displayed in the dropzone', () => {
364
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
365
+ fillInTheGapsOverImageDragAndDropPage.steps.checkWordWrapCheckbox();
366
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
367
+ fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'orci a scelerisque purus semper eget duis at tellus at urna': 0 });
368
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionInDropzoneWrapped();
369
+ });
370
+
371
+ it('When the user clicks on the expand button then the entire option text should be displayed and a close button should be displayed', () => {
372
+ fillInTheGapsOverImageDragAndDropPage.steps.expandOptionInDropzone();
373
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.expandPopupDraggableOption(), 'orci a scelerisque purus semper eget duis at tellus at urna', 'condimentum mattis pellentesque id nibh tortor id aliquet lectus');
374
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.expandPopupCloseButton(), 'visible');
375
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.expandPopupCloseButton(), 'Close');
376
+ });
377
+
378
+ it('When the user clicks on the close button the expanded option should be minimized and the expand icon should be displayed again on the dropzone', () => {
379
+ fillInTheGapsOverImageDragAndDropPage.steps.closeExpandOptionPopup();
380
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.expandIconButton(), 'visible');
381
+ });
382
+ });
383
+
384
+ describe('Option placement in dropzone - Edit tab contents and functionality', () => {
385
+ abortEarlySetup();
386
+ before(() => {
387
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
388
+ cy.barsPreLoaderWait();
389
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
390
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
391
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
392
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
393
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseArea(0);
394
+ fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(['Leaves', 'Flower']);
395
+ fillInTheGapsOverImageDragAndDropPage.steps.expandMaxCapacityPerDropzoneDropdown();
396
+ fillInTheGapsOverImageDragAndDropPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
397
+ });
398
+
399
+ it('Option placement in dropzone label should be displayed', () => {
400
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.optionPlacementInDropzoneLabel(), 'Option placement in dropzone');
401
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.optionPlacementInDropzoneLabel(), 'visible');
402
+ });
403
+
404
+ it('Inline and Block labels and radio buttons should be displayed and by default, inline should be selected', () => {
405
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.inlineLabel(), 'Inline');
406
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.inlineRadioButton(), 'exist');
407
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.blockLabel(), 'Block');
408
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.blockRadioButton(), 'exist');
409
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyInlineRadioButtonChecked();
410
+ });
411
+
412
+ it('When user drops options in the dropzone when \'Inline\' radio button is checked, the options should be displayed inline to each other', () => {
413
+ fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Leaves': 0, 'Flower': 0 });
414
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyInlineOptionPlacementSpecifyCorrectAnswer();
415
+ });
416
+
417
+ it('When the user selects \'Block\' radio button, then the options should be displayed under each other with an expand icon', () => {
418
+ fillInTheGapsOverImageDragAndDropPage.steps.checkBlockRadioButton();
419
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyBlockOptionPlacementSpecifyCorrectAnswer();
420
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.expandIconButton(), 'visible');
421
+ });
422
+
423
+ it('When the user clicks on the expand button then the entire option text should be displayed and a close button should be displayed', () => {
424
+ fillInTheGapsOverImageDragAndDropPage.steps.expandOptionInDropzone();
425
+ utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.expandPopupDraggableOption(), 0), 'Leaves');
426
+ utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.expandPopupDraggableOption(), 1), 'Flower');
427
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.expandPopupCloseButton(), 'Close');
428
+ });
429
+
430
+ it('When the user clicks on the close button the expanded option should be minimized and the expand icon should be displayed again on the dropzone', () => {
431
+ fillInTheGapsOverImageDragAndDropPage.steps.closeExpandOptionPopup();
432
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.expandIconButton(), 'visible');
433
+ });
434
+ });
435
+
436
+ describe('Option placement in dropzone - Preview tab functionality', () => {
437
+ abortEarlySetup();
438
+ before(() => {
439
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
440
+ cy.barsPreLoaderWait();
441
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
442
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
443
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
444
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
445
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseArea(0);
446
+ fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(['Leaves', 'Flower']);
447
+ fillInTheGapsOverImageDragAndDropPage.steps.expandMaxCapacityPerDropzoneDropdown();
448
+ fillInTheGapsOverImageDragAndDropPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
449
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
450
+ });
451
+
452
+ it('When user drops options in the dropzone when \'Inline\' radio button is checked, the options should be displayed inline to each other', () => {
453
+ fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Leaves': 0, 'Flower': 0 });
454
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyInlineOptionPlacementPreviewTab();
455
+ });
456
+
457
+ it('When the user selects \'Block\' radio button, then the options should be displayed under each other with an expand icon', () => {
458
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
459
+ fillInTheGapsOverImageDragAndDropPage.steps.checkBlockRadioButton();
460
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
461
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyBlockOptionPlacementPreviewTab();
462
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.expandIconButton(), 'visible');
463
+ });
464
+
465
+ it('When the user clicks on the expand button then the entire option text should be displayed and a close button should be displayed', () => {
466
+ fillInTheGapsOverImageDragAndDropPage.steps.expandOptionInDropzone();
467
+ utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.expandPopupDraggableOption(), 0), 'Leaves');
468
+ utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.expandPopupDraggableOption(), 1), 'Flower');
469
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.expandPopupCloseButton(), 'Close');
470
+ });
471
+
472
+ it('When the user clicks on the close button the expanded option should be minimized and the expand icon should be displayed again on the dropzone', () => {
473
+ fillInTheGapsOverImageDragAndDropPage.steps.closeExpandOptionPopup();
474
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.expandPopupCloseButton(), 'visible');
475
+ });
476
+ });
477
+
478
+ describe('Option alignment in dropzone - Edit tab contents and functionality', () => {
479
+ abortEarlySetup();
480
+ before(() => {
481
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
482
+ cy.barsPreLoaderWait();
483
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
484
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
485
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
486
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
487
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseArea(0);
488
+ });
489
+
490
+ it('Option alignment in dropzone label should be displayed', () => {
491
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.optionAlignmentInDropzoneLabel(), 'Option alignment in dropzone');
492
+ });
493
+
494
+ it('\'Left, Right, Center\' buttons should be displayed and by default \'Left\' alignment option should be selected', () => {
495
+ optionAlignment.forEach((option) => {
496
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.optionAlignmentInDropzoneOptions(option.toLowerCase()), 'exist');
497
+ });
498
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionAlignmentInDropzoneOptionSelected('left');
499
+ });
500
+
501
+ it('By default, the options in the dropzone should be left aligned', () => {
502
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionAlignmentInDropzoneInSpecifyCorrectAnswer('left');
503
+ });
504
+
505
+ optionAlignment.forEach((option) => {
506
+ it(`When user selects ${option} then the options should be ${option} aligned in the specify correct answer section`, () => {
507
+ fillInTheGapsOverImageDragAndDropPage.steps.selectOptionAlignmentInDropzoneOption(option)
508
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionAlignmentInDropzoneInSpecifyCorrectAnswer(option);
509
+ });
510
+ });
511
+ });
512
+
513
+ describe('Option alignment in dropzone - Preview tab functionality', () => {
514
+ abortEarlySetup();
515
+ before(() => {
516
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
517
+ cy.barsPreLoaderWait();
518
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
519
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
520
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
521
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
522
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseArea(0);
523
+ fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(['Leaves', 'Flower']);
524
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
525
+ });
526
+
527
+ it('By default, the options in the dropzone should be left aligned', () => {
528
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionAlignmentInDropzoneInPreviewTab('Left');
529
+ });
530
+
531
+ optionAlignment.forEach((option) => {
532
+ it(`When user selects ${option} then the options should be ${option} aligned in the preview tab`, () => {
533
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
534
+ fillInTheGapsOverImageDragAndDropPage.steps.selectOptionAlignmentInDropzoneOption(option);
535
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
536
+ fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Leaves': 0 })
537
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionAlignmentInDropzoneInPreviewTab(option);
538
+ });
539
+ });
540
+ });
541
+
542
+ describe('Set height and width for all dropzones contents', () => {
543
+ abortEarlySetup();
544
+ before(() => {
545
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
546
+ cy.barsPreLoaderWait();
547
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
548
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
549
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
550
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
551
+ });
552
+
553
+ it('"Set height and width for all dropzones" label and checkbox should be displayed, By default the checkbox should be in unchecked state', () => {
554
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.setHeightAndWidthForAllDropzoneCheckboxLabel(), 'Set height and width for all dropzones');
555
+ fillInTheGapsOverImageDragAndDropPage.steps.verifySetHeightAndWidthForAllDropzoneCheckboxUncheckedState();
556
+ });
557
+
558
+ it('When the user checks "Set height and width for all dropzones" checkbox, \'Height (px)\' and \'Width (px)\' labels and empty input fields should be displayed', () => {
559
+ fillInTheGapsOverImageDragAndDropPage.steps.checkSetHeightAndWidthForAllDropzoneCheckbox();
560
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.dropzoneHeightInputFieldLabel(), 'Height (px)')
561
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneHeightInputFieldValue('');
562
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.dropzoneWidthInputFieldLabel(), 'Width (px)')
563
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneWidthInputFieldValue('');
564
+ });
565
+
566
+ it('CSS of "Set height and width for all dropzones" section contents', { tags: 'css' }, () => {
567
+ utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.setHeightAndWidthForAllDropzoneCheckboxLabel(), {
568
+ 'color': css.color.labelText,
569
+ 'font-size': css.fontSize.normal,
570
+ 'font-weight': css.fontWeight.regular
571
+ });
572
+ });
573
+
574
+ it('Accessibility of "Set height and width for all dropzones" section contents', { tags: 'a11y' }, () => {
575
+ cy.checkAccessibility(fillInTheGapsOverImageDragAndDropPage.setHeightAndWidthForAllDropzoneCheckboxLabel().parents('[data-ngie-testid="set-height-and-width-for-all-dropzones-checkbox"]'));
576
+ });
577
+ });
578
+
579
+ describe('Set height and width for all dropzones - Edit tab', () => {
580
+ abortEarlySetup();
581
+ before(() => {
582
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
583
+ cy.barsPreLoaderWait();
584
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
585
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
586
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
587
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
588
+ fillInTheGapsOverImageDragAndDropPage.steps.checkSetHeightAndWidthForAllDropzoneCheckbox();
589
+ });
590
+
591
+ it('When the user has not set any height or width values in the "Set height and width for all dropzones" section, the dimensions of the text containers should be default', () => {
592
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneDimensionsSpecifyCorrectAnswer(80, 200);
593
+ });
594
+
595
+ it('When the user specifies the height and width, the dimensions of the text containers should update accordingly', () => {
596
+ fillInTheGapsOverImageDragAndDropPage.steps.setDropzoneHeight(100);
597
+ fillInTheGapsOverImageDragAndDropPage.steps.setDropzoneWidth(200);
598
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneDimensionsSpecifyCorrectAnswer(100, 200);
599
+ });
600
+ });
601
+
602
+ describe('Set height and width for all dropzones - Preview tab', () => {
603
+ abortEarlySetup();
604
+ before(() => {
605
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
606
+ cy.barsPreLoaderWait();
607
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
608
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
609
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
610
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
611
+ fillInTheGapsOverImageDragAndDropPage.steps.checkSetHeightAndWidthForAllDropzoneCheckbox();
612
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
613
+ });
614
+
615
+ it('When the user has not set any height or width values in the "Set height and width for all dropzones" section, the dimensions of the text containers should be default', () => {
616
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneDimensionsPreviewTab(80, 200);
617
+ });
618
+
619
+ it('When the user specifies the height and width, the dimensions of the text containers should update accordingly', () => {
620
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
621
+ fillInTheGapsOverImageDragAndDropPage.steps.setDropzoneHeight(100);
622
+ fillInTheGapsOverImageDragAndDropPage.steps.setDropzoneWidth(210);
623
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
624
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneDimensionsPreviewTab(100, 210);
625
+ });
626
+ });
627
+
628
+ describe('Dropzone connector style contents', () => {
629
+ abortEarlySetup();
630
+ before(() => {
631
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
632
+ cy.barsPreLoaderWait();
633
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
634
+ });
635
+
636
+ it('"Dropzone connector style" label should be displayed', () => {
637
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.dropzoneConnectorStyleLabel(), 'Dropzone connector style');
638
+ });
639
+
640
+ it('"Connector end point shape" label along with four icon buttons - "Circle", "Square", "Diamond" and "None" should be displayed. By default, "Circle" option should be in selected state', () => {
641
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.connectorEndPointShapeLabel(), 'Connector end point shape');
642
+ connectorStyles.forEach((option) => {
643
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.connectorEndPointShapeOptions(option.toLowerCase()), 'exist');
644
+ });
645
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyConnectorStyleOptionSelected('circle')
646
+ });
647
+ });
648
+
649
+ describe('Dropzone connector style - Edit tab', () => {
650
+ abortEarlySetup();
651
+ before(() => {
652
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
653
+ cy.barsPreLoaderWait();
654
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
655
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
656
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
657
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
658
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseArea(0);
659
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseAreaPointerStyle('left');
660
+ });
661
+
662
+ it('When the "Circle" connector style is in selected state, then the connector style of the text containers in the canvas image should be "Dashed"', () => {
663
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaConnectorEndPointShape('Circle');
664
+ });
665
+
666
+ connectorStyles.forEach((button) => {
667
+ it(`When the user selects ${button}, then the connector style of the text containers in the canvas image should update to ${button}`, () => {
668
+ fillInTheGapsOverImageDragAndDropPage.steps.selectEndPointShapeButton(button);
669
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaConnectorEndPointShape(button);
670
+ });
671
+ })
672
+ });
673
+
674
+ describe('Dropzone connector style - Preview tab', () => {
675
+ abortEarlySetup();
676
+ before(() => {
677
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
678
+ cy.barsPreLoaderWait();
679
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
680
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
681
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
682
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
683
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseArea(0);
684
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
685
+ });
686
+
687
+ it('When the "Circle" connector style is in selected state, then the connector style of the text containers in the canvas image should be "Dashed"', () => {
688
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaConnectorEndPointShapePreviewTab('Circle');
689
+ });
690
+
691
+ connectorStyles.forEach((button) => {
692
+ it(`When the user selects ${button}, then the connector style of the text containers in the canvas image should update to ${button}`, () => {
693
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
694
+ fillInTheGapsOverImageDragAndDropPage.steps.selectEndPointShapeButton(button);
695
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
696
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyResponseAreaConnectorEndPointShapePreviewTab(button);
697
+ });
698
+ })
699
+ });
700
+ });