itemengine-cypress-automation 1.0.39 → 1.0.42
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/{dragAndDropIntoCategoriesRowsAndCategoriesSection.js → dragAndDropIntoCategoriesCategoriesSection.js} +1 -295
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesEditTabScoringTypes.js +0 -58
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesManuallyAndNonScoredEditTabScoring.js +68 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesRowsSection.js +304 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesGroupedOptionsAllOrNothing.js → dragAndDropIntoCategoriesScoringFiles/groupedOptionsAllOrNothing.js} +3 -30
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsAllOrNothingAlternatePointsGreaterThanCorrectPoints.js +33 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsAllOrNothingCorrectPointsEqualToAlternatePoints.js +35 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsAllOrNothingCorrectPointsGreaterThanAlternatePoints.js +33 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsPartialScoreForEachCell.js +39 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsPartialScoreForEachCellAlternatePointsGreaterThanCorrectPoints.js +42 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsPartialScoreForEachCellCorrectPointsEqualToAlternatePoints.js +49 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsPartialScoreForEachCellCorrectPointsGreaterThanAlternatePoints.js +42 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsPartialScoreForEachResponse.js +39 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsPartialScoreForEachResponseAlternatePointsGreaterThanCorrectPoints.js +41 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsPartialScoreForEachResponseCorrectPointsEqualToAlternatePoints.js +47 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsPartialScoreForEachResponseCorrectPointsGreaterThanAlternatePoints.js +41 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsTotalScoreDividedBetweenCell.js +57 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsTotalScoreDividedBetweenCellsAlternatePointsGreaterThanCorrectPoints.js +43 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsTotalScoreDividedBetweenCellsCorrectPointsEqualToAlternatePoints.js +49 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsTotalScoreDividedBetweenCellsCorrectPointsGreaterThanAlternatePoints.js +43 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsTotalScoreDividedBetweenResponses.js +57 -0
- package/package.json +1 -1
- 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
@@ -1,31 +1,12 @@
|
|
1
1
|
import { dragAndDropIntoCategoriesPage } from "../../../pages";
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
3
|
const css = Cypress.env('css');
|
4
|
+
|
4
5
|
describe('Create Item page - Drag and drop into categories: Question instructions, Category, Row', () => {
|
5
6
|
before(() => {
|
6
7
|
cy.loginAs('admin');
|
7
8
|
});
|
8
9
|
|
9
|
-
describe('Question Instructions input field - Edit tab', () => {
|
10
|
-
abortEarlySetup();
|
11
|
-
before(() => {
|
12
|
-
cy.log('Navigating to drag and drop into categories question type');
|
13
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
14
|
-
});
|
15
|
-
|
16
|
-
dragAndDropIntoCategoriesPage.tests.verifyQuestionInstructionsInputFieldEditTab();
|
17
|
-
});
|
18
|
-
|
19
|
-
describe('Question Instructions input field - Preview tab', () => {
|
20
|
-
abortEarlySetup();
|
21
|
-
before(() => {
|
22
|
-
cy.log('Navigating to drag and drop into categories question type');
|
23
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
24
|
-
});
|
25
|
-
|
26
|
-
dragAndDropIntoCategoriesPage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
|
27
|
-
});
|
28
|
-
|
29
10
|
describe('Category - Basic', () => {
|
30
11
|
abortEarlySetup();
|
31
12
|
before(() => {
|
@@ -291,279 +272,4 @@ describe('Create Item page - Drag and drop into categories: Question instruction
|
|
291
272
|
|
292
273
|
});
|
293
274
|
});
|
294
|
-
|
295
|
-
describe('Row - Basic', () => {
|
296
|
-
abortEarlySetup();
|
297
|
-
before(() => {
|
298
|
-
cy.log('Navigating to drag and drop into categories question type');
|
299
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
300
|
-
cy.barsPreLoaderWait();
|
301
|
-
});
|
302
|
-
|
303
|
-
it('\'Row\' label should be displayed', () => {
|
304
|
-
dragAndDropIntoCategoriesPage.rowLabel()
|
305
|
-
.verifyInnerText('Row')
|
306
|
-
.should('be.visible');
|
307
|
-
});
|
308
|
-
|
309
|
-
it('By default, 1 empty \'Row\' input field with \'Enter Row title\' placeholder text, numeration and disabled \'Delete row\' icon button should be displayed', () => {
|
310
|
-
dragAndDropIntoCategoriesPage.steps.verifyCountOfRowInputFields(1);
|
311
|
-
dragAndDropIntoCategoriesPage.steps.verifyDefaultStateOfRowInputField(0);
|
312
|
-
dragAndDropIntoCategoriesPage.steps.verifyDisabledDeleteRowButton(0);
|
313
|
-
});
|
314
|
-
|
315
|
-
it('The user should be able to enter text in the \'Row\' input field and when the user enters text in the input field, the placeholder should disappear', () => {
|
316
|
-
dragAndDropIntoCategoriesPage.steps.verifyPlaceholderTextInRowInputField(0);
|
317
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowInputField(0, 'Row 1');
|
318
|
-
dragAndDropIntoCategoriesPage.steps.verifyPlaceholderTextNotExistInRowInputField(0);
|
319
|
-
});
|
320
|
-
|
321
|
-
it('CSS of \'Row\' section', { tags: 'css' }, () => {
|
322
|
-
dragAndDropIntoCategoriesPage.rowLabel()
|
323
|
-
.verifyCSS(css.color.sectionHeading, css.fontSize.normal, css.fontWeight.semibold);
|
324
|
-
dragAndDropIntoCategoriesPage.rowInputField()
|
325
|
-
.parents('[class*="OptionsComponentstyles__TitleWrapper"]')
|
326
|
-
.within(() => {
|
327
|
-
dragAndDropIntoCategoriesPage.deleteButton()
|
328
|
-
.should('have.css', 'opacity', '0.5')
|
329
|
-
.verifyPseudoClassBeforeProperty('color', css.color.deleteIcon);
|
330
|
-
dragAndDropIntoCategoriesPage.rowInputField()
|
331
|
-
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
332
|
-
});
|
333
|
-
dragAndDropIntoCategoriesPage.addRowButton()
|
334
|
-
.verifyCSS(css.color.secondaryBtnActive, css.fontSize.default, css.fontWeight.medium);
|
335
|
-
});
|
336
|
-
|
337
|
-
it('When the user hovers disabled \'Delete row\' icon button of the row input field, \'Minimum one row is required\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the \'Delete row\' icon button', () => {
|
338
|
-
dragAndDropIntoCategoriesPage.steps.verifyDisabledRowInputFieldTooltip();
|
339
|
-
});
|
340
|
-
|
341
|
-
it('CSS of disabled \'Delete row\' tooltip', { tags: 'css' }, () => {
|
342
|
-
dragAndDropIntoCategoriesPage.rowInputField()
|
343
|
-
.parents('[class*="OptionsComponentstyles__TitleWrapper"]')
|
344
|
-
.within(() => {
|
345
|
-
dragAndDropIntoCategoriesPage.deleteButton()
|
346
|
-
.trigger('mouseover', { force: true });
|
347
|
-
});
|
348
|
-
dragAndDropIntoCategoriesPage.tooltipText()
|
349
|
-
.should('be.visible')
|
350
|
-
.verifyCSS(css.color.whiteText, css.fontSize.normal, css.fontWeight.regular);
|
351
|
-
dragAndDropIntoCategoriesPage.rowInputField()
|
352
|
-
.parents('[class*="OptionsComponentstyles__TitleWrapper"]')
|
353
|
-
.within(() => {
|
354
|
-
dragAndDropIntoCategoriesPage.deleteButton()
|
355
|
-
.trigger('mouseout', { force: true });
|
356
|
-
});
|
357
|
-
dragAndDropIntoCategoriesPage.tooltipText()
|
358
|
-
.should('not.exist');
|
359
|
-
});
|
360
|
-
|
361
|
-
it('Accessibility of disabled \'Delete row\' tooltip', { tags: 'a11y' }, () => {
|
362
|
-
dragAndDropIntoCategoriesPage.rowInputField()
|
363
|
-
.parents('[class*="OptionsComponentstyles__TitleWrapper"]')
|
364
|
-
.within(() => {
|
365
|
-
dragAndDropIntoCategoriesPage.deleteButton()
|
366
|
-
.trigger('mouseover', { force: true });
|
367
|
-
});
|
368
|
-
cy.checkAccessibility(dragAndDropIntoCategoriesPage.tooltipText());
|
369
|
-
dragAndDropIntoCategoriesPage.rowInputField()
|
370
|
-
.parents('[class*="OptionsComponentstyles__TitleWrapper"]')
|
371
|
-
.within(() => {
|
372
|
-
dragAndDropIntoCategoriesPage.deleteButton()
|
373
|
-
.trigger('mouseout', { force: true });
|
374
|
-
});
|
375
|
-
dragAndDropIntoCategoriesPage.tooltipText()
|
376
|
-
.should('not.exist');
|
377
|
-
});
|
378
|
-
|
379
|
-
it('\'Add row\' button should be present', () => {
|
380
|
-
dragAndDropIntoCategoriesPage.addRowButton()
|
381
|
-
.verifyInnerText('Add row')
|
382
|
-
.should('be.visible');
|
383
|
-
});
|
384
|
-
|
385
|
-
it('When user adds a row using the \'Add row\' button then added row input field should be empty and displayed with \'Enter Row title\' placeholder text, option numeration and delete button', () => {
|
386
|
-
dragAndDropIntoCategoriesPage.steps.addRow();
|
387
|
-
dragAndDropIntoCategoriesPage.steps.verifyCountOfRowInputFields(2);
|
388
|
-
dragAndDropIntoCategoriesPage.steps.verifyDefaultStateOfRowInputField(1);
|
389
|
-
dragAndDropIntoCategoriesPage.steps.verifyEnabledDeleteRowButton(1);
|
390
|
-
dragAndDropIntoCategoriesPage.steps.verifyNumerationOfRowInputFields();
|
391
|
-
});
|
392
|
-
|
393
|
-
it('When the user focuses in and out of the \'Row\' input field, no error message should appear', () => {
|
394
|
-
dragAndDropIntoCategoriesPage.steps.focusInAndFocusOutOfRowInputField(1)
|
395
|
-
dragAndDropIntoCategoriesPage.steps.verifyErrorMessageIsNotDisplayed();
|
396
|
-
});
|
397
|
-
|
398
|
-
it('When more than 1 row input fields are present, the \'Delete row\' icon buttons of the row input field should get enabled', () => {
|
399
|
-
dragAndDropIntoCategoriesPage.steps.verifyEnabledDeleteRowButton(0);
|
400
|
-
dragAndDropIntoCategoriesPage.steps.verifyEnabledDeleteRowButton(1);
|
401
|
-
});
|
402
|
-
|
403
|
-
it('CSS of enabled \'Delete row\' icon button', { tags: 'css' }, () => {
|
404
|
-
dragAndDropIntoCategoriesPage.rowInputField()
|
405
|
-
.eq(0)
|
406
|
-
.parents('[class*="OptionsComponentstyles__TitleWrapper"]')
|
407
|
-
.within(() => {
|
408
|
-
dragAndDropIntoCategoriesPage.deleteButton()
|
409
|
-
.should('have.css', 'opacity', '1')
|
410
|
-
.verifyPseudoClassBeforeProperty('color', css.color.deleteIcon);
|
411
|
-
});
|
412
|
-
});
|
413
|
-
|
414
|
-
it('Accessibility of enabled \'Delete row\' icon button', { tags: 'a11y' }, () => {
|
415
|
-
cy.checkAccessibility(dragAndDropIntoCategoriesPage.rowInputField().parents('[class*="OptionsComponentstyles__TitleWrapper"]'));
|
416
|
-
});
|
417
|
-
|
418
|
-
it('When the user hovers over the enabled \'Delete row\' icon button, then \'Delete row\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the \'Delete row\' icon button', () => {
|
419
|
-
dragAndDropIntoCategoriesPage.steps.verifyEnabledDeleteRowInputFieldTooltip(0);
|
420
|
-
});
|
421
|
-
|
422
|
-
it('CSS of enabled \'Delete row\' tooltip', { tags: 'css' }, () => {
|
423
|
-
dragAndDropIntoCategoriesPage.rowInputField()
|
424
|
-
.eq(0)
|
425
|
-
.parents('[class*="OptionsComponentstyles__TitleWrapper"]')
|
426
|
-
.within(() => {
|
427
|
-
dragAndDropIntoCategoriesPage.deleteButton()
|
428
|
-
.trigger('mouseover');
|
429
|
-
});
|
430
|
-
dragAndDropIntoCategoriesPage.tooltipText()
|
431
|
-
.should('be.visible')
|
432
|
-
.verifyCSS(css.color.whiteText, css.fontSize.normal, css.fontWeight.regular);
|
433
|
-
dragAndDropIntoCategoriesPage.rowInputField()
|
434
|
-
.eq(0)
|
435
|
-
.parents('[class*="OptionsComponentstyles__TitleWrapper"]')
|
436
|
-
.within(() => {
|
437
|
-
dragAndDropIntoCategoriesPage.deleteButton()
|
438
|
-
.trigger('mouseout');
|
439
|
-
});
|
440
|
-
dragAndDropIntoCategoriesPage.tooltipText()
|
441
|
-
.should('not.exist');
|
442
|
-
});
|
443
|
-
|
444
|
-
it('Accessibility of enabled \'Delete row\' tooltip', { tags: 'a11y' }, () => {
|
445
|
-
dragAndDropIntoCategoriesPage.rowInputField()
|
446
|
-
.eq(0)
|
447
|
-
.parents('[class*="OptionsComponentstyles__TitleWrapper"]')
|
448
|
-
.within(() => {
|
449
|
-
dragAndDropIntoCategoriesPage.deleteButton()
|
450
|
-
.trigger('mouseover');
|
451
|
-
});
|
452
|
-
cy.checkAccessibility(dragAndDropIntoCategoriesPage.tooltipText());
|
453
|
-
dragAndDropIntoCategoriesPage.rowInputField()
|
454
|
-
.eq(0)
|
455
|
-
.parents('[class*="OptionsComponentstyles__TitleWrapper"]')
|
456
|
-
.within(() => {
|
457
|
-
dragAndDropIntoCategoriesPage.deleteButton()
|
458
|
-
.trigger('mouseout');
|
459
|
-
});
|
460
|
-
dragAndDropIntoCategoriesPage.tooltipText()
|
461
|
-
.should('not.exist');
|
462
|
-
});
|
463
|
-
|
464
|
-
it('When user clicks on the \'Delete row\' icon button then the respective row input field should get deleted, option numeration should change accordingly', () => {
|
465
|
-
dragAndDropIntoCategoriesPage.steps.deleteRowInputField(0);
|
466
|
-
dragAndDropIntoCategoriesPage.steps.verifyCountOfRowInputFields(1);
|
467
|
-
dragAndDropIntoCategoriesPage.steps.verifyNumerationOfRowInputFields();
|
468
|
-
});
|
469
|
-
|
470
|
-
it('When only one row input field is present, the \'Delete row\' icon button should get disabled', () => {
|
471
|
-
dragAndDropIntoCategoriesPage.steps.verifyDisabledDeleteRowButton(0);
|
472
|
-
});
|
473
|
-
});
|
474
|
-
|
475
|
-
describe('Row - Set correct answer section', () => {
|
476
|
-
abortEarlySetup();
|
477
|
-
before(() => {
|
478
|
-
cy.log('Navigating to drag and drop into categories question type');
|
479
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
480
|
-
cy.barsPreLoaderWait();
|
481
|
-
});
|
482
|
-
|
483
|
-
it('By default, one row with no row title should be displayed in the \'Set correct answer\' section', () => {
|
484
|
-
dragAndDropIntoCategoriesPage.steps.verifyCountOfRowsInSetCorrectAnswerSection(1);
|
485
|
-
dragAndDropIntoCategoriesPage.setCorrectAnswerSectionRowTitle()
|
486
|
-
.should('not.exist');
|
487
|
-
});
|
488
|
-
|
489
|
-
it('When the user adds a row title, a row title should be displayed in the \'Set correct answer\' section', () => {
|
490
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowInputField(0, 'Row 1');
|
491
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleInSetCorrectAnswerSection(0, 'Row 1');
|
492
|
-
});
|
493
|
-
|
494
|
-
it('CSS of \'Row\' in the \'Set correct answer\' section', { tags: 'css' }, () => {
|
495
|
-
dragAndDropIntoCategoriesPage.setCorrectAnswerSectionRowTitle()
|
496
|
-
.should('have.css', 'background-color', css.color.titleContainerBg)
|
497
|
-
.and('have.css', 'border', `1px solid ${css.color.titleContainerBorder}`)
|
498
|
-
.find('.question-text-wrapper')
|
499
|
-
.verifyCSS(css.color.text, css.fontSize.normal, css.fontWeight.semibold);
|
500
|
-
});
|
501
|
-
|
502
|
-
it('When user adds a row using the \'Add row\' button then added row should be displayed with a blank row title in the \'Set correct answer\' section', () => {
|
503
|
-
dragAndDropIntoCategoriesPage.steps.addRow();
|
504
|
-
dragAndDropIntoCategoriesPage.steps.verifyCountOfRowsInSetCorrectAnswerSection(2);
|
505
|
-
dragAndDropIntoCategoriesPage.steps.verifyCountOfRowTitlesInSetCorrectAnswerSection(2);
|
506
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleInSetCorrectAnswerSection(1, '');
|
507
|
-
});
|
508
|
-
|
509
|
-
it('When the user deletes a row, the respective row should get removed from the \'Set correct answer\' section and the titles of other rows should not get affected', () => {
|
510
|
-
cy.log('Entering text in 2nd row input field')
|
511
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowInputField(1, 'Row 2');
|
512
|
-
dragAndDropIntoCategoriesPage.steps.deleteRowInputField(0);
|
513
|
-
dragAndDropIntoCategoriesPage.steps.verifyCountOfRowsInSetCorrectAnswerSection(1);
|
514
|
-
dragAndDropIntoCategoriesPage.steps.verifyCountOfRowTitlesInSetCorrectAnswerSection(1);
|
515
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleInSetCorrectAnswerSection(0, 'Row 2');
|
516
|
-
});
|
517
|
-
});
|
518
|
-
|
519
|
-
describe('Row - Preview tab', () => {
|
520
|
-
abortEarlySetup();
|
521
|
-
before(() => {
|
522
|
-
cy.log('Navigating to drag and drop into categories question type');
|
523
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
524
|
-
cy.barsPreLoaderWait();
|
525
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
526
|
-
});
|
527
|
-
|
528
|
-
it('When the user has not added any row title, no row title should be displayed in the \'Preview\' tab', () => {
|
529
|
-
dragAndDropIntoCategoriesPage.steps.verifyCountOfRowsInPreviewTab(1);
|
530
|
-
dragAndDropIntoCategoriesPage.previewTabRowTitle()
|
531
|
-
.should('not.exist');
|
532
|
-
});
|
533
|
-
|
534
|
-
it('When the user adds a row title, a row title should be displayed in the \'Preview\' tab', () => {
|
535
|
-
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
536
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowInputField(0, 'Row 1');
|
537
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
538
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleInPreviewTab(0, 'Row 1');
|
539
|
-
});
|
540
|
-
|
541
|
-
it('CSS of \'Row\' in the \'Preview\' tab', { tags: 'css' }, () => {
|
542
|
-
dragAndDropIntoCategoriesPage.previewTabRowTitle()
|
543
|
-
.should('have.css', 'background-color', css.color.titleContainerBg)
|
544
|
-
.and('have.css', 'border', `1px solid ${css.color.titleContainerBorder}`)
|
545
|
-
.find('.question-text-wrapper')
|
546
|
-
.verifyCSS(css.color.text, css.fontSize.normal, css.fontWeight.semibold);
|
547
|
-
});
|
548
|
-
|
549
|
-
it('When user adds a row using the \'Add row\' button then added row should be displayed with a blank row title in the \'Preview\' tab', () => {
|
550
|
-
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
551
|
-
dragAndDropIntoCategoriesPage.steps.addRow();
|
552
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
553
|
-
dragAndDropIntoCategoriesPage.steps.verifyCountOfRowsInPreviewTab(2);
|
554
|
-
dragAndDropIntoCategoriesPage.steps.verifyCountOfRowTitlesInPreviewTab(2);
|
555
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleInPreviewTab(1, '');
|
556
|
-
});
|
557
|
-
|
558
|
-
it('When the user deletes a row, the respective row should get removed from the \'Preview\' tab and the titles of other rows should not get affected', () => {
|
559
|
-
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
560
|
-
cy.log('Entering text in 2nd row input field')
|
561
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInRowInputField(1, 'Row 2');
|
562
|
-
dragAndDropIntoCategoriesPage.steps.deleteRowInputField(0);
|
563
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
564
|
-
dragAndDropIntoCategoriesPage.steps.verifyCountOfRowsInPreviewTab(1);
|
565
|
-
dragAndDropIntoCategoriesPage.steps.verifyCountOfRowTitlesInPreviewTab(1);
|
566
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowTitleInPreviewTab(0, 'Row 2');
|
567
|
-
});
|
568
|
-
});
|
569
275
|
});
|
package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesEditTabScoringTypes.js
CHANGED
@@ -144,62 +144,4 @@ describe('Create Item Page: drag and drop into categories: Edit tab scoring type
|
|
144
144
|
|
145
145
|
dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsErroredState(20, 21);
|
146
146
|
});
|
147
|
-
|
148
|
-
describe('Edit tab \'Scoring\' section for Manually Scored scoring type', () => {
|
149
|
-
abortEarlySetup();
|
150
|
-
before(() => {
|
151
|
-
cy.log('Navigate to fill in the gaps - dropdown question type');
|
152
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
153
|
-
cy.barsPreLoaderWait();
|
154
|
-
});
|
155
|
-
|
156
|
-
it('User should be able to select \'Manually scored\' scoring type from scoring type dropdown', () => {
|
157
|
-
dragAndDropIntoCategoriesPage.steps.selectAScoringTypeFromScoringTypeDropdown('Manually scored');
|
158
|
-
});
|
159
|
-
|
160
|
-
it('When the user has selected \'Manually Scored\' option from the Scoring Type dropdown then the \'Set Correct Answer\' section should not be displayed; \'Scoring subtype\' dropdown should not be displayed; \'Points\' and \'Minimum score awarded (if attempted)\' labels and input fields should be displayed; and inside \'Additional settings\' accordion \'Check answer\' section i.e. \'Allow students to check answer\' checkbox should not be displayed', () => {
|
161
|
-
dragAndDropIntoCategoriesPage.setCorrectAnswerLabel()
|
162
|
-
.should('not.exist');
|
163
|
-
dragAndDropIntoCategoriesPage.scoringSubtypeLabel()
|
164
|
-
.should('not.exist');
|
165
|
-
dragAndDropIntoCategoriesPage.scoringSubtypeDropdown()
|
166
|
-
.should('not.exist');
|
167
|
-
dragAndDropIntoCategoriesPage.penaltyPointsInputField()
|
168
|
-
.should('not.exist');
|
169
|
-
dragAndDropIntoCategoriesPage.penaltyPointsLabel()
|
170
|
-
.should('not.exist');
|
171
|
-
dragAndDropIntoCategoriesPage.rounddownScoreCheckbox()
|
172
|
-
.should('not.exist');
|
173
|
-
dragAndDropIntoCategoriesPage.rounddownScoreCheckboxLabel()
|
174
|
-
.should('not.exist');
|
175
|
-
dragAndDropIntoCategoriesPage.steps.verifyDefaultMinimumScoreIfAttemptedLabelAndPointsField();
|
176
|
-
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings()
|
177
|
-
dragAndDropIntoCategoriesPage.checkAnswerLabel()
|
178
|
-
.should('not.exist');
|
179
|
-
dragAndDropIntoCategoriesPage.allowStudentsToCheckAnswerLabel()
|
180
|
-
.should('not.exist');
|
181
|
-
});
|
182
|
-
|
183
|
-
dragAndDropIntoCategoriesPage.tests.verifyPointsFieldErrorState(10);
|
184
|
-
|
185
|
-
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedFieldErrorState(10, 20, 10);
|
186
|
-
});
|
187
|
-
|
188
|
-
describe('Edit tab \'Scoring\' section for Non Scored scoring type', () => {
|
189
|
-
abortEarlySetup();
|
190
|
-
before(() => {
|
191
|
-
cy.log('Navigate to fill in the gaps - dropdown question type');
|
192
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
193
|
-
cy.barsPreLoaderWait();
|
194
|
-
});
|
195
|
-
|
196
|
-
dragAndDropIntoCategoriesPage.tests.verifyEditTabNonScoredScoringSectionContents();
|
197
|
-
|
198
|
-
it('When the user has switched to \'Non Scored\' scoring type, scoring subtype dropdown should not be displayed', () => {
|
199
|
-
dragAndDropIntoCategoriesPage.scoringSubtypeLabel()
|
200
|
-
.should('not.exist');
|
201
|
-
dragAndDropIntoCategoriesPage.scoringSubtypeDropdown()
|
202
|
-
.should('not.exist');
|
203
|
-
});
|
204
|
-
});
|
205
147
|
});
|
@@ -0,0 +1,68 @@
|
|
1
|
+
import { dragAndDropIntoCategoriesPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
const css = Cypress.env('css');
|
4
|
+
const options = ['Bat', 'Cat']
|
5
|
+
|
6
|
+
describe('Create Item Page: drag and drop into categories: Edit tab scoring types and set correct answer section (Correct answer tab)', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Edit tab \'Scoring\' section for Manually Scored scoring type', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
cy.log('Navigate to fill in the gaps - dropdown question type');
|
15
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
});
|
18
|
+
|
19
|
+
it('User should be able to select \'Manually scored\' scoring type from scoring type dropdown', () => {
|
20
|
+
dragAndDropIntoCategoriesPage.steps.selectAScoringTypeFromScoringTypeDropdown('Manually scored');
|
21
|
+
});
|
22
|
+
|
23
|
+
it('When the user has selected \'Manually Scored\' option from the Scoring Type dropdown then the \'Set Correct Answer\' section should not be displayed; \'Scoring subtype\' dropdown should not be displayed; \'Points\' and \'Minimum score awarded (if attempted)\' labels and input fields should be displayed; and inside \'Additional settings\' accordion \'Check answer\' section i.e. \'Allow students to check answer\' checkbox should not be displayed', () => {
|
24
|
+
dragAndDropIntoCategoriesPage.setCorrectAnswerLabel()
|
25
|
+
.should('not.exist');
|
26
|
+
dragAndDropIntoCategoriesPage.scoringSubtypeLabel()
|
27
|
+
.should('not.exist');
|
28
|
+
dragAndDropIntoCategoriesPage.scoringSubtypeDropdown()
|
29
|
+
.should('not.exist');
|
30
|
+
dragAndDropIntoCategoriesPage.penaltyPointsInputField()
|
31
|
+
.should('not.exist');
|
32
|
+
dragAndDropIntoCategoriesPage.penaltyPointsLabel()
|
33
|
+
.should('not.exist');
|
34
|
+
dragAndDropIntoCategoriesPage.rounddownScoreCheckbox()
|
35
|
+
.should('not.exist');
|
36
|
+
dragAndDropIntoCategoriesPage.rounddownScoreCheckboxLabel()
|
37
|
+
.should('not.exist');
|
38
|
+
dragAndDropIntoCategoriesPage.steps.verifyDefaultMinimumScoreIfAttemptedLabelAndPointsField();
|
39
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings()
|
40
|
+
dragAndDropIntoCategoriesPage.checkAnswerLabel()
|
41
|
+
.should('not.exist');
|
42
|
+
dragAndDropIntoCategoriesPage.allowStudentsToCheckAnswerLabel()
|
43
|
+
.should('not.exist');
|
44
|
+
});
|
45
|
+
|
46
|
+
dragAndDropIntoCategoriesPage.tests.verifyPointsFieldErrorState(10);
|
47
|
+
|
48
|
+
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedFieldErrorState(10, 20, 10);
|
49
|
+
});
|
50
|
+
|
51
|
+
describe('Edit tab \'Scoring\' section for Non Scored scoring type', () => {
|
52
|
+
abortEarlySetup();
|
53
|
+
before(() => {
|
54
|
+
cy.log('Navigate to fill in the gaps - dropdown question type');
|
55
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
56
|
+
cy.barsPreLoaderWait();
|
57
|
+
});
|
58
|
+
|
59
|
+
dragAndDropIntoCategoriesPage.tests.verifyEditTabNonScoredScoringSectionContents();
|
60
|
+
|
61
|
+
it('When the user has switched to \'Non Scored\' scoring type, scoring subtype dropdown should not be displayed', () => {
|
62
|
+
dragAndDropIntoCategoriesPage.scoringSubtypeLabel()
|
63
|
+
.should('not.exist');
|
64
|
+
dragAndDropIntoCategoriesPage.scoringSubtypeDropdown()
|
65
|
+
.should('not.exist');
|
66
|
+
});
|
67
|
+
});
|
68
|
+
});
|