itemengine-cypress-automation 1.0.129 → 1.0.131-updateILCrepo6March-02c78d1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +210 -0
- package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +91 -0
- package/cypress/e2e/ILC/ContentBlocks/styleAndLayoutCustomizationSection.js +392 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +2 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +152 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +196 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +195 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +288 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/manuallyAndNonScored.js +141 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +245 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +413 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +218 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +245 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +163 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +224 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +196 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +224 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +83 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +653 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +180 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabScoringSection.js +229 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/specifyCorrectAnswerSection.js +90 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/switchingCasesBetweenOptionsLayout.js +50 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +204 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +204 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +298 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingPenaltyScoring.js +63 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/manuallyAndNonScored.js +111 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +231 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsBasic.js +90 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +232 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +231 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsBasic.js +138 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +213 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +186 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +214 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAndDropdownMenuSection.js +161 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +328 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +144 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabScoringSection.js +250 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +75 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +74 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +188 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +8 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +4 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +1 -52
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +3 -211
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +39 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -50
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/conditionalCheckboxScoring.js +325 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +1 -146
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +78 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +265 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +75 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/responseAnswersAndAcceptedStudentInput.js +56 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +40 -2
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specialCharactersSection.js +249 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +64 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +128 -0
- package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +889 -0
- package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +168 -0
- package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +203 -0
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +222 -0
- package/cypress/e2e/ILC/SimpleCalculator/calculatorFunctionality.js +349 -0
- package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +132 -0
- package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +35 -7
- package/cypress/e2e/ILC/UploadResponse/studentViewSettingsSection.js +213 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +41 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +377 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponsePreview.js +161 -0
- package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +250 -0
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
- package/cypress/fixtures/theme/ilc.json +6 -1
- package/cypress/fixtures/uploadResponseFileType.js +5 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +13 -13
- package/cypress/pages/components/customizeSpecialCharacterComponent.js +24 -6
- package/cypress/pages/components/draggableOptionContainer.js +1 -0
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +42 -4
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +149 -5
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +954 -77
- package/cypress/pages/components/questionInputFieldComponent.js +1 -1
- package/cypress/pages/components/questionInstructionsComponent.js +2 -1
- package/cypress/pages/contentBlocksPage.js +515 -0
- package/cypress/pages/drawingResponsePage.js +2 -2
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +359 -3
- package/cypress/pages/fillInTheGapsDropdownPage.js +21 -1
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +5 -57
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +3 -24
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +1 -435
- package/cypress/pages/fillInTheGapsTextPage.js +9 -2
- package/cypress/pages/graphingPage.js +484 -0
- package/cypress/pages/index.js +4 -1
- package/cypress/pages/simpleCalculatorPage.js +310 -0
- package/cypress/pages/uploadResponsePage.js +260 -92
- package/package.json +2 -2
- package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +0 -242
- package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +0 -99
- package/cypress/e2e/ILC/Passage/passageEditTab.js +0 -241
- package/cypress/e2e/ILC/Passage/passageHeaderSection.js +0 -73
- package/cypress/e2e/ILC/Passage/passagePreviewTab.js +0 -246
@@ -1,6 +1,13 @@
|
|
1
1
|
import utilities from "../../support/helpers/utilities";
|
2
|
+
import { autoScoredScoringSectionMultiResponseType } from "./autoScoredScoringSectionMultiResponseType";
|
2
3
|
|
3
4
|
const selectors = {
|
5
|
+
dropzoneLabelSpecifyCorrectAnswerSection: () => cy.get('[class*="ResponseLabel"].title-casing'),
|
6
|
+
|
7
|
+
//Penalty points
|
8
|
+
penaltyPointsForEachIncorrectDropzoneInputField: () => cy.get('input[aria-label="Penalty points for each incorrect dropzone"]'),
|
9
|
+
specifyPointsForEachIncorrectDropzoneRadioButton: () => cy.get('input[aria-label*="Specify points for each incorrect"]'),
|
10
|
+
|
4
11
|
correctAnswersNumeration: () => cy.get('[class*="__AnswerCell"] .answer-numeration-number-box'),
|
5
12
|
correctAnswersOptions: () => cy.get('[class*="__AnswerWrapper"] .question-text-wrapper'),
|
6
13
|
correctAnswersLabel: () => cy.get('.correct-answers-label'),
|
@@ -27,14 +34,45 @@ const steps = {
|
|
27
34
|
verifyCorrectAnswerSectionNotExists: () => {
|
28
35
|
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropCommonComponents.correctAnswerContainer(), 'notExist');
|
29
36
|
},
|
30
|
-
}
|
31
37
|
|
32
|
-
|
38
|
+
verifyPointsPerResponseLabel: () => {
|
39
|
+
utilities.verifyInnerText(autoScoredScoringSectionMultiResponseType.pointsPerResponseLabel(), 'Points per response:\n-');
|
40
|
+
utilities.verifyElementVisibilityState(autoScoredScoringSectionMultiResponseType.pointsPerResponseLabel(), 'visible');
|
41
|
+
},
|
42
|
+
|
43
|
+
verifyPartialEqualWeightsPointsPerResponseScore: (pointsPerResponse) => {
|
44
|
+
autoScoredScoringSectionMultiResponseType.partialEqualWeightsPointsPerResponseScore()
|
45
|
+
.should('have.text', pointsPerResponse);
|
46
|
+
},
|
47
|
+
|
48
|
+
/**
|
49
|
+
* @description Verifies the penalty points value for each incorrect dropzone
|
50
|
+
* @param {number} points - The expected penalty points value for each incorrect dropzone.
|
51
|
+
*/
|
52
|
+
verifyPenaltyPointsForEachIncorrectDropzoneValue: (points) => {
|
53
|
+
fillInTheGapsOverImageDragAndDropPage.penaltyPointsForEachIncorrectDropzoneInputField()
|
54
|
+
.should('have.value', points);
|
55
|
+
},
|
56
|
+
|
57
|
+
/**
|
58
|
+
* @description Allots penalty points for each incorrect dropzone
|
59
|
+
* @param {number} points - The penalty points to be allotted for each dropzone.
|
60
|
+
*/
|
61
|
+
allotPenaltyPointsForEachIncorrectDropzone: (points) => {
|
62
|
+
fillInTheGapsOverImageDragAndDropPage.penaltyPointsForEachIncorrectDropzoneInputField()
|
63
|
+
.clear()
|
64
|
+
.type(`${points}`)
|
65
|
+
.should('have.value', points)
|
66
|
+
.blur();
|
67
|
+
},
|
33
68
|
|
69
|
+
selectPenaltyPointsForEachIncorrectDropzone: () => {
|
70
|
+
fillInTheGapsOverImageDragAndDropPage.specifyPointsForEachIncorrectDropzoneRadioButton()
|
71
|
+
.click();
|
72
|
+
}
|
34
73
|
}
|
35
74
|
|
36
75
|
export const fillInTheGapsDragAndDropCommonComponents = {
|
37
76
|
...selectors,
|
38
|
-
steps
|
39
|
-
tests
|
77
|
+
steps
|
40
78
|
}
|
@@ -10,13 +10,15 @@ const selectors = {
|
|
10
10
|
//Dropdown options section
|
11
11
|
dropdownOptionsLabel: () => cy.get('.dropdown-options-label'),
|
12
12
|
dropdownOptionsTab: () => cy.get('.ngie-tablist-tab-button[data-ngie-testid*="dropdown"]'),
|
13
|
-
dropdownOptionsInputField: () => cy.get('.input-editable input[type*="text"]'),
|
13
|
+
dropdownOptionsInputField: () => cy.get('.input-editable input[type*="text"]:visible'),
|
14
14
|
dropdownOptionsInputFieldNumeration: () => cy.get('[class*="MuiInputAdornment"]'),
|
15
15
|
|
16
16
|
//Specify correct answer dropdown
|
17
17
|
dropdownWrapperSpecifyCorrectAnswerSection: () => cy.get('.response-dropdown-wrapper'),
|
18
18
|
dropdownSpecifyCorrectAnswerSection: () => cy.get('.response-dropdown [role="combobox"]'),
|
19
19
|
dropdownLabelSpecifyCorrectAnswerSection: () => cy.get('.response-label'),
|
20
|
+
partialDifferentWeightsPointsLabel: () => cy.get('.cloze-with-text-partial-points-per-response-label'),
|
21
|
+
penaltyPointsForEachIncorrectDropdownInputField: () => cy.get('input[aria-label="Penalty points for each incorrect dropdown"]'),
|
20
22
|
|
21
23
|
//Dropdown list
|
22
24
|
dropdownList: () => cy.get('.dropdown-list-ul'),
|
@@ -45,6 +47,9 @@ const selectors = {
|
|
45
47
|
correctAnswersLabel: () => cy.get('[class*="question-preview-wrapper"] [class*="correct-answer-label"]'),
|
46
48
|
correctAnswerResponseNumeration: () => cy.get('.answer-numeration-number-box'),
|
47
49
|
tickIconWrapper: () => cy.get('.tick-icon-wrapper [data-name*="Rectangle"]'),
|
50
|
+
|
51
|
+
//additional settings
|
52
|
+
enterAriaLabelInputField: () => cy.get('input[aria-label*="Enter ARIA label"]')
|
48
53
|
}
|
49
54
|
|
50
55
|
const steps = {
|
@@ -533,7 +538,55 @@ const steps = {
|
|
533
538
|
verifyDropdownMenuOptionsNotWordWrappedPreviewTab: () => {
|
534
539
|
fillInTheGapsDropdownCommonComponent.dropdownList()
|
535
540
|
.should('not.have.class', 'wordwrap-dropdown-menu');
|
536
|
-
}
|
541
|
+
},
|
542
|
+
|
543
|
+
verifyOptionsInputFieldContents: (index) => {
|
544
|
+
optionsWrapperComponent.optionWrapper()
|
545
|
+
.eq(index)
|
546
|
+
.within(() => {
|
547
|
+
fillInTheGapsDropdownCommonComponent.dropdownOptionsInputField()
|
548
|
+
.should('have.attr', 'placeholder', 'Enter option');
|
549
|
+
commonComponents.dragHandleButton()
|
550
|
+
.should('exist');
|
551
|
+
commonComponents.deleteButton()
|
552
|
+
.should('be.visible');
|
553
|
+
fillInTheGapsDropdownCommonComponent.dropdownOptionsInputFieldNumeration()
|
554
|
+
.should('have.text', index + 1);
|
555
|
+
});
|
556
|
+
},
|
557
|
+
|
558
|
+
getOptionCount: () => {
|
559
|
+
return fillInTheGapsDropdownCommonComponent.dropdownOptionsInputField().its('length')
|
560
|
+
},
|
561
|
+
|
562
|
+
/**
|
563
|
+
* @description verify the displayed penalty points for each incorrect dropdown
|
564
|
+
* @param {number} penaltyPoints displayed penalty points
|
565
|
+
*/
|
566
|
+
verifyPenaltyPointsForEachIncorrectDropdown: (penaltyPoints) => {
|
567
|
+
utilities.verifyInnerText(autoScoredScoringSectionMultiResponseType.penaltyPointsDetailsSectionAllottedPointsLabel(), `Penalty points for each incorrect dropdown: ${penaltyPoints}`);
|
568
|
+
},
|
569
|
+
|
570
|
+
/**
|
571
|
+
* @description Verifies the penalty points value for each incorrect dropdown
|
572
|
+
* @param {number} points - The expected penalty points value for each incorrect dropdown.
|
573
|
+
*/
|
574
|
+
verifyPenaltyPointsForEachIncorrectDropdownValue: (points) => {
|
575
|
+
fillInTheGapsDropdownCommonComponent.penaltyPointsForEachIncorrectDropdownInputField()
|
576
|
+
.should('have.value', points);
|
577
|
+
},
|
578
|
+
|
579
|
+
/**
|
580
|
+
* @description Allots penalty points for each incorrect dropdown
|
581
|
+
* @param {number} points - The penalty points to be allotted for each dropdown.
|
582
|
+
*/
|
583
|
+
allotPenaltyPointsForEachIncorrectDropdown: (points) => {
|
584
|
+
fillInTheGapsDropdownCommonComponent.penaltyPointsForEachIncorrectDropdownInputField()
|
585
|
+
.clear()
|
586
|
+
.type(`${points}`)
|
587
|
+
.should('have.value', points)
|
588
|
+
.blur();
|
589
|
+
},
|
537
590
|
}
|
538
591
|
|
539
592
|
const tests = {
|
@@ -543,10 +596,11 @@ const tests = {
|
|
543
596
|
* @example - verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
|
544
597
|
*/
|
545
598
|
verifySpecifyCorrectAnswerAccordionContentsAndFunctionality: (accordionName) => {
|
546
|
-
it(`
|
547
|
-
utilities.verifyElementCount(fillInTheGapsDropdownCommonComponent.dropdownSpecifyCorrectAnswerSection(),
|
599
|
+
it(`The dropdowns \'Dropdown 1\' and \'Dropdown 2\' should be displayed in the ${accordionName} accordion in collapsed state`, () => {
|
600
|
+
utilities.verifyElementCount(fillInTheGapsDropdownCommonComponent.dropdownSpecifyCorrectAnswerSection(), 2);
|
548
601
|
fillInTheGapsDropdownCommonComponent.steps.verifyDropdownIsCollapsedInSpecifyCorrectAnswerSection(0);
|
549
602
|
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownLabelSpecifyCorrectAnswerSection(), 0), 'Dropdown 1');
|
603
|
+
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownLabelSpecifyCorrectAnswerSection(), 1), 'Dropdown 2');
|
550
604
|
});
|
551
605
|
|
552
606
|
it('When user expands and collapses the dropdown without selecting any option, \'Error: Please set a correct answer.\' error message should be displayed', () => {
|
@@ -594,10 +648,100 @@ const tests = {
|
|
594
648
|
utilities.verifyElementVisibilityState(utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownLabelSpecifyCorrectAnswerSection(), index), 'visible');
|
595
649
|
})
|
596
650
|
});
|
651
|
+
},
|
652
|
+
|
653
|
+
verifyAddOptionFunctionalityForDropdownOptions: () => {
|
654
|
+
it('When user adds an option using \'Add Option\' button then the added option input field should be displayed and option numeration should increment', () => {
|
655
|
+
let initialOptionCount;
|
656
|
+
fillInTheGapsDropdownCommonComponent.steps.getOptionCount().then((count) => {
|
657
|
+
initialOptionCount = count;
|
658
|
+
optionsWrapperComponent.steps.addOption();
|
659
|
+
fillInTheGapsDropdownCommonComponent.steps.getOptionCount().should('eq', initialOptionCount + 1);
|
660
|
+
fillInTheGapsDropdownCommonComponent.steps.verifyOptionsInputFieldContents(initialOptionCount);
|
661
|
+
});
|
662
|
+
});
|
663
|
+
},
|
664
|
+
|
665
|
+
verifyDropdownAndDropdownMenuSectionContents: () => {
|
666
|
+
it('Dropdown label, \'User specified width\' and \'Auto scale\' toggle buttons should be displayed', () => {
|
667
|
+
utilities.verifyInnerText(fillInTheGapsDropdownCommonComponent.dropdownLabel(), 'Dropdown');
|
668
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDropdownCommonComponent.dropdownLabel(), 'visible');
|
669
|
+
utilities.verifyInnerText(fillInTheGapsDropdownCommonComponent.userSpecifiedWidthToggleButton(), 'User specified width');
|
670
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDropdownCommonComponent.userSpecifiedWidthToggleButton(), 'visible');
|
671
|
+
utilities.verifyInnerText(fillInTheGapsDropdownCommonComponent.AutoScaleToggleButton(), 'Auto scale');
|
672
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDropdownCommonComponent.AutoScaleToggleButton(), 'visible');
|
673
|
+
});
|
674
|
+
|
675
|
+
it('By default \'User specified width\' toggle button should be in selected state and \'Auto scale\' should not be in selected state', () => {
|
676
|
+
fillInTheGapsDropdownCommonComponent.steps.verifyUserSpecifiedToggleButtonIsSelected();
|
677
|
+
fillInTheGapsDropdownCommonComponent.steps.verifyAutoScaleToggleButtonNotSelected();
|
678
|
+
});
|
679
|
+
|
680
|
+
it('\'Display multiline text in dropdown\' checkbox and label should be displayed and by default it should be unchecked', () => {
|
681
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDropdownCommonComponent.displayMultilineTextCheckbox(), 'exist');
|
682
|
+
utilities.verifyInnerText(fillInTheGapsDropdownCommonComponent.displayMultilineTextCheckboxLabel(), 'Display multiline text in dropdown');
|
683
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDropdownCommonComponent.displayMultilineTextCheckboxLabel(), 'visible');
|
684
|
+
fillInTheGapsDropdownCommonComponent.steps.verifyDisplayMultilineCheckboxIsNotChecked();
|
685
|
+
});
|
686
|
+
|
687
|
+
it('\'Dropdown menu\' label should be displayed', () => {
|
688
|
+
utilities.verifyInnerText(fillInTheGapsDropdownCommonComponent.dropdownMenuLabel(), 'Dropdown menu');
|
689
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDropdownCommonComponent.dropdownMenuLabel(), 'visible');
|
690
|
+
});
|
691
|
+
|
692
|
+
it('\'Word wrap for dropdown menu\' checkbox and label should be displayed and by default it should be checked', () => {
|
693
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDropdownCommonComponent.wordWrapCheckbox(), 'exist');
|
694
|
+
utilities.verifyInnerText(fillInTheGapsDropdownCommonComponent.wordWrapCheckboxLabel(), 'Word wrap for dropdown menu');
|
695
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDropdownCommonComponent.wordWrapCheckboxLabel(), 'visible');
|
696
|
+
fillInTheGapsDropdownCommonComponent.steps.verifyWordWrapForDropdownMenuCheckboxIsChecked();
|
697
|
+
});
|
698
|
+
|
699
|
+
it('CSS of Dropdown and Dropdown menu section', { tags: 'css' }, () => {
|
700
|
+
utilities.verifyCSS(fillInTheGapsDropdownCommonComponent.dropdownLabel(), {
|
701
|
+
'color': css.color.sectionHeading,
|
702
|
+
'font-size': css.fontSize.normal,
|
703
|
+
'font-weight': css.fontWeight.semibold
|
704
|
+
});
|
705
|
+
utilities.verifyCSS(fillInTheGapsDropdownCommonComponent.userSpecifiedWidthToggleButton(), {
|
706
|
+
'color': css.color.whiteText,
|
707
|
+
'font-size': css.fontSize.normal,
|
708
|
+
'font-weight': css.fontWeight.bold,
|
709
|
+
'background-color': css.color.toggleButtonSelectedBg
|
710
|
+
});
|
711
|
+
utilities.verifyCSS(fillInTheGapsDropdownCommonComponent.AutoScaleToggleButton(), {
|
712
|
+
'color': css.color.UnselectedToggleButton,
|
713
|
+
'font-size': css.fontSize.normal,
|
714
|
+
'font-weight': css.fontWeight.bold
|
715
|
+
});
|
716
|
+
utilities.verifyCSS(fillInTheGapsDropdownCommonComponent.displayMultilineTextCheckboxLabel(), {
|
717
|
+
'color': css.color.labelText,
|
718
|
+
'font-size': css.fontSize.normal,
|
719
|
+
'font-weight': css.fontWeight.regular
|
720
|
+
});
|
721
|
+
utilities.verifyCSS(fillInTheGapsDropdownCommonComponent.dropdownMenuLabel(), {
|
722
|
+
'color': css.color.sectionHeading,
|
723
|
+
'font-size': css.fontSize.normal,
|
724
|
+
'font-weight': css.fontWeight.semibold
|
725
|
+
});
|
726
|
+
utilities.verifyCSS(fillInTheGapsDropdownCommonComponent.wordWrapCheckboxLabel(), {
|
727
|
+
'color': css.color.labelText,
|
728
|
+
'font-size': css.fontSize.normal,
|
729
|
+
'font-weight': css.fontWeight.regular
|
730
|
+
});
|
731
|
+
//Checked checkbox
|
732
|
+
utilities.verifyCSS(fillInTheGapsDropdownCommonComponent.wordWrapCheckbox().parent().find('g g').eq(0), {
|
733
|
+
'fill': css.color.activeButtons
|
734
|
+
});
|
735
|
+
});
|
736
|
+
|
737
|
+
it('Accessibility of Dropdown and Dropdown menu section', { tags: 'a11y' }, () => {
|
738
|
+
cy.checkAccessibility(fillInTheGapsDropdownCommonComponent.dropdownLabel().parents('.student-view-settings-container'));
|
739
|
+
});
|
597
740
|
}
|
598
741
|
}
|
599
742
|
|
600
743
|
export const fillInTheGapsDropdownCommonComponent = {
|
601
744
|
...selectors,
|
602
|
-
steps
|
745
|
+
steps,
|
746
|
+
tests
|
603
747
|
}
|