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,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 : Probability calculator', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Probability calculator: Header section', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
geoGebraToolsPage.steps.navigateToCreateResource('probability calculator');
|
14
|
+
});
|
15
|
+
|
16
|
+
geoGebraToolsPage.tests.verifyCreateQuestionPageQuestionTypeHeader('GeoGebra probability calculator');
|
17
|
+
});
|
18
|
+
|
19
|
+
describe('Probability calculator: Edit tab basic section content', () => {
|
20
|
+
abortEarlySetup();
|
21
|
+
before(() => {
|
22
|
+
geoGebraToolsPage.steps.navigateToCreateResource('probability calculator');
|
23
|
+
});
|
24
|
+
|
25
|
+
geoGebraToolsPage.tests.verifyEditTabContents('probability calculator');
|
26
|
+
});
|
27
|
+
|
28
|
+
describe('Probability calculator: Edit tab basic section functionality', () => {
|
29
|
+
abortEarlySetup();
|
30
|
+
before(() => {
|
31
|
+
geoGebraToolsPage.steps.navigateToCreateResource('probability calculator');
|
32
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
33
|
+
});
|
34
|
+
|
35
|
+
it('When user switches to preview tab, the \'Probability 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 Probability calculator\' button should be displayed and the Probability calculator should not be displayed', () => {
|
55
|
+
geoGebraToolsPage.steps.switchToEditTab();
|
56
|
+
geoGebraToolsPage.steps.checkAddShowHideButtonCheckbox();
|
57
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
58
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Show', 'probability calculator');
|
59
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolNotVisible();
|
60
|
+
});
|
61
|
+
|
62
|
+
it('When the user selects \'Show GeoGebra Probability calculator\' button then the Probability calculator should be displayed and the button should change to \'Hide GeoGebra Probability calculator\'', () => {
|
63
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolVisibilityButton();
|
64
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Hide', 'probability 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 Probability calculator using the \'Close\' button the Probability calculator should close and the \'Show GeoGebra Probability calculator\' button should be displayed', () => {
|
72
|
+
geoGebraToolsPage.steps.closeGeoGebraTool();
|
73
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Show', 'probability calculator');
|
74
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolNotVisible();
|
75
|
+
});
|
76
|
+
|
77
|
+
it('When the user checks \'Launch the GeoGebra Probability calculator by default\' then on switching to preview tab the Probability calculator should be displayed along with \'Hide GeoGebra Probability calculator\' button', () => {
|
78
|
+
geoGebraToolsPage.steps.switchToEditTab();
|
79
|
+
geoGebraToolsPage.steps.checkLaunchToolByDefaultCheckbox();
|
80
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
81
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Hide', 'probability 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 Probability calculator\' button then the Probability calculator should not be displayed and the button should change to \'Show GeoGebra Probability calculator\'', () => {
|
91
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolVisibilityButton();
|
92
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Show', 'probability 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
|
+
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('probability 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 \'Probability 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 \'Probability calculator\' and should yield expected results', () => {
|
65
|
+
geoGebraToolsPage.steps.switchToProbabilityCalculatorStatisticsTab();
|
66
|
+
geoGebraToolsPage.steps.selectAlternativeHypothesisLessThanRadioButton();
|
67
|
+
geoGebraToolsPage.steps.verifyAlternativeHypothesisLessThanRadioButtonIsSelected();
|
68
|
+
utilities.verifyTextContent(utilities.getNthElement(geoGebraToolsPage.geoGebraProbabilityCalculatorSampleValueLabel(), 0), 'Mean');
|
69
|
+
utilities.verifyTextContent(utilities.getNthElement(geoGebraToolsPage.geoGebraProbabilityCalculatorSampleValueLabel(), 1), 'σ');
|
70
|
+
utilities.verifyTextContent(utilities.getNthElement(geoGebraToolsPage.geoGebraProbabilityCalculatorSampleValueLabel(), 2), 'n');
|
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: Scientific calculator', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Scientific calculator: Header section', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
geoGebraToolsPage.steps.navigateToCreateResource('geogebra scientific calculator');
|
14
|
+
});
|
15
|
+
|
16
|
+
geoGebraToolsPage.tests.verifyCreateQuestionPageQuestionTypeHeader('GeoGebra scientific calculator');
|
17
|
+
});
|
18
|
+
|
19
|
+
describe('Scientific calculator: Edit tab basic section', () => {
|
20
|
+
abortEarlySetup();
|
21
|
+
before(() => {
|
22
|
+
geoGebraToolsPage.steps.navigateToCreateResource('geogebra scientific calculator');
|
23
|
+
});
|
24
|
+
|
25
|
+
geoGebraToolsPage.tests.verifyEditTabContents('scientific calculator');
|
26
|
+
});
|
27
|
+
|
28
|
+
describe('Scientific calculator: edit tab functionality', () => {
|
29
|
+
abortEarlySetup();
|
30
|
+
before(() => {
|
31
|
+
geoGebraToolsPage.steps.navigateToCreateResource('geogebra scientific calculator');
|
32
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
33
|
+
});
|
34
|
+
|
35
|
+
it('When user switches to preview tab, the \'Scientific 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
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolKeypadIsVisible();
|
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('300');
|
49
|
+
geoGebraToolsPage.steps.enterInputInHeightInputField('200');
|
50
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
51
|
+
geoGebraToolsPage.steps.verifyWidthAndHeightOfGeoGebraTool('300', '200');
|
52
|
+
});
|
53
|
+
|
54
|
+
it('When the user checks the \'Add show/hide button\' checkbox then \'Show GeoGebra scientific calculator\' button should be displayed and the scientific calculator should not be displayed', () => {
|
55
|
+
geoGebraToolsPage.steps.switchToEditTab();
|
56
|
+
geoGebraToolsPage.steps.checkAddShowHideButtonCheckbox();
|
57
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
58
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Show', 'scientific calculator');
|
59
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolNotVisible();
|
60
|
+
});
|
61
|
+
|
62
|
+
it('When the user selects \'Show GeoGebra scientific calculator\' button then the scientific calculator should be displayed and the button should change to \'Hide GeoGebra scientific calculator\'', () => {
|
63
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolVisibilityButton();
|
64
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Hide', 'scientific 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 scientific calculator using the \'Close\' button the scientific calculator should close and the \'Show GeoGebra scientific calculator\' button should be displayed', () => {
|
72
|
+
geoGebraToolsPage.steps.closeGeoGebraTool();
|
73
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Show', 'scientific calculator');
|
74
|
+
geoGebraToolsPage.steps.verifyGeoGebraToolNotVisible();
|
75
|
+
});
|
76
|
+
|
77
|
+
it('When the user checks \'Launch the GeoGebra scientific calculator by default\' then on switching to preview tab the scientific calculator should be displayed along with \'Hide GeoGebra scientific calculator\' button', () => {
|
78
|
+
geoGebraToolsPage.steps.switchToEditTab();
|
79
|
+
geoGebraToolsPage.steps.checkLaunchToolByDefaultCheckbox();
|
80
|
+
geoGebraToolsPage.steps.switchToPreviewTab();
|
81
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Hide', 'scientific 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 scientific calculator\' button then the scientific calculator should not be displayed and the button should change to \'Show GeoGebra scientific calculator\'', () => {
|
91
|
+
geoGebraToolsPage.steps.clickOnGeoGebraToolVisibilityButton();
|
92
|
+
geoGebraToolsPage.steps.verifyPreviewTabGeoGebraToolVisibilityButtonLabel('Show', 'scientific 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('geogebra scientific 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 \'Scientific 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 \'Scientific 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
|
+
})
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import constants from "../../../fixtures/constants";
|
1
2
|
import { geoGebraActivityPage } from "../../../pages";
|
2
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
4
|
import utilities from "../../../support/helpers/utilities";
|
@@ -24,7 +25,7 @@ describe('Create item page - GeoGebra activity: Additional Settings accordion',
|
|
24
25
|
before(() => {
|
25
26
|
geoGebraActivityPage.steps.navigateToCreateQuestion('GeoGebra activity');
|
26
27
|
cy.barsPreLoaderWait();
|
27
|
-
geoGebraActivityPage.steps.
|
28
|
+
geoGebraActivityPage.steps.expandAdditionalSettings();
|
28
29
|
});
|
29
30
|
geoGebraActivityPage.tests.verifyFontSizeSectionContents();
|
30
31
|
});
|
@@ -34,15 +35,15 @@ describe('Create item page - GeoGebra activity: Additional Settings accordion',
|
|
34
35
|
before(() => {
|
35
36
|
geoGebraActivityPage.steps.navigateToCreateQuestion('GeoGebra activity');
|
36
37
|
cy.barsPreLoaderWait();
|
37
|
-
geoGebraActivityPage.steps.
|
38
|
-
geoGebraActivityPage.steps.
|
38
|
+
geoGebraActivityPage.steps.addInputToInsertResourceLinkInputField(constants.geoGebraResourceLink1);
|
39
|
+
geoGebraActivityPage.steps.expandAdditionalSettings();
|
39
40
|
});
|
40
41
|
|
41
42
|
fontSizeDropdownOptions.forEach((option, fontsIndex) => {
|
42
43
|
it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the edit tab geoGebra resource should stay 16px`, () => {
|
43
44
|
geoGebraActivityPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex);
|
44
45
|
utilities.verifyInnerText(geoGebraActivityPage.fontSizeDropdown(), `${option}`);
|
45
|
-
utilities.verifyCSS(geoGebraActivityPage.
|
46
|
+
utilities.verifyCSS(geoGebraActivityPage.geoGebraResourceCanvasEditTab(), {
|
46
47
|
'font-size': css.fontSize.default
|
47
48
|
});
|
48
49
|
});
|
@@ -55,8 +56,8 @@ describe('Create item page - GeoGebra activity: Additional Settings accordion',
|
|
55
56
|
geoGebraActivityPage.steps.navigateToCreateQuestion('GeoGebra activity');
|
56
57
|
cy.barsPreLoaderWait();
|
57
58
|
geoGebraActivityPage.steps.addQuestionInstructions();
|
58
|
-
geoGebraActivityPage.steps.
|
59
|
-
geoGebraActivityPage.steps.
|
59
|
+
geoGebraActivityPage.steps.addInputToInsertResourceLinkInputField(constants.geoGebraResourceLink1);
|
60
|
+
geoGebraActivityPage.steps.expandAdditionalSettings();
|
60
61
|
});
|
61
62
|
|
62
63
|
fontSizeDropdownOptions.forEach((option, fontsIndex) => {
|
@@ -80,7 +81,8 @@ describe('Create item page - GeoGebra activity: Additional Settings accordion',
|
|
80
81
|
abortEarlySetup();
|
81
82
|
before(() => {
|
82
83
|
geoGebraActivityPage.steps.navigateToCreateQuestion('GeoGebra activity');
|
83
|
-
|
84
|
+
cy.barsPreLoaderWait();
|
85
|
+
geoGebraActivityPage.steps.expandAdditionalSettings();
|
84
86
|
});
|
85
87
|
|
86
88
|
geoGebraActivityPage.tests.verifyAdditionalSettingsAccessibilitySection();
|
@@ -91,7 +93,7 @@ describe('Create item page - GeoGebra activity: Additional Settings accordion',
|
|
91
93
|
before(() => {
|
92
94
|
geoGebraActivityPage.steps.navigateToCreateQuestion('GeoGebra activity');
|
93
95
|
cy.barsPreLoaderWait();
|
94
|
-
geoGebraActivityPage.steps.
|
96
|
+
geoGebraActivityPage.steps.expandAdditionalSettings();
|
95
97
|
});
|
96
98
|
geoGebraActivityPage.tests.verifyDetailsSection();
|
97
99
|
});
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import constants from "../../../fixtures/constants";
|
1
2
|
import { correctAnswerViewPage, geoGebraActivityPage, itemPreviewPage, studentViewPage, gradingViewPage } from "../../../pages";
|
2
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
4
|
import utilities from "../../../support/helpers/utilities";
|
@@ -18,7 +19,7 @@ describe('Create item page - Desmos: Grading view, Correct answer view contents'
|
|
18
19
|
geoGebraActivityPage.steps.navigateToCreateQuestion('GeoGebra activity');
|
19
20
|
cy.barsPreLoaderWait();
|
20
21
|
geoGebraActivityPage.steps.addQuestionInstructions();
|
21
|
-
geoGebraActivityPage.steps.
|
22
|
+
geoGebraActivityPage.steps.addInputToInsertResourceLinkInputField(constants.geoGebraResourceLink1);
|
22
23
|
geoGebraActivityPage.steps.addInputToWidthInputField(450);
|
23
24
|
geoGebraActivityPage.steps.addInputToHeightInputField(400);
|
24
25
|
geoGebraActivityPage.steps.allotPoints(10);
|
@@ -71,7 +72,7 @@ describe('Create item page - Desmos: Grading view, Correct answer view contents'
|
|
71
72
|
geoGebraActivityPage.steps.navigateToCreateQuestion('GeoGebra activity');
|
72
73
|
cy.barsPreLoaderWait();
|
73
74
|
geoGebraActivityPage.steps.addQuestionInstructions();
|
74
|
-
geoGebraActivityPage.steps.
|
75
|
+
geoGebraActivityPage.steps.addInputToInsertResourceLinkInputField(constants.geoGebraResourceLink1);
|
75
76
|
geoGebraActivityPage.steps.addInputToWidthInputField(450);
|
76
77
|
geoGebraActivityPage.steps.addInputToHeightInputField(400);
|
77
78
|
geoGebraActivityPage.steps.allotPoints(10);
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import constants from "../../../fixtures/constants";
|
1
2
|
import { dialogBoxBase, geoGebraActivityPage } from "../../../pages";
|
2
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
4
|
import utilities from "../../../support/helpers/utilities";
|
@@ -56,7 +57,7 @@ describe('Create item page - GeoGebra activity: Question instructions', () => {
|
|
56
57
|
|
57
58
|
it('Validation error messages should disappear when required input fields are filled', () => {
|
58
59
|
geoGebraActivityPage.steps.addTextInQuestionInstructionsInputField('Select correct option from dropdown');
|
59
|
-
geoGebraActivityPage.steps.
|
60
|
+
geoGebraActivityPage.steps.addInputToInsertResourceLinkInputField(constants.geoGebraResourceLink1);
|
60
61
|
geoGebraActivityPage.steps.allotPoints(10);
|
61
62
|
geoGebraActivityPage.steps.verifyErrorMessageIsNotDisplayed();
|
62
63
|
});
|