itemengine-cypress-automation 1.0.47 → 1.0.48
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettings.js +1 -1139
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettingsBasic.js +202 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettingsCustomSpecialCharachters.js +120 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettingsMultilineResponse.js +189 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettingsResponseAccordions.js +431 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettingsStudentResponseAreaAndLayout.js +262 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAllOrNothingScoring.js +1 -763
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAllOrNothingWithAlternateAnswer.js +613 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAllOrNothingWithAlternateAnswerMatchFromAllResponsesTrue.js +172 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextConditionalCheckboxes.js +0 -154
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabBasicSection.js +1 -76
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextMatchFromAllResponses.js +162 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialDifferentWeightsScoring.js +0 -999
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialDifferentWeightsWithAlternateAnswer.js +849 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialDifferentWeightsWithAlternateAnswerMatchFromAllResponsesTrue.js +171 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialEqualWeightsScoring.js +0 -885
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialEqualWeightsWithAlternateAnswer.js +738 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialEqualWeightsWithAlternateAnswerMatchFromAllResponsesTrue.js +168 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextSupportedFileTypes.js +86 -0
- package/package.json +1 -1
package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettings.js
CHANGED
@@ -1,17 +1,8 @@
|
|
1
1
|
import { specialOrMathCharacters } from "../../../fixtures/specialAndMathCharacters";
|
2
|
-
import {
|
2
|
+
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
3
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
4
|
import utilities from "../../../support/helpers/utilities";
|
5
5
|
const css = Cypress.env('css');
|
6
|
-
let customSpecialCharacters = [':', ')', '`']
|
7
|
-
const correctTabAnswerArray = ['Flower', 'Leaf'];
|
8
|
-
const incorrectAnswerArray = ['Root', 'Branch'];
|
9
|
-
const numbers = ['1', '2'];
|
10
|
-
const lowercase = ['a', 'b'];
|
11
|
-
const uppercase = ['A', 'B'];
|
12
|
-
const answerNumerationDropdownOptions = ['Numerical', 'Uppercase alphabet', 'Lowercase alphabet'];
|
13
|
-
const fontSizeDropdownOptions = ['Default', 'Small', 'Normal', 'Large', 'Extra large', 'Huge'];
|
14
|
-
const fontSizes = ['16px', '12px', '14px', '17px', '20px', '24px'];
|
15
6
|
let symbolsString = specialOrMathCharacters['specialCharacters'].characters.map((icon) => icon.symbol);
|
16
7
|
symbolsString = symbolsString.join('');
|
17
8
|
|
@@ -20,16 +11,6 @@ describe('Fill In the gaps over image - text - Additional settings', () => {
|
|
20
11
|
cy.loginAs('admin');
|
21
12
|
});
|
22
13
|
|
23
|
-
describe('Additional settings accordion', () => {
|
24
|
-
abortEarlySetup();
|
25
|
-
before(() => {
|
26
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
27
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
28
|
-
});
|
29
|
-
|
30
|
-
fillInTheGapsOverImageTextPage.tests.verifyAdditonalSettingsAccordionProperties();
|
31
|
-
});
|
32
|
-
|
33
14
|
describe('Additional settings: Placeholder text - Contents and set correct answer section', () => {
|
34
15
|
abortEarlySetup();
|
35
16
|
before(() => {
|
@@ -466,1123 +447,4 @@ describe('Fill In the gaps over image - text - Additional settings', () => {
|
|
466
447
|
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldPreviewTab(0, '400px');
|
467
448
|
});
|
468
449
|
});
|
469
|
-
|
470
|
-
//Failing due to https://redmine.zeuslearning.com/issues/546981
|
471
|
-
//Failing due to https://redmine.zeuslearning.com/issues/546987
|
472
|
-
describe('Additional settings - \'Advanced settings for individual response area\' section contents', () => {
|
473
|
-
abortEarlySetup();
|
474
|
-
before(() => {
|
475
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
476
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
477
|
-
cy.barsPreLoaderWait();
|
478
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
479
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
480
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
481
|
-
});
|
482
|
-
|
483
|
-
it('When the user has not added any response container, response accordion should not be displayed', () => {
|
484
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseAccordionWrapper(), 'notExist');
|
485
|
-
});
|
486
|
-
|
487
|
-
it('When the user adds response container, \'Advanced settings for individual response area\' label along with response accordion should be displayed', () => {
|
488
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
489
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
490
|
-
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.responseAccordionWrapper(), 2);
|
491
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.advanceSettingForIndividualResponsesLabel(), 'Advanced settings for individual response area');
|
492
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.advanceSettingForIndividualResponsesLabel(), 'visible');
|
493
|
-
});
|
494
|
-
|
495
|
-
it('The response accordion should have a label \'Response #\', by default the response accordion should be collapsed and by clicking on the response accordion, user should be able to expand the accordion', () => {
|
496
|
-
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionLabel(0);
|
497
|
-
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionLabel(1);
|
498
|
-
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionCollapsedState(0);
|
499
|
-
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionCollapsedState(1);
|
500
|
-
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(0);
|
501
|
-
});
|
502
|
-
|
503
|
-
it('\'Placeholder text\' label and input field should be displayed and by default, the input field should be empty', () => {
|
504
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderTextLabelAndInputFieldResponseAccordion(0);
|
505
|
-
});
|
506
|
-
|
507
|
-
it('\'Type of answer input\' label and dropdown should be displayed and in \'Type of answer input\' dropdown \'Text\' option should be selected by default', () => {
|
508
|
-
fillInTheGapsOverImageTextPage.steps.verifyTypeOfAnswerLabelAndDropdownResponseAccordion(0);
|
509
|
-
});
|
510
|
-
|
511
|
-
it('\'Pointer\' label and dropdown should be displayed and in \'Type of answer input\' dropdown \'Left\' option should be selected by default', () => {
|
512
|
-
fillInTheGapsOverImageTextPage.steps.verifyPointerLabelAndDropdownResponseAccordion(0);
|
513
|
-
});
|
514
|
-
|
515
|
-
it('\'Height (px)\' and \'Width (px)\' labels and input fields should be displayed and by default, the input fields should be empty', () => {
|
516
|
-
fillInTheGapsOverImageTextPage.steps.verifyHeightAndWidthLabelAndInputFieldResponseAccordion(0);
|
517
|
-
});
|
518
|
-
|
519
|
-
//Note: The CSS of labels and response fields are being verified in their respective describes, so not verifying them here again
|
520
|
-
|
521
|
-
it('Accessibility of \'Advanced settings for individual response area\' section contents', { tags: 'a11y' }, () => {
|
522
|
-
cy.checkAccessibility(fillInTheGapsOverImageTextPage.responseAccordionWrapper());
|
523
|
-
});
|
524
|
-
});
|
525
|
-
|
526
|
-
describe('Response accordions: Placeholder text - Set correct answer section', () => {
|
527
|
-
abortEarlySetup();
|
528
|
-
before(() => {
|
529
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
530
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
531
|
-
cy.barsPreLoaderWait();
|
532
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
533
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
534
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
535
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
536
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
537
|
-
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(0);
|
538
|
-
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(1);
|
539
|
-
});
|
540
|
-
|
541
|
-
it('When the user has not set placeholder text in the Response accordion then placeholder should not be displayed in \'Set correct answer\' section', () => {
|
542
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseFieldNotExists(0);
|
543
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseFieldNotExists(1);
|
544
|
-
});
|
545
|
-
|
546
|
-
fillInTheGapsOverImageTextPage.tests.verifyCustomLabelNotVisibleOnResponseAccordion('Placeholder text');
|
547
|
-
|
548
|
-
it('When the user has set a placeholder text in either response accordion then a placeholder text should be displayed for the respective response in \'Set correct answer\' section', () => {
|
549
|
-
fillInTheGapsOverImageTextPage.steps.setPlaceholderTextInResponseAccordion(0, 'Enter response here');
|
550
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseField(0, 'Enter response here');
|
551
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseFieldNotExists(1);
|
552
|
-
});
|
553
|
-
|
554
|
-
fillInTheGapsOverImageTextPage.tests.verifyCustomLabelVisibleOnResponseAccordion('Placeholder text');
|
555
|
-
|
556
|
-
it('CSS of Custom label', { tags: 'css' }, () => {
|
557
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.responseAccordionCustomLabel(), {
|
558
|
-
'color': css.color.activeButtons,
|
559
|
-
'font-size': css.fontSize.normal,
|
560
|
-
'font-weight': css.fontWeight.medium,
|
561
|
-
'border': `1px solid ${css.color.primaryBtnBorder}`
|
562
|
-
});
|
563
|
-
});
|
564
|
-
|
565
|
-
it('When the user removes the placeholder text from the individual responses, then the placeholder attribute of the response fields should get updated accordingly in \'Set correct answer\' section', () => {
|
566
|
-
fillInTheGapsOverImageTextPage.steps.clearPlaceholderTextInResponseAccordion(0);
|
567
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseFieldNotExists(0);
|
568
|
-
});
|
569
|
-
|
570
|
-
it('When the user has set placeholder text in the individual response areas, then it should override the placeholder text set in the \'Advanced settings for all response areas\' in the \'Set correct answer\' section', () => {
|
571
|
-
fillInTheGapsOverImageTextPage.steps.setResponseFieldPlaceholderTextGlobal('Global placeholder');
|
572
|
-
fillInTheGapsOverImageTextPage.steps.setPlaceholderTextInResponseAccordion(0, 'Enter response here');
|
573
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseField(0, 'Enter response here');
|
574
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseField(1, 'Global placeholder');
|
575
|
-
});
|
576
|
-
|
577
|
-
//Note: not possible to check css of placeholder since it is added as an attribute, properties of placeholder is not visible in dev tools
|
578
|
-
|
579
|
-
it('Accessibility of \'Placeholder text\' in \'Set correct answer\' section', { tags: 'a11y' }, () => {
|
580
|
-
cy.checkAccessibility(fillInTheGapsOverImageTextPage.responseFieldSetCorrectAnswerSection().parents('.response-input-field'));
|
581
|
-
});
|
582
|
-
|
583
|
-
it('When the user enters text in the response field, then the placeholder text should disappear and on clearing the input field the placeholder text should re-appear for the set correct answer section', () => {
|
584
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, 'Flower');
|
585
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseFieldNotExists(0);
|
586
|
-
fillInTheGapsOverImageTextPage.steps.clearResponseFieldSetCorrectAnswerSection(0);
|
587
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseField(0, 'Enter response here');
|
588
|
-
});
|
589
|
-
|
590
|
-
it('When the user clears the placeholder text input field, the placeholder text should get removed from the set correct answer section response fields', () => {
|
591
|
-
fillInTheGapsOverImageTextPage.steps.clearPlaceholderTextInResponseAccordion(0);
|
592
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseFieldNotExists(0);
|
593
|
-
});
|
594
|
-
});
|
595
|
-
|
596
|
-
describe('Response accordions: Placeholder text - Preview tab', () => {
|
597
|
-
abortEarlySetup();
|
598
|
-
before(() => {
|
599
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
600
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
601
|
-
cy.barsPreLoaderWait();
|
602
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
603
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
604
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
605
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
606
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
607
|
-
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(0)
|
608
|
-
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(1)
|
609
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
610
|
-
});
|
611
|
-
|
612
|
-
it('When the user has not set placeholder text in the Response accordion then placeholder should not be displayed in preview tab response fields', () => {
|
613
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseFieldNotExists(0);
|
614
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseFieldNotExists(1);
|
615
|
-
});
|
616
|
-
|
617
|
-
it('When the user has set a placeholder text in either individual response accordion a placeholder text should be displayed for the respective response in preview tab', () => {
|
618
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
619
|
-
fillInTheGapsOverImageTextPage.steps.setPlaceholderTextInResponseAccordion(0, 'Enter response here');
|
620
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
621
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseField(0, 'Enter response here');
|
622
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseFieldNotExists(1);
|
623
|
-
});
|
624
|
-
|
625
|
-
it('When the user removes the placeholder text from individual responses the Placeholders should get updated accordingly for both the responses in preview tab', () => {
|
626
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
627
|
-
fillInTheGapsOverImageTextPage.steps.clearPlaceholderTextInResponseAccordion(0);
|
628
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
629
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseFieldNotExists(0);
|
630
|
-
});
|
631
|
-
|
632
|
-
it('When the user has set placeholder text in the individual response area, then it should override the placeholder text set in the \'Advanced settings for all response areas\' in the preview tab response fields', () => {
|
633
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
634
|
-
fillInTheGapsOverImageTextPage.steps.setResponseFieldPlaceholderTextGlobal('Global placeholder');
|
635
|
-
fillInTheGapsOverImageTextPage.steps.setPlaceholderTextInResponseAccordion(0, 'Enter response here');
|
636
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
637
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseField(0, 'Enter response here');
|
638
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseField(1, 'Global placeholder');
|
639
|
-
});
|
640
|
-
|
641
|
-
//Note: not possible to check css of placeholder since it is added as an attribute, properties of placeholder is not visible in dev tools
|
642
|
-
|
643
|
-
it('Accessibility of \'Placeholder text\' in preview tab', { tags: 'a11y' }, () => {
|
644
|
-
cy.checkAccessibility(fillInTheGapsOverImageTextPage.responseFieldPreviewTab().parents('.response-input-field'))
|
645
|
-
});
|
646
|
-
|
647
|
-
it('When the user enters text in the response field, then the placeholder text should disappear and on clearing the input field the placeholder text should re-appear in the preview tab', () => {
|
648
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, 'Flower');
|
649
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseFieldNotExists(0);
|
650
|
-
fillInTheGapsOverImageTextPage.steps.clearResponseFieldPreviewTab(0);
|
651
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseField(0, 'Enter response here');
|
652
|
-
});
|
653
|
-
|
654
|
-
it('When the user clears the placeholder text input field, the placeholder text should get removed from the preview tab response fields', () => {
|
655
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
656
|
-
fillInTheGapsOverImageTextPage.steps.clearPlaceholderTextInResponseAccordion(0);
|
657
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
658
|
-
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseFieldNotExists(0);
|
659
|
-
});
|
660
|
-
});
|
661
|
-
|
662
|
-
//Failing due to https://redmine.zeuslearning.com/issues/547573
|
663
|
-
describe('Response accordions: Type of answer input - Set correct answer section', () => {
|
664
|
-
abortEarlySetup();
|
665
|
-
before(() => {
|
666
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
667
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
668
|
-
cy.barsPreLoaderWait();
|
669
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
670
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
671
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
672
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
673
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
674
|
-
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(0);
|
675
|
-
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(1);
|
676
|
-
});
|
677
|
-
|
678
|
-
fillInTheGapsOverImageTextPage.tests.verifyCustomLabelNotVisibleOnResponseAccordion('Type of answer input');
|
679
|
-
|
680
|
-
it('When the user has set \'Text\' option in the response accordion, then user should be able to enter alpha-numeric characters in the \'Set correct answer\' section', () => {
|
681
|
-
fillInTheGapsOverImageTextPage.steps.clickOnTypeOfAnswerDropdownInResponseAccordion(0);
|
682
|
-
fillInTheGapsOverImageTextPage.steps.selectTypeOfAnswerDropdownOption('Text');
|
683
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, 'Response 1');
|
684
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldSetCorrectAnswerSection(0, 'Response 1');
|
685
|
-
});
|
686
|
-
|
687
|
-
it('When the user has set \'Number\' option the response accordion, then user should be able to enter only numeric characters in the \'Set correct answer\' section', () => {
|
688
|
-
fillInTheGapsOverImageTextPage.steps.clickOnTypeOfAnswerDropdownInResponseAccordion(1);
|
689
|
-
fillInTheGapsOverImageTextPage.steps.selectTypeOfAnswerDropdownOption('Number');
|
690
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, 'Response 1');
|
691
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldSetCorrectAnswerSection(1, '1');
|
692
|
-
});
|
693
|
-
|
694
|
-
it('When the user has set \'Number\' option in the \'Advanced settings for all response areas\' then both the options in the Response accordions should change to \'Number\'', () => {
|
695
|
-
fillInTheGapsOverImageTextPage.steps.clickOnTypeOfAnswerDropdown();
|
696
|
-
fillInTheGapsOverImageTextPage.steps.selectTypeOfAnswerDropdownOption('Number');
|
697
|
-
fillInTheGapsOverImageTextPage.steps.verifySelectedOptionInTypeOfAnswerDropdownInResponseAccordion(0, 'Number');
|
698
|
-
fillInTheGapsOverImageTextPage.steps.verifySelectedOptionInTypeOfAnswerDropdownInResponseAccordion(1, 'Number');
|
699
|
-
});
|
700
|
-
|
701
|
-
it('When the user has set \'Text\' option in the response accordion then it should override the \'Number\' option set in the \'Advanced settings for all response areas\' and user should be able to enter responses accordingly in the \'Set correct answer\' section', () => {
|
702
|
-
fillInTheGapsOverImageTextPage.steps.clickOnTypeOfAnswerDropdownInResponseAccordion(0);
|
703
|
-
fillInTheGapsOverImageTextPage.steps.selectTypeOfAnswerDropdownOption('Text');
|
704
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, '1 Response');
|
705
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldSetCorrectAnswerSection(0, '1 Response');
|
706
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, '1 Response');
|
707
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldSetCorrectAnswerSection(1, '1');
|
708
|
-
});
|
709
|
-
|
710
|
-
fillInTheGapsOverImageTextPage.tests.verifyCustomLabelVisibleOnResponseAccordion('Type of answer input');
|
711
|
-
});
|
712
|
-
|
713
|
-
describe('Response accordions: Type of answer input - Preview tab', () => {
|
714
|
-
abortEarlySetup();
|
715
|
-
before(() => {
|
716
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
717
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
718
|
-
cy.barsPreLoaderWait();
|
719
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
720
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
721
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
722
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
723
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
724
|
-
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(0);
|
725
|
-
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(1);
|
726
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
727
|
-
});
|
728
|
-
|
729
|
-
it('When the user has set \'Text\' option in the response accordion, then user should be able to enter alpha-numeric characters in preview tab response fields', () => {
|
730
|
-
fillInTheGapsOverImageTextPage.steps.verifySelectedOptionInTypeOfAnswerDropdownInResponseAccordion(0, 'Text');
|
731
|
-
fillInTheGapsOverImageTextPage.steps.verifySelectedOptionInTypeOfAnswerDropdownInResponseAccordion(1, 'Text');
|
732
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
733
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, '1 Flower');
|
734
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(0, '1 Flower');
|
735
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, '2 Leaves');
|
736
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(1, '2 Leaves');
|
737
|
-
});
|
738
|
-
|
739
|
-
it('When the user has set \'Number\' option in the response accordion, then the user should be able to enter only numeric characters in preview tab response fields', () => {
|
740
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
741
|
-
fillInTheGapsOverImageTextPage.steps.clickOnTypeOfAnswerDropdownInResponseAccordion(1);
|
742
|
-
fillInTheGapsOverImageTextPage.steps.selectTypeOfAnswerDropdownOption('Number');
|
743
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
744
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, '1 Flower');
|
745
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(0, '1 Flower');
|
746
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, '2 Leaves');
|
747
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(1, '2');
|
748
|
-
});
|
749
|
-
|
750
|
-
it('When the user has set \'Text\' option in the response accordion, then it should override the \'Number\' option set in \'Advanced settings for all response areas\' and user should be able to enter responses accordingly in the preview tab section', () => {
|
751
|
-
cy.log('Pre step: Setting \'Number\' option in \'Advanced settings for all response areas\'')
|
752
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
753
|
-
fillInTheGapsOverImageTextPage.steps.clickOnTypeOfAnswerDropdown();
|
754
|
-
fillInTheGapsOverImageTextPage.steps.selectTypeOfAnswerDropdownOption('Number');
|
755
|
-
fillInTheGapsOverImageTextPage.steps.clickOnTypeOfAnswerDropdownInResponseAccordion(0);
|
756
|
-
fillInTheGapsOverImageTextPage.steps.selectTypeOfAnswerDropdownOption('Text');
|
757
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
758
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, '1 Flower');
|
759
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(0, '1 Flower');
|
760
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, '2 Leaves');
|
761
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(1, '2');
|
762
|
-
});
|
763
|
-
});
|
764
|
-
|
765
|
-
describe('Response accordions: Height and Width - Set correct answer section', () => {
|
766
|
-
abortEarlySetup();
|
767
|
-
before(() => {
|
768
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
769
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
770
|
-
cy.barsPreLoaderWait();
|
771
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
772
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
773
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
774
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
775
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
776
|
-
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(0);
|
777
|
-
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(1);
|
778
|
-
});
|
779
|
-
|
780
|
-
it('When the user has not set \'Height\' and \'Width\' for response fields then the default dimension of the response field in the \'Set correct answer\' section response fields should be (197x46)px', () => {
|
781
|
-
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldSetCorrectAnswerSection(0, '46px');
|
782
|
-
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldSetCorrectAnswerSection(0, '13.7em');
|
783
|
-
});
|
784
|
-
|
785
|
-
fillInTheGapsOverImageTextPage.tests.verifyCustomLabelNotVisibleOnResponseAccordion('Height and Width');
|
786
|
-
|
787
|
-
it('When the user has set \'Height\' for the response field then the height of the response field should get updated accordingly in the \'Set correct answer\' section', () => {
|
788
|
-
fillInTheGapsOverImageTextPage.steps.setHeightInResponseAccordion(0, 100);
|
789
|
-
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldSetCorrectAnswerSection(0, '100px');
|
790
|
-
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldSetCorrectAnswerSection(1, '46px');
|
791
|
-
});
|
792
|
-
|
793
|
-
fillInTheGapsOverImageTextPage.tests.verifyCustomLabelVisibleOnResponseAccordion('Height and Width');
|
794
|
-
|
795
|
-
it('When the user has set \'Width\' for the response field then the Width of the response field should get updated accordingly in the \'Set correct answer\' section', () => {
|
796
|
-
fillInTheGapsOverImageTextPage.steps.setWidthInResponseAccordion(0, 100);
|
797
|
-
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldSetCorrectAnswerSection(0, '100px');
|
798
|
-
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldSetCorrectAnswerSection(1, '13.7em');
|
799
|
-
});
|
800
|
-
|
801
|
-
it('When the user has set width below 80px then the width should remain 80px in the \'Set correct answer\' section', () => {
|
802
|
-
fillInTheGapsOverImageTextPage.steps.setWidthInResponseAccordion(0, 20);
|
803
|
-
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldSetCorrectAnswerSection(0, '80px');
|
804
|
-
});
|
805
|
-
|
806
|
-
it('When the user has set width above 400px then the width should remain 400px in the \'Set correct answer\' section', () => {
|
807
|
-
fillInTheGapsOverImageTextPage.steps.setWidthInResponseAccordion(0, 800);
|
808
|
-
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldSetCorrectAnswerSection(0, '400px');
|
809
|
-
});
|
810
|
-
|
811
|
-
it('When the user has set \'Height\' and \'Width\' in the individual responses accordion then it should override the \'Height\' and \'Width\'set in the \'Advanced settings for all response areas\' in the \'Set correct answer\' section', () => {
|
812
|
-
fillInTheGapsOverImageTextPage.steps.setResponseFieldWidthGlobal(250);
|
813
|
-
fillInTheGapsOverImageTextPage.steps.setResponseFieldHeightGlobal(180);
|
814
|
-
fillInTheGapsOverImageTextPage.steps.setWidthInResponseAccordion(0, 175);
|
815
|
-
fillInTheGapsOverImageTextPage.steps.setHeightInResponseAccordion(0, 120);
|
816
|
-
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldSetCorrectAnswerSection(0, '175px');
|
817
|
-
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldSetCorrectAnswerSection(0, '120px');
|
818
|
-
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldSetCorrectAnswerSection(1, '250px');
|
819
|
-
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldSetCorrectAnswerSection(1, '180px');
|
820
|
-
});
|
821
|
-
});
|
822
|
-
|
823
|
-
describe('Response accordions: Height and Width - Preview tab', () => {
|
824
|
-
abortEarlySetup();
|
825
|
-
before(() => {
|
826
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
827
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
828
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
829
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
830
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
831
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
832
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
833
|
-
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(0);
|
834
|
-
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(1);
|
835
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
836
|
-
});
|
837
|
-
|
838
|
-
it('When the user has not set \'Height\' and \'Width\' for the response accordion then the default dimension of the response field in the preview tab response field should be (197x46)px', () => {
|
839
|
-
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldPreviewTab(0, '46px')
|
840
|
-
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldPreviewTab(0, '13.7em');
|
841
|
-
});
|
842
|
-
|
843
|
-
it('When the user has set \'Height\' for the response field then the height of the preview tab response field should get updated accordingly', () => {
|
844
|
-
cy.log('Pre step: Switch to Edit tab')
|
845
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
846
|
-
fillInTheGapsOverImageTextPage.steps.setHeightInResponseAccordion(0, 100);
|
847
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
848
|
-
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldPreviewTab(0, '100px');
|
849
|
-
});
|
850
|
-
|
851
|
-
it('When the user has set \'Width\' for the response field then the width of the preview tab response field should get updated accordingly', () => {
|
852
|
-
cy.log('Pre step: Switch to Edit tab')
|
853
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
854
|
-
fillInTheGapsOverImageTextPage.steps.setWidthInResponseAccordion(0, 100);
|
855
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
856
|
-
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldPreviewTab(0, '100px');
|
857
|
-
});
|
858
|
-
|
859
|
-
it('When the user has set width below 80px then the width of the preview tab response field should remain 80px', () => {
|
860
|
-
cy.log('Pre step: Switch to Edit tab')
|
861
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
862
|
-
fillInTheGapsOverImageTextPage.steps.setWidthInResponseAccordion(0, 20);
|
863
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
864
|
-
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldPreviewTab(0, '80px');
|
865
|
-
});
|
866
|
-
|
867
|
-
it('When the user has set width above 400px then the width of the preview tab response field should remain 400px', () => {
|
868
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
869
|
-
fillInTheGapsOverImageTextPage.steps.setWidthInResponseAccordion(0, 800);
|
870
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
871
|
-
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldPreviewTab(0, '400px');
|
872
|
-
});
|
873
|
-
|
874
|
-
it('When the user has set \'Height\' and \'Width\' in the individual responses accordion then it should override the \'Height\' and \'Width\'set in the \'Advanced settings for all response areas\' for the preview tab response fields', () => {
|
875
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
876
|
-
fillInTheGapsOverImageTextPage.steps.setResponseFieldWidthGlobal(250);
|
877
|
-
fillInTheGapsOverImageTextPage.steps.setResponseFieldHeightGlobal(180);
|
878
|
-
fillInTheGapsOverImageTextPage.steps.setWidthInResponseAccordion(0, 175);
|
879
|
-
fillInTheGapsOverImageTextPage.steps.setHeightInResponseAccordion(0, 120);
|
880
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
881
|
-
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldPreviewTab(0, '175px');
|
882
|
-
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldPreviewTab(0, '120px');
|
883
|
-
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldPreviewTab(1, '250px');
|
884
|
-
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldPreviewTab(1, '180px');
|
885
|
-
});
|
886
|
-
});
|
887
|
-
|
888
|
-
describe('Additional settings: Student response area and layout', () => {
|
889
|
-
abortEarlySetup();
|
890
|
-
before(() => {
|
891
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
892
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
893
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
894
|
-
});
|
895
|
-
|
896
|
-
it('\'Student response area and layout\' label should be displayed', () => {
|
897
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.studentResponseAreaAndLayoutLabel(), 'Student response area and layout');
|
898
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.studentResponseAreaAndLayoutLabel(), 'visible');
|
899
|
-
});
|
900
|
-
|
901
|
-
it('CSS of \'Student response area and layout\' section', { tags: 'css' }, () => {
|
902
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.studentResponseAreaAndLayoutLabel(), {
|
903
|
-
'color': css.color.labels,
|
904
|
-
'font-size': css.fontSize.default,
|
905
|
-
'font-weight': css.fontWeight.semibold
|
906
|
-
});
|
907
|
-
});
|
908
|
-
|
909
|
-
//Note: a11y covered in Additional settings accordion, verifyAdditonalSettingsAccordionProperties
|
910
|
-
});
|
911
|
-
|
912
|
-
describe('Additional settings: \'Answer numeration\' (only while grading) - Contents and set correct answer section', () => {
|
913
|
-
abortEarlySetup();
|
914
|
-
before(() => {
|
915
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
916
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
917
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
918
|
-
});
|
919
|
-
|
920
|
-
fillInTheGapsOverImageTextPage.tests.verifyAnswerNumerationContents();
|
921
|
-
|
922
|
-
it(`When the user selects ${answerNumerationDropdownOptions[0]} option from the \'Answer numeration\' dropdown, then correct response numeration should not be displayed in the \'Set correct answer section\'`, () => {
|
923
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.answerNumerationDropdown(), `${answerNumerationDropdownOptions[0]}`)
|
924
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseNumeration(), 'notExist');
|
925
|
-
});
|
926
|
-
|
927
|
-
it(`When the user selects ${answerNumerationDropdownOptions[1]} option from the \'Answer numeration\' dropdown, then correct response numeration should not be displayed in the \'Set correct answer section\'`, () => {
|
928
|
-
fillInTheGapsOverImageTextPage.steps.selectAnswerNumerationDropdownOption(`${answerNumerationDropdownOptions[1]}`);
|
929
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseNumeration(), 'notExist');
|
930
|
-
});
|
931
|
-
|
932
|
-
it(`When the user selects ${answerNumerationDropdownOptions[2]} option from the \'Answer numeration\' dropdown, then correct response numeration should not be displayed in the \'Set correct answer section\'`, () => {
|
933
|
-
fillInTheGapsOverImageTextPage.steps.selectAnswerNumerationDropdownOption(`${answerNumerationDropdownOptions[2]}`);
|
934
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseNumeration(), 'notExist');
|
935
|
-
});
|
936
|
-
});
|
937
|
-
|
938
|
-
describe('Additional settings: \'Answer numeration\' (only while grading) - Preview tab', () => {
|
939
|
-
abortEarlySetup();
|
940
|
-
before(() => {
|
941
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
942
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
943
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
944
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
945
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
946
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
947
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
|
948
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
|
949
|
-
fillInTheGapsOverImageTextPage.steps.allotPoints(10);
|
950
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
951
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
952
|
-
});
|
953
|
-
|
954
|
-
it(`When the user attempts the question when ${answerNumerationDropdownOptions[0]} is selected and selects \'Show correct answer\' checkbox then the correct answer section should have ${answerNumerationDropdownOptions[0]} numeration`, () => {
|
955
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.answerNumerationDropdown(), `${answerNumerationDropdownOptions[0]}`);
|
956
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
957
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, incorrectAnswerArray[0]);
|
958
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, incorrectAnswerArray[1]);
|
959
|
-
fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
|
960
|
-
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabResponseFieldAndCorrectAnswerNumeration(numbers);
|
961
|
-
});
|
962
|
-
|
963
|
-
it(`When the user attempts the question when ${answerNumerationDropdownOptions[1]} is selected and selects \'Show correct answer\' checkbox then the correct answer section should have ${answerNumerationDropdownOptions[1]} numeration`, () => {
|
964
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
965
|
-
fillInTheGapsOverImageTextPage.steps.selectAnswerNumerationDropdownOption(`${answerNumerationDropdownOptions[1]}`);
|
966
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
967
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, incorrectAnswerArray[0]);
|
968
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, incorrectAnswerArray[1]);
|
969
|
-
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabResponseFieldAndCorrectAnswerNumeration(uppercase);
|
970
|
-
});
|
971
|
-
|
972
|
-
it(`When the user attempts the question when ${answerNumerationDropdownOptions[2]} is selected and selects \'Show correct answer\' checkbox then the correct answer section should have ${answerNumerationDropdownOptions[2]} numeration`, () => {
|
973
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
974
|
-
fillInTheGapsOverImageTextPage.steps.selectAnswerNumerationDropdownOption(`${answerNumerationDropdownOptions[2]}`);
|
975
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
976
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, incorrectAnswerArray[0]);
|
977
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, incorrectAnswerArray[1]);
|
978
|
-
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabResponseFieldAndCorrectAnswerNumeration(lowercase);
|
979
|
-
});
|
980
|
-
});
|
981
|
-
|
982
|
-
describe('Additional settings: Display answer numeration to students - Contents and set correct answer section', () => {
|
983
|
-
abortEarlySetup();
|
984
|
-
before(() => {
|
985
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
986
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
987
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
988
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
989
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
990
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
991
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
992
|
-
});
|
993
|
-
|
994
|
-
it('\'Display answer numeration to students\' functionality label and checkbox should be displayed and by default it should be unchecked', () => {
|
995
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.displayAnswerNumerationToStudentsLabel(), 'Display answer numeration to students');
|
996
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.displayAnswerNumerationToStudentsLabel(), 'visible');
|
997
|
-
fillInTheGapsOverImageTextPage.steps.verifyDisplayAnswerNumerationToStudentsCheckboxNotChecked();
|
998
|
-
});
|
999
|
-
|
1000
|
-
it('CSS of \'Display answer numeration to students\' section - unchecked state', { tags: 'css' }, () => {
|
1001
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.displayAnswerNumerationToStudentsLabel(), {
|
1002
|
-
'color': css.color.labelText,
|
1003
|
-
'font-size': css.fontSize.normal,
|
1004
|
-
'font-weight': css.fontWeight.regular
|
1005
|
-
});
|
1006
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.displayAnswerNumerationToStudentsCheckbox().parent().find('svg'), {
|
1007
|
-
'fill': css.color.uncheckedCheckbox
|
1008
|
-
});
|
1009
|
-
});
|
1010
|
-
|
1011
|
-
it('When \'Display answer numeration to students\' checkbox is unchecked, answer numeration should not be displayed in set correct answer section response fields', () => {
|
1012
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseNumeration(), 'notExist');
|
1013
|
-
});
|
1014
|
-
|
1015
|
-
it('When the user checks the \'Display answer numeration to students\' checkbox, answer numeration should not be displayed in set correct answer section response fields', () => {
|
1016
|
-
fillInTheGapsOverImageTextPage.steps.checkDisplayAnswerNumerationToStudentsCheckbox();
|
1017
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseNumeration(), 'notExist');
|
1018
|
-
});
|
1019
|
-
|
1020
|
-
it('CSS of \'Display answer numeration to students\' section - checked state', { tags: 'css' }, () => {
|
1021
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.displayAnswerNumerationToStudentsCheckbox().parent().find('svg g g'), {
|
1022
|
-
'fill': css.color.activeButtons
|
1023
|
-
});
|
1024
|
-
});
|
1025
|
-
|
1026
|
-
it('Accessibility of \'Display answer numeration to students\' section - checked state', { tags: 'a11y' }, () => {
|
1027
|
-
cy.checkAccessibility(fillInTheGapsOverImageTextPage.displayAnswerNumerationToStudentsCheckbox().parents('.additional-settings-container'));
|
1028
|
-
});
|
1029
|
-
});
|
1030
|
-
|
1031
|
-
//Failing due to https://redmine.zeuslearning.com/issues/548127
|
1032
|
-
describe('Additional settings: Display answer numeration to students - Preview tab', () => {
|
1033
|
-
abortEarlySetup();
|
1034
|
-
before(() => {
|
1035
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
1036
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
1037
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
1038
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
1039
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1040
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1041
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
1042
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
1043
|
-
});
|
1044
|
-
|
1045
|
-
it('When \'Display answer numeration to students\' checkbox is unchecked, answer numeration should not be displayed in preview tab response fields', () => {
|
1046
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseNumeration(), 'notExist');
|
1047
|
-
});
|
1048
|
-
|
1049
|
-
it('When the user checks the \'Display answer numeration to students\' checkbox, answer numeration should not be displayed in preview tab response fields', () => {
|
1050
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
1051
|
-
fillInTheGapsOverImageTextPage.steps.checkDisplayAnswerNumerationToStudentsCheckbox();
|
1052
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
1053
|
-
fillInTheGapsOverImageTextPage.steps.verifyResponseFieldNumeration(['1', '2']);
|
1054
|
-
});
|
1055
|
-
});
|
1056
|
-
|
1057
|
-
describe('Additional settings: Multiline response - Contents and set correct answer section', () => {
|
1058
|
-
abortEarlySetup();
|
1059
|
-
before(() => {
|
1060
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
1061
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
1062
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
1063
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
1064
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1065
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
1066
|
-
});
|
1067
|
-
|
1068
|
-
it('\'Multiline response\' functionality label and checkbox should be displayed and by default it should be unchecked', () => {
|
1069
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.multilineResponseLabel(), 'Multiline response');
|
1070
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.multilineResponseLabel(), 'visible');
|
1071
|
-
fillInTheGapsOverImageTextPage.steps.verifyMultilineResponseCheckboxNotChecked();
|
1072
|
-
});
|
1073
|
-
|
1074
|
-
it('CSS of \'Multiline response\' section - unchecked state', { tags: 'css' }, () => {
|
1075
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.multilineResponseLabel(), {
|
1076
|
-
'color': css.color.labelText,
|
1077
|
-
'font-size': css.fontSize.normal,
|
1078
|
-
'font-weight': css.fontWeight.regular
|
1079
|
-
});
|
1080
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.multilineResponseCheckbox().parent().find('svg'), {
|
1081
|
-
'fill': css.color.uncheckedCheckbox
|
1082
|
-
});
|
1083
|
-
});
|
1084
|
-
|
1085
|
-
//Note: a11y covered in Additional settings accordion, verifyAdditonalSettingsAccordionProperties
|
1086
|
-
|
1087
|
-
it('When the \'Multiline response\' functionality is disabled, the response fields should not have \'textarea\' field in \'Set correct answer\' section', () => {
|
1088
|
-
fillInTheGapsOverImageTextPage.steps.verifyMultilineResponseForResponseFieldSetCorrectAnswerSectionDisabled();
|
1089
|
-
});
|
1090
|
-
|
1091
|
-
it('When \'Multiline response\' functionality is disabled then the user should not be able to enter a multiline response in the \'Set correct answer\' section', () => {
|
1092
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, 'l{enter}o{enter}r{enter}e{enter}m');
|
1093
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldSetCorrectAnswerSection(0, 'lorem');
|
1094
|
-
});
|
1095
|
-
|
1096
|
-
it('When the \'Multiline response\' functionality is enabled, the response field should have \'textarea\' field in \'Set correct answer\' section', () => {
|
1097
|
-
fillInTheGapsOverImageTextPage.steps.checkMultilineResponseCheckbox();
|
1098
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseFieldSetCorrectAnswerSection(), 'notExist');
|
1099
|
-
});
|
1100
|
-
|
1101
|
-
it('When the \'Multiline response\' functionality is enabled then the user should be able to add Multiline responses in the \'Set correct answer\' section', () => {
|
1102
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaSetCorrectAnswerSection(0, 'l{enter}o{enter}r{enter}e{enter}m');
|
1103
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInMultilineResponseAreaSetCorrectAnswerSection(0, 'l\no\nr\ne\nm');
|
1104
|
-
});
|
1105
|
-
|
1106
|
-
it('CSS of \'Multiline response\' section - checked state', { tags: 'css' }, () => {
|
1107
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.multilineResponseCheckbox().parent().find('svg g g'), {
|
1108
|
-
'fill': css.color.activeButtons
|
1109
|
-
});
|
1110
|
-
});
|
1111
|
-
|
1112
|
-
it('Accessibility of \'Multiline response\' section - checked state', { tags: 'a11y' }, () => {
|
1113
|
-
cy.checkAccessibility(fillInTheGapsOverImageTextPage.multilineResponseCheckbox().parents('.additional-settings-container'));
|
1114
|
-
});
|
1115
|
-
|
1116
|
-
it('When the \'Multiline response\' functionality is enabled then the user should be able to enter multiline characters including the line breaks up to the set character limit', () => {
|
1117
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaSetCorrectAnswerSection(0, 'l{enter}o{enter}r{enter}e{enter}m{enter}e{enter}s{enter}u{enter}m{enter}l{enter}nam');
|
1118
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInMultilineResponseAreaSetCorrectAnswerSection(0, 'l\no\nr\ne\nm\ne\ns\nu\nm\nl\n');
|
1119
|
-
});
|
1120
|
-
|
1121
|
-
//Failing due to https://redmine.zeuslearning.com/issues/547598
|
1122
|
-
it('When the user disables the Multiline response functionality, the added input in the response field should appear in a single line in \'Set correct answer\' section', () => {
|
1123
|
-
fillInTheGapsOverImageTextPage.steps.uncheckMultilineResponseCheckbox();
|
1124
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldSetCorrectAnswerSection(0, 'loremesuml');
|
1125
|
-
});
|
1126
|
-
});
|
1127
|
-
|
1128
|
-
describe('Additional settings: Multiline response - Preview tab', () => {
|
1129
|
-
abortEarlySetup();
|
1130
|
-
before(() => {
|
1131
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
1132
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
1133
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
1134
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
1135
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1136
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
1137
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
1138
|
-
});
|
1139
|
-
|
1140
|
-
it('When the \'Multiline response\' functionality is disabled, the response field should not have \'textarea\' field in preview tab', () => {
|
1141
|
-
fillInTheGapsOverImageTextPage.steps.verifyMultilineResponseForResponseFieldPreviewTabDisabled();
|
1142
|
-
});
|
1143
|
-
|
1144
|
-
it('When \'Multiline response\' functionality is disabled, the user should not be able to add multiline response in the preview tab response field', () => {
|
1145
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, 'l{enter}o{enter}r{enter}e{enter}m');
|
1146
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(0, 'lorem');
|
1147
|
-
});
|
1148
|
-
|
1149
|
-
it('When the \'Multiline response\' functionality is enabled, the response field should have \'textarea\' field in the preview tab', () => {
|
1150
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
1151
|
-
fillInTheGapsOverImageTextPage.steps.checkMultilineResponseCheckbox();
|
1152
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
1153
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseFieldPreviewTab(), 'notExist');
|
1154
|
-
});
|
1155
|
-
|
1156
|
-
it('When the \'Multiline response\' functionality is enabled then the user should be able to add Multiline responses in the preview tab', () => {
|
1157
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaPreviewTab(0, 'l{enter}o{enter}r{enter}e{enter}m');
|
1158
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInMultilineResponseAreaPreviewTab(0, 'l\no\nr\ne\nm');
|
1159
|
-
});
|
1160
|
-
|
1161
|
-
it('When the \'Multiline response\' functionality is enabled then the user should be able to enter multiline characters including the line breaks up to the set character limit in the preview tab', () => {
|
1162
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaPreviewTab(0, 'l{enter}o{enter}r{enter}e{enter}m{enter}e{enter}s{enter}u{enter}m{enter}l{enter}nam');
|
1163
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInMultilineResponseAreaPreviewTab(0, 'l\no\nr\ne\nm\ne\ns\nu\nm\nl\n');
|
1164
|
-
});
|
1165
|
-
});
|
1166
|
-
|
1167
|
-
//Failing due to https://redmine.zeuslearning.com/issues/547600
|
1168
|
-
describe('Additional settings: Scoring for multiline response', () => {
|
1169
|
-
abortEarlySetup();
|
1170
|
-
before(() => {
|
1171
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
1172
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
1173
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
1174
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
1175
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1176
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1177
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
1178
|
-
fillInTheGapsOverImageTextPage.steps.checkMultilineResponseCheckbox();
|
1179
|
-
});
|
1180
|
-
|
1181
|
-
it('When the user has enabled the Multiline functionality then user should be able to set multiline correct answers and points in the \'Set correct answer\' section', () => {
|
1182
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaSetCorrectAnswerSection(0, 'R{enter}e{enter}s{enter}p{enter}o{enter}n{enter}s{enter}e{enter}1');
|
1183
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInMultilineResponseAreaSetCorrectAnswerSection(0, 'R\ne\ns\np\no\nn\ns\ne\n1');
|
1184
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaSetCorrectAnswerSection(1, 'Response 2')
|
1185
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInMultilineResponseAreaSetCorrectAnswerSection(1, 'Response 2');
|
1186
|
-
fillInTheGapsOverImageTextPage.steps.allotPoints(10);
|
1187
|
-
});
|
1188
|
-
|
1189
|
-
it('When the user enters the correct multiline and single line response in the preview tab then full points should be awarded and on selecting show correct answer checkbox, correct icons should be displayed beside response areas, \'Correct answer\' label and correct answer border should be displayed below the question preview and no correct answer container should be displayed', () => {
|
1190
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
1191
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaPreviewTab(0, 'R{enter}e{enter}s{enter}p{enter}o{enter}n{enter}s{enter}e{enter}1');
|
1192
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaPreviewTab(1, 'Response 2')
|
1193
|
-
fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
|
1194
|
-
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(10, 10);
|
1195
|
-
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1196
|
-
fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
|
1197
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
1198
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
1199
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
1200
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectAttemptBorder();
|
1201
|
-
fillInTheGapsOverImageTextPage.steps.uncheckShowCorrectAnswerCheckbox();
|
1202
|
-
});
|
1203
|
-
|
1204
|
-
it('When the user enters a single line response instead of a multiline response then 0 points should be awarded and on selecting show correct answer checkbox, incorrect icons should be displayed beside response areas, \'Incorrect answer\' label and incorrect answer border should be displayed below the question preview and correct answer container along with correct answers for responses marked incorrect should be displayed', () => {
|
1205
|
-
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
1206
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaPreviewTab(0, 'Response 1');
|
1207
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaPreviewTab(1, 'Response 2');
|
1208
|
-
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(0, 10);
|
1209
|
-
fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
|
1210
|
-
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
|
1211
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
1212
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
1213
|
-
fillInTheGapsOverImageTextPage.steps.verifyIncorrectAttemptBorder();
|
1214
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount(['R\ne\ns\np\no\nn\ns\ne\n1'], ['1']);
|
1215
|
-
fillInTheGapsOverImageTextPage.steps.uncheckShowCorrectAnswerCheckbox();
|
1216
|
-
});
|
1217
|
-
|
1218
|
-
it('When the user enters a multiline response instead of a single line response then 0 points should be awarded and on selecting show correct answer checkbox, incorrect icons should be displayed beside response areas, \'Incorrect answer\' label and incorrect answer border should be displayed below the question preview and correct answer container along with correct answers for responses marked incorrect should be displayed', () => {
|
1219
|
-
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
1220
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaPreviewTab(0, 'R{enter}e{enter}s{enter}p{enter}o{enter}n{enter}s{enter}e{enter}1');
|
1221
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaPreviewTab(1, 'R{enter}e{enter}s{enter}p{enter}o{enter}n{enter}s{enter}e{enter}2');
|
1222
|
-
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(0, 10);
|
1223
|
-
fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
|
1224
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
1225
|
-
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
1226
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
1227
|
-
fillInTheGapsOverImageTextPage.steps.verifyIncorrectAttemptBorder();
|
1228
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount(['Response 2'], ['2']);
|
1229
|
-
fillInTheGapsOverImageTextPage.steps.uncheckShowCorrectAnswerCheckbox();
|
1230
|
-
});
|
1231
|
-
});
|
1232
|
-
|
1233
|
-
describe('Additional settings: Spell check - Contents and set correct answer section', () => {
|
1234
|
-
abortEarlySetup();
|
1235
|
-
before(() => {
|
1236
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
1237
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
1238
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
1239
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
1240
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1241
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
1242
|
-
});
|
1243
|
-
|
1244
|
-
it('\'Spell check\' functionality label and checkbox should be displayed and by default it should be unchecked', () => {
|
1245
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.spellCheckLabel(), 'Spell check');
|
1246
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.spellCheckLabel(), 'visible');
|
1247
|
-
fillInTheGapsOverImageTextPage.steps.verifySpellCheckCheckboxNotChecked();
|
1248
|
-
});
|
1249
|
-
|
1250
|
-
it('CSS of \'Spell check\' section - unchecked state', { tags: 'css' }, () => {
|
1251
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.spellCheckLabel(), {
|
1252
|
-
'color': css.color.labelText,
|
1253
|
-
'font-size': css.fontSize.normal,
|
1254
|
-
'font-weight': css.fontWeight.regular
|
1255
|
-
});
|
1256
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.spellCheckCheckbox().parent().find('svg'), {
|
1257
|
-
'fill': css.color.uncheckedCheckbox
|
1258
|
-
});
|
1259
|
-
});
|
1260
|
-
|
1261
|
-
//Note: a11y covered in Additional settings accordion, verifyAdditonalSettingsAccordionProperties
|
1262
|
-
|
1263
|
-
//Spell check test cases for set correct answer section response fields
|
1264
|
-
it('When the \'Spell check\' functionality is disabled, the response field should have \'spellcheck\' attribute set as \'false\' in \'Set correct answer\' section', () => {
|
1265
|
-
fillInTheGapsOverImageTextPage.steps.verifySpellCheckOfResponseFieldSetCorrectAnswerSectionDisabled(0);
|
1266
|
-
});
|
1267
|
-
|
1268
|
-
it('When the \'Spell check\' functionality is enabled, the response field should have \'spellcheck\' attribute set as \'true\' in \'Set correct answer\' section', () => {
|
1269
|
-
fillInTheGapsOverImageTextPage.steps.checkSpellCheckCheckbox();
|
1270
|
-
fillInTheGapsOverImageTextPage.steps.verifySpellCheckOfResponseFieldSetCorrectAnswerSectionEnabled(0);
|
1271
|
-
});
|
1272
|
-
|
1273
|
-
it('CSS of \'Spell check\' section - checked state', { tags: 'css' }, () => {
|
1274
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.spellCheckCheckbox().parent().find('svg g g'), {
|
1275
|
-
'fill': css.color.activeButtons
|
1276
|
-
});
|
1277
|
-
});
|
1278
|
-
|
1279
|
-
it('Accessibility of \'Spell check\' section - checked state', { tags: 'a11y' }, () => {
|
1280
|
-
cy.checkAccessibility(fillInTheGapsOverImageTextPage.spellCheckCheckbox().parents('.additional-settings-container'));
|
1281
|
-
});
|
1282
|
-
});
|
1283
|
-
|
1284
|
-
describe('Additional settings: Spell check - Preview tab', () => {
|
1285
|
-
abortEarlySetup();
|
1286
|
-
before(() => {
|
1287
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
1288
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
1289
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
1290
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
1291
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1292
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
1293
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
1294
|
-
});
|
1295
|
-
it('When the \'Spell check\' functionality is disabled, the response field should have \'spellcheck\' attribute set as \'false\' in preview tab', () => {
|
1296
|
-
fillInTheGapsOverImageTextPage.steps.verifySpellCheckOfResponseFieldPreviewTabDisabled(0);
|
1297
|
-
});
|
1298
|
-
|
1299
|
-
it('When the \'Spell check\' functionality is enabled, the response field should have \'spellcheck\' attribute set as \'true\' in the preview tab', () => {
|
1300
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
1301
|
-
fillInTheGapsOverImageTextPage.steps.checkSpellCheckCheckbox();
|
1302
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
1303
|
-
fillInTheGapsOverImageTextPage.steps.verifySpellCheckOfResponseFieldPreviewTabEnabled(0);
|
1304
|
-
});
|
1305
|
-
});
|
1306
|
-
|
1307
|
-
describe('Additional settings: Font size - Contents and functionality in set correct answer section', () => {
|
1308
|
-
abortEarlySetup();
|
1309
|
-
before(() => {
|
1310
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
1311
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
1312
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
1313
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
1314
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1315
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1316
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
|
1317
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
|
1318
|
-
fillInTheGapsOverImageTextPage.steps.allotPoints(10);
|
1319
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
1320
|
-
});
|
1321
|
-
|
1322
|
-
fillInTheGapsOverImageTextPage.tests.verifyFontSizeSectionContents();
|
1323
|
-
|
1324
|
-
fontSizeDropdownOptions.forEach((option, fontsIndex) => {
|
1325
|
-
it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the set correct answer section should change to ${option}`, () => {
|
1326
|
-
fillInTheGapsOverImageTextPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex);
|
1327
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.fontSizeDropdown(), `${option}`);
|
1328
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.responseFieldSetCorrectAnswerSection(), {
|
1329
|
-
'font-size': font[count]
|
1330
|
-
});
|
1331
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.highlightNumeration(), {
|
1332
|
-
'font-size': font[count]
|
1333
|
-
});
|
1334
|
-
});
|
1335
|
-
});
|
1336
|
-
});
|
1337
|
-
|
1338
|
-
describe('Additional settings: Font size - functionality in preview tab', () => {
|
1339
|
-
abortEarlySetup();
|
1340
|
-
before(() => {
|
1341
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
1342
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
1343
|
-
cy.barsPreLoaderWait();
|
1344
|
-
fillInTheGapsOverImageTextPage.steps.addQuestionInstructions();
|
1345
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
1346
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
1347
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1348
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1349
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
|
1350
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
|
1351
|
-
fillInTheGapsOverImageTextPage.steps.allotPoints(10);
|
1352
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
1353
|
-
});
|
1354
|
-
|
1355
|
-
fontSizeDropdownOptions.forEach((option, fontsIndex) => {
|
1356
|
-
it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview tab should change to ${option} accordingly`, () => {
|
1357
|
-
fillInTheGapsOverImageTextPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex);
|
1358
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.fontSizeDropdown(), `${option}`);
|
1359
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
1360
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.questionInstructionsText(), {
|
1361
|
-
'font-size': fontSizes[fontsIndex]
|
1362
|
-
});
|
1363
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.responseFieldPreviewTab(), {
|
1364
|
-
'font-size': fontSizes[fontsIndex]
|
1365
|
-
});
|
1366
|
-
fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
|
1367
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.previewTabCorrectAnswerLabel(), {
|
1368
|
-
'font-size': fontSizes[fontsIndex]
|
1369
|
-
});
|
1370
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.responseNumeration(), {
|
1371
|
-
'font-size': fontSizes[fontsIndex]
|
1372
|
-
});
|
1373
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.previewTabCorrectAnswerResponseWrapper(), {
|
1374
|
-
'font-size': fontSizes[fontsIndex]
|
1375
|
-
});
|
1376
|
-
fillInTheGapsOverImageTextPage.steps.uncheckShowCorrectAnswerCheckbox();
|
1377
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
1378
|
-
});
|
1379
|
-
});
|
1380
|
-
});
|
1381
|
-
|
1382
|
-
describe('Additional settings: Custom special characters section - Contents and set correct answer section', () => {
|
1383
|
-
abortEarlySetup();
|
1384
|
-
before(() => {
|
1385
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
1386
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
1387
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
1388
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
1389
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1390
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1391
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
1392
|
-
});
|
1393
|
-
|
1394
|
-
fillInTheGapsOverImageTextPage.tests.verifyAdditionalSettingsCustomSpecialCharactersSection();
|
1395
|
-
|
1396
|
-
it('When the user has enabled the \'Display special characters\' functionality, then the \'Special characters\' button should be displayed when user focuses in any response field in \'Set correct answer\' section ', () => {
|
1397
|
-
fillInTheGapsOverImageTextPage.steps.verifySpecialCharacterButtonNotVisibleInResponseFieldSetCorrectAnswerSection(0);
|
1398
|
-
fillInTheGapsOverImageTextPage.steps.focusAndVerifySpecialCharactersButtonInResponseFieldSetCorrectAnswerSection(0);
|
1399
|
-
});
|
1400
|
-
|
1401
|
-
it('When the user has added no input to the \'Custom special characters\' input field then the default Special characters flyout should be displayed on clicking the \'Special characters\' button in the response field', () => {
|
1402
|
-
fillInTheGapsOverImageTextPage.steps.clickOnSpecialCharactersButtonSetCorrectAnswerSection(0);
|
1403
|
-
fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersFlyoutHeaderContents();
|
1404
|
-
});
|
1405
|
-
|
1406
|
-
fillInTheGapsOverImageTextPage.tests.verifySpecialCharactersFlyoutSymbols();
|
1407
|
-
|
1408
|
-
it(`When the user clicks on a symbol in the ${specialOrMathCharacters['specialCharacters'].popupTitle} popup, then that symbol should be inserted in the response field`, () => {
|
1409
|
-
cy.log('Clicking on all symbols.');
|
1410
|
-
fillInTheGapsOverImageTextPage.steps.clickingOnSpecialCharactersSymbolsFromFlyout();
|
1411
|
-
dialogBoxBase.steps.closeWarningPopup();
|
1412
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldSetCorrectAnswerSection(0, symbolsString)
|
1413
|
-
});
|
1414
|
-
|
1415
|
-
it('When the \'Display special characters\' checkbox is checked then user should be able to enter value in the \'Custom special characters\' input field', () => {
|
1416
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInCustomSpecialCharactersInputField(':)`');
|
1417
|
-
});
|
1418
|
-
|
1419
|
-
it('When the user clicks on the \'Special characters\' button in the response field, then a flyout with the title \'Special characters\' and close button should be displayed, the flyout should contain all the added Special characters entered in the \'Custom special characters\' input field', () => {
|
1420
|
-
fillInTheGapsOverImageTextPage.steps.focusAndVerifySpecialCharactersButtonInResponseFieldSetCorrectAnswerSection(1);
|
1421
|
-
fillInTheGapsOverImageTextPage.steps.clickOnSpecialCharactersButtonSetCorrectAnswerSection(1);
|
1422
|
-
fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersFlyoutHeaderContents();
|
1423
|
-
fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersFlyoutIcons(customSpecialCharacters);
|
1424
|
-
});
|
1425
|
-
|
1426
|
-
it('When the user clicks on the characters then they should be added to the set correct answer response field', () => {
|
1427
|
-
fillInTheGapsOverImageTextPage.steps.clickingOnSpecialCharactersSymbolsFromFlyout();
|
1428
|
-
dialogBoxBase.steps.closeWarningPopup();
|
1429
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldSetCorrectAnswerSection(1, ':)`');
|
1430
|
-
});
|
1431
|
-
});
|
1432
|
-
|
1433
|
-
describe('Additional settings: Custom special characters section - Preview tab', () => {
|
1434
|
-
abortEarlySetup();
|
1435
|
-
before(() => {
|
1436
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
1437
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
1438
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
1439
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
1440
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1441
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1442
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
1443
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
1444
|
-
});
|
1445
|
-
|
1446
|
-
it('When the \'Custom special characters\' functionality is disabled then the \'Special characters\' button should not be displayed in the preview tab response field', () => {
|
1447
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.previewTabResponseFieldSpecialCharactersButton(), 'notExist');
|
1448
|
-
});
|
1449
|
-
|
1450
|
-
it('When the user has enabled the \'Custom special characters\' functionality then the \'Special characters\' button should be displayed when user focuses in any response field in the preview tab', () => {
|
1451
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
1452
|
-
fillInTheGapsOverImageTextPage.steps.checkDisplaySpecialCharactersCheckbox();
|
1453
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
1454
|
-
fillInTheGapsOverImageTextPage.steps.verifySpecialCharacterButtonNotVisibleInResponseFieldPreviewTab(0);
|
1455
|
-
fillInTheGapsOverImageTextPage.steps.focusAndVerifySpecialCharactersButtonInResponseFieldPreviewTab(0);
|
1456
|
-
});
|
1457
|
-
|
1458
|
-
it('When the user has added no input to the \'Custom special characters\' input field then the default Special characters flyout should be displayed on clicking the \'Special characters\' button in the response field', () => {
|
1459
|
-
fillInTheGapsOverImageTextPage.steps.clickOnSpecialCharactersButtonPreviewTab(0);
|
1460
|
-
fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersFlyoutHeaderContents();
|
1461
|
-
});
|
1462
|
-
|
1463
|
-
fillInTheGapsOverImageTextPage.tests.verifySpecialCharactersFlyoutSymbols()
|
1464
|
-
|
1465
|
-
it(`When the user clicks on a symbol in the ${specialOrMathCharacters['specialCharacters'].popupTitle} popup, then that symbol should be inserted in the response field`, () => {
|
1466
|
-
fillInTheGapsOverImageTextPage.steps.clickingOnSpecialCharactersSymbolsFromFlyout();
|
1467
|
-
dialogBoxBase.steps.closeWarningPopup();
|
1468
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(0, symbolsString);
|
1469
|
-
});
|
1470
|
-
|
1471
|
-
it('When the user specifies custom special characters and clicks on the \'Special characters\' button in the preview tab response field, then a flyout with the title \'Special characters\' and close button should be displayed, the flyout should contain all the added Special characters entered in the \'Custom special characters\' input field', () => {
|
1472
|
-
cy.log('Adding custom special characters')
|
1473
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
1474
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInCustomSpecialCharactersInputField(':)`');
|
1475
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
1476
|
-
fillInTheGapsOverImageTextPage.steps.focusAndVerifySpecialCharactersButtonInResponseFieldPreviewTab(1);
|
1477
|
-
fillInTheGapsOverImageTextPage.steps.clickOnSpecialCharactersButtonPreviewTab(1);
|
1478
|
-
fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersFlyoutHeaderContents();
|
1479
|
-
fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersFlyoutIcons(customSpecialCharacters);
|
1480
|
-
});
|
1481
|
-
|
1482
|
-
it('When the user clicks on the characters then they should be added to the preview tab input field', () => {
|
1483
|
-
fillInTheGapsOverImageTextPage.steps.clickingOnSpecialCharactersSymbolsFromFlyout();
|
1484
|
-
dialogBoxBase.steps.closeWarningPopup();
|
1485
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(1, ':)`');
|
1486
|
-
});
|
1487
|
-
});
|
1488
|
-
|
1489
|
-
describe('Additional settings: Check answer', () => {
|
1490
|
-
abortEarlySetup();
|
1491
|
-
before(() => {
|
1492
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
1493
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
1494
|
-
cy.barsPreLoaderWait();
|
1495
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
1496
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
1497
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1498
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1499
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
|
1500
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
|
1501
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
1502
|
-
});
|
1503
|
-
|
1504
|
-
fillInTheGapsOverImageTextPage.tests.verifyCheckAnswerSectionAndPreviewTabCheckAnswerButton();
|
1505
|
-
});
|
1506
|
-
|
1507
|
-
describe('Additional settings: Check answer - Functionality', () => {
|
1508
|
-
abortEarlySetup();
|
1509
|
-
before(() => {
|
1510
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
1511
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
1512
|
-
cy.barsPreLoaderWait();
|
1513
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
1514
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
1515
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1516
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
1517
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
|
1518
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
|
1519
|
-
fillInTheGapsOverImageTextPage.steps.allotPoints(20);
|
1520
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
1521
|
-
fillInTheGapsOverImageTextPage.steps.setMaximumCheckAnswerAttempts(2);
|
1522
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
1523
|
-
});
|
1524
|
-
|
1525
|
-
fillInTheGapsOverImageTextPage.tests.verifyCheckAnswerButtonFunctionalityWhenQuestionIsUnattempted();
|
1526
|
-
|
1527
|
-
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', () => {
|
1528
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[0]);
|
1529
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, incorrectAnswerArray[0]);
|
1530
|
-
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
1531
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
1532
|
-
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
1533
|
-
fillInTheGapsOverImageTextPage.steps.verifyIncorrectAttemptBorder();
|
1534
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
1535
|
-
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1536
|
-
});
|
1537
|
-
|
1538
|
-
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', () => {
|
1539
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[0]);
|
1540
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, correctTabAnswerArray[0]);
|
1541
|
-
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
1542
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
1543
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
1544
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectAttemptBorder();
|
1545
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
1546
|
-
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1547
|
-
});
|
1548
|
-
|
1549
|
-
fillInTheGapsOverImageTextPage.tests.verifyDisabledCheckAnswerButtonWithCSSAnda11y();
|
1550
|
-
|
1551
|
-
it('When the user updates the value of Maximum check answer attempts input field, it should get reflected on the Preview tab', () => {
|
1552
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
1553
|
-
fillInTheGapsOverImageTextPage.steps.clearMaximumCheckAnswerAttemptsInputField();
|
1554
|
-
fillInTheGapsOverImageTextPage.steps.addInputToMaximumCheckAnswerAttemptsInputField(1);
|
1555
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
1556
|
-
fillInTheGapsOverImageTextPage.steps.verifyCheckAnswerButtonEnabled();
|
1557
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[0]);
|
1558
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, correctTabAnswerArray[0]);
|
1559
|
-
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
1560
|
-
fillInTheGapsOverImageTextPage.steps.verifyCheckAnswerButtonDisabled();
|
1561
|
-
});
|
1562
|
-
|
1563
|
-
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', () => {
|
1564
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
1565
|
-
fillInTheGapsOverImageTextPage.steps.clearMaximumCheckAnswerAttemptsInputField()
|
1566
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
1567
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[0]);
|
1568
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, correctTabAnswerArray[0]);
|
1569
|
-
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
1570
|
-
fillInTheGapsOverImageTextPage.steps.verifyCheckAnswerButtonEnabled();
|
1571
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, incorrectAnswerArray[0]);
|
1572
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, incorrectAnswerArray[0]);
|
1573
|
-
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
1574
|
-
fillInTheGapsOverImageTextPage.steps.verifyCheckAnswerButtonEnabled();
|
1575
|
-
});
|
1576
|
-
});
|
1577
|
-
|
1578
|
-
describe('Additional settings: Details section', () => {
|
1579
|
-
abortEarlySetup();
|
1580
|
-
before(() => {
|
1581
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
1582
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
1583
|
-
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
1584
|
-
});
|
1585
|
-
|
1586
|
-
fillInTheGapsOverImageTextPage.tests.verifyDetailsSection();
|
1587
|
-
});
|
1588
450
|
});
|