itemengine-cypress-automation 1.0.337-IEI-5508-automated-tests-9e03453.0 → 1.0.338
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/fillInTheGapsDropdownCommonComponent.js +67 -0
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +66 -0
- 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/dialogBoxBase.js +13 -7
- package/cypress/pages/drawingResponsePage.js +73 -2
- package/cypress/pages/feedbackScalePage.js +2 -0
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +71 -4
- 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 +106 -6
- package/cypress/pages/listOrderingPage.js +4 -2
- package/cypress/pages/menuBarPage.js +65 -65
- package/cypress/pages/multipleSelectionGridPage.js +68 -1
- package/cypress/pages/multipleSelectionPage.js +67 -0
- package/cypress/pages/numberLineLabelPage.js +4 -1
- package/cypress/pages/numberLinePage.js +2 -0
- package/cypress/pages/shortTextResponsePage.js +2 -0
- package/cypress/pages/singleSelectionGridPage.js +68 -1
- package/cypress/pages/singleSelectionPage.js +67 -0
- package/cypress/pages/textEntryMathPage.js +7 -3
- package/cypress/pages/textEntryMathWithImagePage.js +3 -0
- package/package.json +2 -2
@@ -4,6 +4,8 @@ import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
4
4
|
const css = Cypress.env('css');
|
5
5
|
|
6
6
|
const dropdownPointerStyles = ['none', 'bottom', 'bottom right', 'right', 'top right', 'top', 'top left', 'left', 'bottom left'];
|
7
|
+
const optionsForDropdown = ['Flower', 'Petal', 'Stem', 'Branch'];
|
8
|
+
|
7
9
|
|
8
10
|
describe('Create item page - Fill in the gaps: Question instructions, Options section', () => {
|
9
11
|
before(() => {
|
@@ -99,12 +101,12 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
99
101
|
utilities.verifyElementCount(fillInTheGapsDropdownPage.enterAriaLabelInputField(), 2);
|
100
102
|
});
|
101
103
|
|
102
|
-
it('When the user removes all dropdowns from the question input field, an error message \'Error: Minimum one response token is required.\' should be displayed', () => {
|
104
|
+
it('When the user removes all dropdowns from the question input field, an error message \'Error: Minimum one response token is required.\' should not be displayed', () => {
|
103
105
|
cy.log('Switching to edit tab')
|
104
106
|
fillInTheGapsDropdownPage.steps.switchToEditTab();
|
105
107
|
fillInTheGapsDropdownPage.steps.deleteAResponseArea(0);
|
106
108
|
fillInTheGapsDropdownPage.steps.deleteAResponseArea(0);
|
107
|
-
utilities.
|
109
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDropdownPage.errorMessage(), 'notExist');
|
108
110
|
});
|
109
111
|
|
110
112
|
fillInTheGapsDropdownPage.tests.verifyErrorMessageCSSAndA11y();
|
@@ -141,4 +143,36 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
141
143
|
utilities.verifyInnerText(fillInTheGapsDropdownPage.questionContainerPreviewTab(), 'Lorem ipsum dolor sit amet, \n\n\n onsectetur adipiscing elit. Ut pellentesque tinciduntornare. Integer porttitor est quis urna porttitor, eget tempus tellus dapibus \n\n\nLorem ipsum');
|
142
144
|
});
|
143
145
|
});
|
146
|
+
|
147
|
+
describe('User should be able to edit incomplete authored question', () => {
|
148
|
+
abortEarlySetup();
|
149
|
+
before(() => {
|
150
|
+
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
151
|
+
cy.barsPreLoaderWait();
|
152
|
+
fillInTheGapsDropdownPage.steps.saveAQuestionWithIncompleteAuthoring();
|
153
|
+
fillInTheGapsDropdownPage.steps.editItem(1);
|
154
|
+
});
|
155
|
+
|
156
|
+
it('Warning icons should be displayed on the required input fields', () => {
|
157
|
+
fillInTheGapsDropdownPage.steps.verifyWarningIconOnRequiredFields(['Please enter all option values', 'Please set points']);
|
158
|
+
});
|
159
|
+
|
160
|
+
it('When required input fields are filled then warning icons should disappear', () => {
|
161
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown);
|
162
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown);
|
163
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, optionsForDropdown[0]);
|
164
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, optionsForDropdown[1]);
|
165
|
+
fillInTheGapsDropdownPage.steps.allotPoints(10);
|
166
|
+
fillInTheGapsDropdownPage.steps.verifyErrorMessageIsNotDisplayed();
|
167
|
+
fillInTheGapsDropdownPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
|
168
|
+
});
|
169
|
+
|
170
|
+
it('Clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
171
|
+
fillInTheGapsDropdownPage.steps.saveAQuestionAndVerifySnackbar();
|
172
|
+
});
|
173
|
+
|
174
|
+
it('Warning icon should not be visible', () => {
|
175
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDropdownPage.warningIcon(), 'notExist');
|
176
|
+
});
|
177
|
+
});
|
144
178
|
});
|
@@ -1,7 +1,10 @@
|
|
1
1
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
-
import { dialogBoxBase, fillInTheGapsDropdownPage } from "../../../pages";
|
2
|
+
import { dialogBoxBase, itemPreviewPage, fillInTheGapsDropdownPage } from "../../../pages";
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
4
|
+
import { browseItemsPage } from "../../../pages/components";
|
4
5
|
const optionsForDropdown = ['Flower', 'Petal', 'Stem', 'Branch'];
|
6
|
+
var itemReferenceID = ""
|
7
|
+
|
5
8
|
|
6
9
|
describe('Create item page - Fill in the gaps with dropdown: Header section and Saving question', () => {
|
7
10
|
before(() => {
|
@@ -43,14 +46,11 @@ describe('Create item page - Fill in the gaps with dropdown: Header section and
|
|
43
46
|
});
|
44
47
|
|
45
48
|
describe('Validation error messages', () => {
|
46
|
-
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
|
49
|
+
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please enter all option values', 'Please set points']);
|
47
50
|
|
48
51
|
it('Validation error messages should be displayed below required input fields', () => {
|
49
52
|
fillInTheGapsDropdownPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
|
50
|
-
fillInTheGapsDropdownPage.steps.
|
51
|
-
fillInTheGapsDropdownPage.steps.verifyOptionsInputFieldErrorMessage(0);
|
52
|
-
fillInTheGapsDropdownPage.steps.verifySpecifyCorrectAnswerErrorMessage();
|
53
|
-
fillInTheGapsDropdownPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
|
53
|
+
fillInTheGapsDropdownPage.steps.verifyWarningIconOnRequiredFields(['Please enter all option values', 'Please set points']);
|
54
54
|
});
|
55
55
|
|
56
56
|
it('Validation error messages should disappear when required input fields are filled', () => {
|
@@ -72,5 +72,35 @@ describe('Create item page - Fill in the gaps with dropdown: Header section and
|
|
72
72
|
});
|
73
73
|
fillInTheGapsDropdownPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
74
74
|
});
|
75
|
+
|
76
|
+
describe('Saving a question with incomplete authoring', () => {
|
77
|
+
abortEarlySetup();
|
78
|
+
before(() => {
|
79
|
+
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
80
|
+
cy.barsPreLoaderWait();
|
81
|
+
});
|
82
|
+
|
83
|
+
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', () => {
|
84
|
+
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please enter all option values', 'Please set points']);
|
85
|
+
fillInTheGapsDropdownPage.steps.saveAQuestionWithIncompleteAuthoring();
|
86
|
+
});
|
87
|
+
fillInTheGapsDropdownPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
88
|
+
});
|
89
|
+
|
90
|
+
describe('Save as you go - Browse item page contents', () => {
|
91
|
+
abortEarlySetup();
|
92
|
+
before(() => {
|
93
|
+
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
94
|
+
cy.barsPreLoaderWait();
|
95
|
+
fillInTheGapsDropdownPage.steps.saveAQuestionWithIncompleteAuthoring();
|
96
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
97
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
98
|
+
browseItemsPage.steps.navigateToBrowseItemsPage();
|
99
|
+
});
|
100
|
+
|
101
|
+
it('When user saves an incompletely authored question then a warning icon should be visible in browse items page', () => {
|
102
|
+
browseItemsPage.steps.verifyWarningIconInBrowseItemPage(`${itemReferenceID}`);
|
103
|
+
});
|
104
|
+
});
|
75
105
|
});
|
76
106
|
});
|
@@ -0,0 +1,103 @@
|
|
1
|
+
import { fillInTheGapsDropdownPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
|
6
|
+
const views = utilities.getViews(previewContentViews);
|
7
|
+
var itemReferenceID = "";
|
8
|
+
|
9
|
+
const optionsForDropdown1 = ['Flower', 'Petal', 'Stem', 'Branch'];
|
10
|
+
const optionsForDropdown2 = ['Leaf', 'Leaves', 'Stem', 'Seed'];
|
11
|
+
const correctAnswerArray = ['Flower', 'Leaf'];
|
12
|
+
|
13
|
+
describe('Create item page - Fill In The Gaps Dropdown: Preview contents', () => {
|
14
|
+
before(() => {
|
15
|
+
cy.loginAs('admin');
|
16
|
+
});
|
17
|
+
|
18
|
+
views.forEach((view) => {
|
19
|
+
describe(`Preview tab contents when authoring is incomplete - ${view}`, { tags: 'smoke' }, () => {
|
20
|
+
abortEarlySetup();
|
21
|
+
before(() => {
|
22
|
+
switch (view) {
|
23
|
+
case 'Question preview':
|
24
|
+
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
25
|
+
cy.barsPreLoaderWait();
|
26
|
+
fillInTheGapsDropdownPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
27
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
|
28
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown2);
|
29
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
|
30
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
|
31
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
32
|
+
break;
|
33
|
+
case 'Item view':
|
34
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
35
|
+
break;
|
36
|
+
case 'Item preview':
|
37
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
38
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
39
|
+
break;
|
40
|
+
case 'Student view':
|
41
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
42
|
+
break;
|
43
|
+
case 'Grading view':
|
44
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
45
|
+
break;
|
46
|
+
case 'Correct answer view':
|
47
|
+
cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
|
48
|
+
break;
|
49
|
+
default:
|
50
|
+
throw new Error('Invalid view');
|
51
|
+
}
|
52
|
+
});
|
53
|
+
|
54
|
+
after(() => {
|
55
|
+
if (view === 'Question preview') {
|
56
|
+
fillInTheGapsDropdownPage.steps.saveAQuestionWithIncompleteAuthoring();
|
57
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
58
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
59
|
+
}
|
60
|
+
|
61
|
+
if (view === 'Student view') {
|
62
|
+
studentViewPage.steps.submitResponse();
|
63
|
+
utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
|
64
|
+
}
|
65
|
+
});
|
66
|
+
|
67
|
+
if (view === 'Item view') {
|
68
|
+
it('Warning icon should be visible', () => {
|
69
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDropdownPage.warningIcon(), 'visible');
|
70
|
+
});
|
71
|
+
}
|
72
|
+
|
73
|
+
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
74
|
+
it('The sample \'Lorem Ipsum\' text along with two response dropdowns should be displayed', () => {
|
75
|
+
utilities.verifyElementCount(fillInTheGapsDropdownPage.dropdownPreviewTab(), 2);
|
76
|
+
utilities.verifyInnerText(fillInTheGapsDropdownPage.questionContainerPreviewTab(), 'Lorem ipsum dolor sit amet, \n\n\n onsectetur adipiscing elit. Ut pellentesque tinciduntornare. Integer porttitor est quis urna porttitor, eget tempus tellus dapibus \n\n');
|
77
|
+
});
|
78
|
+
|
79
|
+
it('User should be able to select an option from the dropdown', () => {
|
80
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
|
81
|
+
});
|
82
|
+
} else if (view === 'Grading view') {
|
83
|
+
it('The dropdowns should be displayed filled with answers', () => {
|
84
|
+
utilities.verifyElementCount(fillInTheGapsDropdownPage.dropdownPreviewTab(), 2);
|
85
|
+
fillInTheGapsDropdownPage.steps.verifyTextInDropdownsInPreviewTab([{ dropdownIndex: 0, dropdownText: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownText: correctAnswerArray[1] }]);
|
86
|
+
});
|
87
|
+
|
88
|
+
it('The dropdowns should not be editable', () => {
|
89
|
+
fillInTheGapsDropdownPage.steps.verifyDropdownIsDisabled(0);
|
90
|
+
fillInTheGapsDropdownPage.steps.verifyDropdownIsDisabled(1);
|
91
|
+
});
|
92
|
+
} else {
|
93
|
+
it('The dropdowns should be displayed filled with correct answers', () => {
|
94
|
+
utilities.verifyElementCount(fillInTheGapsDropdownPage.dropdownPreviewTab(), 2);
|
95
|
+
fillInTheGapsDropdownPage.steps.verifyTextInDropdownsInPreviewTab([{ dropdownIndex: 0, dropdownText: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownText: correctAnswerArray[1] }]);
|
96
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
97
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
|
98
|
+
});
|
99
|
+
}
|
100
|
+
});
|
101
|
+
});
|
102
|
+
|
103
|
+
});
|
@@ -61,7 +61,7 @@ describe('Edit item - fill in the gaps over image with drag and drop', () => {
|
|
61
61
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyPointInQuestionPreview(30);
|
62
62
|
});
|
63
63
|
|
64
|
-
it('User should be able to change scoring type to manually and save the question', () => {
|
64
|
+
it('User should be able to change scoring type to manually scored and save the question', () => {
|
65
65
|
fillInTheGapsOverImageDragAndDropPage.steps.editItem();
|
66
66
|
fillInTheGapsOverImageDragAndDropPage.steps.expandScoringTypeDropdown();
|
67
67
|
fillInTheGapsOverImageDragAndDropPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
@@ -0,0 +1,96 @@
|
|
1
|
+
import { fillInTheGapsOverImageDropdownPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
const optionsForDropdown1 = ['Flower', 'Petal', 'Stem', 'Branch'];
|
5
|
+
const correctAnswerArray = ['Flower'];
|
6
|
+
const inCorrectAnswerArray = ['Petal'];
|
7
|
+
|
8
|
+
|
9
|
+
describe('Create Item page - Fill in the gaps over image with dropdown', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
describe('Question Preview: Auto Scored With Points', () => {
|
15
|
+
abortEarlySetup();
|
16
|
+
before(() => {
|
17
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image with dropdown');
|
18
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
19
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
20
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(30);
|
21
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
|
22
|
+
cy.barsPreLoaderWait();
|
23
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
24
|
+
});
|
25
|
+
|
26
|
+
it('In Preview tab, when an answer is not set then manually scored scoring label should be displayed', () => {
|
27
|
+
fillInTheGapsOverImageDropdownPage.steps.checkManuallyScoredScoringLabel();
|
28
|
+
});
|
29
|
+
|
30
|
+
it('In Preview tab, when user switches to grading view then no banner and correct answer should be displayed', () => {
|
31
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
32
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }]);
|
33
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerStatusBannerNotExist();
|
34
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExist();
|
35
|
+
})
|
36
|
+
|
37
|
+
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', () => {
|
38
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
|
39
|
+
fillInTheGapsOverImageDropdownPage.steps.allotPoints(2);
|
40
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
41
|
+
fillInTheGapsOverImageDropdownPage.steps.checkManuallyScoredScoringLabel();
|
42
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }]);
|
43
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
44
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerStatusBannerNotExist();
|
45
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExist();
|
46
|
+
})
|
47
|
+
|
48
|
+
});
|
49
|
+
|
50
|
+
describe('Question Preview: Auto Scored Without Points', () => {
|
51
|
+
abortEarlySetup();
|
52
|
+
before(() => {
|
53
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image with dropdown');
|
54
|
+
cy.barsPreLoaderWait();
|
55
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
56
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
57
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(30);
|
58
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
|
59
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
|
60
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
61
|
+
});
|
62
|
+
|
63
|
+
it('In Preview tab, when points are not set then manually scored scoring label should be displayed', () => {
|
64
|
+
fillInTheGapsOverImageDropdownPage.steps.checkManuallyScoredScoringLabel();
|
65
|
+
});
|
66
|
+
|
67
|
+
it('In Preview tab, when user switches to grading view then banner and correct answer should be displayed', () => {
|
68
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: inCorrectAnswerArray[0] }]);
|
69
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
70
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerStatusBannerExist();
|
71
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionExist();
|
72
|
+
})
|
73
|
+
});
|
74
|
+
|
75
|
+
describe('Question Preview: Non Scored', () => {
|
76
|
+
abortEarlySetup();
|
77
|
+
before(() => {
|
78
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image with dropdown');
|
79
|
+
cy.barsPreLoaderWait();
|
80
|
+
});
|
81
|
+
|
82
|
+
it('When the user selects \'Grading\' view without setting the answer, correct answers section and answer status banner should not be displayed', () => {
|
83
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
84
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
85
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(30);
|
86
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
|
87
|
+
fillInTheGapsOverImageDropdownPage.steps.expandScoringTypeDropdown();
|
88
|
+
fillInTheGapsOverImageDropdownPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
89
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
90
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: inCorrectAnswerArray[0] }]);
|
91
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
92
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerStatusBannerNotExist();
|
93
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExist();
|
94
|
+
});
|
95
|
+
});
|
96
|
+
});
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { fillInTheGapsOverImageDropdownPage } 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 over image with dropdown ', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Check Alternative Answer Button', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image with dropdown');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
fillInTheGapsOverImageDropdownPage.steps.addTextInQuestionInstructionsInputField('fill in the gaps over image with dropdown');
|
17
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
18
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
19
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(30);
|
20
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown);
|
21
|
+
});
|
22
|
+
|
23
|
+
it('When correct answer is not set then alternative answer should be disabled', () => {
|
24
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAlternativeButtonDisabled();
|
25
|
+
});
|
26
|
+
|
27
|
+
it('When correct answer is set then alternative answer should be enabled', () => {
|
28
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, optionsForDropdown[0]);
|
29
|
+
fillInTheGapsOverImageDropdownPage.steps.allotPoints(10);
|
30
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAlternativeButtonEnabled();
|
31
|
+
});
|
32
|
+
|
33
|
+
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', () => {
|
34
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnAddAlternativeAnswerButton();
|
35
|
+
fillInTheGapsOverImageDropdownPage.steps.expandCorrectAnswerAccordion();
|
36
|
+
});
|
37
|
+
});
|
38
|
+
});
|
@@ -79,7 +79,7 @@ describe('Create item page - Fill in the gaps over image - dropdown: Dropdown op
|
|
79
79
|
|
80
80
|
it('When user focus in and out of any of the \'Options\' input field without typing anything, an error message should not be thrown', () => {
|
81
81
|
fillInTheGapsOverImageDropdownPage.steps.focusInAndFocusOutOfDropdownOptionInputField(2);
|
82
|
-
utilities.
|
82
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
|
83
83
|
});
|
84
84
|
|
85
85
|
it('User should be able to enter text in options input field and \'Error: Option is required.\' error message should disappear', () => {
|
@@ -42,7 +42,7 @@ describe('Edit item - ', () => {
|
|
42
42
|
it('User should be able to edit correct answer and save the question', () => {
|
43
43
|
fillInTheGapsOverImageDropdownPage.steps.editItem();
|
44
44
|
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray1[1]);
|
45
|
-
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray1[0])
|
45
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray1[0]);
|
46
46
|
fillInTheGapsOverImageDropdownPage.steps.saveAQuestionAndVerifySnackbar();
|
47
47
|
});
|
48
48
|
|
@@ -53,7 +53,7 @@ describe('Edit item - ', () => {
|
|
53
53
|
fillInTheGapsOverImageDropdownPage.steps.verifyPointInQuestionPreview(30);
|
54
54
|
});
|
55
55
|
|
56
|
-
it('User should be able to change scoring type to manually and save the question', () => {
|
56
|
+
it('User should be able to change scoring type to manually scored and save the question', () => {
|
57
57
|
fillInTheGapsOverImageDropdownPage.steps.editItem();
|
58
58
|
fillInTheGapsOverImageDropdownPage.steps.expandScoringTypeDropdown();
|
59
59
|
fillInTheGapsOverImageDropdownPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
@@ -5,6 +5,7 @@ import { colorPopupComponent } from "../../../pages/components";
|
|
5
5
|
const css = Cypress.env('css');
|
6
6
|
|
7
7
|
const dropdownPointerStyles = ['none', 'bottom', 'bottom right', 'right', 'top right', 'top', 'top left', 'left', 'bottom left'];
|
8
|
+
const optionsForDropdown = ['Image of a flower', 'Petals are displayed', 'Stem is the largest', 'Branches of a plane contain both leaves and flowers'];
|
8
9
|
|
9
10
|
describe('Create item page - Fill in the gaps: Question instructions, Options section', () => {
|
10
11
|
before(() => {
|
@@ -423,4 +424,42 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
423
424
|
|
424
425
|
fillInTheGapsOverImageDropdownPage.tests.verifyImageNotExistPreviewTab();
|
425
426
|
});
|
427
|
+
|
428
|
+
describe('User should be able to edit incomplete authored question', () => {
|
429
|
+
abortEarlySetup();
|
430
|
+
before(() => {
|
431
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image with dropdown');
|
432
|
+
cy.barsPreLoaderWait();
|
433
|
+
fillInTheGapsOverImageDropdownPage.steps.saveAQuestionWithIncompleteAuthoring();
|
434
|
+
fillInTheGapsOverImageDropdownPage.steps.editItem();
|
435
|
+
});
|
436
|
+
|
437
|
+
it('Warning icons should be displayed on the required input fields', () => {
|
438
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyWarningIconOnRequiredFields(['Please upload an image', 'Please set points']);
|
439
|
+
});
|
440
|
+
|
441
|
+
it('When required input fields are filled then warning icons should disappear', () => {
|
442
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
443
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(60);
|
444
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(80);
|
445
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(10);
|
446
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown);
|
447
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown);
|
448
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(2, optionsForDropdown);
|
449
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, optionsForDropdown[0]);
|
450
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, optionsForDropdown[1]);
|
451
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(2, optionsForDropdown[2]);
|
452
|
+
fillInTheGapsOverImageDropdownPage.steps.allotPoints(10);
|
453
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyErrorMessageIsNotDisplayed();
|
454
|
+
fillInTheGapsOverImageDropdownPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
|
455
|
+
});
|
456
|
+
|
457
|
+
it('Clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
458
|
+
fillInTheGapsOverImageDropdownPage.steps.saveAQuestionAndVerifySnackbar();
|
459
|
+
});
|
460
|
+
|
461
|
+
it('Warning icon should not be visible', () => {
|
462
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.warningIcon(), 'notExist');
|
463
|
+
});
|
464
|
+
});
|
426
465
|
});
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
-
import { dialogBoxBase, fillInTheGapsOverImageDropdownPage } from "../../../pages";
|
3
|
-
import { commonComponents } from "../../../pages/components";
|
4
|
-
const optionsForDropdown = ['Flower', 'Petal', 'Stem', 'Branch'];
|
2
|
+
import { dialogBoxBase, fillInTheGapsOverImageDropdownPage, itemPreviewPage } from "../../../pages";
|
5
3
|
import utilities from "../../../support/helpers/utilities";
|
4
|
+
import { commonComponents, browseItemsPage } from "../../../pages/components";
|
5
|
+
const optionsForDropdown = ['Flower', 'Petal', 'Stem', 'Branch'];
|
6
|
+
var itemReferenceID = ""
|
6
7
|
|
7
8
|
describe('Create item page - Fill in the gaps over image - dropdown: Header section and Saving question', () => {
|
8
9
|
before(() => {
|
@@ -44,14 +45,11 @@ describe('Create item page - Fill in the gaps over image - dropdown: Header sect
|
|
44
45
|
});
|
45
46
|
|
46
47
|
describe('Validation error messages', () => {
|
47
|
-
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
|
48
|
+
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please upload an image', 'Please insert a dropdown', 'Please set points']);
|
48
49
|
|
49
50
|
it('Validation error messages should be displayed below required input fields', () => {
|
50
51
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
|
51
|
-
fillInTheGapsOverImageDropdownPage.steps.
|
52
|
-
utilities.verifyInnerText(utilities.getNthElement(commonComponents.errorMessage(), 0), 'Error: Image is required.');
|
53
|
-
utilities.verifyInnerText(utilities.getNthElement(commonComponents.errorMessage(), 1), 'Error: Please insert a dropdown.');
|
54
|
-
fillInTheGapsOverImageDropdownPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
|
52
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyWarningIconOnRequiredFields(['Please upload an image', 'Please insert a dropdown', 'Please set points'])
|
55
53
|
});
|
56
54
|
|
57
55
|
it('Validation error messages should disappear when required input fields are filled', () => {
|
@@ -74,5 +72,38 @@ describe('Create item page - Fill in the gaps over image - dropdown: Header sect
|
|
74
72
|
});
|
75
73
|
fillInTheGapsOverImageDropdownPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
76
74
|
});
|
75
|
+
|
76
|
+
describe('Saving a question with incomplete authoring', () => {
|
77
|
+
abortEarlySetup();
|
78
|
+
before(() => {
|
79
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image with dropdown');
|
80
|
+
cy.barsPreLoaderWait();
|
81
|
+
});
|
82
|
+
|
83
|
+
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', () => {
|
84
|
+
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please upload an image', 'Please set points']);
|
85
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
86
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(60);
|
87
|
+
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please insert a dropdown', 'Please set points']);
|
88
|
+
fillInTheGapsOverImageDropdownPage.steps.saveAQuestionWithIncompleteAuthoring();
|
89
|
+
});
|
90
|
+
fillInTheGapsOverImageDropdownPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
91
|
+
});
|
92
|
+
|
93
|
+
describe('Save as you go - Browse item page contents', () => {
|
94
|
+
abortEarlySetup();
|
95
|
+
before(() => {
|
96
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image with dropdown');
|
97
|
+
cy.barsPreLoaderWait();
|
98
|
+
fillInTheGapsOverImageDropdownPage.steps.saveAQuestionWithIncompleteAuthoring();
|
99
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
100
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
101
|
+
browseItemsPage.steps.navigateToBrowseItemsPage();
|
102
|
+
});
|
103
|
+
|
104
|
+
it('When user saves an incompletely authored question then a warning icon should be visible in browse items page', () => {
|
105
|
+
browseItemsPage.steps.verifyWarningIconInBrowseItemPage(`${itemReferenceID}`);
|
106
|
+
});
|
107
|
+
});
|
77
108
|
});
|
78
109
|
});
|
package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js
CHANGED
@@ -78,7 +78,7 @@ describe('Create item page - Fill in the gaps over image - dropdown - Preview co
|
|
78
78
|
it(`${view} - Fill in the gaps over image dropdown Question instructions should be visible`, () => {
|
79
79
|
utilities.verifyInnerText(fillInTheGapsOverImageDropdownPage.questionInstructionsText(), 'Fill in the gaps');
|
80
80
|
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.questionInstructionsText(), 'visible');
|
81
|
-
cy.eyesCheckWindow(`${view} - Fill in the gaps over image dropdown -
|
81
|
+
cy.eyesCheckWindow(`${view} - Fill in the gaps over image dropdown - default state`);
|
82
82
|
});
|
83
83
|
|
84
84
|
it('The image uploaded in the \'Background image\' section should be displayed', () => {
|