itemengine-cypress-automation 1.0.180-essayResponseLazyLoadingFix-3170a00.0 → 1.0.181
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +162 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +4 -5
- package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +64 -3
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
- package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +29 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +3 -4
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
- package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +216 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +214 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +251 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
- package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +243 -0
- package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
- package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +176 -0
- package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +1 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/LayoutSection.js +530 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
- package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +119 -0
- package/cypress/e2e/ILC/NumberLine/numberLineSection.js +263 -0
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +2 -1
- package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +49 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +0 -1
- package/cypress/e2e/ILC/TextSelection/additionalSettings.js +125 -0
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +5 -4
- package/cypress/e2e/ILC/TextSelection/headerSection.js +73 -0
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.smoke.js +179 -0
- package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +89 -0
- package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +436 -0
- package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +277 -0
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +222 -0
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +260 -0
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +380 -0
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
- package/cypress/fixtures/constants.js +1 -1
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
- package/cypress/fixtures/theme/ilc.json +16 -16
- package/cypress/pages/audioPlayerPage.js +55 -543
- package/cypress/pages/brainingCampManipulativePage.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
- package/cypress/pages/components/autoScoredStudentViewSettings.js +4 -4
- package/cypress/pages/components/commonComponents.js +1 -0
- package/cypress/pages/components/draggableOptionContainer.js +1 -0
- package/cypress/pages/components/equationEditorFlyout.js +3 -2
- package/cypress/pages/components/essayResponseCommonComponents.js +8 -2
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -0
- package/cypress/pages/components/imageCanvasComponent.js +2 -1
- package/cypress/pages/components/index.js +1 -0
- package/cypress/pages/components/optionsWrapperComponent.js +11 -0
- package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +46 -0
- package/cypress/pages/components/toolSettingsComponent.js +6 -0
- package/cypress/pages/contentBlocksPage.js +2 -2
- package/cypress/pages/createItemPage.js +29 -0
- package/cypress/pages/dialogBoxBase.js +2 -2
- package/cypress/pages/drawingResponsePage.js +23 -4
- package/cypress/pages/feedbackScalePage.js +3 -0
- package/cypress/pages/graphingPage.js +18 -0
- package/cypress/pages/gridFillPage.js +18 -2
- package/cypress/pages/index.js +1 -1
- package/cypress/pages/itemPreviewSettingsPage.js +4 -0
- package/cypress/pages/listOrderingPage.js +122 -647
- package/cypress/pages/matchingPage.js +1 -1
- package/cypress/pages/multipleSelectionPage.js +23 -1
- package/cypress/pages/numberLinePage.js +1196 -59
- package/cypress/pages/rulerPage.js +6 -2
- package/cypress/pages/textSelectionPage.js +460 -22
- package/package.json +2 -2
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
@@ -0,0 +1,125 @@
|
|
1
|
+
import { textSelectionPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
|
5
|
+
const fontSizeDropdownOptions = ['Tiny', 'Small', 'Default', 'Normal', 'Big', 'Huge'];
|
6
|
+
const fontSizes = ['12px', '14px', '16px', '18px', '22px', '26px'];
|
7
|
+
const paragraphTextArray = ['All animals have a unique role to play in maintaining the balance of nature.', 'A lot of animal species exist in both, land and water. As a result, each of them has a purpose for their existence.', 'The animals divide into specific groups in biology. Amphibians are those which can live on both, land and water.', 'Mammals are ones which give birth to their offspring in the womb and have mammary glands.'];
|
8
|
+
|
9
|
+
describe('Create Item page - Text selection : Additional settings', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
describe('Additional Settings accordion', () => {
|
15
|
+
abortEarlySetup();
|
16
|
+
before(() => {
|
17
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
18
|
+
cy.barsPreLoaderWait();
|
19
|
+
});
|
20
|
+
|
21
|
+
textSelectionPage.tests.verifyAdditionalSettingsAccordionProperties();
|
22
|
+
});
|
23
|
+
|
24
|
+
describe('Additional settings: Font size contents', () => {
|
25
|
+
abortEarlySetup();
|
26
|
+
before(() => {
|
27
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
28
|
+
cy.barsPreLoaderWait();
|
29
|
+
textSelectionPage.steps.expandAdditionalSettings();
|
30
|
+
});
|
31
|
+
|
32
|
+
textSelectionPage.tests.verifyFontSizeSectionContents();
|
33
|
+
});
|
34
|
+
|
35
|
+
describe('Additional settings: Font size functionality edit tab', () => {
|
36
|
+
abortEarlySetup();
|
37
|
+
before(() => {
|
38
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
39
|
+
cy.barsPreLoaderWait();
|
40
|
+
textSelectionPage.steps.expandAdditionalSettings();
|
41
|
+
textSelectionPage.steps.clearQuestionInputField();
|
42
|
+
paragraphTextArray.forEach((paragraphText) => {
|
43
|
+
textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
44
|
+
});
|
45
|
+
textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
|
46
|
+
});
|
47
|
+
|
48
|
+
fontSizeDropdownOptions.forEach((option, fontsIndex) => {
|
49
|
+
it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the edit tab should change to ${option} accordingly`, () => {
|
50
|
+
textSelectionPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontSizeDropdownOptions[fontsIndex]);
|
51
|
+
utilities.verifyInnerText(textSelectionPage.fontSizeDropdown(), `${option}`);
|
52
|
+
utilities.verifyCSS(textSelectionPage.specifyCorrectAnswerTextParagraphs(), {
|
53
|
+
'font-size': fontSizes[fontsIndex]
|
54
|
+
});
|
55
|
+
});
|
56
|
+
});
|
57
|
+
});
|
58
|
+
|
59
|
+
describe('Additional settings: Font size functionality preview tab', () => {
|
60
|
+
abortEarlySetup();
|
61
|
+
before(() => {
|
62
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
63
|
+
cy.barsPreLoaderWait();
|
64
|
+
textSelectionPage.steps.expandAdditionalSettings();
|
65
|
+
textSelectionPage.steps.clearQuestionInputField();
|
66
|
+
paragraphTextArray.forEach((paragraphText) => {
|
67
|
+
textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
68
|
+
});
|
69
|
+
textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
|
70
|
+
textSelectionPage.steps.switchTextSelectionMode('Paragraph');
|
71
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
|
72
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[1]);
|
73
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
|
74
|
+
textSelectionPage.steps.allotPoints(5);
|
75
|
+
});
|
76
|
+
|
77
|
+
fontSizeDropdownOptions.forEach((option, fontsIndex) => {
|
78
|
+
it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview tab should change to ${option} accordingly`, () => {
|
79
|
+
textSelectionPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontSizeDropdownOptions[fontsIndex]);
|
80
|
+
utilities.verifyInnerText(textSelectionPage.fontSizeDropdown(), `${option}`);
|
81
|
+
textSelectionPage.steps.switchToPreviewTab();
|
82
|
+
utilities.verifyCSS(textSelectionPage.questionInstructionsText(), {
|
83
|
+
'font-size': fontSizes[fontsIndex]
|
84
|
+
});
|
85
|
+
utilities.verifyCSS(textSelectionPage.previewTabQuestionTextParagraphs(), {
|
86
|
+
'font-size': fontSizes[fontsIndex]
|
87
|
+
});
|
88
|
+
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[1]);
|
89
|
+
textSelectionPage.steps.switchToGradingView();
|
90
|
+
utilities.verifyCSS(textSelectionPage.correctAnswersLabel(), {
|
91
|
+
'font-size': fontSizes[fontsIndex]
|
92
|
+
});
|
93
|
+
utilities.verifyCSS(textSelectionPage.optionCorrectAnswerSection(), {
|
94
|
+
'font-size': fontSizes[fontsIndex]
|
95
|
+
});
|
96
|
+
utilities.verifyCSS(textSelectionPage.correctIncorrectAnswerLabel(), {
|
97
|
+
'font-size': fontSizes[fontsIndex]
|
98
|
+
});
|
99
|
+
textSelectionPage.steps.switchToEditTab();
|
100
|
+
});
|
101
|
+
});
|
102
|
+
});
|
103
|
+
|
104
|
+
describe('Additional settings: Accessibility section', () => {
|
105
|
+
abortEarlySetup();
|
106
|
+
before(() => {
|
107
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
108
|
+
cy.barsPreLoaderWait();
|
109
|
+
textSelectionPage.steps.expandAdditionalSettings();
|
110
|
+
});
|
111
|
+
|
112
|
+
textSelectionPage.tests.verifyAdditionalSettingsAccessibilitySection();
|
113
|
+
});
|
114
|
+
|
115
|
+
describe('Additional Settings: Details section', () => {
|
116
|
+
abortEarlySetup();
|
117
|
+
before(() => {
|
118
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
119
|
+
cy.barsPreLoaderWait();
|
120
|
+
textSelectionPage.steps.expandAdditionalSettings();
|
121
|
+
});
|
122
|
+
|
123
|
+
textSelectionPage.tests.verifyDetailsSection();
|
124
|
+
});
|
125
|
+
});
|
@@ -232,7 +232,6 @@ describe('Create item page - Text selection: All or nothing ', () => {
|
|
232
232
|
describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
|
233
233
|
abortEarlySetup();
|
234
234
|
before(() => {
|
235
|
-
cy.log('Navigating to Highlight question type');
|
236
235
|
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
237
236
|
cy.barsPreLoaderWait();
|
238
237
|
textSelectionPage.steps.addTextInQuestionInstructionsInputField('Highlight the correct statements.');
|
@@ -93,7 +93,6 @@ describe('Create item page - Matching - Check answer functionality', () => {
|
|
93
93
|
|
94
94
|
it('When the user attempts the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' should be displayed. Correct answer section should not be displayed', () => {
|
95
95
|
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[2]);
|
96
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[3]);
|
97
96
|
checkAnswer(view);
|
98
97
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
|
99
98
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[1]);
|
@@ -98,8 +98,9 @@ describe('Create item page - Text selection: Scoring section', () => {
|
|
98
98
|
|
99
99
|
textSelectionPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
100
100
|
|
101
|
-
it('\'Points per response
|
102
|
-
textSelectionPage.
|
101
|
+
it('\'Points per response:\' label should be displayed in the \'Specify correct answer\' section', () => {
|
102
|
+
utilities.verifyInnerText(textSelectionPage.pointsPerResponseLabel(), 'Points per response:');
|
103
|
+
utilities.verifyElementVisibilityState(textSelectionPage.pointsPerResponseLabel(), 'visible');
|
103
104
|
});
|
104
105
|
|
105
106
|
it('When the user gives a score input to \'Points\' input field, then the score should be equally divided among the dropzone \'Points per response\' label', () => {
|
@@ -187,12 +188,12 @@ describe('Create item page - Text selection: Scoring section', () => {
|
|
187
188
|
it('When user has not selected an option in specify correct answer section, then the \'Set points\' button should be disabled', () => {
|
188
189
|
utilities.verifyElementDisabled(textSelectionPage.setPointsButton());
|
189
190
|
});
|
190
|
-
|
191
|
+
|
191
192
|
it('When user selects an option in set correct answer section, then the \'Set points\' button should be enabled', () => {
|
192
193
|
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
|
193
194
|
textSelectionPage.steps.verifySetPointsButtonLabelAndEnabledState();
|
194
195
|
});
|
195
|
-
|
196
|
+
|
196
197
|
it('CSS of \'Set points\' button', { tags: 'css' }, () => {
|
197
198
|
utilities.verifyCSS(textSelectionPage.setPointsButton(), {
|
198
199
|
'color': css.color.activeButtons,
|
@@ -0,0 +1,73 @@
|
|
1
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
+
import { dialogBoxBase, textSelectionPage } from "../../../pages";
|
3
|
+
const options = ['Bat', 'Eagle'];
|
4
|
+
|
5
|
+
describe('Create item page - Text selection: Header section and Saving question', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Header section contents', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
14
|
+
});
|
15
|
+
|
16
|
+
textSelectionPage.tests.verifyCreateQuestionPageQuestionTypeHeader('Text selection');
|
17
|
+
});
|
18
|
+
|
19
|
+
describe('Tabs section', () => {
|
20
|
+
abortEarlySetup();
|
21
|
+
before(() => {
|
22
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
23
|
+
});
|
24
|
+
|
25
|
+
textSelectionPage.tests.verifyTabsSection();
|
26
|
+
});
|
27
|
+
|
28
|
+
describe('Cancel button', () => {
|
29
|
+
abortEarlySetup();
|
30
|
+
before(() => {
|
31
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
32
|
+
});
|
33
|
+
|
34
|
+
textSelectionPage.tests.verifyCancelButton('text selection')
|
35
|
+
});
|
36
|
+
|
37
|
+
describe('Save Question button', () => {
|
38
|
+
abortEarlySetup();
|
39
|
+
before(() => {
|
40
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
41
|
+
cy.barsPreLoaderWait();
|
42
|
+
});
|
43
|
+
|
44
|
+
describe('Validation error messages', () => {
|
45
|
+
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
|
46
|
+
|
47
|
+
it('Validation error messages should be displayed below required input fields', () => {
|
48
|
+
textSelectionPage.steps.verifyQuestionInstructionsErrorMessage();
|
49
|
+
textSelectionPage.steps.verifyPointsFieldErrorMessage();
|
50
|
+
textSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
|
51
|
+
textSelectionPage.steps.verifySpecifyCorrectAnswerErrorMessage();
|
52
|
+
});
|
53
|
+
|
54
|
+
it('Validation error messages should disappear when required input fields are filled', () => {
|
55
|
+
textSelectionPage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
56
|
+
textSelectionPage.steps.selectOptionInSpecifyPossibleOptionsSection('Custom', 'Lorem');
|
57
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection('Lorem');
|
58
|
+
textSelectionPage.steps.allotPoints(10);
|
59
|
+
textSelectionPage.steps.verifyErrorMessageIsNotDisplayed();
|
60
|
+
textSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
|
61
|
+
});
|
62
|
+
|
63
|
+
textSelectionPage.tests.verifyCreateItemWrapperContentsA11y();
|
64
|
+
});
|
65
|
+
|
66
|
+
describe('Saving a question', () => {
|
67
|
+
it('Clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
68
|
+
textSelectionPage.steps.saveAQuestionAndVerifySnackbar();
|
69
|
+
});
|
70
|
+
textSelectionPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
71
|
+
});
|
72
|
+
});
|
73
|
+
});
|
@@ -70,7 +70,7 @@ describe('Create item page - Text selection : Preview contents', () => {
|
|
70
70
|
});
|
71
71
|
|
72
72
|
it('Question instructions should be visible', () => {
|
73
|
-
utilities.verifyInnerText(textSelectionPage.questionInstructionsText(), '
|
73
|
+
utilities.verifyInnerText(textSelectionPage.questionInstructionsText(), 'Select the correct statements.');
|
74
74
|
utilities.verifyElementVisibilityState(textSelectionPage.questionInstructionsText(), 'visible');
|
75
75
|
});
|
76
76
|
|
@@ -109,7 +109,7 @@ describe('Create item page - Text selection : Preview contents', () => {
|
|
109
109
|
|
110
110
|
it('When user clicks on a selected option, then that option should be deselected', () => {
|
111
111
|
textSelectionPage.steps.deselectOptionInPreviewTab(paragraphTextArray[0]);
|
112
|
-
textSelectionPage.steps.
|
112
|
+
textSelectionPage.steps.verifyStandardStateOptionInPreviewTab(paragraphTextArray[0]);
|
113
113
|
});
|
114
114
|
} else if (view === 'Grading view') {
|
115
115
|
it('The question text should be displayed with the selected correct options and status message \' Your answer is correct\' should be displayed', () => {
|
@@ -0,0 +1,179 @@
|
|
1
|
+
import { textSelectionPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
const grepTags = Cypress.env('grepTags');
|
6
|
+
|
7
|
+
describe('Create Item page - Text selection: Question Instructions and Question section', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Question Instructions input field - Edit tab', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
});
|
18
|
+
|
19
|
+
textSelectionPage.tests.verifyQuestionInstructionsInputFieldEditTab();
|
20
|
+
});
|
21
|
+
|
22
|
+
describe('Question Instructions input field - Preview tab', () => {
|
23
|
+
abortEarlySetup();
|
24
|
+
before(() => {
|
25
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
26
|
+
cy.barsPreLoaderWait();
|
27
|
+
});
|
28
|
+
|
29
|
+
textSelectionPage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
|
30
|
+
});
|
31
|
+
|
32
|
+
describe('Question input field - Edit tab', () => {
|
33
|
+
abortEarlySetup();
|
34
|
+
before(() => {
|
35
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
36
|
+
cy.barsPreLoaderWait();
|
37
|
+
});
|
38
|
+
|
39
|
+
it('\'Question\' label and input field should be displayed and by default in the question input field, sample \'Lorem Ipsum\' text should be present', () => {
|
40
|
+
utilities.verifyInnerText(textSelectionPage.questionLabel(), 'Question');
|
41
|
+
utilities.verifyInnerText(textSelectionPage.questionInputField(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\n\n\n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n\n\n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
|
42
|
+
});
|
43
|
+
|
44
|
+
it('The default sample \'Lorem Ipsum\' text in the question input field should also be displayed in specify possible options section and specify correct answer section in the edit tab.', () => {
|
45
|
+
utilities.verifyInnerText(textSelectionPage.specifyPossibleOptionsTextFieldWrapper(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\n \n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n \n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
|
46
|
+
utilities.verifyInnerText(textSelectionPage.specifyCorrectAnswerTextWrapper(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\n \n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n \n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
|
47
|
+
});
|
48
|
+
|
49
|
+
it('When the user removes all the text from the question input field and focuses out of it, an error message \'Error: Question is required.\' should be displayed', () => {
|
50
|
+
textSelectionPage.steps.clearQuestionInputField();
|
51
|
+
textSelectionPage.steps.focusOutOfQuestionInputField();
|
52
|
+
utilities.verifyInnerText(textSelectionPage.errorMessage(), 'Error: Question is required.');
|
53
|
+
textSelectionPage.steps.verifyErroredStateOfQuestionInputField();
|
54
|
+
});
|
55
|
+
|
56
|
+
textSelectionPage.tests.verifyErrorMessageCSSAndA11y();
|
57
|
+
|
58
|
+
it('The user should be able to give input in the question input field, then the error message should disappear', () => {
|
59
|
+
cy.log('Add Image to Question input field')
|
60
|
+
textSelectionPage.steps.focusInQuestionInputField();
|
61
|
+
textSelectionPage.steps.selectImageOptionFromCKEditorToolbar();
|
62
|
+
textSelectionPage.steps.addImageToInputField();
|
63
|
+
textSelectionPage.steps.verifyImageAndAltTextInQuestionInputField();
|
64
|
+
textSelectionPage.steps.addInputToQuestionInputField('{enter}');
|
65
|
+
cy.log('Add equation to Question input field')
|
66
|
+
textSelectionPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
|
67
|
+
textSelectionPage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
|
68
|
+
textSelectionPage.steps.verifyEquationInQuestionInputField();
|
69
|
+
textSelectionPage.steps.addInputToQuestionInputField('{rightarrow}{enter}');
|
70
|
+
cy.log('Add bold text to input field')
|
71
|
+
textSelectionPage.steps.focusInQuestionInputField();
|
72
|
+
textSelectionPage.steps.selectBoldOptionFromCKEditorToolbar();
|
73
|
+
textSelectionPage.steps.addInputToQuestionInputField('This is Bold text input.');
|
74
|
+
textSelectionPage.steps.verifyBoldTextInQuestionInputField();
|
75
|
+
textSelectionPage.steps.addInputToQuestionInputField('{enter}');
|
76
|
+
cy.log('Add link to Question input field')
|
77
|
+
textSelectionPage.steps.selectLinkOptionFromCKEditorToolbar();
|
78
|
+
textSelectionPage.steps.addLinkToInputField();
|
79
|
+
textSelectionPage.steps.verifyLinkInQuestionInputField();
|
80
|
+
utilities.verifyElementVisibilityState(textSelectionPage.errorMessage(), 'notExist');
|
81
|
+
textSelectionPage.steps.focusOutOfQuestionInputField();
|
82
|
+
});
|
83
|
+
|
84
|
+
it('CSS of Question label and Question input field contents', { tags: 'css' }, () => {
|
85
|
+
utilities.verifyCSS(textSelectionPage.questionLabel(), {
|
86
|
+
'color': css.color.sectionHeading,
|
87
|
+
'font-size': css.fontSize.normal,
|
88
|
+
'font-weight': css.fontWeight.semibold
|
89
|
+
});
|
90
|
+
utilities.verifyCSS(textSelectionPage.questionInputField(), {
|
91
|
+
'color': css.color.text,
|
92
|
+
'font-size': css.fontSize.default,
|
93
|
+
'font-weight': css.fontWeight.regular,
|
94
|
+
'border': `1px solid ${css.color.figDefaultComponentBorder}`
|
95
|
+
});
|
96
|
+
utilities.verifyCSS(textSelectionPage.questionInputField().find('a'), {
|
97
|
+
'color': css.color.linkText,
|
98
|
+
'font-size': css.fontSize.default,
|
99
|
+
'font-weight': css.fontWeight.bold
|
100
|
+
});
|
101
|
+
});
|
102
|
+
|
103
|
+
it('Image, equation, bold text and link added in Question input field should be properly displayed in specify possible options section', () => {
|
104
|
+
textSelectionPage.steps.verifyImageAndAltTextInSpecifyPossibleOptionsSection();
|
105
|
+
textSelectionPage.steps.verifyEquationInSpecifyPossibleOptionsSection();
|
106
|
+
textSelectionPage.steps.verifyBoldTextInSpecifyPossibleOptionsSection();
|
107
|
+
textSelectionPage.steps.verifyLinkInSpecifyPossibleOptionsSection();
|
108
|
+
});
|
109
|
+
|
110
|
+
it('Image, equation, bold text and link added in Question input field should be properly displayed in specify correct answer section', () => {
|
111
|
+
textSelectionPage.steps.verifyImageAndAltTextInSpecifyCorrectAnswerSection();
|
112
|
+
textSelectionPage.steps.verifyEquationInSpecifyCorrectAnswerSection();
|
113
|
+
textSelectionPage.steps.verifyBoldTextInSpecifyCorrectAnswerSection();
|
114
|
+
textSelectionPage.steps.verifyLinkInSpecifyCorrectAnswerSection();
|
115
|
+
});
|
116
|
+
});
|
117
|
+
|
118
|
+
describe('Question field - Preview tab', () => {
|
119
|
+
abortEarlySetup();
|
120
|
+
before(() => {
|
121
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
122
|
+
cy.barsPreLoaderWait();
|
123
|
+
});
|
124
|
+
|
125
|
+
it('In Preview tab, the sample \'Lorem Ipsum\' text should be displayed in the question field', () => {
|
126
|
+
textSelectionPage.steps.switchToPreviewTab()
|
127
|
+
utilities.verifyInnerText(textSelectionPage.questionTextWrapperPreviewTab(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\n \n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n \n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
|
128
|
+
});
|
129
|
+
|
130
|
+
it('The user should be able to edit text in the question input field and the updated question should be displayed in the preview tab', () => {
|
131
|
+
cy.log('Switching to edit tab')
|
132
|
+
textSelectionPage.steps.switchToEditTab();
|
133
|
+
textSelectionPage.steps.clearQuestionInputField();
|
134
|
+
cy.log('Add Image to Question input field')
|
135
|
+
textSelectionPage.steps.focusInQuestionInputField();
|
136
|
+
textSelectionPage.steps.selectImageOptionFromCKEditorToolbar();
|
137
|
+
textSelectionPage.steps.addImageToInputField();
|
138
|
+
textSelectionPage.steps.verifyImageAndAltTextInQuestionInputField();
|
139
|
+
textSelectionPage.steps.addInputToQuestionInputField('{enter}');
|
140
|
+
cy.log('Add equation to Question input field')
|
141
|
+
textSelectionPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
|
142
|
+
textSelectionPage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
|
143
|
+
textSelectionPage.steps.verifyEquationInQuestionInputField();
|
144
|
+
textSelectionPage.steps.addInputToQuestionInputField('{rightarrow}{enter}');
|
145
|
+
cy.log('Add bold text to input field')
|
146
|
+
textSelectionPage.steps.focusInQuestionInputField();
|
147
|
+
textSelectionPage.steps.selectBoldOptionFromCKEditorToolbar();
|
148
|
+
textSelectionPage.steps.addInputToQuestionInputField('This is Bold text input.');
|
149
|
+
textSelectionPage.steps.verifyBoldTextInQuestionInputField();
|
150
|
+
textSelectionPage.steps.addInputToQuestionInputField('{enter}');
|
151
|
+
cy.log('Add link to Question input field')
|
152
|
+
textSelectionPage.steps.selectLinkOptionFromCKEditorToolbar();
|
153
|
+
textSelectionPage.steps.addLinkToInputField();
|
154
|
+
textSelectionPage.steps.verifyLinkInQuestionInputField();
|
155
|
+
utilities.verifyElementVisibilityState(textSelectionPage.errorMessage(), 'notExist');
|
156
|
+
textSelectionPage.steps.focusOutOfQuestionInputField();
|
157
|
+
cy.log('Switching to preview tab')
|
158
|
+
textSelectionPage.steps.switchToPreviewTab();
|
159
|
+
textSelectionPage.steps.verifyImageAndAltTextInPreviewTab();
|
160
|
+
textSelectionPage.steps.verifyEquationInPreviewTab();
|
161
|
+
textSelectionPage.steps.verifyBoldTextInPreviewTab();
|
162
|
+
textSelectionPage.steps.verifyLinkInPreviewTab();
|
163
|
+
});
|
164
|
+
|
165
|
+
//Failing due to https://redmine.zeuslearning.com/issues/537907
|
166
|
+
it('CSS of \'Preview tab\' when image, equation, bold text and link are added', { tags: 'css' }, () => {
|
167
|
+
utilities.verifyCSS(textSelectionPage.questionTextWrapperPreviewTab().find('strong'), {
|
168
|
+
'color': css.color.text,
|
169
|
+
'font-size': css.fontSize.default,
|
170
|
+
'font-weight': css.fontWeight.bold
|
171
|
+
});
|
172
|
+
utilities.verifyCSS(textSelectionPage.questionTextWrapperPreviewTab().find('a'), {
|
173
|
+
'color': css.color.linkText,
|
174
|
+
'font-size': css.fontSize.default,
|
175
|
+
'font-weight': css.fontWeight.bold
|
176
|
+
});
|
177
|
+
});
|
178
|
+
});
|
179
|
+
});
|
@@ -0,0 +1,89 @@
|
|
1
|
+
import { textSelectionPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
|
5
|
+
const paragraphTextArray = ['All animals have a unique role to play in maintaining the balance of nature.', 'A lot of animal species exist in both, land and water. As a result, each of them has a purpose for their existence.', 'The animals divide into specific groups in biology. Amphibians are those which can live on both, land and water.', 'Mammals are ones which give birth to their offspring in the womb and have mammary glands.'];
|
6
|
+
|
7
|
+
describe('Create Item page - Text selection: Specify correct answer, Alternative correct answer', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Specify correct answer section - \'Correct\' accordion', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
textSelectionPage.steps.addTextInQuestionInstructionsInputField('Select text from the given paragraph');
|
18
|
+
textSelectionPage.steps.clearQuestionInputField();
|
19
|
+
paragraphTextArray.forEach((paragraphText) => {
|
20
|
+
textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
21
|
+
});
|
22
|
+
textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
|
23
|
+
textSelectionPage.steps.switchTextSelectionMode('Paragraph');
|
24
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
|
25
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[1]);
|
26
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[2]);
|
27
|
+
});
|
28
|
+
|
29
|
+
textSelectionPage.tests.verifyAutoScoredSpecifyCorrectAnswerHeaderSectionContents('text selection');
|
30
|
+
|
31
|
+
it('In the \'Correct\' accordion the question field text should be displayed and the options should be available as set in \'Specify possible options\' section', () => {
|
32
|
+
textSelectionPage.steps.verifySpecifyCorrectAnswerTextAndOptions(paragraphTextArray, [paragraphTextArray[0], paragraphTextArray[1], paragraphTextArray[2]]);
|
33
|
+
});
|
34
|
+
|
35
|
+
textSelectionPage.tests.verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
|
36
|
+
});
|
37
|
+
|
38
|
+
describe('Specify correct answer section - \'Alternative\' accordion', () => {
|
39
|
+
abortEarlySetup();
|
40
|
+
before(() => {
|
41
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
42
|
+
cy.barsPreLoaderWait();
|
43
|
+
textSelectionPage.steps.addTextInQuestionInstructionsInputField('Select text from the given paragraph');
|
44
|
+
textSelectionPage.steps.clearQuestionInputField();
|
45
|
+
paragraphTextArray.forEach((paragraphText) => {
|
46
|
+
textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
47
|
+
});
|
48
|
+
textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
|
49
|
+
textSelectionPage.steps.switchTextSelectionMode('Paragraph');
|
50
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
|
51
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[1]);
|
52
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[2]);
|
53
|
+
});
|
54
|
+
|
55
|
+
textSelectionPage.tests.verifyAutoScoredAddAlternativeAnswerButtonAndValidation('text selection');
|
56
|
+
|
57
|
+
it('When user has added points and set correct answers in the \'Correct\' accordion, then the user should be able to add alternative answer for the question using \'Add alternative answer\' button', () => {
|
58
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
|
59
|
+
textSelectionPage.steps.allotPoints(20);
|
60
|
+
textSelectionPage.steps.addAlternativeAnswerAccordion(1);
|
61
|
+
});
|
62
|
+
|
63
|
+
it('In the \'Alternate\' accordion the question field text should be displayed and the options should be available as set in \'Specify possible options\' section', () => {
|
64
|
+
textSelectionPage.steps.verifySpecifyCorrectAnswerTextAndOptions(paragraphTextArray, [paragraphTextArray[0], paragraphTextArray[1], paragraphTextArray[2]]);
|
65
|
+
});
|
66
|
+
|
67
|
+
textSelectionPage.tests.verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Alternative');
|
68
|
+
|
69
|
+
it('User should be able to add another alternative answer for the question using \'Add alternative answer\' button and the name for this new accordion should be \'Alternative 2\'', () => {
|
70
|
+
textSelectionPage.steps.addAlternativeAnswerAccordion(2);
|
71
|
+
});
|
72
|
+
|
73
|
+
textSelectionPage.tests.verifyWarningPopupAndAccordionNavigationWhenNoPointsAddedInAlternativeAccordion();
|
74
|
+
|
75
|
+
it('User should be able to remove alternative correct answer by clicking on the \'Delete\' icon button alongside alternative answer accordion and the name of the alternative answer accordions should get updated accordingly', () => {
|
76
|
+
cy.log('Set correct answer and points in alternative 2 accordion, then switch to alternative 1 accordion and click delete icon button');
|
77
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[1]);
|
78
|
+
textSelectionPage.steps.allotPoints(5);
|
79
|
+
textSelectionPage.steps.deleteAlternativeAnswerAccordion(1);
|
80
|
+
textSelectionPage.steps.verifyAlternativeAnswerAccordionNotExists(2);
|
81
|
+
textSelectionPage.steps.verifyAlternativeAnswerAccordionLabel(0);
|
82
|
+
});
|
83
|
+
|
84
|
+
it('When the user deselects an option assigned as correct in the correct accordion then the correct accordion should be in the expanded state', () => {
|
85
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
|
86
|
+
textSelectionPage.steps.verifyCorrectAnswerAccordionIsExpanded();
|
87
|
+
});
|
88
|
+
});
|
89
|
+
});
|