itemengine-cypress-automation 1.0.336 → 1.0.338-12thMarchRegressionFixes-1cd5906.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/editQuestion.smoke.js +94 -0
- package/cypress/e2e/ILC/ChartsBar/editQuestion.smoke.js +93 -0
- package/cypress/e2e/ILC/ChartsDotsPlot/editQuestion.smoke.js +92 -0
- package/cypress/e2e/ILC/ChartsLine/editQuestion.smoke.js +84 -0
- package/cypress/e2e/ILC/ChartsLine/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/CkEditorEquationEditor/selectModeEditorBasic.js +1 -1
- package/cypress/e2e/ILC/CkEditorInsertImage/insertImageBasicFile.js +1 -1
- package/cypress/e2e/ILC/CkEditorInsertImage/upload.js +1 -1
- package/cypress/e2e/ILC/CkEditorInsertTable/insertTableEditorBasicFile.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +12 -9
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationLayoutProperties.js +2 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +63 -1
- package/cypress/e2e/ILC/EssayResponse/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/EssayResponseBasic/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/EssayResponseMath/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/checkScoringLableBannerAndCorrectAnswer.js +84 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/checkAddAlternativeButton.js +33 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +2 -4
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +2 -8
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabBasicSection.js +32 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/headerSection.js +39 -6
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViewInIncompleteAuthoring.smoke.js +119 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +91 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/checkAddAlternativeButton.js +37 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editQuestion.smoke.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +36 -2
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +36 -6
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/previewContentsForAllViewsInIncompleteAuthoring.smoke.js +103 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +96 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAddAlternativeButton.js +38 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editQuestion.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +39 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +39 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViewsInIncompleteuthoring.smoke.js +106 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/supportedFileTypes.js +2 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +38 -5
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +88 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/checkAddAlternative.js +35 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editQuestion.smoke.js +33 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViewsInIncompleteAuthoring.js +97 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +3 -4
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +79 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/checkAddAlternativeButton.js +32 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +30 -2
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +35 -4
- package/cypress/e2e/ILC/FillInTheGapsTextNew/previewContentsForAllViewsInIncompleteAuthoring.smoke.js +99 -0
- package/cypress/e2e/ILC/GridFill/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +109 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternatePoints.js +45 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/checkScoringLableBannerAndCorrectAnswer.js +96 -0
- package/cypress/e2e/ILC/ImageHighlight/checkAddAlternativeButton.js +39 -0
- package/cypress/e2e/ILC/ImageHighlight/editQuestion.smoke.js +76 -0
- package/cypress/e2e/ILC/ImageHighlight/editTabBasicSection.js +46 -0
- package/cypress/e2e/ILC/ImageHighlight/headerSection.js +35 -5
- package/cypress/e2e/ILC/ImageHighlight/previewContentForAllViewInIncompleteAuthoring.js +118 -0
- package/cypress/e2e/ILC/ListOrderingNew/editQuestion.smoke.js +3 -0
- package/cypress/e2e/ILC/Matching/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationLayoutProperties.js +3 -3
- package/cypress/e2e/ILC/NumberLine/editQuestion.smoke.js +79 -0
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +5 -5
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/editQuestion.smoke.js +72 -0
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +1 -0
- package/cypress/e2e/ILC/NumberLineLabel/editQuestion.smoke.js +80 -0
- package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/editQuestion.smoke.js +81 -0
- package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +2 -2
- package/cypress/e2e/ILC/ShortTextResponseNew/editQuestion.smoke.js +56 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/previewContentsForAllViews.smoke.js +5 -6
- package/cypress/e2e/ILC/SingleSelection/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/SingleSelection/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/editQuestion.smoke.js +76 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/editQuestion.smoke.js +92 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/TextSelection/editQuestion.smoke.js +0 -3
- package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
- package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +9 -9
- package/cypress/e2e/ILC/chartsDotsPlot/gradingViewAndCorrectAnswerView.smoke.js +2 -2
- package/cypress/e2e/ILC/chartsDotsPlot/numberLineAxisSettings.js +1 -0
- package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/fixtures/uploadResponseFileType.js +1 -1
- package/cypress/pages/chartsBarPage.js +3 -0
- package/cypress/pages/chartsDotPlotPage.js +2 -0
- package/cypress/pages/chartsLinePage.js +38 -2
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +2 -0
- package/cypress/pages/components/browseItemsPage.js +4 -4
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +22 -1
- package/cypress/pages/components/layoutSectionComponent.js +1 -1
- package/cypress/pages/components/optionsWrapperComponent.js +1 -0
- package/cypress/pages/components/scoringSectionBaseEditTab.js +2 -1
- package/cypress/pages/createItemPage.js +7 -0
- package/cypress/pages/drawingResponsePage.js +73 -2
- package/cypress/pages/feedbackScalePage.js +2 -0
- package/cypress/pages/fillInTheGapsDropdownPage.js +21 -0
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +2 -2
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +22 -0
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +22 -0
- package/cypress/pages/fillInTheGapsTextPage.js +24 -2
- package/cypress/pages/imageHighlightPage.js +37 -2
- package/cypress/pages/listOrderingPage.js +4 -2
- package/cypress/pages/menuBarPage.js +65 -65
- package/cypress/pages/numberLineLabelPage.js +4 -1
- package/cypress/pages/numberLinePage.js +2 -0
- package/cypress/pages/shortTextResponsePage.js +2 -0
- package/cypress/pages/textEntryMathPage.js +7 -3
- package/cypress/pages/textEntryMathWithImagePage.js +3 -0
- package/package.json +2 -2
@@ -0,0 +1,84 @@
|
|
1
|
+
import { fillInTheGapsDragAndDropPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
const options = ['Flower', 'Leaves'];
|
5
|
+
|
6
|
+
describe('Create item page - Fill in the gaps drag and drop', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Question preview: Auto scored with points', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
fillInTheGapsDragAndDropPage.steps.addInputToOptionsInputField(options);
|
17
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
18
|
+
});
|
19
|
+
|
20
|
+
it('In preview tab, when an answer is not set then manually scored scoring label should be displayed', () => {
|
21
|
+
fillInTheGapsDragAndDropPage.steps.checkManuallyScoredScoringLabel();
|
22
|
+
});
|
23
|
+
|
24
|
+
it('In preview tab, when user switches to grading view then no banner and correct answer should be displayed', () => {
|
25
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Flower': 1, 'Leaves': 0 });
|
26
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
27
|
+
fillInTheGapsDragAndDropPage.steps.verifyAnswerStatusBannerNotExist();
|
28
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExist();
|
29
|
+
});
|
30
|
+
|
31
|
+
it('When user allocates points to the question then the scoring label should be displayed as manually scored and banner and correct answer status should not exist', () => {
|
32
|
+
fillInTheGapsDragAndDropPage.steps.switchToEditTab();
|
33
|
+
fillInTheGapsDragAndDropPage.steps.allotPoints(2);
|
34
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
35
|
+
fillInTheGapsDragAndDropPage.steps.checkManuallyScoredScoringLabel();
|
36
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Flower': 1, 'Leaves': 0 });
|
37
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
38
|
+
fillInTheGapsDragAndDropPage.steps.verifyAnswerStatusBannerNotExist();
|
39
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExist();
|
40
|
+
});
|
41
|
+
|
42
|
+
});
|
43
|
+
|
44
|
+
describe('Question preview: Auto scored without points', () => {
|
45
|
+
abortEarlySetup();
|
46
|
+
before(() => {
|
47
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
48
|
+
cy.barsPreLoaderWait();
|
49
|
+
fillInTheGapsDragAndDropPage.steps.addInputToOptionsInputField(options);
|
50
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Flower': 0, 'Leaves': 1});
|
51
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
52
|
+
});
|
53
|
+
|
54
|
+
it('In preview tab, when points are not set then manually scored scoring label should be displayed', () => {
|
55
|
+
fillInTheGapsDragAndDropPage.steps.checkManuallyScoredScoringLabel();
|
56
|
+
});
|
57
|
+
|
58
|
+
it('In preview tab, when user switches to grading view then banner and correct answer should be displayed', () => {
|
59
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Flower': 1, 'Leaves': 0 });
|
60
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
61
|
+
fillInTheGapsDragAndDropPage.steps.verifyAnswerStatusBannerExist();
|
62
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionExist();
|
63
|
+
});
|
64
|
+
});
|
65
|
+
|
66
|
+
describe('Question preview: Non scored', () => {
|
67
|
+
abortEarlySetup();
|
68
|
+
before(() => {
|
69
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
70
|
+
cy.barsPreLoaderWait();
|
71
|
+
});
|
72
|
+
|
73
|
+
it('When the user selects grading view without setting the answer, correct answers section and answer status banner should not be displayed', () => {
|
74
|
+
fillInTheGapsDragAndDropPage.steps.addInputToOptionsInputField(options);
|
75
|
+
fillInTheGapsDragAndDropPage.steps.expandScoringTypeDropdown();
|
76
|
+
fillInTheGapsDragAndDropPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
77
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
78
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Flower': 1, 'Leaves': 0 });
|
79
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
80
|
+
fillInTheGapsDragAndDropPage.steps.verifyAnswerStatusBannerNotExist();
|
81
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExist();
|
82
|
+
});
|
83
|
+
});
|
84
|
+
});
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { fillInTheGapsDragAndDropPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Create question page - Fill in the gaps with drag and drop', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Check Alternative Answer Button', () => {
|
10
|
+
abortEarlySetup();
|
11
|
+
before(() => {
|
12
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
13
|
+
cy.barsPreLoaderWait();
|
14
|
+
fillInTheGapsDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
|
15
|
+
fillInTheGapsDragAndDropPage.steps.addInputToOptionsInputField(['Option 1', 'Option 2']);
|
16
|
+
});
|
17
|
+
|
18
|
+
it('When correct answer is not set then alternative answer should be disabled', () => {
|
19
|
+
fillInTheGapsDragAndDropPage.steps.checkAlternativeButtonDisabled();
|
20
|
+
});
|
21
|
+
|
22
|
+
it('When correct answer is set then alternative answer should be enabled', () => {
|
23
|
+
fillInTheGapsDragAndDropPage.steps.allotPoints(20);
|
24
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Option 1': 0, 'Option 2': 1 });
|
25
|
+
fillInTheGapsDragAndDropPage.steps.checkAlternativeButtonEnabled();
|
26
|
+
});
|
27
|
+
|
28
|
+
it('User should be able to add \'Alternative\' answer using the \'Add alternative\' button, when user has not set any answer in the \'Alternative\' accordion and clicks on the \'Correct\' accordion then \'Correct\' accordion should be expanded', () => {
|
29
|
+
fillInTheGapsDragAndDropPage.steps.clickOnAddAlternativeAnswerButton();
|
30
|
+
fillInTheGapsDragAndDropPage.steps.expandCorrectAnswerAccordion();
|
31
|
+
});
|
32
|
+
});
|
33
|
+
});
|
@@ -152,8 +152,7 @@ describe('Create Item Page: Fill in the gaps with drag and drop: Click and drop
|
|
152
152
|
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Petals');
|
153
153
|
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Flower');
|
154
154
|
fillInTheGapsDragAndDropPage.steps.verifyDraggableOptionInOptionsContainerSpecifyCorrectAnswerSection(['Petals', 'Flower', 'Stem', 'Seed']);
|
155
|
-
utilities.
|
156
|
-
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.errorMessage(), 'visible');
|
155
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.errorMessage(), 'notExist');
|
157
156
|
});
|
158
157
|
|
159
158
|
fillInTheGapsDragAndDropPage.tests.verifyErrorMessageCSSAndA11y();
|
@@ -474,8 +473,7 @@ describe('Create Item Page: Fill in the gaps with drag and drop: Click and drop
|
|
474
473
|
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Flower');
|
475
474
|
fillInTheGapsDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, groupedOptions[0]);
|
476
475
|
fillInTheGapsDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(1, groupedOptions[1]);
|
477
|
-
utilities.
|
478
|
-
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.errorMessage(), 'visible');
|
476
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.errorMessage(), 'notExist');
|
479
477
|
});
|
480
478
|
|
481
479
|
fillInTheGapsDragAndDropPage.tests.verifyErrorMessageCSSAndA11y();
|
@@ -27,7 +27,6 @@ describe('Create Item page - Fill in the gaps with drag and drop: Draggable opti
|
|
27
27
|
cy.barsPreLoaderWait();
|
28
28
|
});
|
29
29
|
|
30
|
-
//Failing due to https://redmine.zeuslearning.com/issues/566793
|
31
30
|
fillInTheGapsDragAndDropPage.tests.verifyOptionsSectionContents({ optionFieldsCount: 2, optionLabel: 'Options for drag & drop' });
|
32
31
|
|
33
32
|
fillInTheGapsDragAndDropPage.tests.verifyDragHandleTooltip();
|
@@ -100,17 +99,14 @@ describe('Create Item page - Fill in the gaps with drag and drop: Draggable opti
|
|
100
99
|
|
101
100
|
fillInTheGapsDragAndDropPage.tests.verifyGroupedOptionsLayoutSectionContents();
|
102
101
|
|
103
|
-
//Failing due to https://redmine.zeuslearning.com/issues/566793
|
104
102
|
fillInTheGapsDragAndDropPage.tests.verifyOptionsSectionContents({ optionFieldsCount: 2, optionLabel: 'Options for drag & drop' });
|
105
103
|
|
106
104
|
it('When only two options are present, the delete buttons should be in disabled state', () => {
|
107
105
|
fillInTheGapsDragAndDropPage.steps.verifyDeleteOptionButtonDisabledState();
|
108
106
|
});
|
109
107
|
|
110
|
-
it('
|
111
|
-
|
112
|
-
fillInTheGapsDragAndDropPage.steps.verifyOptionsInputFieldErrorMessage(0);
|
113
|
-
fillInTheGapsDragAndDropPage.steps.verifyOptionsInputFieldErrorMessage(1);
|
108
|
+
it('\'Add group\' button should be disabled', () => {
|
109
|
+
utilities.verifyElementDisabled(draggableOptionsSectionComponent.addGroupButton());
|
114
110
|
});
|
115
111
|
|
116
112
|
it('When the user enters text in the options input field, the error messages should disappear', () => {
|
@@ -151,8 +147,6 @@ describe('Create Item page - Fill in the gaps with drag and drop: Draggable opti
|
|
151
147
|
});
|
152
148
|
|
153
149
|
fillInTheGapsDragAndDropPage.tests.verifyDraggableOptionsForGroupedLayoutInSpecifyCorrectAnswerSection();
|
154
|
-
|
155
|
-
//Need to update once https://redmine.zeuslearning.com/issues/557984 is resolved
|
156
150
|
it('When the user deletes a group, then the deleted group should get removed from the options container as well as from the response areas (if any) of the specify correct answer section', () => {
|
157
151
|
cy.log('Pre step: Entering text into the text fields of group 2 response container')
|
158
152
|
fillInTheGapsDragAndDropPage.steps.addInputToOptionsInputField(['option 3', 'option 4']);
|
@@ -57,7 +57,7 @@ describe('Edit item - fill in the gaps with drag and drop', () => {
|
|
57
57
|
fillInTheGapsDragAndDropPage.steps.verifyPointInQuestionPreview(30);
|
58
58
|
});
|
59
59
|
|
60
|
-
it('User should be able to change scoring type to manually and save the question', () => {
|
60
|
+
it('User should be able to change scoring type to manually scored and save the question', () => {
|
61
61
|
fillInTheGapsDragAndDropPage.steps.editItem();
|
62
62
|
fillInTheGapsDragAndDropPage.steps.expandScoringTypeDropdown();
|
63
63
|
fillInTheGapsDragAndDropPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
@@ -2,6 +2,7 @@ import { fillInTheGapsDragAndDropPage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
4
4
|
const css = Cypress.env('css');
|
5
|
+
const options = ['Flower', 'Leaves'];
|
5
6
|
|
6
7
|
describe('Create item page - Fill in the gaps with text: Question instructions, question input field', () => {
|
7
8
|
before(() => {
|
@@ -97,12 +98,12 @@ describe('Create item page - Fill in the gaps with text: Question instructions,
|
|
97
98
|
};
|
98
99
|
});
|
99
100
|
|
100
|
-
it('When the user removes all response areas from the question input field,
|
101
|
+
it('When the user removes all response areas from the question input field, no error message should be displayed', () => {
|
101
102
|
cy.log('Switching to edit tab')
|
102
103
|
fillInTheGapsDragAndDropPage.steps.switchToEditTab();
|
103
104
|
fillInTheGapsDragAndDropPage.steps.deleteAResponseArea(0);
|
104
105
|
fillInTheGapsDragAndDropPage.steps.deleteAResponseArea(0);
|
105
|
-
utilities.
|
106
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.errorMessage(), 'notExist');
|
106
107
|
});
|
107
108
|
|
108
109
|
fillInTheGapsDragAndDropPage.tests.verifyErrorMessageCSSAndA11y();
|
@@ -139,4 +140,33 @@ describe('Create item page - Fill in the gaps with text: Question instructions,
|
|
139
140
|
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.questionContainerPreviewTab(), 'Lorem ipsum dolor sit amet, \n onsectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor,eget \n tempus tellus dapibus.Lorem ipsum');
|
140
141
|
});
|
141
142
|
});
|
143
|
+
|
144
|
+
describe('User should be able to edit incomplete authored question', () => {
|
145
|
+
abortEarlySetup();
|
146
|
+
before(() => {
|
147
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
148
|
+
cy.barsPreLoaderWait();
|
149
|
+
fillInTheGapsDragAndDropPage.steps.saveAQuestionWithIncompleteAuthoring();
|
150
|
+
fillInTheGapsDragAndDropPage.steps.editItem();
|
151
|
+
});
|
152
|
+
|
153
|
+
it('Warning icons should be displayed on the required input fields', () => {
|
154
|
+
fillInTheGapsDragAndDropPage.steps.verifyWarningIconOnRequiredFields(['Please enter all option values', 'Please set points']);
|
155
|
+
});
|
156
|
+
|
157
|
+
it('When required input fields are filled then warning icons should disappear', () => {
|
158
|
+
fillInTheGapsDragAndDropPage.steps.addInputToOptionsInputField(options);
|
159
|
+
fillInTheGapsDragAndDropPage.steps.allotPoints(10);
|
160
|
+
fillInTheGapsDragAndDropPage.steps.verifyErrorMessageIsNotDisplayed();
|
161
|
+
fillInTheGapsDragAndDropPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
|
162
|
+
});
|
163
|
+
|
164
|
+
it('Clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
165
|
+
fillInTheGapsDragAndDropPage.steps.saveAQuestionAndVerifySnackbar();
|
166
|
+
});
|
167
|
+
|
168
|
+
it('Warning icon should not be visible', () => {
|
169
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.warningIcon(), 'notExist');
|
170
|
+
});
|
171
|
+
});
|
142
172
|
});
|
@@ -1,5 +1,9 @@
|
|
1
1
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
-
import { dialogBoxBase, fillInTheGapsDragAndDropPage } from "../../../pages";
|
2
|
+
import { dialogBoxBase, itemPreviewPage, fillInTheGapsDragAndDropPage } from "../../../pages";
|
3
|
+
import { browseItemsPage } from "../../../pages/components";
|
4
|
+
import utilities from "../../../support/helpers/utilities";
|
5
|
+
|
6
|
+
var itemReferenceID = "";
|
3
7
|
const options = ['Flower', 'Leaves'];
|
4
8
|
|
5
9
|
describe('Create item page - Fill in the gaps drag and drop: Header section and Saving question', () => {
|
@@ -42,13 +46,11 @@ describe('Create item page - Fill in the gaps drag and drop: Header section and
|
|
42
46
|
});
|
43
47
|
|
44
48
|
describe('Validation error messages', () => {
|
45
|
-
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
|
49
|
+
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please enter all option values', 'Please set points']);
|
46
50
|
|
47
51
|
it('Validation error messages should be displayed below required input fields', () => {
|
48
|
-
fillInTheGapsDragAndDropPage.steps.
|
49
|
-
fillInTheGapsDragAndDropPage.steps.
|
50
|
-
fillInTheGapsDragAndDropPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
|
51
|
-
fillInTheGapsDragAndDropPage.steps.verifySpecifyCorrectAnswerErrorMessage();
|
52
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
|
53
|
+
fillInTheGapsDragAndDropPage.steps.verifyWarningIconOnRequiredFields(['Please enter all option values', 'Please set points']);
|
52
54
|
});
|
53
55
|
|
54
56
|
it('Validation error messages should disappear when required input fields are filled', () => {
|
@@ -68,5 +70,36 @@ describe('Create item page - Fill in the gaps drag and drop: Header section and
|
|
68
70
|
});
|
69
71
|
fillInTheGapsDragAndDropPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
70
72
|
});
|
73
|
+
|
74
|
+
describe('Saving a question with incomplete authoring', () => {
|
75
|
+
abortEarlySetup();
|
76
|
+
before(() => {
|
77
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
78
|
+
cy.barsPreLoaderWait();
|
79
|
+
});
|
80
|
+
|
81
|
+
it('User should be able to save the question with incomplete authoring and display a snackbar with the text "Saved successfully!" when the Save Question button is clicked', () => {
|
82
|
+
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please enter all option values', 'Please set points']);
|
83
|
+
fillInTheGapsDragAndDropPage.steps.saveAQuestionWithIncompleteAuthoring();
|
84
|
+
});
|
85
|
+
fillInTheGapsDragAndDropPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
86
|
+
});
|
71
87
|
});
|
88
|
+
|
89
|
+
describe('Save as you go - Browse item page contents', () => {
|
90
|
+
abortEarlySetup();
|
91
|
+
before(() => {
|
92
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
93
|
+
cy.barsPreLoaderWait();
|
94
|
+
fillInTheGapsDragAndDropPage.steps.saveAQuestionWithIncompleteAuthoring();
|
95
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
96
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
97
|
+
browseItemsPage.steps.navigateToBrowseItemsPage();
|
98
|
+
});
|
99
|
+
|
100
|
+
it('When user saves an incompletely authored question then a warning icon should be visible in browse items page', () => {
|
101
|
+
browseItemsPage.steps.verifyWarningIconInBrowseItemPage(`${itemReferenceID}`);
|
102
|
+
});
|
103
|
+
});
|
104
|
+
|
72
105
|
});
|
@@ -0,0 +1,119 @@
|
|
1
|
+
import { fillInTheGapsDragAndDropPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view'];
|
5
|
+
const views = utilities.getViews(previewContentViews);
|
6
|
+
let itemReferenceID = "";
|
7
|
+
|
8
|
+
describe('Preview tab contents for all views - Incomplete Authoring', () => {
|
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
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
20
|
+
cy.barsPreLoaderWait();
|
21
|
+
fillInTheGapsDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop the options in appropriate dropzone');
|
22
|
+
fillInTheGapsDragAndDropPage.steps.addMultipleOptionFields(1);
|
23
|
+
fillInTheGapsDragAndDropPage.steps.addResponseArea();
|
24
|
+
fillInTheGapsDragAndDropPage.steps.enterTextInOptionInputField(2, 'Solve the following');
|
25
|
+
fillInTheGapsDragAndDropPage.steps.focusInOptionsInputField(2);
|
26
|
+
fillInTheGapsDragAndDropPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
|
27
|
+
fillInTheGapsDragAndDropPage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
|
28
|
+
fillInTheGapsDragAndDropPage.steps.focusInOptionsInputField(0);
|
29
|
+
fillInTheGapsDragAndDropPage.steps.selectImageOptionFromCKEditorToolbar();
|
30
|
+
fillInTheGapsDragAndDropPage.steps.addImageToInputField();
|
31
|
+
fillInTheGapsDragAndDropPage.steps.addTextInputToOptionsInputFieldWithImage(0);
|
32
|
+
fillInTheGapsDragAndDropPage.steps.focusInOptionsInputField(1);
|
33
|
+
fillInTheGapsDragAndDropPage.steps.selectBoldOptionFromCKEditorToolbar();
|
34
|
+
fillInTheGapsDragAndDropPage.steps.addBoldTextInputToOptionsInputField(1);
|
35
|
+
fillInTheGapsDragAndDropPage.steps.allotPoints(10);
|
36
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
37
|
+
break;
|
38
|
+
case 'Item view':
|
39
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
40
|
+
break;
|
41
|
+
case 'Item preview':
|
42
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
43
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
44
|
+
break;
|
45
|
+
case 'Student view':
|
46
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
47
|
+
break;
|
48
|
+
case 'Grading view':
|
49
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
50
|
+
break;
|
51
|
+
case 'Correct answer view':
|
52
|
+
cy.wait(1000);
|
53
|
+
cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
|
54
|
+
cy.wait(2000);
|
55
|
+
break;
|
56
|
+
default:
|
57
|
+
throw new Error('Invalid view');
|
58
|
+
}
|
59
|
+
});
|
60
|
+
|
61
|
+
after(() => {
|
62
|
+
if (view === 'Question preview') {
|
63
|
+
fillInTheGapsDragAndDropPage.steps.clickOnSaveQuestionButton();
|
64
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
65
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
66
|
+
}
|
67
|
+
if (view === 'Student view') {
|
68
|
+
studentViewPage.steps.submitResponse();
|
69
|
+
utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
|
70
|
+
}
|
71
|
+
});
|
72
|
+
|
73
|
+
it(`Fill in the gaps drag and drop - ${view} - Question instructions should be visible`, () => {
|
74
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.questionInstructionsText(), 'Drag and drop the options in appropriate dropzone');
|
75
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.questionInstructionsText(), 'visible');
|
76
|
+
});
|
77
|
+
|
78
|
+
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
79
|
+
it('The sample \'Lorem Ipsum\' text along with three dropzone should be displayed in the question field and they should be empty.', () => {
|
80
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.questionContainerPreviewTab(), 'Lorem ipsum dolor sit amet, \n onsectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor,eget \n tempus tellus dapibus.');
|
81
|
+
utilities.verifyElementCount(fillInTheGapsDragAndDropPage.dropzonePreviewTab(), 3);
|
82
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneTextPreviewTab(0, '');
|
83
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneTextPreviewTab(1, '');
|
84
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneTextPreviewTab(2, '');
|
85
|
+
});
|
86
|
+
|
87
|
+
it(`When the user has added image, equation, bold text to the options input fields, then they should be displayed in the options container in ${view}`, () => {
|
88
|
+
fillInTheGapsDragAndDropPage.steps.verifyDraggableOptionWithImageInPreviewTab(0);
|
89
|
+
fillInTheGapsDragAndDropPage.steps.verifyDraggableOptionWithBoldTextInPreviewTab(1);
|
90
|
+
fillInTheGapsDragAndDropPage.steps.verifyDraggableOptionWithEquationTextInPreviewTab(2);
|
91
|
+
utilities.verifyElementCount(fillInTheGapsDragAndDropPage.dropzonePreviewTab(), 3);
|
92
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneTextPreviewTab(0, '');
|
93
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneTextPreviewTab(1, '');
|
94
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneTextPreviewTab(2, '');
|
95
|
+
});
|
96
|
+
|
97
|
+
it('User should be able to drag and drop image, bold text and equation options in the dropzone', () => {
|
98
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'This is a bold option': 0, 'Solve the following': 1, 'Petals': 2 });
|
99
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneTextPreviewTab(2, 'Petals');
|
100
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneWithImageInPreviewTab(2);
|
101
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneTextPreviewTab(0, 'This is a bold option');
|
102
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneContainsTextPreviewTab(1, 'Solve the following');
|
103
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneWithEquationTextInPreviewTab(1);
|
104
|
+
});
|
105
|
+
} else if (view === 'Grading view') {
|
106
|
+
it(`The submitted options should be in the respective dropzone and the options container should not be displayed`, () => {
|
107
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneTextPreviewTab(2, '3\nPetals');
|
108
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneWithImageInPreviewTab(2);
|
109
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneTextPreviewTab(0, '1\nThis is a bold option');
|
110
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.optionContainerOptionsPreviewTab(), 'notExist');
|
111
|
+
});
|
112
|
+
|
113
|
+
it('The content in the dropzone should not be editable', () => {
|
114
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneIsNotEditableInGradingView();
|
115
|
+
});
|
116
|
+
}
|
117
|
+
});
|
118
|
+
});
|
119
|
+
});
|
package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
import { fillInTheGapsDropdownPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
const optionsForDropdown1 = ['Flower', 'Petal', 'Stem', 'Branch'];
|
5
|
+
const optionsForDropdown2 = ['Leaf', 'Leaves', 'Stem', 'Seed'];
|
6
|
+
const correctAnswerArray = ['Flower', 'Leaf'];
|
7
|
+
|
8
|
+
|
9
|
+
describe('Create Item page - Fill in the gaps with dropdown', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
describe('Question Preview: Auto Scored With Points', () => {
|
15
|
+
abortEarlySetup();
|
16
|
+
before(() => {
|
17
|
+
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
18
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
|
19
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown2);
|
20
|
+
cy.barsPreLoaderWait();
|
21
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
22
|
+
});
|
23
|
+
|
24
|
+
it('In Preview tab, when an answer is not set then manually scored scoring label should be displayed', () => {
|
25
|
+
fillInTheGapsDropdownPage.steps.checkManuallyScoredScoringLabel();
|
26
|
+
});
|
27
|
+
|
28
|
+
it('In Preview tab, when user switches to grading view then no banner and correct answer should be displayed', () => {
|
29
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
30
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
|
31
|
+
fillInTheGapsDropdownPage.steps.verifyAnswerStatusBannerNotExist();
|
32
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExist();
|
33
|
+
})
|
34
|
+
|
35
|
+
it('When user allocates points to the question then the scoring label should be displayed as manually scored and banner and correct answer status should not exist', () => {
|
36
|
+
fillInTheGapsDropdownPage.steps.switchToEditTab();
|
37
|
+
fillInTheGapsDropdownPage.steps.allotPoints(2);
|
38
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
39
|
+
fillInTheGapsDropdownPage.steps.checkManuallyScoredScoringLabel();
|
40
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
|
41
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
42
|
+
fillInTheGapsDropdownPage.steps.verifyAnswerStatusBannerNotExist();
|
43
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExist();
|
44
|
+
})
|
45
|
+
|
46
|
+
});
|
47
|
+
|
48
|
+
describe('Question Preview: Auto Scored Without Points', () => {
|
49
|
+
abortEarlySetup();
|
50
|
+
before(() => {
|
51
|
+
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
52
|
+
cy.barsPreLoaderWait();
|
53
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
|
54
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown2);
|
55
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
|
56
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
|
57
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
58
|
+
});
|
59
|
+
|
60
|
+
it('In Preview tab, when points are not set then manually scored scoring label should be displayed', () => {
|
61
|
+
fillInTheGapsDropdownPage.steps.checkManuallyScoredScoringLabel();
|
62
|
+
});
|
63
|
+
|
64
|
+
it('In Preview tab, when user switches to grading view then banner and correct answer should be displayed', () => {
|
65
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }]);
|
66
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
67
|
+
fillInTheGapsDropdownPage.steps.verifyAnswerStatusBannerExist();
|
68
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionExist();
|
69
|
+
})
|
70
|
+
});
|
71
|
+
|
72
|
+
describe('Question Preview: Non Scored', () => {
|
73
|
+
abortEarlySetup();
|
74
|
+
before(() => {
|
75
|
+
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
76
|
+
cy.barsPreLoaderWait();
|
77
|
+
});
|
78
|
+
|
79
|
+
it('When the user selects \'Grading\' view without setting the answer, correct answers section and answer status banner should not be displayed', () => {
|
80
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
|
81
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown2);
|
82
|
+
fillInTheGapsDropdownPage.steps.expandScoringTypeDropdown();
|
83
|
+
fillInTheGapsDropdownPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
84
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
85
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
|
86
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
87
|
+
fillInTheGapsDropdownPage.steps.verifyAnswerStatusBannerNotExist();
|
88
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExist();
|
89
|
+
});
|
90
|
+
});
|
91
|
+
});
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { fillInTheGapsDropdownPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
const optionsForDropdown = ['Flower', 'Petal', 'Stem', 'Branch'];
|
5
|
+
|
6
|
+
describe('Create question page - Fill in the gaps with dropdown ', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Check Alternative Answer Button', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
fillInTheGapsDropdownPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps with dropdown');
|
17
|
+
});
|
18
|
+
|
19
|
+
it('When correct answer is not set then alternative answer should be disabled', () => {
|
20
|
+
fillInTheGapsDropdownPage.steps.checkAlternativeButtonDisabled();
|
21
|
+
});
|
22
|
+
|
23
|
+
it('When correct answer is set then alternative answer should be enabled', () => {
|
24
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown);
|
25
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown);
|
26
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, optionsForDropdown[0]);
|
27
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, optionsForDropdown[1]);
|
28
|
+
fillInTheGapsDropdownPage.steps.allotPoints(10);
|
29
|
+
fillInTheGapsDropdownPage.steps.checkAlternativeButtonEnabled();
|
30
|
+
});
|
31
|
+
|
32
|
+
it('User should be able to add \'Alternative\' answer using the \'Add alternative\' button, when user has not set any answer in the \'Alternative\' accordion and clicks on the \'Correct\' accordion then \'Correct\' accordion should be expanded', () => {
|
33
|
+
fillInTheGapsDropdownPage.steps.clickOnAddAlternativeAnswerButton();
|
34
|
+
fillInTheGapsDropdownPage.steps.expandCorrectAnswerAccordion();
|
35
|
+
});
|
36
|
+
});
|
37
|
+
});
|
@@ -59,9 +59,9 @@ describe('Create item page - Fill in the gaps with dropdown: Dropdown options se
|
|
59
59
|
|
60
60
|
fillInTheGapsDropdownPage.tests.verifyAddOptionFunctionalityForDropdownOptions();
|
61
61
|
|
62
|
-
it('When user focus in and out of any of the \'Options\' input field without typing anything,
|
62
|
+
it('When user focus in and out of any of the \'Options\' input field without typing anything, error message should be thrown', () => {
|
63
63
|
fillInTheGapsDropdownPage.steps.focusInAndFocusOutOfDropdownOptionInputField(0);
|
64
|
-
utilities.
|
64
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'exist');
|
65
65
|
});
|
66
66
|
|
67
67
|
it('User should be able to enter text in options input field and \'Error: Option is required.\' error message should disappear', () => {
|
@@ -38,7 +38,7 @@ describe('Edit item - fill in the gaps with dropdown', () => {
|
|
38
38
|
it('User should be able to edit correct answer and save the question', () => {
|
39
39
|
fillInTheGapsDropdownPage.steps.editItem();
|
40
40
|
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray1[1]);
|
41
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray1[0])
|
41
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray1[0]);
|
42
42
|
fillInTheGapsDropdownPage.steps.saveAQuestionAndVerifySnackbar();
|
43
43
|
});
|
44
44
|
|
@@ -49,7 +49,7 @@ describe('Edit item - fill in the gaps with dropdown', () => {
|
|
49
49
|
fillInTheGapsDropdownPage.steps.verifyPointInQuestionPreview(30);
|
50
50
|
});
|
51
51
|
|
52
|
-
it('User should be able to change scoring type to manually and save the question', () => {
|
52
|
+
it('User should be able to change scoring type to manually scored and save the question', () => {
|
53
53
|
fillInTheGapsDropdownPage.steps.editItem();
|
54
54
|
fillInTheGapsDropdownPage.steps.expandScoringTypeDropdown();
|
55
55
|
fillInTheGapsDropdownPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
@@ -86,7 +86,7 @@ describe('Edit item - fill in the gaps with dropdown', () => {
|
|
86
86
|
fillInTheGapsDropdownPage.steps.selectOptionFromScoringTypeDropdown('Auto scored');
|
87
87
|
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
|
88
88
|
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
|
89
|
-
fillInTheGapsDropdownPage.steps.
|
89
|
+
fillInTheGapsDropdownPage.steps.saveAQuestionWithIncompleteAuthoring();
|
90
90
|
});
|
91
91
|
});
|
92
92
|
});
|