itemengine-cypress-automation 1.0.86 → 1.0.87
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +30 -30
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +568 -0
- package/cypress/e2e/ILC/EssayResponse/editAndPreviewTabScoringSection.js +86 -0
- package/cypress/e2e/ILC/EssayResponse/editTabBasicSections.js +389 -0
- package/cypress/e2e/ILC/EssayResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +112 -0
- package/cypress/e2e/ILC/EssayResponse/headerSection.js +68 -0
- package/cypress/e2e/ILC/EssayResponse/previewAddTable.js +290 -0
- package/cypress/e2e/ILC/EssayResponse/previewContentsForAllViews.smoke.js +79 -0
- package/cypress/e2e/ILC/EssayResponse/previewEditTable.js +379 -0
- package/cypress/e2e/ILC/EssayResponseBasic/essayResponseBasicCustomizeFormattingOptions.js +207 -0
- package/cypress/e2e/ILC/EssayResponseBasic/gradingViewAndCorrectAnswerViewContents.smoke.js +115 -0
- package/cypress/e2e/ILC/EssayResponseBasic/previewContentsForAllViews.smoke.js +79 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialDifferentWeightsBasic.js +159 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +507 -29
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +6 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +272 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +300 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +204 -0
- package/cypress/e2e/ILC/Protractor/protractorEditTabBasicsSection.js +4 -4
- package/cypress/e2e/ILC/Protractor/protractorEditTabFunctionality.js +1 -1
- package/cypress/e2e/ILC/Ruler/rulerEditTabBasicsSection.js +4 -4
- package/cypress/e2e/ILC/Ruler/rulerEditTabFunctionality.js +1 -1
- package/cypress/e2e/ILC/SingleSelection/editTabScoringSection.js +1 -3
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +205 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +259 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethods2.js +217 -0
- package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +202 -0
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +613 -0
- package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +71 -0
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +318 -318
- package/cypress/fixtures/theme/ilc.json +3 -0
- package/cypress/pages/components/backgroundImageUploadComponent.js +1 -2
- package/cypress/pages/components/colorPopupComponent.js +26 -3
- package/cypress/pages/components/createCustomCategoryFlyout.js +351 -46
- package/cypress/pages/components/customizeSpecialCharacterComponent.js +165 -0
- package/cypress/pages/components/equationEditorFlyout.js +124 -0
- package/cypress/pages/components/essayResponseCommonComponents.js +3 -0
- package/cypress/pages/components/figOverImageCanvasComponent.js +316 -7
- package/cypress/pages/components/index.js +3 -1
- package/cypress/pages/components/opacityComponent.js +31 -4
- package/cypress/pages/components/specialAndCustomSpecialCharactersComponent.js +1 -0
- package/cypress/pages/components/specialCharactersFlyoutComponent.js +1 -0
- package/cypress/pages/drawingResponsePage.js +33 -138
- package/cypress/pages/essayResponsePage.js +612 -26
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +48 -7
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +267 -13
- package/package.json +1 -1
package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js
CHANGED
@@ -4,6 +4,9 @@ import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
4
4
|
const css = Cypress.env('css');
|
5
5
|
|
6
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];
|
7
10
|
|
8
11
|
describe('Create item page - Fill in the gaps: Question instructions, Options section', () => {
|
9
12
|
before(() => {
|
@@ -13,7 +16,7 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
13
16
|
describe('Question instructions input field - Edit tab', () => {
|
14
17
|
abortEarlySetup();
|
15
18
|
before(() => {
|
16
|
-
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
19
|
+
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
|
17
20
|
cy.barsPreLoaderWait();
|
18
21
|
});
|
19
22
|
|
@@ -89,6 +92,7 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
89
92
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyFileNameLabel('highlightImage.jpg');
|
90
93
|
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.canvasImage(), 'visible');
|
91
94
|
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.uploadImageProgressBar(), 'notExist');
|
95
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
|
92
96
|
});
|
93
97
|
|
94
98
|
it('Delete button should appear beside uploaded file\'s name', () => {
|
@@ -175,6 +179,499 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
175
179
|
});
|
176
180
|
});
|
177
181
|
|
182
|
+
describe('Canvas section - Edit tab', () => {
|
183
|
+
abortEarlySetup();
|
184
|
+
before(() => {
|
185
|
+
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
|
186
|
+
cy.barsPreLoaderWait();
|
187
|
+
});
|
188
|
+
|
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
|
+
});
|
199
|
+
|
200
|
+
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');
|
204
|
+
});
|
205
|
+
|
206
|
+
it('When \'Insert dropzone\' button is selected, then \'Insert dropzone\' label should be displayed inside canvas', () => {
|
207
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasMenuButtonSelected();
|
208
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasSelectedMenuText('Insert dropzone');
|
209
|
+
});
|
210
|
+
|
211
|
+
it('When user hovers over select dropzone button, then \'Select dropzone\' tooltip should be displayed', () => {
|
212
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyTooltipInnerText(fillInTheGapsOverImageDragAndDropPage.selectDropzoneButton, 'Select dropzone');
|
213
|
+
});
|
214
|
+
|
215
|
+
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');
|
232
|
+
});
|
233
|
+
|
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
|
+
});
|
237
|
+
|
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
|
+
});
|
242
|
+
});
|
243
|
+
|
244
|
+
describe('Canvas : Insert dropzone, Delete, Undo, Redo - Specify correct answer section', () => {
|
245
|
+
abortEarlySetup();
|
246
|
+
before(() => {
|
247
|
+
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
|
248
|
+
cy.barsPreLoaderWait();
|
249
|
+
fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
|
250
|
+
});
|
251
|
+
|
252
|
+
it('When user inserts dropzones in canvas, then dropzones should be added in specify correct answer section', () => {
|
253
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(60);
|
254
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(80);
|
255
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
|
256
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneCountInSpecifyCorrectAnswerSection(3);
|
257
|
+
});
|
258
|
+
|
259
|
+
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);
|
261
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneCountInSpecifyCorrectAnswerSection(2);
|
262
|
+
for (let i = 0; i < 2; i++) {
|
263
|
+
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.dropzoneLabelSpecifyCorrectAnswerSection(), i), `Dropzone ${i + 1}`);
|
264
|
+
}
|
265
|
+
});
|
266
|
+
|
267
|
+
it('When user clicks on undo button in canvas section, then previous action should reversed and previously deleted dropzone should be added in specify correct answer section', () => {
|
268
|
+
fillInTheGapsOverImageDragAndDropPage.steps.undoAction();
|
269
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneCountInSpecifyCorrectAnswerSection(3);
|
270
|
+
});
|
271
|
+
|
272
|
+
it('When the user clicks on the redo button after performing an undo action in canvas section, then the previously added dropzone should be deleted again in specify correct answer section', () => {
|
273
|
+
fillInTheGapsOverImageDragAndDropPage.steps.redoAction();
|
274
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneCountInSpecifyCorrectAnswerSection(2);
|
275
|
+
});
|
276
|
+
|
277
|
+
it('When the user reaches the initial state by performing undo actions in canvas section, then specify correct answer section should not have dropzone', () => {
|
278
|
+
for (var i = 0; i < 4; i++) {
|
279
|
+
fillInTheGapsOverImageDragAndDropPage.steps.undoAction();
|
280
|
+
};
|
281
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzoneWrapperSpecifyCorrectAnswerSection(), 'notExist');
|
282
|
+
});
|
283
|
+
|
284
|
+
it('When the user reaches the latest state by performing redo actions in canvas section, then 3 dropzones should be visible in specify correct answer section', () => {
|
285
|
+
for (var i = 0; i < 4; i++) {
|
286
|
+
fillInTheGapsOverImageDragAndDropPage.steps.redoAction();
|
287
|
+
};
|
288
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneCountInSpecifyCorrectAnswerSection(2);
|
289
|
+
});
|
290
|
+
|
291
|
+
it('When user clicks on clear all in canvas, then dropzones in specify correct answer should disappear', () => {
|
292
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clearAll();
|
293
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzoneWrapperSpecifyCorrectAnswerSection(), 'notExist');
|
294
|
+
});
|
295
|
+
});
|
296
|
+
|
297
|
+
describe('Canvas : Select dropzone - Edit tab canvas section functionality', () => {
|
298
|
+
abortEarlySetup();
|
299
|
+
before(() => {
|
300
|
+
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
|
301
|
+
cy.barsPreLoaderWait();
|
302
|
+
fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
|
303
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
|
304
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(20);
|
305
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(30);
|
306
|
+
});
|
307
|
+
|
308
|
+
it('When user clicks on \'Select dropzone\' button is selected, then \'Select\' label should be displayed inside canvas', () => {
|
309
|
+
fillInTheGapsOverImageDragAndDropPage.steps.selectCanvasMenuButton('Select dropzone');
|
310
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasSelectedMenuText('Select');
|
311
|
+
});
|
312
|
+
|
313
|
+
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);
|
317
|
+
});
|
318
|
+
|
319
|
+
it('CSS of dropzones', { tags: 'css' }, () => {
|
320
|
+
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.dropzone(), 1), {
|
321
|
+
'border': `2px solid ${css.color.activeComponentBorder}`
|
322
|
+
});
|
323
|
+
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.dropzone(), 0), {
|
324
|
+
'border': `2px dashed ${css.color.activeComponentBorder}`
|
325
|
+
});
|
326
|
+
});
|
327
|
+
|
328
|
+
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
|
+
});
|
336
|
+
});
|
337
|
+
|
338
|
+
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);
|
342
|
+
});
|
343
|
+
|
344
|
+
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);
|
348
|
+
});
|
349
|
+
});
|
350
|
+
|
351
|
+
describe('Canvas : Insert and delete dropzone - Edit tab canvas section functionality', () => {
|
352
|
+
abortEarlySetup();
|
353
|
+
before(() => {
|
354
|
+
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
|
355
|
+
cy.barsPreLoaderWait();
|
356
|
+
});
|
357
|
+
|
358
|
+
it('When user clicks inside canvas, then one dropzone should be added with pointer, close button and numeration.', () => {
|
359
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(80);
|
360
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzoneWrapper(), 1);
|
361
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzone(), 'visible');
|
362
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzonePointer(), 'visible');
|
363
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.removeDropzoneButton(), 'visible');
|
364
|
+
utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.dropzoneNumerationText(), '1');
|
365
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzoneNumerationText(), 'visible');
|
366
|
+
});
|
367
|
+
|
368
|
+
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', () => {
|
369
|
+
fillInTheGapsOverImageDragAndDropPage.steps.removeDropzone(0);
|
370
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzoneWrapper(), 'notExist');
|
371
|
+
utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'Error: Please insert a dropzone.');
|
372
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'visible');
|
373
|
+
});
|
374
|
+
|
375
|
+
it('When user adds dropzone, then error message should disappear', () => {
|
376
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(80);
|
377
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'notExist');
|
378
|
+
});
|
379
|
+
|
380
|
+
it('User should be able to add maximum 20 multiple dropzones inside canvas', () => {
|
381
|
+
for (let i = 0; i < 21; i++) {
|
382
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(i * 2);
|
383
|
+
}
|
384
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzoneWrapper(), 20);
|
385
|
+
});
|
386
|
+
|
387
|
+
it('When user clicks on close button for a dropzone, then dropzone should disappear and numeration for existing dropzones should be changed appropriately', () => {
|
388
|
+
fillInTheGapsOverImageDragAndDropPage.steps.removeDropzone(0);
|
389
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzoneWrapper(), 19);
|
390
|
+
for (let i = 0; i < 19; i++) {
|
391
|
+
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.dropzoneNumerationText(), i), `${i + 1}`);
|
392
|
+
}
|
393
|
+
});
|
394
|
+
});
|
395
|
+
|
396
|
+
describe('Canvas : Undo, Redo, Clear all - Edit tab canvas section functionality', () => {
|
397
|
+
abortEarlySetup();
|
398
|
+
before(() => {
|
399
|
+
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
|
400
|
+
cy.barsPreLoaderWait();
|
401
|
+
fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
|
402
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
|
403
|
+
});
|
404
|
+
|
405
|
+
it('When the user has not made any changes in the canvas, the \'Undo\' and \'Redo\' button should be in disabled state', () => {
|
406
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyUndoButtonDisabled();
|
407
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyRedoButtonDisabled();
|
408
|
+
});
|
409
|
+
|
410
|
+
it('When user adds dropzone inside canvas, the \'Undo\' button should get enabled but the \'Redo\' button should continue to stay in disabled state', () => {
|
411
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(80);
|
412
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(20);
|
413
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(30);
|
414
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(40);
|
415
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyUndoButtonEnabled();
|
416
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyRedoButtonDisabled();
|
417
|
+
});
|
418
|
+
|
419
|
+
it('When the user clicks on the \'Undo\' button, then previous action should be reversed and redo button should be in enabled state', () => {
|
420
|
+
fillInTheGapsOverImageDragAndDropPage.steps.undoAction();
|
421
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzone(), 3);
|
422
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyRedoButtonEnabled();
|
423
|
+
});
|
424
|
+
|
425
|
+
it('When the user clicks on the redo button, then previous action should be reinstated and redo button should be disabled', () => {
|
426
|
+
fillInTheGapsOverImageDragAndDropPage.steps.redoAction()
|
427
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzone(), 4);
|
428
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyRedoButtonDisabled();
|
429
|
+
});
|
430
|
+
|
431
|
+
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', () => {
|
432
|
+
for (var i = 0; i < 4; i++) {
|
433
|
+
fillInTheGapsOverImageDragAndDropPage.steps.undoAction();
|
434
|
+
}
|
435
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzone(), 0);
|
436
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyUndoButtonDisabled();
|
437
|
+
utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'Error: Please insert a dropzone.');
|
438
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'visible');
|
439
|
+
});
|
440
|
+
|
441
|
+
it('When the user reaches the latest state by performing redo actions, the \'Redo\' button should get disabled and error message should disappear', () => {
|
442
|
+
for (var i = 0; i < 4; i++) {
|
443
|
+
fillInTheGapsOverImageDragAndDropPage.steps.redoAction();
|
444
|
+
}
|
445
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzone(), 4);
|
446
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyRedoButtonDisabled();
|
447
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'notExist');
|
448
|
+
});
|
449
|
+
|
450
|
+
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', () => {
|
451
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clearAll();
|
452
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzoneWrapper(), 'notExist');
|
453
|
+
utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'Error: Please insert a dropzone.');
|
454
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'visible');
|
455
|
+
});
|
456
|
+
|
457
|
+
it('When user clicks on undo button, then previously added dropzones should be restored and error message should disappear', () => {
|
458
|
+
fillInTheGapsOverImageDragAndDropPage.steps.undoAction();
|
459
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzone(), 4);
|
460
|
+
});
|
461
|
+
});
|
462
|
+
|
463
|
+
describe('Canvas : Insert text - Edit tab canvas section functionality', () => {
|
464
|
+
abortEarlySetup();
|
465
|
+
before(() => {
|
466
|
+
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
|
467
|
+
cy.barsPreLoaderWait();
|
468
|
+
fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
|
469
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
|
470
|
+
});
|
471
|
+
|
472
|
+
it('When user clicks on \'Insert text\' button, then \'Text\' menu label and \'Text color\' icon should be displayed.', () => {
|
473
|
+
fillInTheGapsOverImageDragAndDropPage.steps.selectCanvasMenuButton('Insert text');
|
474
|
+
cy.log('Clicking on canvas Selected Menu Text to hover away from select dropzone button');
|
475
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickOnCanvasSelectedMenuText();
|
476
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyCanvasSelectedMenuText('Text');
|
477
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzoneStyle(), 'visible');
|
478
|
+
});
|
479
|
+
|
480
|
+
it('\'Text color\' button should be in disabled state.', () => {
|
481
|
+
utilities.verifyElementDisabled(fillInTheGapsOverImageDragAndDropPage.dropzoneStyle());
|
482
|
+
});
|
483
|
+
|
484
|
+
it('When user hovers over \'Text color\' button, then \'Text color\' tooltip should be displayed.', () => {
|
485
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyTooltipInnerText(fillInTheGapsOverImageDragAndDropPage.dropzoneStyle, 'Text color');
|
486
|
+
});
|
487
|
+
|
488
|
+
it('When user clicks inside the canvas, then text box should be displayed and \'Text color\' button should be enabled', () => {
|
489
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertTextArea(80, 'Inserted text');
|
490
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyTextOfTextBox('Inserted text');
|
491
|
+
utilities.verifyElementNotDisabled(fillInTheGapsOverImageDragAndDropPage.dropzoneStyle());
|
492
|
+
});
|
493
|
+
|
494
|
+
it('Text color of text inside text box should be black by default', () => {
|
495
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyTextColorOfTextBox('rgb(0, 0, 46)');
|
496
|
+
});
|
497
|
+
|
498
|
+
it('When user clicks on \'Text color\' button, \'Text color\' popup should be displayed.', () => {
|
499
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickOnTextColorButton();
|
500
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.textColorPopupWrapper(), 'visible');
|
501
|
+
utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.textColorLabelInTextColorPopup(), 'Text color');
|
502
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.textColorLabelInTextColorPopup(), 'visible');
|
503
|
+
});
|
504
|
+
|
505
|
+
it('\'Edit color\' label and Black color block should be displayed in selected state in the popup', () => {
|
506
|
+
utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.editColorLabel(), 'Edit color');
|
507
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.editColorLabel(), 'visible');
|
508
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.selectedColorBlockInTextColorPopup(), 'visible');
|
509
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyColorBlock('rgb(0, 0, 46)');
|
510
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyColorBlockSelectedState();
|
511
|
+
});
|
512
|
+
|
513
|
+
it('When the user clicks on the \'Edit color\' present in an \'Text color\' popup, then a select color popup should be displayed', () => {
|
514
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickOnEditColorButton();
|
515
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyColorPopupIsDisplayed();
|
516
|
+
});
|
517
|
+
|
518
|
+
it('A title \'Select color\' should be displayed on the color popup', () => {
|
519
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyColorPopupSelectColorTitle();
|
520
|
+
});
|
521
|
+
|
522
|
+
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', () => {
|
523
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyColorSaturationPaletteAndPicker();
|
524
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifySaturationPaletteColor('rgb(0, 0, 46)');
|
525
|
+
});
|
526
|
+
|
527
|
+
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', () => {
|
528
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyColorHuePaletteAndPicker();
|
529
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyHuePaletteColor('rgb(0, 0, 255)');
|
530
|
+
});
|
531
|
+
|
532
|
+
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', () => {
|
533
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityGradientHuePaletteAndPicker();
|
534
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityGradientPaletteColor('rgb(0, 0, 46)');
|
535
|
+
});
|
536
|
+
|
537
|
+
it('A \'Selected color\' label and color block displaying the selected color should be displayed', () => {
|
538
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifySelectedColorLabelAndSelectedColorBlock();
|
539
|
+
});
|
540
|
+
|
541
|
+
it('A \'Hex\' label and input field with pre-filled hex code value of the selected color should be displayed', () => {
|
542
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyHexLabelAndInputField();
|
543
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyHexValue('#00002E');
|
544
|
+
});
|
545
|
+
|
546
|
+
it('\'Cancel\' and \'Ok\' buttons should be displayed', () => {
|
547
|
+
utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.cancelButton(), 'Cancel');
|
548
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.cancelButton(), 'visible');
|
549
|
+
utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.okButton(), 'OK');
|
550
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.okButton(), 'visible');
|
551
|
+
});
|
552
|
+
|
553
|
+
it('CSS of color popup contents', { tags: 'css' }, () => {
|
554
|
+
labels.forEach(label => {
|
555
|
+
utilities.verifyCSS(label(), {
|
556
|
+
'color': css.color.labels,
|
557
|
+
'font-size': css.fontSize.normal,
|
558
|
+
'font-weight': css.fontWeight.semibold
|
559
|
+
});
|
560
|
+
});
|
561
|
+
inputFields.forEach(inputField => {
|
562
|
+
utilities.verifyCSS(inputField(), {
|
563
|
+
'color': css.color.text,
|
564
|
+
'font-size': css.fontSize.default,
|
565
|
+
'font-weight': css.fontWeight.regular
|
566
|
+
});
|
567
|
+
});
|
568
|
+
utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.okButton(), {
|
569
|
+
'color': css.color.whiteText,
|
570
|
+
'font-size': css.fontSize.default,
|
571
|
+
'font-weight': css.fontWeight.regular,
|
572
|
+
'background-color': css.color.activeButtons
|
573
|
+
});
|
574
|
+
utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.cancelButton(), {
|
575
|
+
'color': css.color.secondaryBtn,
|
576
|
+
'font-size': css.fontSize.default,
|
577
|
+
'font-weight': css.fontWeight.semibold,
|
578
|
+
'background-color': css.color.transparent
|
579
|
+
});
|
580
|
+
});
|
581
|
+
|
582
|
+
//Failing due to https://redmine.zeuslearning.com/issues/539391
|
583
|
+
it('Accessibility of color popup contents', { tags: 'a11y' }, () => {
|
584
|
+
cy.checkAccessibility(fillInTheGapsOverImageDragAndDropPage.dialogBox());
|
585
|
+
});
|
586
|
+
|
587
|
+
it('When the user changes the color using hex code, the color in color saturation palette and color hue palette should change', () => {
|
588
|
+
fillInTheGapsOverImageDragAndDropPage.steps.addInputToHexInputField('#ff0000');
|
589
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyHexValue('#ff0000');
|
590
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifySaturationPaletteColor('rgb(255, 0, 0)');
|
591
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
|
592
|
+
});
|
593
|
+
|
594
|
+
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', () => {
|
595
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickOnOpacityGradientHuePalette();
|
596
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityGradientPaletteColor('rgba(255, 0, 0, 0.5)');
|
597
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifySelectedColorBlock('rgba(255, 0, 0, 0.5)');
|
598
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyHexValue('#ff0000');
|
599
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifySaturationPaletteColor('rgb(255, 0, 0)');
|
600
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
|
601
|
+
});
|
602
|
+
|
603
|
+
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', () => {
|
604
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickOnOkButton();
|
605
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dialogBox(), 'notExist');
|
606
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyTextColorOfTextBox('rgba(255, 0, 0, 0.5)');
|
607
|
+
});
|
608
|
+
|
609
|
+
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', () => {
|
610
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickOnEditColorButton()
|
611
|
+
fillInTheGapsOverImageDragAndDropPage.steps.addInputToHexInputField('#00002E');
|
612
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickOnCancelButton();
|
613
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dialogBox(), 'notExist');
|
614
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyTextColorOfTextBox('rgba(255, 0, 0, 0.5)');
|
615
|
+
});
|
616
|
+
});
|
617
|
+
|
618
|
+
describe('Canvas : Select dropzone, Insert dropzone, Insert text, Undo, Redo and Clear all - Preview tab functionality', () => {
|
619
|
+
abortEarlySetup();
|
620
|
+
before(() => {
|
621
|
+
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
|
622
|
+
cy.barsPreLoaderWait();
|
623
|
+
fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
|
624
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
|
625
|
+
});
|
626
|
+
|
627
|
+
it('When user insert dropzone in edit tab, then dropzone should be visible in preview tab', () => {
|
628
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(20);
|
629
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(90);
|
630
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
|
631
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzoneInPreviewTab(), 'visible');
|
632
|
+
});
|
633
|
+
|
634
|
+
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', () => {
|
635
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
|
636
|
+
fillInTheGapsOverImageDragAndDropPage.steps.selectDropzone(0);
|
637
|
+
fillInTheGapsOverImageDragAndDropPage.steps.selectDropzonePointerStyle(dropzonePointerStyles[1]);
|
638
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
|
639
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzonePointerStyleInPreviewTab(dropzonePointerStyles[1], 0);
|
640
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzonePointerStyleInPreviewTab(dropzonePointerStyles[8], 1);
|
641
|
+
});
|
642
|
+
|
643
|
+
it('When user insert text and changes color for text in edit tab, then inserted text should be displayed in canvas in preview tab', () => {
|
644
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
|
645
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertTextArea(60, 'Inserted text');
|
646
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
|
647
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyTextBoxExistInPreviewTab();
|
648
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyTextColorOfTextBoxInPreviewTab('rgb(0, 0, 46)');
|
649
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyTextOfTextBoxInPreviewTab('Inserted text');
|
650
|
+
});
|
651
|
+
|
652
|
+
it('When the user clicks on the undo button in edit tab, then previous action should be reversed and same should reflect in preview tab', () => {
|
653
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
|
654
|
+
fillInTheGapsOverImageDragAndDropPage.steps.undoAction();
|
655
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
|
656
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyTextOfTextBoxInPreviewTab('');
|
657
|
+
});
|
658
|
+
|
659
|
+
it('When the user clicks on the redo button in edit tab, then previous action should be reinstated and same should reflect in preview tab', () => {
|
660
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
|
661
|
+
fillInTheGapsOverImageDragAndDropPage.steps.redoAction();
|
662
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
|
663
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyTextBoxExistInPreviewTab();
|
664
|
+
});
|
665
|
+
|
666
|
+
it('When user clicks on \'Clear all\' button, then all dropzones should be deleted in preview tab', () => {
|
667
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
|
668
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clearAll();
|
669
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
|
670
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyTextBoxNotExistInPreviewTab();
|
671
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneNotExistInPreviewTab();
|
672
|
+
});
|
673
|
+
});
|
674
|
+
|
178
675
|
describe('Image properties section - Edit tab', () => {
|
179
676
|
abortEarlySetup();
|
180
677
|
before(() => {
|
@@ -217,7 +714,7 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
217
714
|
|
218
715
|
it('\'Opacity\' label, slider and input field should be displayed. \'Opacity\' slider and input field should be set to 100 percent by default', () => {
|
219
716
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyDefaultOpacityLabelSliderAndInputField();
|
220
|
-
fillInTheGapsOverImageDragAndDropPage.steps.
|
717
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyValueOfOpacitySlider(100);
|
221
718
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityInputFieldValue(100);
|
222
719
|
});
|
223
720
|
|
@@ -226,37 +723,18 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
226
723
|
});
|
227
724
|
|
228
725
|
it('When the user changes the opacity slider value, value in the opacity input field should also change', () => {
|
229
|
-
fillInTheGapsOverImageDragAndDropPage.steps.
|
230
|
-
fillInTheGapsOverImageDragAndDropPage.steps.
|
726
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickActionOnOpacitySlider();
|
727
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyValueOfOpacitySlider(50);
|
231
728
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityInputFieldValue(50);
|
232
729
|
});
|
233
730
|
|
234
731
|
it('When the user changes value in the opacity input field, the slider value should also change accordingly', () => {
|
235
732
|
fillInTheGapsOverImageDragAndDropPage.steps.enterInputToOpacityInputField(85);
|
236
733
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityInputFieldValue(85);
|
237
|
-
fillInTheGapsOverImageDragAndDropPage.steps.
|
238
|
-
});
|
239
|
-
|
240
|
-
it('CSS of \'Opacity\' Section in Edit tab', { tags: 'css' }, () => {
|
241
|
-
utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.opacityLabel(), {
|
242
|
-
'color': css.color.labels,
|
243
|
-
'font-size': css.fontSize.normal,
|
244
|
-
'font-weight': css.fontWeight.semibold
|
245
|
-
});
|
246
|
-
utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.opacityInputField(), {
|
247
|
-
'color': css.color.labels,
|
248
|
-
'font-size': css.fontSize.default,
|
249
|
-
'font-weight': css.fontWeight.regular
|
250
|
-
});
|
251
|
-
utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.opacitySlider(), {
|
252
|
-
'color': css.color.activeButtons,
|
253
|
-
'font-weight': css.fontWeight.regular
|
254
|
-
});
|
734
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyValueOfOpacitySlider(85);
|
255
735
|
});
|
256
736
|
|
257
|
-
|
258
|
-
cy.checkAccessibility(fillInTheGapsOverImageDragAndDropPage.opacityLabel().parents('.MuiGrid-root'));
|
259
|
-
});
|
737
|
+
fillInTheGapsOverImageDragAndDropPage.tests.verifyOpacityCSSAndA11y()
|
260
738
|
|
261
739
|
it('\'Image alternative text\' label and input field should be displayed. By default input field should be empty', () => {
|
262
740
|
utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.imageAlternativeTextLabel(), 'Image alternative text');
|
@@ -275,7 +753,7 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
275
753
|
});
|
276
754
|
});
|
277
755
|
|
278
|
-
describe('Image properties section -
|
756
|
+
describe('Image properties section - Edit tab canvas section functionality', () => {
|
279
757
|
abortEarlySetup();
|
280
758
|
before(() => {
|
281
759
|
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
|
@@ -309,7 +787,7 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
309
787
|
});
|
310
788
|
|
311
789
|
it('When user changes opacity slider value , then opacity for image should be updated accordingly', () => {
|
312
|
-
fillInTheGapsOverImageDragAndDropPage.steps.
|
790
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickActionOnOpacitySlider();
|
313
791
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityValueForCanvasImage(50);
|
314
792
|
});
|
315
793
|
|
@@ -331,7 +809,7 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
331
809
|
});
|
332
810
|
});
|
333
811
|
|
334
|
-
describe('Canvas width, Canvas height, Image alternative text -
|
812
|
+
describe('Canvas width, Canvas height, Image alternative text - Edit tab canvas section functionality', () => {
|
335
813
|
abortEarlySetup();
|
336
814
|
before(() => {
|
337
815
|
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
|
@@ -420,7 +898,7 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
420
898
|
|
421
899
|
it('When user changes opacity slider value in edit tab, then opacity for canvas image should change accordingly in preview tab ', () => {
|
422
900
|
fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
|
423
|
-
fillInTheGapsOverImageDragAndDropPage.steps.
|
901
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickActionOnOpacitySlider();
|
424
902
|
fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
|
425
903
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyOpacityValueForCanvasImageInPreviewTab(50);
|
426
904
|
});
|
package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js
CHANGED
@@ -27,6 +27,8 @@ describe('Preview tab contents for all views', () => {
|
|
27
27
|
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
|
28
28
|
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(40);
|
29
29
|
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(80);
|
30
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertTextArea(20);
|
31
|
+
fillInTheGapsOverImageDragAndDropPage.steps.enterTextInTextArea('This is a text area');
|
30
32
|
cy.log('Add image to option input field')
|
31
33
|
fillInTheGapsOverImageDragAndDropPage.steps.focusInOptionsInputField(0);
|
32
34
|
fillInTheGapsOverImageDragAndDropPage.steps.selectImageOptionFromCKEditorToolbar();
|
@@ -83,6 +85,10 @@ describe('Preview tab contents for all views', () => {
|
|
83
85
|
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.questionInstructionsText(), 'visible');
|
84
86
|
});
|
85
87
|
|
88
|
+
it('The text area should be displayed on the image canvas', () => {
|
89
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyTextInTextAreaPreviewTab('This is a text area');
|
90
|
+
});
|
91
|
+
|
86
92
|
it('The image uploaded in the \'Background image\' section should be displayed', () => {
|
87
93
|
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.canvasImage(), 'visible');
|
88
94
|
});
|