itemengine-cypress-automation 1.0.142 → 1.0.143
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,75 @@
|
|
1
|
+
import { geoGebraToolsPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
|
5
|
+
const views = utilities.getViews(previewContentViews);
|
6
|
+
var itemReferenceID = "";
|
7
|
+
|
8
|
+
//TODO - Update after https://redmine.zeuslearning.com/issues/564419 is resolved
|
9
|
+
|
10
|
+
describe('Preview tab contents for all views', () => {
|
11
|
+
before(() => {
|
12
|
+
cy.loginAs('admin');
|
13
|
+
});
|
14
|
+
|
15
|
+
views.forEach((view) => {
|
16
|
+
describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
|
17
|
+
abortEarlySetup();
|
18
|
+
before(() => {
|
19
|
+
switch (view) {
|
20
|
+
case 'Question preview':
|
21
|
+
geoGebraToolsPage.steps.navigateToCreateResource('3D graphing calculator');
|
22
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
23
|
+
break;
|
24
|
+
case 'Item view':
|
25
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
26
|
+
break;
|
27
|
+
case 'Item preview':
|
28
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
29
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
30
|
+
break;
|
31
|
+
case 'Student view':
|
32
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
33
|
+
break;
|
34
|
+
case 'Grading view':
|
35
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
36
|
+
break;
|
37
|
+
case 'Correct answer view':
|
38
|
+
cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
|
39
|
+
break;
|
40
|
+
default:
|
41
|
+
throw new Error('Invalid view');
|
42
|
+
}
|
43
|
+
});
|
44
|
+
|
45
|
+
after(() => {
|
46
|
+
if (view === 'Question preview') {
|
47
|
+
geoGebraToolsPage.steps.clickOnSaveQuestionButton();
|
48
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
49
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
50
|
+
}
|
51
|
+
if (view === 'Student view') {
|
52
|
+
studentViewPage.steps.submitResponse();
|
53
|
+
utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
|
54
|
+
}
|
55
|
+
});
|
56
|
+
|
57
|
+
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', () => {
|
58
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolIsVisible();
|
59
|
+
utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraKeyBoardPreviewTab(), 'exist');
|
60
|
+
geoGebraToolsPage.steps.verifyWidthAndHeightOfGeoGebraTool('600', '450');
|
61
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonDoesNotExist();
|
62
|
+
utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraToolPreviewTab(), 'exist');
|
63
|
+
});
|
64
|
+
|
65
|
+
if (view != 'Item view' && view != 'Item preview') {
|
66
|
+
it('User should be able to perform actions on the on the \'3D graphing calculator\' and should yield appropriate results', () => {
|
67
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolKeypadKeys('5');
|
68
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolKeypadKeys('−');
|
69
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolKeypadKeys('6');
|
70
|
+
geoGebraToolsPage.steps.verifyTextAndResultInTextArea('5-6 = -1');
|
71
|
+
});
|
72
|
+
}
|
73
|
+
});
|
74
|
+
});
|
75
|
+
})
|
@@ -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 : CAS calculator', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('CAS calculator: Header section', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
geoGebraToolsPage.steps.navigateToCreateResource('CAS calculator');
|
14
|
+
});
|
15
|
+
|
16
|
+
geoGebraToolsPage.tests.verifyCreateQuestionPageQuestionTypeHeader('GeoGebra CAS calculator');
|
17
|
+
});
|
18
|
+
|
19
|
+
describe('CAS calculator: Edit tab basic section content', () => {
|
20
|
+
abortEarlySetup();
|
21
|
+
before(() => {
|
22
|
+
geoGebraToolsPage.steps.navigateToCreateResource('CAS calculator');
|
23
|
+
});
|
24
|
+
|
25
|
+
geoGebraToolsPage.tests.verifyEditTabContents('CAS calculator');
|
26
|
+
});
|
27
|
+
|
28
|
+
describe('CAS calculator: Edit tab basic section functionality', () => {
|
29
|
+
abortEarlySetup();
|
30
|
+
before(() => {
|
31
|
+
geoGebraToolsPage.steps.navigateToCreateResource('CAS calculator');
|
32
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
33
|
+
});
|
34
|
+
|
35
|
+
it('When user switches to preview tab, the \'CAS 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 CAS calculator\' button should be displayed and the CAS calculator should not be displayed', () => {
|
55
|
+
geoGebraToolsPage.steps.switchToEditTab();
|
56
|
+
geoGebraToolsPage.steps.checkAddShowHideButtonCheckbox();
|
57
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
58
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Show', 'CAS calculator');
|
59
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolNotVisible();
|
60
|
+
});
|
61
|
+
|
62
|
+
it('When the user selects \'Show GeoGebra CAS calculator\' button then the CAS calculator should be displayed and the button should change to \'Hide GeoGebra CAS calculator\'', () => {
|
63
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolVisibilityButton();
|
64
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Hide', 'CAS 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 CAS calculator using the \'Close\' button the CAS calculator should close and the \'Show GeoGebra CAS calculator\' button should be displayed', () => {
|
72
|
+
geoGebraToolsPage.steps.closeGeoGebraTool();
|
73
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Show', 'CAS calculator');
|
74
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolNotVisible();
|
75
|
+
});
|
76
|
+
|
77
|
+
it('When the user checks \'Launch the GeoGebra CAS calculator by default\' then on switching to preview tab the CAS calculator should be displayed along with \'Hide GeoGebra CAS calculator\' button', () => {
|
78
|
+
geoGebraToolsPage.steps.switchToEditTab();
|
79
|
+
geoGebraToolsPage.steps.checkLaunchToolByDefaultCheckbox();
|
80
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
81
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Hide', 'CAS 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 CAS calculator\' button then the CAS calculator should not be displayed and the button should change to \'Show GeoGebra CAS calculator\'', () => {
|
91
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolVisibilityButton();
|
92
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Show', 'CAS calculator');
|
93
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolNotVisible();
|
94
|
+
});
|
95
|
+
});
|
96
|
+
});
|
@@ -0,0 +1,75 @@
|
|
1
|
+
import { geoGebraToolsPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
|
5
|
+
const views = utilities.getViews(previewContentViews);
|
6
|
+
var itemReferenceID = "";
|
7
|
+
|
8
|
+
//TODO - Update after https://redmine.zeuslearning.com/issues/564419 is resolved
|
9
|
+
|
10
|
+
describe('Preview tab contents for all views', () => {
|
11
|
+
before(() => {
|
12
|
+
cy.loginAs('admin');
|
13
|
+
});
|
14
|
+
|
15
|
+
views.forEach((view) => {
|
16
|
+
describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
|
17
|
+
abortEarlySetup();
|
18
|
+
before(() => {
|
19
|
+
switch (view) {
|
20
|
+
case 'Question preview':
|
21
|
+
geoGebraToolsPage.steps.navigateToCreateResource('CAS calculator');
|
22
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
23
|
+
break;
|
24
|
+
case 'Item view':
|
25
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
26
|
+
break;
|
27
|
+
case 'Item preview':
|
28
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
29
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
30
|
+
break;
|
31
|
+
case 'Student view':
|
32
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
33
|
+
break;
|
34
|
+
case 'Grading view':
|
35
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
36
|
+
break;
|
37
|
+
case 'Correct answer view':
|
38
|
+
cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
|
39
|
+
break;
|
40
|
+
default:
|
41
|
+
throw new Error('Invalid view');
|
42
|
+
}
|
43
|
+
});
|
44
|
+
|
45
|
+
after(() => {
|
46
|
+
if (view === 'Question preview') {
|
47
|
+
geoGebraToolsPage.steps.clickOnSaveQuestionButton();
|
48
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
49
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
50
|
+
}
|
51
|
+
if (view === 'Student view') {
|
52
|
+
studentViewPage.steps.submitResponse();
|
53
|
+
utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
|
54
|
+
}
|
55
|
+
});
|
56
|
+
|
57
|
+
it('When user switches to preview tab, the \'CAS 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', () => {
|
58
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolIsVisible();
|
59
|
+
utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraKeyBoardPreviewTab(), 'exist');
|
60
|
+
geoGebraToolsPage.steps.verifyWidthAndHeightOfGeoGebraTool('600', '450');
|
61
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonDoesNotExist();
|
62
|
+
utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraToolPreviewTab(), 'exist');
|
63
|
+
});
|
64
|
+
|
65
|
+
if (view != 'Item view' && view != 'Item preview') {
|
66
|
+
it('User should be able to perform actions on the on the \'CAS calculator\' and should yield appropriate results', () => {
|
67
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolKeypadKeys('5');
|
68
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolKeypadKeys('−');
|
69
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolKeypadKeys('6');
|
70
|
+
geoGebraToolsPage.steps.verifyTextAndResultInTextArea('5-6');
|
71
|
+
});
|
72
|
+
}
|
73
|
+
});
|
74
|
+
});
|
75
|
+
})
|
@@ -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 : Geometry calculator', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Geometry calculator: Header section', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
geoGebraToolsPage.steps.navigateToCreateResource('geometry calculator');
|
14
|
+
});
|
15
|
+
|
16
|
+
geoGebraToolsPage.tests.verifyCreateQuestionPageQuestionTypeHeader('GeoGebra geometry calculator');
|
17
|
+
});
|
18
|
+
|
19
|
+
describe('Geometry calculator: Edit tab basic section content', () => {
|
20
|
+
abortEarlySetup();
|
21
|
+
before(() => {
|
22
|
+
geoGebraToolsPage.steps.navigateToCreateResource('geometry calculator');
|
23
|
+
});
|
24
|
+
|
25
|
+
geoGebraToolsPage.tests.verifyEditTabContents('geometry calculator');
|
26
|
+
});
|
27
|
+
|
28
|
+
describe('Geometry calculator: Edit tab basic section functionality', () => {
|
29
|
+
abortEarlySetup();
|
30
|
+
before(() => {
|
31
|
+
geoGebraToolsPage.steps.navigateToCreateResource('geometry calculator');
|
32
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
33
|
+
});
|
34
|
+
|
35
|
+
it('When user switches to preview tab, the \'Geometry 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.geoGebraGeometryCalculatorToolsPanel(), '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 Geometry calculator\' button should be displayed and the Geometry calculator should not be displayed', () => {
|
55
|
+
geoGebraToolsPage.steps.switchToEditTab();
|
56
|
+
geoGebraToolsPage.steps.checkAddShowHideButtonCheckbox();
|
57
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
58
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Show', 'geometry calculator');
|
59
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolNotVisible();
|
60
|
+
});
|
61
|
+
|
62
|
+
it('When the user selects \'Show GeoGebra Geometry calculator\' button then the Geometry calculator should be displayed and the button should change to \'Hide GeoGebra Geometry calculator\'', () => {
|
63
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolVisibilityButton();
|
64
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Hide', 'geometry calculator');
|
65
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolIsVisible();
|
66
|
+
utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraGeometryCalculatorToolsPanel(), 'visible');
|
67
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolCloseButtonIsVisible();
|
68
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolDragHandleIsVisible();
|
69
|
+
});
|
70
|
+
|
71
|
+
it('When the user closes the Geometry calculator using the \'Close\' button the Geometry calculator should close and the \'Show GeoGebra Geometry calculator\' button should be displayed', () => {
|
72
|
+
geoGebraToolsPage.steps.closeGeoGebraTool();
|
73
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Show', 'geometry calculator');
|
74
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolNotVisible();
|
75
|
+
});
|
76
|
+
|
77
|
+
it('When the user checks \'Launch the GeoGebra Geometry calculator by default\' then on switching to preview tab the Geometry calculator should be displayed along with \'Hide GeoGebra Geometry calculator\' button', () => {
|
78
|
+
geoGebraToolsPage.steps.switchToEditTab();
|
79
|
+
geoGebraToolsPage.steps.checkLaunchToolByDefaultCheckbox();
|
80
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
81
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Hide', 'geometry calculator');
|
82
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolIsVisible();
|
83
|
+
utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraGeometryCalculatorToolsPanel(), 'visible');
|
84
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolCloseButtonIsVisible();
|
85
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolDragHandleIsVisible();
|
86
|
+
});
|
87
|
+
|
88
|
+
geoGebraToolsPage.tests.verifyPreviewTabContentsCSSAndA11y();
|
89
|
+
|
90
|
+
it('When the user selects \'Hide GeoGebra Geometry calculator\' button then the Geometry calculator should not be displayed and the button should change to \'Show GeoGebra Geometry calculator\'', () => {
|
91
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolVisibilityButton();
|
92
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Show', 'geometry calculator');
|
93
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolNotVisible();
|
94
|
+
});
|
95
|
+
});
|
96
|
+
});
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import { geoGebraToolsPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
|
5
|
+
const views = utilities.getViews(previewContentViews);
|
6
|
+
var itemReferenceID = "";
|
7
|
+
|
8
|
+
describe('Preview tab contents for all views', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
views.forEach((view) => {
|
14
|
+
describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
|
15
|
+
abortEarlySetup();
|
16
|
+
before(() => {
|
17
|
+
switch (view) {
|
18
|
+
case 'Question preview':
|
19
|
+
geoGebraToolsPage.steps.navigateToCreateResource('geometry calculator');
|
20
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
21
|
+
break;
|
22
|
+
case 'Item view':
|
23
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
24
|
+
break;
|
25
|
+
case 'Item preview':
|
26
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
27
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
28
|
+
break;
|
29
|
+
case 'Student view':
|
30
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
31
|
+
break;
|
32
|
+
case 'Grading view':
|
33
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
34
|
+
break;
|
35
|
+
case 'Correct answer view':
|
36
|
+
cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
|
37
|
+
break;
|
38
|
+
default:
|
39
|
+
throw new Error('Invalid view');
|
40
|
+
}
|
41
|
+
});
|
42
|
+
|
43
|
+
after(() => {
|
44
|
+
if (view === 'Question preview') {
|
45
|
+
geoGebraToolsPage.steps.clickOnSaveQuestionButton();
|
46
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
47
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
48
|
+
}
|
49
|
+
if (view === 'Student view') {
|
50
|
+
studentViewPage.steps.submitResponse();
|
51
|
+
utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
|
52
|
+
}
|
53
|
+
});
|
54
|
+
|
55
|
+
it('When user switches to preview tab, the \'Geometry 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', () => {
|
56
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolIsVisible();
|
57
|
+
utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraKeyBoardPreviewTab(), 'exist');
|
58
|
+
geoGebraToolsPage.steps.verifyWidthAndHeightOfGeoGebraTool('600', '450');
|
59
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonDoesNotExist();
|
60
|
+
utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraToolPreviewTab(), 'exist');
|
61
|
+
});
|
62
|
+
|
63
|
+
if (view != 'Item view' && view != 'Item preview') {
|
64
|
+
it('User should be able to perform actions on the on the \'Geometry calculator\' and should yield appropriate results', () => {
|
65
|
+
geoGebraToolsPage.steps.selectGeometryCalculatorAlgebraButton();
|
66
|
+
geoGebraToolsPage.steps.clickShowKeyboardButton();
|
67
|
+
utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraKeyBoardPreviewTab(), 'visible');
|
68
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolKeypadKeys('5');
|
69
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolKeypadKeys('−');
|
70
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolKeypadKeys('6');
|
71
|
+
geoGebraToolsPage.steps.verifyTextAndResultInTextArea('5-6 = -1');
|
72
|
+
});
|
73
|
+
}
|
74
|
+
});
|
75
|
+
});
|
76
|
+
})
|
@@ -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 : Graphing calculator', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Graphing calculator: Header section', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
geoGebraToolsPage.steps.navigateToCreateResource('graphing calculator');
|
14
|
+
});
|
15
|
+
|
16
|
+
geoGebraToolsPage.tests.verifyCreateQuestionPageQuestionTypeHeader('GeoGebra graphing calculator');
|
17
|
+
});
|
18
|
+
|
19
|
+
describe('Graphing calculator: Edit tab basic section content', () => {
|
20
|
+
abortEarlySetup();
|
21
|
+
before(() => {
|
22
|
+
geoGebraToolsPage.steps.navigateToCreateResource('graphing calculator');
|
23
|
+
});
|
24
|
+
|
25
|
+
geoGebraToolsPage.tests.verifyEditTabContents('graphing calculator');
|
26
|
+
});
|
27
|
+
|
28
|
+
describe('Graphing calculator: Edit tab basic section functionality', () => {
|
29
|
+
abortEarlySetup();
|
30
|
+
before(() => {
|
31
|
+
geoGebraToolsPage.steps.navigateToCreateResource('graphing calculator');
|
32
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
33
|
+
});
|
34
|
+
|
35
|
+
it('When user switches to preview tab, the \'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 Graphing calculator\' button should be displayed and the Graphing calculator should not be displayed', () => {
|
55
|
+
geoGebraToolsPage.steps.switchToEditTab();
|
56
|
+
geoGebraToolsPage.steps.checkAddShowHideButtonCheckbox();
|
57
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
58
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Show', 'graphing calculator');
|
59
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolNotVisible();
|
60
|
+
});
|
61
|
+
|
62
|
+
it('When the user selects \'Show GeoGebra Graphing calculator\' button then the Graphing calculator should be displayed and the button should change to \'Hide GeoGebra Graphing calculator\'', () => {
|
63
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolVisibilityButton();
|
64
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Hide', '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 Graphing calculator using the \'Close\' button the Graphing calculator should close and the \'Show GeoGebra Graphing calculator\' button should be displayed', () => {
|
72
|
+
geoGebraToolsPage.steps.closeGeoGebraTool();
|
73
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Show', 'graphing calculator');
|
74
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolNotVisible();
|
75
|
+
});
|
76
|
+
|
77
|
+
it('When the user checks \'Launch the GeoGebra Graphing calculator by default\' then on switching to preview tab the Graphing calculator should be displayed along with \'Hide GeoGebra Graphing calculator\' button', () => {
|
78
|
+
geoGebraToolsPage.steps.switchToEditTab();
|
79
|
+
geoGebraToolsPage.steps.checkLaunchToolByDefaultCheckbox();
|
80
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
81
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Hide', '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 Graphing calculator\' button then the Graphing calculator should not be displayed and the button should change to \'Show GeoGebra Graphing calculator\'', () => {
|
91
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolVisibilityButton();
|
92
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Show', 'graphing calculator');
|
93
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolNotVisible();
|
94
|
+
});
|
95
|
+
});
|
96
|
+
});
|
@@ -0,0 +1,73 @@
|
|
1
|
+
import { geoGebraToolsPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
|
5
|
+
const views = utilities.getViews(previewContentViews);
|
6
|
+
var itemReferenceID = "";
|
7
|
+
|
8
|
+
describe('Preview tab contents for all views', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
views.forEach((view) => {
|
14
|
+
describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
|
15
|
+
abortEarlySetup();
|
16
|
+
before(() => {
|
17
|
+
switch (view) {
|
18
|
+
case 'Question preview':
|
19
|
+
geoGebraToolsPage.steps.navigateToCreateResource('graphing calculator');
|
20
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
21
|
+
break;
|
22
|
+
case 'Item view':
|
23
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
24
|
+
break;
|
25
|
+
case 'Item preview':
|
26
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
27
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
28
|
+
break;
|
29
|
+
case 'Student view':
|
30
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
31
|
+
break;
|
32
|
+
case 'Grading view':
|
33
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
34
|
+
break;
|
35
|
+
case 'Correct answer view':
|
36
|
+
cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
|
37
|
+
break;
|
38
|
+
default:
|
39
|
+
throw new Error('Invalid view');
|
40
|
+
}
|
41
|
+
});
|
42
|
+
|
43
|
+
after(() => {
|
44
|
+
if (view === 'Question preview') {
|
45
|
+
geoGebraToolsPage.steps.clickOnSaveQuestionButton();
|
46
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
47
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
48
|
+
}
|
49
|
+
if (view === 'Student view') {
|
50
|
+
studentViewPage.steps.submitResponse();
|
51
|
+
utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
|
52
|
+
}
|
53
|
+
});
|
54
|
+
|
55
|
+
it('When user switches to preview tab, the \'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', () => {
|
56
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolIsVisible();
|
57
|
+
utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraKeyBoardPreviewTab(), 'exist');
|
58
|
+
geoGebraToolsPage.steps.verifyWidthAndHeightOfGeoGebraTool(600, 450);
|
59
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonDoesNotExist();
|
60
|
+
utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraToolPreviewTab(), 'exist');
|
61
|
+
});
|
62
|
+
|
63
|
+
if (view != 'Item view' && view != 'Item preview' && view != 'Student view') {
|
64
|
+
it('User should be able to perform actions on the on the \'Graphing calculator\' and should yield expected results', () => {
|
65
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolKeypadKeys('5');
|
66
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolKeypadKeys('−');
|
67
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolKeypadKeys('6');
|
68
|
+
geoGebraToolsPage.steps.verifyTextAndResultInTextArea('5-6 = -1');
|
69
|
+
});
|
70
|
+
};
|
71
|
+
});
|
72
|
+
});
|
73
|
+
});
|