itemengine-cypress-automation 1.0.143-migrationScripts-d059d60.0 → 1.0.144-21MatchRepoUpdate-0ab2c79.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/additionalSettingsBasic.js +104 -0
- package/cypress/e2e/ILC/ContentBlocks/additionalSection.js +92 -0
- package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +11 -1
- package/cypress/e2e/ILC/ContentBlocks/previewTab.js +91 -0
- package/cypress/e2e/ILC/ContentBlocks/styleAndLayoutCustomizationSection.js +3 -3
- package/cypress/e2e/ILC/Desmos/desmosFourFunctionCalculatorEditTabBasicSection.js +2 -1
- package/cypress/e2e/ILC/Desmos/desmosFourFunctionCalculatorPreviewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/Desmos/desmosGeometryToolEditTabBasicSection.js +1 -0
- package/cypress/e2e/ILC/Desmos/desmosGeometryToolPreviewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/Desmos/desmosGraphingCalculatorEditTabBasicSection.js +1 -0
- package/cypress/e2e/ILC/Desmos/desmosGraphingCalculatorPreviewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/Desmos/desmosMatrixCalculatorEditTabBasicSection.js +2 -2
- package/cypress/e2e/ILC/Desmos/desmosMatrixCalculatorPreviewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/Desmos/desmosScientificCalculatorEditTabBasicSection.js +3 -2
- package/cypress/e2e/ILC/Desmos/desmosScientificCalculatorPreviewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/DesmosGraphing/additionalSettings.js +0 -5
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettingsBasic.js +124 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +0 -9
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +17 -17
- package/cypress/e2e/ILC/EssayResponse/additionalSettingsBasic.js +83 -0
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +32 -30
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +25 -21
- package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +40 -41
- package/cypress/e2e/ILC/EssayResponse/equationEditorCategories1.js +249 -99
- package/cypress/e2e/ILC/EssayResponse/equationEditorCategories2.js +118 -187
- package/cypress/e2e/ILC/EssayResponseBasic/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/EssayResponseMath/mathCharacters.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/additionalSettings.js +11 -11
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/dropzoneSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +1 -3
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/additionalSettingsBasic.js +138 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/additionalSettingsForDropdowns.js +309 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownSettings.js +181 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettingsBasic.js +132 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsBasic.js +143 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsForDropdowns.js +345 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/supportedFileTypes.js +49 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsBasic.js +25 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsForAnswerInputFields.js +251 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +49 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/additionalSettingsBasic.js +93 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/additionalSettingsForAnswerInputFields.js +215 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/textContainerSettings.js +219 -0
- package/cypress/e2e/ILC/GeoGebraTools/3DGraphingCalculatorEditTabBasicSection.js +96 -0
- package/cypress/e2e/ILC/GeoGebraTools/3DGraphingCalculatorPreviewTabContents.smoke.js +75 -0
- package/cypress/e2e/ILC/GeoGebraTools/casCalculatorEditTabBasicSection.js +96 -0
- package/cypress/e2e/ILC/GeoGebraTools/casCalculatorPreviewTabContents.smoke.js +75 -0
- package/cypress/e2e/ILC/GeoGebraTools/geometryCalculatorEditTabBasicSection.js +96 -0
- package/cypress/e2e/ILC/GeoGebraTools/geometryCalculatorPreviewTabContents.smoke.js +76 -0
- package/cypress/e2e/ILC/GeoGebraTools/graphingCalculatorEditTabBasicSection.js +96 -0
- package/cypress/e2e/ILC/GeoGebraTools/graphingCalculatorPreviewTabContents.smoke.js +73 -0
- package/cypress/e2e/ILC/GeoGebraTools/probablityCalculatorEditTabBasicSection.js +96 -0
- package/cypress/e2e/ILC/GeoGebraTools/probablityCalculatorPreviewTabContents.smoke.js +75 -0
- package/cypress/e2e/ILC/GeoGebraTools/scientificCalculatorEditTabBasicSection.js +96 -0
- package/cypress/e2e/ILC/GeoGebraTools/scientificCalculatorPreviewTabContents.smoke.js +75 -0
- package/cypress/e2e/ILC/GeogebraActivity/additionalSettings.js +10 -8
- package/cypress/e2e/ILC/GeogebraActivity/gradingViewAndCorrectAnswerViewContents.smoke.js +3 -2
- package/cypress/e2e/ILC/GeogebraActivity/headerSection.js +2 -1
- package/cypress/e2e/ILC/GeogebraActivity/insertResourceLink.js +318 -0
- package/cypress/e2e/ILC/GeogebraActivity/previewTabContent.smoke.js +2 -1
- package/cypress/e2e/ILC/Graphing/additionalSettingsBasic.js +15 -4
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +280 -0
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +136 -0
- package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +205 -0
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +213 -0
- package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +106 -0
- package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +79 -0
- package/cypress/e2e/ILC/MultipleSelection/additionalSettingsBasic.js +108 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +251 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/previewContentsForAllViews.smoke.js +180 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/additionalSettings.js +48 -56
- package/cypress/e2e/ILC/SingleSelection/additionalSettingsBasic.js +107 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +251 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/previewContentsForAllViews.smoke.js +180 -0
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +12 -3
- package/cypress/e2e/ILC/TextEntryMath/checkAnswerFunctionalityForAllViews.smoke.js +4 -1
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +93 -68
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +59 -52
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +59 -52
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +61 -50
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +65 -51
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +55 -46
- package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +6 -3
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +11 -9
- package/cypress/e2e/ILC/TextEntryMathWithImage/checkAnswerFunctionalityForAllViews.smoke.js +4 -3
- package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +4 -2
- package/cypress/e2e/ILC/UploadResponse/additionalSettingsBasic.js +85 -0
- package/cypress/e2e/ILC/UploadResponse/editTabScoringSection.js +12 -12
- package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +1 -1
- package/cypress/fixtures/constants.js +2 -0
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +1114 -1511
- package/cypress/fixtures/theme/ilc.json +7 -1
- package/cypress/pages/audioResponsePage.js +26 -2
- package/cypress/pages/components/additionalSettingsAccessibilitySectionComponent.js +1 -0
- package/cypress/pages/components/additionalSettingsPanel.js +3 -10
- package/cypress/pages/components/ariaLabelSectionComponent.js +84 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +5 -2
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/commonComponents.js +1 -1
- package/cypress/pages/components/createCustomCategoryFlyout.js +2 -2
- package/cypress/pages/components/createQuestionBasePage.js +1 -1
- package/cypress/pages/components/desmosToolComponent.js +1 -0
- package/cypress/pages/components/draggableOptionContainer.js +1 -1
- package/cypress/pages/components/editCategoryFlyout.js +9 -10
- package/cypress/pages/components/equationEditorFlyout.js +20 -11
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +167 -3
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +149 -6
- package/cypress/pages/components/gradingViewEnumerationComponent.js +151 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +390 -0
- package/cypress/pages/components/imageCanvasComponent.js +25 -1
- package/cypress/pages/components/index.js +5 -1
- package/cypress/pages/components/placeholderTextSectionComponent.js +110 -0
- package/cypress/pages/components/responseAreaSettingsPopupComponent.js +2 -2
- package/cypress/pages/contentBlocksPage.js +60 -1
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +4 -17
- package/cypress/pages/essayResponsePage.js +14 -11
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +15 -0
- package/cypress/pages/fillInTheGapsDropdownPage.js +121 -2
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +3 -1
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +70 -3
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +33 -3
- package/cypress/pages/fillInTheGapsTextPage.js +81 -4
- package/cypress/pages/geoGebraActivityPage.js +75 -11
- package/cypress/pages/geoGebraToolsPage.js +292 -0
- package/cypress/pages/graphingPage.js +2 -1
- package/cypress/pages/gridFillPage.js +713 -0
- package/cypress/pages/index.js +3 -1
- package/cypress/pages/multipleSelectionGridPage.js +71 -317
- package/cypress/pages/multipleSelectionPage.js +2 -1
- package/cypress/pages/selectQuestionResourceToolPage.js +13 -2
- package/cypress/pages/singleSelectionGridPage.js +78 -329
- package/cypress/pages/singleSelectionPage.js +2 -1
- package/cypress/pages/textEntryMathPage.js +24 -6
- package/cypress/pages/textEntryMathWithImagePage.js +1 -1
- package/cypress/pages/uploadResponsePage.js +4 -3
- package/package.json +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettings.js +0 -43
- package/cypress/pages/components/fillInTheGapsCommonComponents.js +0 -642
@@ -0,0 +1,93 @@
|
|
1
|
+
import { fillInTheGapsTextPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const fontSizes = { 'Tiny': '12px', 'Small': '14px', 'Default': '16px', 'Normal': '18px', 'Big': '22px', 'Huge': '26px' };
|
5
|
+
|
6
|
+
describe('Fill In the gaps with text - Additional settings', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Additional settings accordion', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
});
|
17
|
+
|
18
|
+
fillInTheGapsTextPage.tests.verifyAdditionalSettingsAccordionProperties();
|
19
|
+
});
|
20
|
+
|
21
|
+
describe('Additional settings: Font size - Contents in edit tab', () => {
|
22
|
+
abortEarlySetup();
|
23
|
+
before(() => {
|
24
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
25
|
+
cy.barsPreLoaderWait();
|
26
|
+
fillInTheGapsTextPage.steps.expandAdditionalSettings();
|
27
|
+
});
|
28
|
+
|
29
|
+
fillInTheGapsTextPage.tests.verifyFontSizeSectionContents();
|
30
|
+
});
|
31
|
+
|
32
|
+
describe('Additional settings: Font size - functionality in preview tab', () => {
|
33
|
+
abortEarlySetup();
|
34
|
+
before(() => {
|
35
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
36
|
+
cy.barsPreLoaderWait();
|
37
|
+
fillInTheGapsTextPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
38
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }]);
|
39
|
+
fillInTheGapsTextPage.steps.expandAdditionalSettings();
|
40
|
+
});
|
41
|
+
|
42
|
+
Object.keys(fontSizes).forEach((option) => {
|
43
|
+
it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview tab should change to ${fontSizes[option]} accordingly`, () => {
|
44
|
+
fillInTheGapsTextPage.steps.selectFontSizeOptionFromFontSizeDropdown(option);
|
45
|
+
utilities.verifyInnerText(fillInTheGapsTextPage.fontSizeDropdown(), `${option}`);
|
46
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
47
|
+
utilities.verifyCSS(fillInTheGapsTextPage.questionInstructionsText(), {
|
48
|
+
'font-size': fontSizes[option]
|
49
|
+
});
|
50
|
+
utilities.verifyCSS(fillInTheGapsTextPage.answerInputFieldPreviewTab(), {
|
51
|
+
'font-size': fontSizes[option]
|
52
|
+
});
|
53
|
+
fillInTheGapsTextPage.steps.switchToGradingView();
|
54
|
+
utilities.verifyCSS(fillInTheGapsTextPage.correctAnswersLabel(), {
|
55
|
+
'font-size': fontSizes[option]
|
56
|
+
});
|
57
|
+
utilities.verifyCSS(fillInTheGapsTextPage.correctAnswerResponseNumeration().find('.response-input-adornment'), {
|
58
|
+
'font-size': fontSizes[option]
|
59
|
+
});
|
60
|
+
utilities.verifyCSS(fillInTheGapsTextPage.correctAnswerResponse(), {
|
61
|
+
'font-size': fontSizes[option]
|
62
|
+
});
|
63
|
+
utilities.verifyCSS(fillInTheGapsTextPage.correctIncorrectStatusMessageText(), {
|
64
|
+
'font-size': fontSizes[option]
|
65
|
+
});
|
66
|
+
fillInTheGapsTextPage.steps.switchToStudentView();
|
67
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
68
|
+
});
|
69
|
+
});
|
70
|
+
});
|
71
|
+
|
72
|
+
describe('Additional settings: Accessibility section', () => {
|
73
|
+
abortEarlySetup();
|
74
|
+
before(() => {
|
75
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
76
|
+
cy.barsPreLoaderWait();
|
77
|
+
fillInTheGapsTextPage.steps.expandAdditionalSettings();
|
78
|
+
});
|
79
|
+
|
80
|
+
fillInTheGapsTextPage.tests.verifyAdditionalSettingsAccessibilitySection();
|
81
|
+
});
|
82
|
+
|
83
|
+
describe('Additional Settings: Details section', () => {
|
84
|
+
abortEarlySetup();
|
85
|
+
before(() => {
|
86
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
87
|
+
cy.barsPreLoaderWait();
|
88
|
+
fillInTheGapsTextPage.steps.expandAdditionalSettings();
|
89
|
+
});
|
90
|
+
|
91
|
+
fillInTheGapsTextPage.tests.verifyDetailsSection();
|
92
|
+
});
|
93
|
+
});
|
@@ -0,0 +1,215 @@
|
|
1
|
+
import { fillInTheGapsTextPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const enumerationOptions = {
|
5
|
+
'Numerical': ['1', '2'],
|
6
|
+
'Alphabet (uppercase)': ['A', 'B'],
|
7
|
+
'Alphabet (lowercase)': ['a', 'b'],
|
8
|
+
'Roman numeral (uppercase)': ['I', 'II'],
|
9
|
+
'Roman numeral (lowercase)': ['i', 'ii'],
|
10
|
+
};
|
11
|
+
const css = Cypress.env('css');
|
12
|
+
|
13
|
+
describe('Fill In the gaps with text - Additional settings : Placeholder text, Grading view, ARIA label for text containers', () => {
|
14
|
+
before(() => {
|
15
|
+
cy.loginAs('admin');
|
16
|
+
});
|
17
|
+
|
18
|
+
describe('Additional Settings: Placeholder text - Contents in edit tab', () => {
|
19
|
+
abortEarlySetup();
|
20
|
+
before(() => {
|
21
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
22
|
+
cy.barsPreLoaderWait();
|
23
|
+
fillInTheGapsTextPage.steps.expandAdditionalSettings();
|
24
|
+
});
|
25
|
+
|
26
|
+
fillInTheGapsTextPage.tests.verifyPlaceholderTextSectionContents('text containers');
|
27
|
+
|
28
|
+
it('When the user checks the "Customize placeholder text for individual text containers" checkbox, "Placeholder text for text containers" label and two input fields for individual text containers should be displayed', () => {
|
29
|
+
fillInTheGapsTextPage.steps.checkCustomizePlaceholderTextCheckbox();
|
30
|
+
utilities.verifyElementCount(fillInTheGapsTextPage.individualPlaceholderTextInputField(), 2);
|
31
|
+
fillInTheGapsTextPage.steps.verifyIndividualPlaceholderTextInputFields(0);
|
32
|
+
fillInTheGapsTextPage.steps.verifyIndividualPlaceholderTextInputFields(1);
|
33
|
+
});
|
34
|
+
|
35
|
+
it('When the users adds a new text container, the count of the placeholder text input fields should update accordingly', () => {
|
36
|
+
fillInTheGapsTextPage.steps.addResponseArea();
|
37
|
+
utilities.verifyElementCount(fillInTheGapsTextPage.individualPlaceholderTextInputField(), 3);
|
38
|
+
fillInTheGapsTextPage.steps.verifyIndividualPlaceholderTextInputFields(2);
|
39
|
+
});
|
40
|
+
|
41
|
+
it('When the user deletes any text container, the count of the placeholder text input fields should update accordingly', () => {
|
42
|
+
fillInTheGapsTextPage.steps.deleteAResponseArea(1);
|
43
|
+
utilities.verifyElementCount(fillInTheGapsTextPage.individualPlaceholderTextInputField(), 2);
|
44
|
+
fillInTheGapsTextPage.steps.verifyIndividualPlaceholderTextInputFields(0);
|
45
|
+
fillInTheGapsTextPage.steps.verifyIndividualPlaceholderTextInputFields(1);
|
46
|
+
});
|
47
|
+
});
|
48
|
+
|
49
|
+
describe('Additional Settings: Placeholder text - functionality in preview tab', () => {
|
50
|
+
abortEarlySetup();
|
51
|
+
before(() => {
|
52
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
53
|
+
cy.barsPreLoaderWait();
|
54
|
+
fillInTheGapsTextPage.steps.expandAdditionalSettings();
|
55
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
56
|
+
});
|
57
|
+
|
58
|
+
fillInTheGapsTextPage.tests.verifyPlaceholderTextPreviewTabFunctionality();
|
59
|
+
|
60
|
+
fillInTheGapsTextPage.tests.verifyIndividualPlaceholderTextPreviewTabFunctionality();
|
61
|
+
});
|
62
|
+
|
63
|
+
describe('Additional Settings: Grading view - Contents in edit tab', () => {
|
64
|
+
abortEarlySetup();
|
65
|
+
before(() => {
|
66
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
67
|
+
cy.barsPreLoaderWait();
|
68
|
+
fillInTheGapsTextPage.steps.expandAdditionalSettings();
|
69
|
+
});
|
70
|
+
|
71
|
+
fillInTheGapsTextPage.tests.verifyGradingViewEnumerationSectionContents('Text container');
|
72
|
+
|
73
|
+
it('When the user selects "Without enumeration" radio button, the identifiers section should disappear', () => {
|
74
|
+
fillInTheGapsTextPage.steps.selectEnumerationType('without enumeration');
|
75
|
+
utilities.verifyElementVisibilityState(fillInTheGapsTextPage.identifiersLabel(), 'notExist');
|
76
|
+
utilities.verifyElementVisibilityState(fillInTheGapsTextPage.numericalToggleButton(), 'notExist');
|
77
|
+
});
|
78
|
+
|
79
|
+
it('When the user selects "With enumeration" radio button again, the identifiers section should appear again', () => {
|
80
|
+
fillInTheGapsTextPage.steps.selectEnumerationType('with enumeration');
|
81
|
+
utilities.verifyElementVisibilityState(fillInTheGapsTextPage.identifiersLabel(), 'visible');
|
82
|
+
utilities.verifyElementVisibilityState(fillInTheGapsTextPage.numericalToggleButton(), 'visible');
|
83
|
+
})
|
84
|
+
});
|
85
|
+
|
86
|
+
describe('Additional settings: Grading view - functionality in preview tab', () => {
|
87
|
+
abortEarlySetup();
|
88
|
+
before(() => {
|
89
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
90
|
+
cy.barsPreLoaderWait();
|
91
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }]);
|
92
|
+
fillInTheGapsTextPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
93
|
+
fillInTheGapsTextPage.steps.expandAdditionalSettings();
|
94
|
+
});
|
95
|
+
|
96
|
+
Object.keys(enumerationOptions).forEach(option => {
|
97
|
+
it(`When "${option}" toggle button is selected in the text container identifiers section, then on switching to the preview tab text container numeration should not be displayed`, () => {
|
98
|
+
fillInTheGapsTextPage.steps.selectIdentifierToggleButton(option);
|
99
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
100
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaNumerationNotExists();
|
101
|
+
});
|
102
|
+
|
103
|
+
it('When user clicks on \'Check answer\' button then the numeration should not be displayed in the text containers', () => {
|
104
|
+
fillInTheGapsTextPage.steps.checkAnswer();
|
105
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaNumerationNotExists();
|
106
|
+
});
|
107
|
+
|
108
|
+
it(`When the user switches to the "Grading view", then the "${option}" numeration should be displayed in the answer input fields as well as correct answer options in the correct answer section`, () => {
|
109
|
+
fillInTheGapsTextPage.steps.switchToGradingView();
|
110
|
+
fillInTheGapsTextPage.steps.verifyAnswerInputFieldEnumeration(enumerationOptions[option]);
|
111
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesEnumeration(enumerationOptions[option]);
|
112
|
+
cy.log('Post step: Switch to Edit tab')
|
113
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
114
|
+
});
|
115
|
+
});
|
116
|
+
|
117
|
+
it('When the user selects "without enumeration" radio button, then in the "Grading view", numeration should not be displayed for answer input fields and in the correct answer section, the entire question preview should be displayed with correct answers', () => {
|
118
|
+
fillInTheGapsTextPage.steps.selectEnumerationType('without enumeration');
|
119
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
120
|
+
fillInTheGapsTextPage.steps.switchToGradingView();
|
121
|
+
utilities.verifyInnerText(fillInTheGapsTextPage.correctAnswerSectionWithoutEnumerationWrapper(), 'Lorem ipsum dolor sit amet, \n\nonsectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor,eget \n\ntempus tellus dapibus.');
|
122
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesWithoutEnumeration(['Flower', 'Leaf']);
|
123
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaNumerationNotExists();
|
124
|
+
utilities.verifyElementVisibilityState(fillInTheGapsTextPage.correctAnswerResponseNumeration(), 'notExist');
|
125
|
+
});
|
126
|
+
|
127
|
+
it('CSS of correct answer section', { tags: 'css' }, () => {
|
128
|
+
utilities.verifyCSS(fillInTheGapsTextPage.correctAnswerSectionWithoutEnumerationWrapper().find('.preview-question-text-wrapper'), {
|
129
|
+
'color': css.color.text,
|
130
|
+
'font-size': css.fontSize.default,
|
131
|
+
'font-weight': css.fontWeight.regular
|
132
|
+
});
|
133
|
+
fillInTheGapsTextPage.correctAnswerSectionWithoutEnumerationWrapper()
|
134
|
+
.within(() => {
|
135
|
+
utilities.verifyCSS(fillInTheGapsTextPage.correctAnswerResponseWrapperWithoutEnumeration(), {
|
136
|
+
'color': css.color.text,
|
137
|
+
'font-size': css.fontSize.default,
|
138
|
+
'font-weight': css.fontWeight.regular
|
139
|
+
});
|
140
|
+
utilities.verifyCSS(fillInTheGapsTextPage.correctAnswerResponseWrapperWithoutEnumeration().parents('.response-input-field'), {
|
141
|
+
'border': `1px solid ${css.color.correctAnswer}`
|
142
|
+
});
|
143
|
+
})
|
144
|
+
});
|
145
|
+
|
146
|
+
it('Accessibility of correct answer section', { tags: 'a11y' }, () => {
|
147
|
+
cy.checkAccessibility(fillInTheGapsTextPage.correctAnswerSectionWithoutEnumerationWrapper().parents('[class*="question-preview-wrapper"]'));
|
148
|
+
});
|
149
|
+
});
|
150
|
+
|
151
|
+
describe('Additional settings: ARIA label for text containers - Contents in edit tab', () => {
|
152
|
+
abortEarlySetup();
|
153
|
+
before(() => {
|
154
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
155
|
+
cy.barsPreLoaderWait();
|
156
|
+
fillInTheGapsTextPage.steps.expandAdditionalSettings();
|
157
|
+
});
|
158
|
+
|
159
|
+
fillInTheGapsTextPage.tests.verifyAriaLabelSectionContents('text containers');
|
160
|
+
|
161
|
+
it('When the users adds a new text container, the count of the aria label text input fields should update accordingly', () => {
|
162
|
+
fillInTheGapsTextPage.steps.addResponseArea();
|
163
|
+
utilities.verifyElementCount(fillInTheGapsTextPage.ariaLabelInputField(), 3);
|
164
|
+
fillInTheGapsTextPage.steps.verifyAriaLabelTextInputFields(2);
|
165
|
+
});
|
166
|
+
|
167
|
+
it('When the user deletes any text container, the count of the aria label texts input fields should update accordingly', () => {
|
168
|
+
fillInTheGapsTextPage.steps.deleteAResponseArea(1);
|
169
|
+
utilities.verifyElementCount(fillInTheGapsTextPage.ariaLabelInputField(), 2);
|
170
|
+
fillInTheGapsTextPage.steps.verifyAriaLabelTextInputFields(0);
|
171
|
+
fillInTheGapsTextPage.steps.verifyAriaLabelTextInputFields(1);
|
172
|
+
});
|
173
|
+
|
174
|
+
it('When the user sets aria label, then in the answer input fields of the specify correct answer section, the aria labels should not change', () => {
|
175
|
+
fillInTheGapsTextPage.steps.enterTextInAriaLabelInputField(0, 'Add answer for response 1');
|
176
|
+
fillInTheGapsTextPage.steps.verifyAnswerInputFieldAriaLabelSpecifyCorrectAnswerSection(0, 'Add answer');
|
177
|
+
fillInTheGapsTextPage.steps.verifyAnswerInputFieldAriaLabelSpecifyCorrectAnswerSection(1, 'Add answer');
|
178
|
+
});
|
179
|
+
});
|
180
|
+
|
181
|
+
describe('Additional settings: ARIA label for text containers - functionality in preview tab', () => {
|
182
|
+
abortEarlySetup();
|
183
|
+
before(() => {
|
184
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
185
|
+
cy.barsPreLoaderWait();
|
186
|
+
fillInTheGapsTextPage.steps.expandAdditionalSettings();
|
187
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
188
|
+
});
|
189
|
+
|
190
|
+
it('When the user has not set \'ARIA label\' input field, then default aria labels should be present for the answer input fields in the preview tab', () => {
|
191
|
+
fillInTheGapsTextPage.steps.verifyAnswerInputFieldAriaLabelPreviewTab(0, 'Add answer for response 1');
|
192
|
+
fillInTheGapsTextPage.steps.verifyAnswerInputFieldAriaLabelPreviewTab(1, 'Add answer for response 2');
|
193
|
+
});
|
194
|
+
|
195
|
+
it('When the user has set \'ARIA label\', then it should be present for the answer input fields in the preview tab', () => {
|
196
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
197
|
+
fillInTheGapsTextPage.steps.enterTextInAriaLabelInputField(0, 'Correct response 1');
|
198
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
199
|
+
fillInTheGapsTextPage.steps.verifyAnswerInputFieldAriaLabelPreviewTab(0, 'Correct response 1');
|
200
|
+
fillInTheGapsTextPage.steps.verifyAnswerInputFieldAriaLabelPreviewTab(1, 'Add answer for response 2');
|
201
|
+
});
|
202
|
+
|
203
|
+
it('Accessibility of input field in preview tab when custom \'ARIA label\' is set', { tags: 'a11y' }, () => {
|
204
|
+
cy.checkAccessibility(fillInTheGapsTextPage.answerInputFieldPreviewTab().parents('[class*="question-preview-wrapper"]'));
|
205
|
+
});
|
206
|
+
|
207
|
+
it('When the user clears the set value in the \'ARIA label\' input field, then the default aria labels should be present for the answer input fields in the preview tab', () => {
|
208
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
209
|
+
fillInTheGapsTextPage.steps.clearTextInAriaLabelInputField(0);
|
210
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
211
|
+
fillInTheGapsTextPage.steps.verifyAnswerInputFieldAriaLabelPreviewTab(0, 'Add answer for response 1');
|
212
|
+
fillInTheGapsTextPage.steps.verifyAnswerInputFieldAriaLabelPreviewTab(1, 'Add answer for response 2');
|
213
|
+
});
|
214
|
+
});
|
215
|
+
});
|
@@ -79,7 +79,7 @@ describe('Create item page - Fill in the gaps with text: Question instructions,
|
|
79
79
|
utilities.verifyElementCount(fillInTheGapsTextPage.answerInputFieldSpecifyCorrectAnswerSection(), 3);
|
80
80
|
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsTextPage.responseAccordionLabel(), 2), 'Response 3');
|
81
81
|
fillInTheGapsTextPage.steps.expandAdditonalSettings();
|
82
|
-
utilities.verifyElementCount(fillInTheGapsTextPage.
|
82
|
+
utilities.verifyElementCount(fillInTheGapsTextPage.ariaLabelInputField(), 3);
|
83
83
|
});
|
84
84
|
|
85
85
|
it('When the user clicks on the \'close\' button present on a response area, the response area in the question input field should get removed and the count of the response areas present in the question input field should get updated accordingly, response field along with \'Response #\' label in the \'specify correct answer\' section, \'Response #\' accordion in the additional settings accordion and the respective response field in the \'Preview tab\' should also get removed', () => {
|
@@ -0,0 +1,219 @@
|
|
1
|
+
import { dialogBoxBase, fillInTheGapsTextPage } from "../../../pages";
|
2
|
+
import utilities from "../../../support/helpers/utilities";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Create item page - Fill in the gaps with text: Text container settings', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Text container settings - Contents', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
});
|
17
|
+
|
18
|
+
it('When the user clicks on a Text container settings button, then Text container settings popup should be displayed with the title \'Text container settings\'', () => {
|
19
|
+
fillInTheGapsTextPage.steps.clickOnResponseAreaSettingsButton(0);
|
20
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
21
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBoxTitle(), 'visible');
|
22
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'Text container settings');
|
23
|
+
});
|
24
|
+
|
25
|
+
it('\'Width (px)\', \'Height (px)\' labels and input fields with default values should be displayed', () => {
|
26
|
+
utilities.verifyInnerText(fillInTheGapsTextPage.responseAreaSettingsWidthLabel(), 'Width (px)');
|
27
|
+
utilities.verifyElementVisibilityState(fillInTheGapsTextPage.responseAreaSettingsWidthLabel(), 'visible');
|
28
|
+
utilities.verifyElementVisibilityState(fillInTheGapsTextPage.responseAreaSettingsWidthInputField(), 'visible');
|
29
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaSettingsWidthInputFieldValue(120);
|
30
|
+
utilities.verifyInnerText(fillInTheGapsTextPage.responseAreaSettingsHeightLabel(), 'Height (px)');
|
31
|
+
utilities.verifyElementVisibilityState(fillInTheGapsTextPage.responseAreaSettingsHeightLabel(), 'visible');
|
32
|
+
utilities.verifyElementVisibilityState(fillInTheGapsTextPage.responseAreaSettingsHeightInputField(), 'visible');
|
33
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaSettingsHeightInputFieldValue(32);
|
34
|
+
});
|
35
|
+
|
36
|
+
it('The minimum allowed value for \'Width (px)\' and \'Height (px)\' input fields should be \'80\' and \'32\' respectively', () => {
|
37
|
+
fillInTheGapsTextPage.steps.verifyMinimumValueOfWidthAndHeightInputFields();
|
38
|
+
});
|
39
|
+
|
40
|
+
it('When user gives an input lower than \'80\' in \'Width (px)\' input field, then the input field value should be automatically set to 80', () => {
|
41
|
+
fillInTheGapsTextPage.steps.addInputToWidthInputField(50);
|
42
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaSettingsWidthInputFieldValue(80);
|
43
|
+
});
|
44
|
+
|
45
|
+
it('When user gives an input lower than \'32\' in \'Height (px)\' input field, then the input field value should be automatically set to 32', () => {
|
46
|
+
fillInTheGapsTextPage.steps.addInputToHeightInputField(30);
|
47
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaSettingsHeightInputFieldValue(32);
|
48
|
+
});
|
49
|
+
|
50
|
+
it('\'Set for all text containers\' label and checkbox should be displayed and by default the checkbox should be checked', () => {
|
51
|
+
utilities.verifyInnerText(fillInTheGapsTextPage.setForAllTextContainersLabel(), 'Set for all text containers');
|
52
|
+
utilities.verifyElementVisibilityState(fillInTheGapsTextPage.setForAllTextContainersLabel(), 'visible');
|
53
|
+
fillInTheGapsTextPage.steps.verifySetForAllTextContainersCheckboxChecked();
|
54
|
+
});
|
55
|
+
|
56
|
+
it('\'OK\' and \'Cancel\' button should be displayed in the popup', () => {
|
57
|
+
utilities.verifyInnerText(fillInTheGapsTextPage.responseAreaSettingsCancelButton(), 'Cancel');
|
58
|
+
utilities.verifyElementVisibilityState(fillInTheGapsTextPage.responseAreaSettingsCancelButton(), 'visible');
|
59
|
+
utilities.verifyInnerText(fillInTheGapsTextPage.responseAreaSettingsOkButton(), 'OK');
|
60
|
+
utilities.verifyElementVisibilityState(fillInTheGapsTextPage.responseAreaSettingsOkButton(), 'visible');
|
61
|
+
});
|
62
|
+
|
63
|
+
it('When user updates any value and clicks on \'Cancel\' button, then the Text container settings popup should close and the updated values should not be saved', () => {
|
64
|
+
fillInTheGapsTextPage.steps.addInputToWidthInputField(150);
|
65
|
+
fillInTheGapsTextPage.steps.addInputToHeightInputField(120);
|
66
|
+
fillInTheGapsTextPage.steps.uncheckSetForAllTextContainersCheckbox();
|
67
|
+
fillInTheGapsTextPage.steps.clickOnResponseAreaSettingsCancelButton();
|
68
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
69
|
+
cy.log('Reopening Text container settings popup and verifying changes not retained');
|
70
|
+
fillInTheGapsTextPage.steps.clickOnResponseAreaSettingsButton(0);
|
71
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaSettingsWidthInputFieldValue(120);
|
72
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaSettingsHeightInputFieldValue(32);
|
73
|
+
fillInTheGapsTextPage.steps.verifySetForAllTextContainersCheckboxChecked();
|
74
|
+
});
|
75
|
+
|
76
|
+
it('When user updates any value and clicks on \'OK\' button, then the Text container settings popup should close and the updated values should be saved', () => {
|
77
|
+
fillInTheGapsTextPage.steps.addInputToWidthInputField(150);
|
78
|
+
fillInTheGapsTextPage.steps.addInputToHeightInputField(120);
|
79
|
+
fillInTheGapsTextPage.steps.uncheckSetForAllTextContainersCheckbox();
|
80
|
+
fillInTheGapsTextPage.steps.clickOnResponseAreaSettingsOkButton();
|
81
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
82
|
+
cy.log('Reopening Text container settings popup and verifying changes are retained');
|
83
|
+
fillInTheGapsTextPage.steps.clickOnResponseAreaSettingsButton(0);
|
84
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaSettingsWidthInputFieldValue(150);
|
85
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaSettingsHeightInputFieldValue(120);
|
86
|
+
fillInTheGapsTextPage.steps.verifySetForAllTextContainersCheckboxUnchecked();
|
87
|
+
});
|
88
|
+
|
89
|
+
it('CSS of text container settings popup', { tags: 'css' }, () => {
|
90
|
+
utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
|
91
|
+
'color': css.color.flyoutTitle,
|
92
|
+
'font-size': css.fontSize.heading,
|
93
|
+
'font-weight': css.fontWeight.semibold
|
94
|
+
});
|
95
|
+
utilities.verifyCSS(fillInTheGapsTextPage.responseAreaSettingsWidthLabel(), {
|
96
|
+
'color': css.color.labels,
|
97
|
+
'font-size': css.fontSize.normal,
|
98
|
+
'font-weight': css.fontWeight.semibold
|
99
|
+
});
|
100
|
+
utilities.verifyCSS(fillInTheGapsTextPage.responseAreaSettingsHeightLabel(), {
|
101
|
+
'color': css.color.labels,
|
102
|
+
'font-size': css.fontSize.normal,
|
103
|
+
'font-weight': css.fontWeight.semibold
|
104
|
+
});
|
105
|
+
utilities.verifyCSS(fillInTheGapsTextPage.responseAreaSettingsWidthInputField(), {
|
106
|
+
'color': css.color.text,
|
107
|
+
'font-size': css.fontSize.default,
|
108
|
+
'font-weight': css.fontWeight.regular
|
109
|
+
});
|
110
|
+
utilities.verifyCSS(fillInTheGapsTextPage.responseAreaSettingsHeightInputField(), {
|
111
|
+
'color': css.color.text,
|
112
|
+
'font-size': css.fontSize.default,
|
113
|
+
'font-weight': css.fontWeight.regular
|
114
|
+
});
|
115
|
+
utilities.verifyCSS(fillInTheGapsTextPage.setForAllTextContainersLabel(), {
|
116
|
+
'color': css.color.labelText,
|
117
|
+
'font-size': css.fontSize.normal,
|
118
|
+
'font-weight': css.fontWeight.regular
|
119
|
+
});
|
120
|
+
utilities.verifyCSS(fillInTheGapsTextPage.responseAreaSettingsCancelButton(), {
|
121
|
+
'color': css.color.secondaryBtn,
|
122
|
+
'font-size': css.fontSize.default,
|
123
|
+
'font-weight': css.fontWeight.semibold,
|
124
|
+
'background-color': css.color.transparent
|
125
|
+
});
|
126
|
+
utilities.verifyCSS(fillInTheGapsTextPage.responseAreaSettingsOkButton(), {
|
127
|
+
'color': css.color.primaryBtn,
|
128
|
+
'font-size': css.fontSize.default,
|
129
|
+
'font-weight': css.fontWeight.semibold,
|
130
|
+
'background-color': css.color.primaryBtnBg
|
131
|
+
});
|
132
|
+
});
|
133
|
+
|
134
|
+
it('Accessibility of text container settings popup', { tags: 'css' }, () => {
|
135
|
+
cy.checkAccessibility(dialogBoxBase.dialogBox());
|
136
|
+
});
|
137
|
+
});
|
138
|
+
|
139
|
+
describe('Text container settings - Width and Height input field functionality in Edit tab', () => {
|
140
|
+
abortEarlySetup();
|
141
|
+
before(() => {
|
142
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
143
|
+
cy.barsPreLoaderWait();
|
144
|
+
fillInTheGapsTextPage.steps.clickOnResponseAreaSettingsButton(0);
|
145
|
+
});
|
146
|
+
|
147
|
+
it('When \'Set for all text containers\' checkbox is checked, user updates the width input field value and clicks on OK, then width of all response areas in question input field should be updated', () => {
|
148
|
+
fillInTheGapsTextPage.steps.addInputToWidthInputField(120);
|
149
|
+
fillInTheGapsTextPage.steps.clickOnResponseAreaSettingsOkButton();
|
150
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaWidth(0, '120px');
|
151
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaWidth(1, '120px');
|
152
|
+
});
|
153
|
+
|
154
|
+
it('When \'Set for all text containers\' checkbox is unchecked, user updates the width input field value and clicks on OK, then width of that particular response area in question input field should be updated', () => {
|
155
|
+
cy.log('Pre-step: Uncheck \'Set for all text containers\' checkbox')
|
156
|
+
fillInTheGapsTextPage.steps.clickOnResponseAreaSettingsButton(0);
|
157
|
+
fillInTheGapsTextPage.steps.uncheckSetForAllTextContainersCheckbox();
|
158
|
+
fillInTheGapsTextPage.steps.addInputToWidthInputField(180);
|
159
|
+
fillInTheGapsTextPage.steps.clickOnResponseAreaSettingsOkButton();
|
160
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaWidth(0, '180px');
|
161
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaWidth(1, '120px');
|
162
|
+
});
|
163
|
+
|
164
|
+
it('When \'Set for all text containers\' checkbox is checked, user updates the height input field value and clicks on OK, then height of all response areas in question input field should be updated', () => {
|
165
|
+
cy.log('Pre-step: Check \'Set for all text containers\' checkbox')
|
166
|
+
fillInTheGapsTextPage.steps.clickOnResponseAreaSettingsButton(0);
|
167
|
+
fillInTheGapsTextPage.steps.checkSetForAllTextContainersCheckbox();
|
168
|
+
fillInTheGapsTextPage.steps.addInputToHeightInputField(100);
|
169
|
+
fillInTheGapsTextPage.steps.clickOnResponseAreaSettingsOkButton();
|
170
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaHeight(0, '100px');
|
171
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaHeight(1, '100px');
|
172
|
+
});
|
173
|
+
|
174
|
+
it('When \'Set for all text containers\' checkbox is unchecked, user updates the height input field value and clicks on OK, then height of that particular response area in question input field should be updated', () => {
|
175
|
+
cy.log('Pre-step: Uncheck \'Set for all text containers\' checkbox')
|
176
|
+
fillInTheGapsTextPage.steps.clickOnResponseAreaSettingsButton(0);
|
177
|
+
fillInTheGapsTextPage.steps.uncheckSetForAllTextContainersCheckbox();
|
178
|
+
fillInTheGapsTextPage.steps.addInputToHeightInputField(125);
|
179
|
+
fillInTheGapsTextPage.steps.clickOnResponseAreaSettingsOkButton();
|
180
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaHeight(0, '125px');
|
181
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaHeight(1, '100px');
|
182
|
+
});
|
183
|
+
});
|
184
|
+
|
185
|
+
describe('Text container settings - Width and Height input field functionality in Preview tab', () => {
|
186
|
+
abortEarlySetup();
|
187
|
+
before(() => {
|
188
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
189
|
+
cy.barsPreLoaderWait();
|
190
|
+
fillInTheGapsTextPage.steps.clickOnResponseAreaSettingsButton(0);
|
191
|
+
});
|
192
|
+
|
193
|
+
it('When \'Set for all text containers\' checkbox is checked, user updates the width and height input field value and clicks on OK, then dimensions of all answer input fields in preview tab should be updated', () => {
|
194
|
+
fillInTheGapsTextPage.steps.addInputToWidthInputField(120);
|
195
|
+
fillInTheGapsTextPage.steps.addInputToHeightInputField(150);
|
196
|
+
fillInTheGapsTextPage.steps.clickOnResponseAreaSettingsOkButton();
|
197
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
198
|
+
fillInTheGapsTextPage.steps.verifyAnswerInputFieldWidthPreviewTab(0, '120px');
|
199
|
+
fillInTheGapsTextPage.steps.verifyAnswerInputFieldHeightPreviewTab(0, '150px');
|
200
|
+
fillInTheGapsTextPage.steps.verifyAnswerInputFieldWidthPreviewTab(1, '120px');
|
201
|
+
fillInTheGapsTextPage.steps.verifyAnswerInputFieldHeightPreviewTab(1, '150px');
|
202
|
+
});
|
203
|
+
|
204
|
+
it('When \'Set for all text containers\' checkbox is unchecked, user updates the width and height input field value and clicks on OK, then dimensions of that particular answer input field in in preview tab should be updated', () => {
|
205
|
+
cy.log('Pre-step: Uncheck \'Set for all text containers\' checkbox')
|
206
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
207
|
+
fillInTheGapsTextPage.steps.clickOnResponseAreaSettingsButton(0);
|
208
|
+
fillInTheGapsTextPage.steps.uncheckSetForAllTextContainersCheckbox();
|
209
|
+
fillInTheGapsTextPage.steps.addInputToWidthInputField(180);
|
210
|
+
fillInTheGapsTextPage.steps.addInputToHeightInputField(130);
|
211
|
+
fillInTheGapsTextPage.steps.clickOnResponseAreaSettingsOkButton();
|
212
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
213
|
+
fillInTheGapsTextPage.steps.verifyAnswerInputFieldWidthPreviewTab(0, '180px');
|
214
|
+
fillInTheGapsTextPage.steps.verifyAnswerInputFieldHeightPreviewTab(0, '130px');
|
215
|
+
fillInTheGapsTextPage.steps.verifyAnswerInputFieldWidthPreviewTab(1, '120px');
|
216
|
+
fillInTheGapsTextPage.steps.verifyAnswerInputFieldHeightPreviewTab(1, '150px');
|
217
|
+
});
|
218
|
+
});
|
219
|
+
});
|
@@ -0,0 +1,96 @@
|
|
1
|
+
import { geoGebraToolsPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
|
5
|
+
describe('Create Item page - GeoGebra : 3D graphing calculator', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('3D graphing calculator: Header section', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
geoGebraToolsPage.steps.navigateToCreateResource('3D graphing calculator');
|
14
|
+
});
|
15
|
+
|
16
|
+
geoGebraToolsPage.tests.verifyCreateQuestionPageQuestionTypeHeader('GeoGebra 3D graphing calculator');
|
17
|
+
});
|
18
|
+
|
19
|
+
describe('3D graphing calculator: Edit tab basic section content', () => {
|
20
|
+
abortEarlySetup();
|
21
|
+
before(() => {
|
22
|
+
geoGebraToolsPage.steps.navigateToCreateResource('3D graphing calculator');
|
23
|
+
});
|
24
|
+
|
25
|
+
geoGebraToolsPage.tests.verifyEditTabContents('3D graphing calculator');
|
26
|
+
});
|
27
|
+
|
28
|
+
describe('3D graphing calculator: Edit tab basic section functionality', () => {
|
29
|
+
abortEarlySetup();
|
30
|
+
before(() => {
|
31
|
+
geoGebraToolsPage.steps.navigateToCreateResource('3D graphing calculator');
|
32
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
33
|
+
});
|
34
|
+
|
35
|
+
it('When user switches to preview tab, the \'3D graphing calculator\' should be displayed with \'Width (px)\' and \'Height (px)\' as 600px by 450 px respectively and the \'Show GeoGebra\' button should not be displayed', () => {
|
36
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolIsVisible();
|
37
|
+
utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraKeyBoardPreviewTab(), 'exist');
|
38
|
+
geoGebraToolsPage.steps.verifyWidthAndHeightOfGeoGebraTool(600, 450);
|
39
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonDoesNotExist();
|
40
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolIsVisible();
|
41
|
+
utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraKeyBoardPreviewTab(), 'visible');
|
42
|
+
utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraToolCloseButtonPreviewTab(), 'notExist');
|
43
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolDragHandleIsVisible();
|
44
|
+
});
|
45
|
+
|
46
|
+
it('When the user updates the \'Width (px)\' and \'Height (px)\' in the input field the dimensions of the calculator should change accordingly', () => {
|
47
|
+
geoGebraToolsPage.steps.switchToEditTab();
|
48
|
+
geoGebraToolsPage.steps.enterInputInWidthInputField('450');
|
49
|
+
geoGebraToolsPage.steps.enterInputInHeightInputField('325');
|
50
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
51
|
+
geoGebraToolsPage.steps.verifyWidthAndHeightOfGeoGebraTool(450, 325);
|
52
|
+
});
|
53
|
+
|
54
|
+
it('When the user checks the \'Add show/hide button\' checkbox, then \'Show GeoGebra 3D graphing calculator\' button should be displayed and the 3D graphing calculator should not be displayed', () => {
|
55
|
+
geoGebraToolsPage.steps.switchToEditTab();
|
56
|
+
geoGebraToolsPage.steps.checkAddShowHideButtonCheckbox();
|
57
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
58
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Show', '3D graphing calculator');
|
59
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolNotVisible();
|
60
|
+
});
|
61
|
+
|
62
|
+
it('When the user selects \'Show GeoGebra 3D graphing calculator\' button then the 3D graphing calculator should be displayed and the button should change to \'Hide GeoGebra 3D graphing calculator\'', () => {
|
63
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolVisibilityButton();
|
64
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Hide', '3D graphing calculator');
|
65
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolIsVisible();
|
66
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolKeypadIsVisible();
|
67
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolCloseButtonIsVisible();
|
68
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolDragHandleIsVisible();
|
69
|
+
});
|
70
|
+
|
71
|
+
it('When the user closes the 3D graphing calculator using the \'Close\' button the 3D graphing calculator should close and the \'Show GeoGebra 3D graphing calculator\' button should be displayed', () => {
|
72
|
+
geoGebraToolsPage.steps.closeGeoGebraTool();
|
73
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Show', '3D graphing calculator');
|
74
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolNotVisible();
|
75
|
+
});
|
76
|
+
|
77
|
+
it('When the user checks \'Launch the GeoGebra 3D graphing calculator by default\' then on switching to preview tab the 3D graphing calculator should be displayed along with \'Hide GeoGebra 3D graphing calculator\' button', () => {
|
78
|
+
geoGebraToolsPage.steps.switchToEditTab();
|
79
|
+
geoGebraToolsPage.steps.checkLaunchToolByDefaultCheckbox();
|
80
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
81
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Hide', '3D graphing calculator');
|
82
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolIsVisible();
|
83
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolKeypadIsVisible();
|
84
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolCloseButtonIsVisible();
|
85
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolDragHandleIsVisible();
|
86
|
+
});
|
87
|
+
|
88
|
+
geoGebraToolsPage.tests.verifyPreviewTabContentsCSSAndA11y();
|
89
|
+
|
90
|
+
it('When the user selects \'Hide GeoGebra 3D graphing calculator\' button then the 3D graphing calculator should not be displayed and the button should change to \'Show GeoGebra 3D graphing calculator\'', () => {
|
91
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolVisibilityButton();
|
92
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Show', '3D graphing calculator');
|
93
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolNotVisible();
|
94
|
+
});
|
95
|
+
});
|
96
|
+
});
|