itemengine-cypress-automation 1.0.38 → 1.0.40
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesAdditionalSettings.js +0 -669
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesAdditionalSettingsBasic.js +317 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesAdditionalSettingsRowProperties.js +372 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesCategoriesSection.js +275 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesEditTabScoringTypes.js +0 -58
- package/cypress/e2e/ILC/FeedbackScale/feedbackScaleAdditionalSettings.js +0 -110
- package/cypress/e2e/ILC/FeedbackScale/feedbackScaleAdditionalSettingsBasic.js +120 -0
- package/cypress/e2e/ILC/FeedbackScale/feedbackScaleColorPopup.js +237 -0
- package/package.json +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsAllOrNothing.js +0 -143
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsPartialScoreForEachCell.js +0 -145
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsPartialScoreForEachResponse.js +0 -141
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsTotalScoreDividedBetweenCell.js +0 -165
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsTotalScoreDividedBetweenResponses.js +0 -420
package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesAdditionalSettings.js
CHANGED
@@ -2,42 +2,16 @@ import { dragAndDropIntoCategoriesPage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
4
4
|
const css = Cypress.env('css');
|
5
|
-
const optionsArray = ['Bat', 'Eagle', 'Parrot', 'Whale'];
|
6
5
|
const answerNumerationDropdownOptions = ['Numerical', 'Uppercase alphabet', 'Lowercase alphabet'];
|
7
6
|
const numbers = ['1', '2', '3', '4'];
|
8
7
|
const lowercase = ['a', 'b', 'c', 'd'];
|
9
8
|
const uppercase = ['A', 'B', 'C', 'D'];
|
10
|
-
const fontSizeDropdownOptions = ['Default', 'Small', 'Normal', 'Large', 'Extra large', 'Huge'];
|
11
|
-
const fontSizes = ['16px', '12px', '14px', '17px', '20px', '24px'];
|
12
9
|
|
13
10
|
describe('Create item page: Drag and drop into categories: Additional settings', () => {
|
14
11
|
before(() => {
|
15
12
|
cy.loginAs('admin');
|
16
13
|
});
|
17
14
|
|
18
|
-
describe('Additional settings accordion', () => {
|
19
|
-
abortEarlySetup();
|
20
|
-
before(() => {
|
21
|
-
cy.log('Navigate to Drag and drop into categories question type');
|
22
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
23
|
-
});
|
24
|
-
|
25
|
-
dragAndDropIntoCategoriesPage.tests.verifyAdditonalSettingsAccordionProperties();
|
26
|
-
});
|
27
|
-
|
28
|
-
describe('Additional settings: Student response area and layout', () => {
|
29
|
-
abortEarlySetup();
|
30
|
-
before(() => {
|
31
|
-
cy.log('Navigate to Drag and drop into categories question type');
|
32
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
33
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
34
|
-
});
|
35
|
-
|
36
|
-
dragAndDropIntoCategoriesPage.tests.verifyStudentResponseAreaAndLayoutLabelAndCSS();
|
37
|
-
|
38
|
-
//Note: a11y covered in verifyAdditonalSettingsAccordionProperties
|
39
|
-
});
|
40
|
-
|
41
15
|
describe('Additional settings: Response option placement - Contents', () => {
|
42
16
|
abortEarlySetup();
|
43
17
|
before(() => {
|
@@ -200,368 +174,6 @@ describe('Create item page: Drag and drop into categories: Additional settings',
|
|
200
174
|
dragAndDropIntoCategoriesPage.tests.verifyCategoryCellsNumerationNotDisplayedWhenCheckAnswerIsSelected(lowercase)
|
201
175
|
});
|
202
176
|
|
203
|
-
describe('Additional settings: \'Row title width (px)\' - Contents', () => {
|
204
|
-
abortEarlySetup();
|
205
|
-
before(() => {
|
206
|
-
cy.log('Navigate to Drag and drop into categories question type');
|
207
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
208
|
-
cy.barsPreLoaderWait();
|
209
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowInputField(0, 'Can fly');
|
210
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
211
|
-
});
|
212
|
-
|
213
|
-
it('\'Row title width (px)\' label and input field should be displayed. By default, the \'Row title width\' input field should be empty', () => {
|
214
|
-
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.rowTitleWidthLabel(), 'Row title width (px)');
|
215
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowTitleWidthLabel(), 'visible');
|
216
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowTitleWidthInputField(), 'visible');
|
217
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthInputFieldValue('');
|
218
|
-
});
|
219
|
-
|
220
|
-
it('CSS of \'Row title width (px)\' contents', { tags: 'css' }, () => {
|
221
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.rowTitleWidthLabel(), {
|
222
|
-
'color': css.color.labels,
|
223
|
-
'font-size': css.fontSize.normal,
|
224
|
-
'font-weight': css.fontWeight.semibold
|
225
|
-
});
|
226
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.rowTitleWidthInputField(), {
|
227
|
-
'color': css.color.text,
|
228
|
-
'font-size': css.fontSize.default,
|
229
|
-
'font-weight': css.fontWeight.regular
|
230
|
-
});
|
231
|
-
});
|
232
|
-
|
233
|
-
//Note: a11y covered in verifyAdditonalSettingsAccordionProperties
|
234
|
-
|
235
|
-
it('The user should only be able to enter only numeric value in the \'Row title width\' input field', () => {
|
236
|
-
dragAndDropIntoCategoriesPage.steps.clearTextInRowTitleWidthInputField();
|
237
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowTitleWidthInputField('a!1b#c4d0');
|
238
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthInputFieldValue(140);
|
239
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthSetCorrectAnswerSection(140);
|
240
|
-
});
|
241
|
-
});
|
242
|
-
|
243
|
-
//https://redmine.zeuslearning.com/issues/547937
|
244
|
-
describe('Additional settings: \'Row title width (px)\' - Set correct answer section', () => {
|
245
|
-
abortEarlySetup();
|
246
|
-
before(() => {
|
247
|
-
cy.log('Navigate to Drag and drop into categories question type');
|
248
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
249
|
-
cy.barsPreLoaderWait();
|
250
|
-
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
251
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints('20');
|
252
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
253
|
-
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
254
|
-
});
|
255
|
-
|
256
|
-
it('When the user has not set any value in the \'Row title width\' input field, the width of the row title should be 64px by default', () => {
|
257
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthSetCorrectAnswerSection(64);
|
258
|
-
});
|
259
|
-
|
260
|
-
it('When the user enters a numeric value in the \'Row title width\' input field, the row title width should get updated accordingly', () => {
|
261
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowTitleWidthInputField(100);
|
262
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthInputFieldValue(100);
|
263
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthSetCorrectAnswerSection(100);
|
264
|
-
});
|
265
|
-
|
266
|
-
it('When the users adds a value greater than 400, the entered value should automatically update to 400 and the row title width should change to 400px', () => {
|
267
|
-
dragAndDropIntoCategoriesPage.steps.clearTextInRowTitleWidthInputField();
|
268
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowTitleWidthInputField(500);
|
269
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthInputFieldValue(400);
|
270
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthSetCorrectAnswerSection(400);
|
271
|
-
});
|
272
|
-
|
273
|
-
it('When user clears the \'Row title width\' input field, the row title width should change back to the default value', () => {
|
274
|
-
dragAndDropIntoCategoriesPage.steps.clearTextInRowTitleWidthInputField();
|
275
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthSetCorrectAnswerSection(64);
|
276
|
-
});
|
277
|
-
|
278
|
-
it('When the users adds a value less than 64, the entered value should automatically update to 64 and the row title width should change to 64px', () => {
|
279
|
-
dragAndDropIntoCategoriesPage.steps.clearTextInRowTitleWidthInputField();
|
280
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowTitleWidthInputField(50);
|
281
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthInputFieldValue(64);
|
282
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthSetCorrectAnswerSection(64);
|
283
|
-
});
|
284
|
-
});
|
285
|
-
|
286
|
-
describe('Additional settings: \'Row title width (px)\' - Preview tab', () => {
|
287
|
-
abortEarlySetup();
|
288
|
-
before(() => {
|
289
|
-
cy.log('Navigate to Drag and drop into categories question type');
|
290
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
291
|
-
cy.barsPreLoaderWait();
|
292
|
-
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
293
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints('20');
|
294
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
295
|
-
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
296
|
-
});
|
297
|
-
|
298
|
-
it('When the user has not set any value in the \'Row title width\' input field, the width of the row title should be 64px by default in the preview tab', () => {
|
299
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
300
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthPreviewTab(64);
|
301
|
-
});
|
302
|
-
|
303
|
-
it('When the user enters a numeric value in the \'Row title width\' input field, the row title width should get updated accordingly in the preview tab', () => {
|
304
|
-
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
305
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowTitleWidthInputField(100);
|
306
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthInputFieldValue(100);
|
307
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
308
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthPreviewTab(100);
|
309
|
-
});
|
310
|
-
|
311
|
-
it('When user clears the \'Row title width\' input field, the row title width should change back to the default value in the preview tab', () => {
|
312
|
-
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
313
|
-
dragAndDropIntoCategoriesPage.steps.clearTextInRowTitleWidthInputField();
|
314
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
315
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthPreviewTab(64);
|
316
|
-
});
|
317
|
-
|
318
|
-
it('When the users adds a value greater than 400, the entered value should automatically update to 400 and the row title width should change to 400px in the preview tab', () => {
|
319
|
-
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
320
|
-
dragAndDropIntoCategoriesPage.steps.clearTextInRowTitleWidthInputField();
|
321
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowTitleWidthInputField(500);
|
322
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthInputFieldValue(400);
|
323
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
324
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthPreviewTab(400);
|
325
|
-
});
|
326
|
-
|
327
|
-
it('When the users adds a value less than 64, the entered value should automatically update to 64 and the row title width should change to 64px in the preview tab', () => {
|
328
|
-
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
329
|
-
dragAndDropIntoCategoriesPage.steps.clearTextInRowTitleWidthInputField();
|
330
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowTitleWidthInputField(50);
|
331
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthInputFieldValue(64);
|
332
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
333
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthPreviewTab(64);
|
334
|
-
});
|
335
|
-
});
|
336
|
-
|
337
|
-
describe('Additional settings: \'Row minimum height (px)\' - Contents', () => {
|
338
|
-
abortEarlySetup();
|
339
|
-
before(() => {
|
340
|
-
cy.log('Navigate to Drag and drop into categories question type');
|
341
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
342
|
-
cy.barsPreLoaderWait();
|
343
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
344
|
-
});
|
345
|
-
|
346
|
-
it('\'Row minimum height (px)\' label and input field should be displayed. By default, the \'Row minimum height\' input field should be empty', () => {
|
347
|
-
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.rowMinHeightLabel(), 'Row minimum height (px)');
|
348
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowMinHeightLabel(), 'visible');
|
349
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowMinHeightInputField(), 'visible');
|
350
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightInputFieldValue('');
|
351
|
-
});
|
352
|
-
|
353
|
-
it('CSS of \'Row minimum height (px)\' contents', { tags: 'css' }, () => {
|
354
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.rowMinHeightLabel(), {
|
355
|
-
'color': css.color.labels,
|
356
|
-
'font-size': css.fontSize.normal,
|
357
|
-
'font-weight': css.fontWeight.semibold
|
358
|
-
});
|
359
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.rowMinHeightInputField(), {
|
360
|
-
'color': css.color.text,
|
361
|
-
'font-size': css.fontSize.default,
|
362
|
-
'font-weight': css.fontWeight.regular
|
363
|
-
});
|
364
|
-
});
|
365
|
-
|
366
|
-
//Note: a11y covered in verifyAdditonalSettingsAccordionProperties
|
367
|
-
|
368
|
-
it('The user should only be able to enter only numeric value in the \'Row minimum height\' input field', () => {
|
369
|
-
dragAndDropIntoCategoriesPage.steps.clearTextInRowMinHeightInputField();
|
370
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowMinHeightInputField('a!1b#c4d0');
|
371
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightInputFieldValue(140);
|
372
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightSetCorrectAnswerSection(140);
|
373
|
-
});
|
374
|
-
});
|
375
|
-
|
376
|
-
describe('Additional settings: \'Row minimum height (px)\' - Set correct answer section', () => {
|
377
|
-
abortEarlySetup();
|
378
|
-
before(() => {
|
379
|
-
cy.log('Navigate to Drag and drop into categories question type');
|
380
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
381
|
-
cy.barsPreLoaderWait();
|
382
|
-
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
383
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints('20');
|
384
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
385
|
-
});
|
386
|
-
|
387
|
-
it('\'Row minimum height (px)\' label and input field should be displayed. By default, the \'Row minimum height\' input field should be empty', () => {
|
388
|
-
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.rowMinHeightLabel(), 'Row minimum height (px)');
|
389
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowMinHeightLabel(), 'visible');
|
390
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowMinHeightInputField(), 'visible');
|
391
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightInputFieldValue('');
|
392
|
-
});
|
393
|
-
|
394
|
-
it('When the user has not set any value in the \'Row minimum height\' input field, the minimum row height should be 100px by default', () => {
|
395
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightSetCorrectAnswerSection(100);
|
396
|
-
});
|
397
|
-
|
398
|
-
it('When the user enters a numeric value in the \'Row minimum height\' input field, the minimum row height should get updated accordingly', () => {
|
399
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowMinHeightInputField(200);
|
400
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightInputFieldValue(200);
|
401
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightSetCorrectAnswerSection(200);
|
402
|
-
});
|
403
|
-
|
404
|
-
it('When user clears the \'Row minimum height\' input field, the minimum row height should change back to the default value', () => {
|
405
|
-
dragAndDropIntoCategoriesPage.steps.clearTextInRowMinHeightInputField();
|
406
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightSetCorrectAnswerSection(100);
|
407
|
-
});
|
408
|
-
|
409
|
-
it('When the users adds a value greater than 400, the entered value should automatically update to 400 and the minimum row height should change to 400px', () => {
|
410
|
-
dragAndDropIntoCategoriesPage.steps.clearTextInRowMinHeightInputField();
|
411
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowMinHeightInputField(500);
|
412
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightInputFieldValue(400);
|
413
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightSetCorrectAnswerSection(400);
|
414
|
-
});
|
415
|
-
|
416
|
-
it('When the users adds a value less than 50, the entered value should automatically update to 50 and the minimum row height should change to 50px', () => {
|
417
|
-
dragAndDropIntoCategoriesPage.steps.clearTextInRowMinHeightInputField();
|
418
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowMinHeightInputField(40);
|
419
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightInputFieldValue(50);
|
420
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightSetCorrectAnswerSection(50);
|
421
|
-
});
|
422
|
-
});
|
423
|
-
|
424
|
-
describe('Additional settings: \'Row minimum height (px)\' - Preview tab', () => {
|
425
|
-
abortEarlySetup();
|
426
|
-
before(() => {
|
427
|
-
cy.log('Navigate to Drag and drop into categories question type');
|
428
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
429
|
-
cy.barsPreLoaderWait();
|
430
|
-
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
431
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints('20');
|
432
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
433
|
-
});
|
434
|
-
|
435
|
-
it('When the user has not set any value in the \'Row minimum height\' input field, the minimum row height should be 100px by default in the preview tab', () => {
|
436
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
437
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightPreviewTab(100);
|
438
|
-
});
|
439
|
-
|
440
|
-
it('When the user enters a numeric value in the \'Row minimum height\' input field, the minimum row height should get updated accordingly in the preview tab', () => {
|
441
|
-
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
442
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowMinHeightInputField(200);
|
443
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
444
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightPreviewTab(200);
|
445
|
-
});
|
446
|
-
|
447
|
-
it('When user clears the \'Row minimum height\' input field, the minimum row height should change back to the default value in the preview tab', () => {
|
448
|
-
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
449
|
-
dragAndDropIntoCategoriesPage.steps.clearTextInRowMinHeightInputField();
|
450
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
451
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightPreviewTab(100);
|
452
|
-
});
|
453
|
-
|
454
|
-
it('When the users adds a value greater than 400, the entered value should automatically update to 400 and the minimum row height should change to 400px in the preview tab', () => {
|
455
|
-
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
456
|
-
dragAndDropIntoCategoriesPage.steps.clearTextInRowMinHeightInputField();
|
457
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowMinHeightInputField(500);
|
458
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightInputFieldValue(400);
|
459
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
460
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightPreviewTab(400);
|
461
|
-
});
|
462
|
-
|
463
|
-
it('When the users adds a value less than 50, the entered value should automatically update to 50 and the minimum row height should change to 50px in the preview tab', () => {
|
464
|
-
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
465
|
-
dragAndDropIntoCategoriesPage.steps.clearTextInRowMinHeightInputField();
|
466
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowMinHeightInputField(40);
|
467
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightInputFieldValue(50);
|
468
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
469
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightPreviewTab(50);
|
470
|
-
});
|
471
|
-
});
|
472
|
-
|
473
|
-
describe('Additional settings: \'Row heading\' - Contents', () => {
|
474
|
-
abortEarlySetup();
|
475
|
-
before(() => {
|
476
|
-
cy.log('Navigate to Drag and drop into categories question type');
|
477
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
478
|
-
cy.barsPreLoaderWait();
|
479
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
480
|
-
});
|
481
|
-
|
482
|
-
it('\'Row heading\' label and input field should be displayed. By default, the \'Row heading\' input field should be empty', () => {
|
483
|
-
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.rowHeadingLabel(), 'Row heading');
|
484
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowHeadingLabel(), 'visible');
|
485
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowHeadingInputField(), 'visible');
|
486
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowHeadingInputFieldValue('');
|
487
|
-
});
|
488
|
-
|
489
|
-
it('CSS of \'Row heading\' contents', { tags: 'css' }, () => {
|
490
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.rowHeadingLabel(), {
|
491
|
-
'color': css.color.labels,
|
492
|
-
'font-size': css.fontSize.normal,
|
493
|
-
'font-weight': css.fontWeight.semibold
|
494
|
-
});
|
495
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.rowHeadingInputField(), {
|
496
|
-
'color': css.color.text,
|
497
|
-
'font-size': css.fontSize.default,
|
498
|
-
'font-weight': css.fontWeight.regular
|
499
|
-
});
|
500
|
-
});
|
501
|
-
|
502
|
-
//Note: a11y covered in verifyAdditonalSettingsAccordionProperties
|
503
|
-
});
|
504
|
-
|
505
|
-
describe('Additional settings: \'Row heading\' - Set correct answer section', () => {
|
506
|
-
abortEarlySetup();
|
507
|
-
before(() => {
|
508
|
-
cy.log('Navigate to Drag and drop into categories question type');
|
509
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
510
|
-
cy.barsPreLoaderWait();
|
511
|
-
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
512
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints('20');
|
513
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
514
|
-
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
515
|
-
});
|
516
|
-
|
517
|
-
it('When the user has not entered any value in the \'Row heading\' input field, Row heading should not be displayed', () => {
|
518
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowHeadingSetCorrectAnswerSection(), 'notExist');
|
519
|
-
});
|
520
|
-
|
521
|
-
it('When the user enters text in the \'Row heading\' input field, a Row heading should be displayed', () => {
|
522
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowHeadingInputField('Row heading');
|
523
|
-
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.rowHeadingSetCorrectAnswerSection(), 'Row heading');
|
524
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowHeadingSetCorrectAnswerSection(), 'visible');
|
525
|
-
});
|
526
|
-
|
527
|
-
it('When user clears the \'Row heading\' input field, the Row heading should disappear', () => {
|
528
|
-
dragAndDropIntoCategoriesPage.steps.clearTextInRowHeadingInputField();
|
529
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowHeadingSetCorrectAnswerSection(), 'notExist');
|
530
|
-
});
|
531
|
-
});
|
532
|
-
|
533
|
-
describe('Additional settings: \'Row heading\' - Preview tab', () => {
|
534
|
-
abortEarlySetup();
|
535
|
-
before(() => {
|
536
|
-
cy.log('Navigate to Drag and drop into categories question type');
|
537
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
538
|
-
cy.barsPreLoaderWait();
|
539
|
-
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
540
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints('20');
|
541
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
542
|
-
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
543
|
-
});
|
544
|
-
|
545
|
-
it('When the user has not entered any value in the \'Row heading\' input field, Row heading should not be displayed in the preview tab', () => {
|
546
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowHeadingPreviewTab(), 'notExist');
|
547
|
-
});
|
548
|
-
|
549
|
-
it('When the user enters text in the \'Row heading\' input field, a Row heading should be displayed in the preview tab', () => {
|
550
|
-
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
551
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowHeadingInputField('Row heading');
|
552
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
553
|
-
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.rowHeadingPreviewTab(), 'Row heading');
|
554
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowHeadingPreviewTab(), 'visible');
|
555
|
-
});
|
556
|
-
|
557
|
-
it('When user clears the \'Row heading\' input field, the Row heading should disappear from the preview tab', () => {
|
558
|
-
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
559
|
-
dragAndDropIntoCategoriesPage.steps.clearTextInRowHeadingInputField();
|
560
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
561
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowHeadingPreviewTab(), 'notExist');
|
562
|
-
});
|
563
|
-
});
|
564
|
-
|
565
177
|
describe('Additional settings: \'Maximum responses per cell\' - Contents', () => {
|
566
178
|
abortEarlySetup();
|
567
179
|
before(() => {
|
@@ -679,285 +291,4 @@ describe('Create item page: Drag and drop into categories: Additional settings',
|
|
679
291
|
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionInCategoryCellOfPreviewTab(1, ['Falcon', 'Peacock', 'Ostrich']);
|
680
292
|
});
|
681
293
|
});
|
682
|
-
|
683
|
-
describe('Additional settings: Font size - Contents', () => {
|
684
|
-
abortEarlySetup();
|
685
|
-
before(() => {
|
686
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
687
|
-
cy.barsPreLoaderWait();
|
688
|
-
dragAndDropIntoCategoriesPage.steps.addOption();
|
689
|
-
dragAndDropIntoCategoriesPage.steps.addOption();
|
690
|
-
dragAndDropIntoCategoriesPage.steps.addInputToOptionsForDragAndDropFields(optionsArray);
|
691
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints(20);
|
692
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Bat', 0);
|
693
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
|
694
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
|
695
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 3);
|
696
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
697
|
-
});
|
698
|
-
|
699
|
-
dragAndDropIntoCategoriesPage.tests.verifyFontSizeSectionContents();
|
700
|
-
});
|
701
|
-
|
702
|
-
//Note: Will need to work on the font size describes after https://redmine.zeuslearning.com/issues/543473 gets resolved
|
703
|
-
describe('Additional settings: Font size - Set correct answer section', () => {
|
704
|
-
abortEarlySetup();
|
705
|
-
before(() => {
|
706
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
707
|
-
cy.barsPreLoaderWait();
|
708
|
-
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
709
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints(20);
|
710
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Bat', 0);
|
711
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
|
712
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
|
713
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 3);
|
714
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
715
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowHeadingInputField('Row heading');
|
716
|
-
});
|
717
|
-
|
718
|
-
fontSizeDropdownOptions.forEach((option, fontsIndex) => {
|
719
|
-
it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the set correct answer section (options, labels) should be changed to ${option}`, () => {
|
720
|
-
dragAndDropIntoCategoriesPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex)
|
721
|
-
dragAndDropIntoCategoriesPage.fontSizeDropdown()
|
722
|
-
.verifyInnerText(`${option}`);
|
723
|
-
dragAndDropIntoCategoriesPage.setCorrectAnswerDraggableOptionsWrapper('drag and drop into categories')
|
724
|
-
.within(() => {
|
725
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.draggableOption(), {
|
726
|
-
'font-size': fontSizes[fontsIndex]
|
727
|
-
});
|
728
|
-
});
|
729
|
-
dragAndDropIntoCategoriesPage.setCorrectAnswerSectionCategoryGrid()
|
730
|
-
.within(() => {
|
731
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.draggableOption(), {
|
732
|
-
'font-size': fontSizes[fontsIndex]
|
733
|
-
});
|
734
|
-
});
|
735
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.setCorrectAnswerSectionCategoryTitle(), {
|
736
|
-
'font-size': fontSizes[fontsIndex]
|
737
|
-
});
|
738
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.setCorrectAnswerSectionRowTitle(), {
|
739
|
-
'font-size': fontSizes[fontsIndex]
|
740
|
-
});
|
741
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.rowHeadingSetCorrectAnswerSection(), {
|
742
|
-
'font-size': fontSizes[fontsIndex]
|
743
|
-
});
|
744
|
-
});
|
745
|
-
});
|
746
|
-
});
|
747
|
-
|
748
|
-
describe('Additional settings: Font size - Preview tab', () => {
|
749
|
-
abortEarlySetup();
|
750
|
-
before(() => {
|
751
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
752
|
-
cy.barsPreLoaderWait();
|
753
|
-
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
754
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints(20);
|
755
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Bat', 0);
|
756
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
|
757
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
|
758
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 3);
|
759
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
760
|
-
});
|
761
|
-
|
762
|
-
fontSizeDropdownOptions.forEach((option, fontsIndex) => {
|
763
|
-
it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview (options, question instructions question stems) should be changed to ${option} in the preview tab Answer table`, () => {
|
764
|
-
dragAndDropIntoCategoriesPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex);
|
765
|
-
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.fontSizeDropdown(), `${option}`);
|
766
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
767
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.questionInstructionsText(), {
|
768
|
-
'font-size': fontSizes[fontsIndex]
|
769
|
-
});
|
770
|
-
dragAndDropIntoCategoriesPage.previewTabDraggableOptionsWrapper('drag and drop into categories')
|
771
|
-
.within(() => {
|
772
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.draggableOption(), {
|
773
|
-
'font-size': fontSizes[fontsIndex]
|
774
|
-
});
|
775
|
-
});
|
776
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
|
777
|
-
dragAndDropIntoCategoriesPage.previewTabCategoryGrid()
|
778
|
-
.within(() => {
|
779
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.draggableOption(), {
|
780
|
-
'font-size': fontSizes[fontsIndex]
|
781
|
-
});
|
782
|
-
});
|
783
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.previewTabCategoryTitle(), {
|
784
|
-
'font-size': fontSizes[fontsIndex]
|
785
|
-
});
|
786
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.previewTabRowTitle(), {
|
787
|
-
'font-size': fontSizes[fontsIndex]
|
788
|
-
});
|
789
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.rowHeadingPreviewTab(), {
|
790
|
-
'font-size': fontSizes[fontsIndex]
|
791
|
-
});
|
792
|
-
cy.log('Font size of answer numeration and correct answer container when show correct answer is checked')
|
793
|
-
dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
|
794
|
-
dragAndDropIntoCategoriesPage.previewTabCategoryGrid()
|
795
|
-
.within(() => {
|
796
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.categoryCellNumeration(), {
|
797
|
-
'font-size': fontSizes[fontsIndex]
|
798
|
-
});
|
799
|
-
});
|
800
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.correctAnswerLabel(), {
|
801
|
-
'font-size': fontSizes[fontsIndex]
|
802
|
-
});
|
803
|
-
dragAndDropIntoCategoriesPage.correctAnswerContainer()
|
804
|
-
.within(() => {
|
805
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.categoryCellNumeration(), {
|
806
|
-
'font-size': fontSizes[fontsIndex]
|
807
|
-
});
|
808
|
-
});
|
809
|
-
dragAndDropIntoCategoriesPage.correctAnswerContainer()
|
810
|
-
.within(() => {
|
811
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.correctAnswerOption(), {
|
812
|
-
'font-size': fontSizes[fontsIndex]
|
813
|
-
});
|
814
|
-
});
|
815
|
-
cy.log('Uncheck show correct answer checkbox')
|
816
|
-
dragAndDropIntoCategoriesPage.steps.uncheckShowCorrectAnswerCheckbox()
|
817
|
-
cy.log('Font size of answer numeration when check answer is selected')
|
818
|
-
dragAndDropIntoCategoriesPage.steps.checkAnswer()
|
819
|
-
dragAndDropIntoCategoriesPage.previewTabCategoryGrid()
|
820
|
-
.within(() => {
|
821
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.categoryCellNumeration(), {
|
822
|
-
'font-size': fontSizes[fontsIndex]
|
823
|
-
});
|
824
|
-
});
|
825
|
-
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
826
|
-
});
|
827
|
-
});
|
828
|
-
});
|
829
|
-
|
830
|
-
describe('Additional settings: Check answer', () => {
|
831
|
-
abortEarlySetup();
|
832
|
-
before(() => {
|
833
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
834
|
-
cy.barsPreLoaderWait();
|
835
|
-
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
836
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints(20);
|
837
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Bat', 0);
|
838
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
|
839
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
|
840
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 3);
|
841
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
842
|
-
});
|
843
|
-
|
844
|
-
dragAndDropIntoCategoriesPage.tests.verifyCheckAnswerSectionAndPreviewTabCheckAnswerButton();
|
845
|
-
});
|
846
|
-
|
847
|
-
describe('Additional settings: Check answer - Functionality', () => {
|
848
|
-
abortEarlySetup();
|
849
|
-
before(() => {
|
850
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
851
|
-
cy.barsPreLoaderWait();
|
852
|
-
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
853
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints(20);
|
854
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Bat', 0);
|
855
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
|
856
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
|
857
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 3);
|
858
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
859
|
-
dragAndDropIntoCategoriesPage.steps.setMaximumCheckAnswerAttempts(2);
|
860
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
861
|
-
});
|
862
|
-
|
863
|
-
dragAndDropIntoCategoriesPage.tests.verifyCheckAnswerButtonFunctionalityWhenQuestionIsUnattempted();
|
864
|
-
|
865
|
-
it('When the user attempts the question partially correct, then on clicking on the \'Check answer\' button, green check-mark icon should be displayed besides the correct response, red cross-mark should be displayed besides incorrect response and \'Incorrect answer\' label should be displayed below the question preview', () => {
|
866
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
|
867
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
|
868
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 3);
|
869
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
|
870
|
-
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
871
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
872
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
873
|
-
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
|
874
|
-
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(3);
|
875
|
-
dragAndDropIntoCategoriesPage.steps.verifyIncorrectAttemptBorder();
|
876
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
877
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
|
878
|
-
cy.log('Dropping the options back to the options container')
|
879
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfPreviewTab('Whale');
|
880
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfPreviewTab('Platypus');
|
881
|
-
});
|
882
|
-
|
883
|
-
it('When the user attempts the question correctly, then on clicking on the \'Check answer\' button, green check-mark icon should be displayed besides the correct response and \'Correct answer\' label should be displayed below the question preview', () => {
|
884
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
|
885
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 3);
|
886
|
-
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
887
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
888
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
889
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(2);
|
890
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(3);
|
891
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectAttemptBorder();
|
892
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
893
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
|
894
|
-
});
|
895
|
-
|
896
|
-
dragAndDropIntoCategoriesPage.tests.verifyDisabledCheckAnswerButtonWithCSSAnda11y();
|
897
|
-
|
898
|
-
it('When the user updates the value of Maximum check answer attempts input field, it should get reflected on the Preview tab', () => {
|
899
|
-
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
900
|
-
dragAndDropIntoCategoriesPage.steps.clearMaximumCheckAnswerAttemptsInputField();
|
901
|
-
dragAndDropIntoCategoriesPage.steps.addInputToMaximumCheckAnswerAttemptsInputField(1);
|
902
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
903
|
-
dragAndDropIntoCategoriesPage.steps.verifyCheckAnswerButtonEnabled();
|
904
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
|
905
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
|
906
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 3);
|
907
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
|
908
|
-
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
909
|
-
dragAndDropIntoCategoriesPage.steps.verifyCheckAnswerButtonDisabled();
|
910
|
-
});
|
911
|
-
|
912
|
-
it('When the \'Maximum check answer attempts\' input field has value \'0\' and user switches to Preview tab, then the \'Check Answer\' button should be enabled and user should be able to check answer multiple times', () => {
|
913
|
-
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
914
|
-
dragAndDropIntoCategoriesPage.steps.clearMaximumCheckAnswerAttemptsInputField();
|
915
|
-
dragAndDropIntoCategoriesPage.steps.addInputToMaximumCheckAnswerAttemptsInputField(0);
|
916
|
-
cy.log('Switching to Preview tab')
|
917
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
918
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
|
919
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
|
920
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 3);
|
921
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
|
922
|
-
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
923
|
-
dragAndDropIntoCategoriesPage.steps.verifyCheckAnswerButtonEnabled();
|
924
|
-
cy.log('Dropping the options back to the options container')
|
925
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfPreviewTab('Whale');
|
926
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfPreviewTab('Platypus');
|
927
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
|
928
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 3);
|
929
|
-
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
930
|
-
dragAndDropIntoCategoriesPage.steps.verifyCheckAnswerButtonEnabled();
|
931
|
-
});
|
932
|
-
|
933
|
-
it('When the \'Maximum check answer attempts\' input field is empty and user switches to Preview tab, then the \'Check Answer\' button should be enabled and user should be able to check answer multiple times', () => {
|
934
|
-
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
935
|
-
dragAndDropIntoCategoriesPage.steps.clearMaximumCheckAnswerAttemptsInputField()
|
936
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
937
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
|
938
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
|
939
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 3);
|
940
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
|
941
|
-
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
942
|
-
dragAndDropIntoCategoriesPage.steps.verifyCheckAnswerButtonEnabled();
|
943
|
-
cy.log('Dropping the options back to the options container')
|
944
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfPreviewTab('Whale');
|
945
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfPreviewTab('Platypus');
|
946
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
|
947
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 3);
|
948
|
-
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
949
|
-
dragAndDropIntoCategoriesPage.steps.verifyCheckAnswerButtonEnabled();
|
950
|
-
});
|
951
|
-
});
|
952
|
-
|
953
|
-
describe('Additional settings: Details section', () => {
|
954
|
-
abortEarlySetup();
|
955
|
-
before(() => {
|
956
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
957
|
-
cy.barsPreLoaderWait();
|
958
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
959
|
-
});
|
960
|
-
|
961
|
-
dragAndDropIntoCategoriesPage.tests.verifyDetailsSection();
|
962
|
-
});
|
963
294
|
});
|