itemengine-cypress-automation 1.0.129 → 1.0.131-updateILCrepo6March-02c78d1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +210 -0
- package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +91 -0
- package/cypress/e2e/ILC/ContentBlocks/styleAndLayoutCustomizationSection.js +392 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +2 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +152 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +196 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +195 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +288 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/manuallyAndNonScored.js +141 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +245 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +413 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +218 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +245 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +163 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +224 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +196 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +224 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +83 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +653 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +180 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabScoringSection.js +229 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/specifyCorrectAnswerSection.js +90 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/switchingCasesBetweenOptionsLayout.js +50 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +204 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +204 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +298 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingPenaltyScoring.js +63 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/manuallyAndNonScored.js +111 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +231 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsBasic.js +90 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +232 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +231 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsBasic.js +138 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +213 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +186 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +214 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAndDropdownMenuSection.js +161 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +328 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +144 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabScoringSection.js +250 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +75 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +74 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +188 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +8 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +4 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +1 -52
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +3 -211
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +39 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -50
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/conditionalCheckboxScoring.js +325 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +1 -146
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +78 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +265 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +75 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/responseAnswersAndAcceptedStudentInput.js +56 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +40 -2
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specialCharactersSection.js +249 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +64 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +128 -0
- package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +889 -0
- package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +168 -0
- package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +203 -0
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +222 -0
- package/cypress/e2e/ILC/SimpleCalculator/calculatorFunctionality.js +349 -0
- package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +132 -0
- package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +35 -7
- package/cypress/e2e/ILC/UploadResponse/studentViewSettingsSection.js +213 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +41 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +377 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponsePreview.js +161 -0
- package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +250 -0
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
- package/cypress/fixtures/theme/ilc.json +6 -1
- package/cypress/fixtures/uploadResponseFileType.js +5 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +13 -13
- package/cypress/pages/components/customizeSpecialCharacterComponent.js +24 -6
- package/cypress/pages/components/draggableOptionContainer.js +1 -0
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +42 -4
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +149 -5
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +954 -77
- package/cypress/pages/components/questionInputFieldComponent.js +1 -1
- package/cypress/pages/components/questionInstructionsComponent.js +2 -1
- package/cypress/pages/contentBlocksPage.js +515 -0
- package/cypress/pages/drawingResponsePage.js +2 -2
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +359 -3
- package/cypress/pages/fillInTheGapsDropdownPage.js +21 -1
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +5 -57
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +3 -24
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +1 -435
- package/cypress/pages/fillInTheGapsTextPage.js +9 -2
- package/cypress/pages/graphingPage.js +484 -0
- package/cypress/pages/index.js +4 -1
- package/cypress/pages/simpleCalculatorPage.js +310 -0
- package/cypress/pages/uploadResponsePage.js +260 -92
- package/package.json +2 -2
- package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +0 -242
- package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +0 -99
- package/cypress/e2e/ILC/Passage/passageEditTab.js +0 -241
- package/cypress/e2e/ILC/Passage/passageHeaderSection.js +0 -73
- package/cypress/e2e/ILC/Passage/passagePreviewTab.js +0 -246
@@ -0,0 +1,188 @@
|
|
1
|
+
import { fillInTheGapsDropdownPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
const optionsForDropdown = ['Flower', 'Petal', 'Stem', 'Branch'];
|
7
|
+
|
8
|
+
describe('Create Item page - Fill in the gaps with dropdown: Student view settings', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Randomize options : Edit tab', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown);
|
19
|
+
});
|
20
|
+
|
21
|
+
fillInTheGapsDropdownPage.tests.verifyStudentViewSettingsLabelAndCSS();
|
22
|
+
|
23
|
+
it('\'Randomize options\' checkbox and label should be displayed and by default it should be unchecked', () => {
|
24
|
+
utilities.verifyInnerText(fillInTheGapsDropdownPage.randomizeOptionsLabel(), 'Randomize options');
|
25
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDropdownPage.randomizeOptionsCheckbox(), 'exist');
|
26
|
+
fillInTheGapsDropdownPage.steps.verifyRandomizeOptionsCheckboxUnchecked();
|
27
|
+
});
|
28
|
+
|
29
|
+
fillInTheGapsDropdownPage.tests.verifyRandomizeOptionsCheckboxAndLabelUncheckedCSS();
|
30
|
+
|
31
|
+
it('When the \'Randomize options\' functionality is disabled, the options in the specify correct answer section dropdown should be displayed in the order in which the user has set them in the \'Dropdown options\' section', () => {
|
32
|
+
fillInTheGapsDropdownPage.steps.verifyRandomizeOptionsCheckboxUnchecked();
|
33
|
+
fillInTheGapsDropdownPage.steps.expandDropdownInSpecifyCorrectAnswerSection(0);
|
34
|
+
fillInTheGapsDropdownPage.steps.verifyDropdownOptionsSpecifyCorrectAnswer(optionsForDropdown);
|
35
|
+
cy.log('Selecting an option to collapse the dropdown');
|
36
|
+
fillInTheGapsDropdownPage.steps.selectOptionFromDropdownList(optionsForDropdown[0]);
|
37
|
+
});
|
38
|
+
|
39
|
+
it('When the user enables the \'Randomize options\' functionality, then the options in the specify correct answer section dropdown should be displayed in the order in which the user has set them in the \'Dropdown options\' section', () => {
|
40
|
+
fillInTheGapsDropdownPage.steps.checkRandomizeOptionsCheckbox();
|
41
|
+
fillInTheGapsDropdownPage.steps.expandDropdownInSpecifyCorrectAnswerSection(0);
|
42
|
+
fillInTheGapsDropdownPage.steps.verifyDropdownOptionsSpecifyCorrectAnswer(optionsForDropdown);
|
43
|
+
cy.log('Selecting an option to collapse the dropdown');
|
44
|
+
fillInTheGapsDropdownPage.steps.selectOptionFromDropdownList(optionsForDropdown[0]);
|
45
|
+
});
|
46
|
+
|
47
|
+
fillInTheGapsDropdownPage.tests.verifyRandomizeOptionsCheckboxCheckedCSSAndA11y();
|
48
|
+
});
|
49
|
+
|
50
|
+
describe('Randomize options - Functionality: Preview tab', () => {
|
51
|
+
let randomizedOptionsString = '';
|
52
|
+
abortEarlySetup();
|
53
|
+
before(() => {
|
54
|
+
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
55
|
+
cy.barsPreLoaderWait();
|
56
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown);
|
57
|
+
});
|
58
|
+
|
59
|
+
it('When the \'Randomize options\' functionality is disabled, then the options displayed in the preview tab dropdown should be in the order in which the user has set them in the \'Dropdown options\' section', () => {
|
60
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
61
|
+
fillInTheGapsDropdownPage.steps.expandDropdownInPreviewTab(0);
|
62
|
+
fillInTheGapsDropdownPage.steps.verifyDropdownOptionsPreviewTab(optionsForDropdown);
|
63
|
+
cy.log('Selecting an option to collapse the dropdown');
|
64
|
+
fillInTheGapsDropdownPage.steps.selectOptionFromDropdownList(optionsForDropdown[0]);
|
65
|
+
});
|
66
|
+
|
67
|
+
it('When the user enables the \'Randomize options\' functionality, then the options should be displayed in a random order in the preview tab dropdown', () => {
|
68
|
+
fillInTheGapsDropdownPage.steps.switchToEditTab();
|
69
|
+
fillInTheGapsDropdownPage.steps.checkRandomizeOptionsCheckbox();
|
70
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
71
|
+
fillInTheGapsDropdownPage.steps.expandDropdownInPreviewTab(0);
|
72
|
+
fillInTheGapsDropdownPage.steps.verifyRandomizeOptionOrder(optionsForDropdown);
|
73
|
+
randomizedOptionsString = fillInTheGapsDropdownPage.steps.getDropdownOptionsArray();
|
74
|
+
cy.log('Selecting an option to collapse the dropdown');
|
75
|
+
fillInTheGapsDropdownPage.steps.selectOptionFromDropdownList(optionsForDropdown[0]);
|
76
|
+
});
|
77
|
+
|
78
|
+
it('When the user switches to Edit tab and does not modify any question properties, then the order of the options should not change in the preview tab dropdown', () => {
|
79
|
+
fillInTheGapsDropdownPage.steps.switchToEditTab();
|
80
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
81
|
+
fillInTheGapsDropdownPage.steps.expandDropdownInPreviewTab(0);
|
82
|
+
fillInTheGapsDropdownPage.steps.verifyDropdownOptionsPreviewTab(randomizedOptionsString);
|
83
|
+
cy.log('Selecting an option to collapse the dropdown');
|
84
|
+
fillInTheGapsDropdownPage.steps.selectOptionFromDropdownList(optionsForDropdown[0]);
|
85
|
+
});
|
86
|
+
|
87
|
+
it('When the user switches to Edit tab and modifies any of question properties, then the order of the options should change in the preview tab dropdown', () => {
|
88
|
+
fillInTheGapsDropdownPage.steps.switchToEditTab();
|
89
|
+
fillInTheGapsDropdownPage.steps.allotPoints(5);
|
90
|
+
cy.log('Added wait here to prevent cypress from switching to preview tab just after modifying the question');
|
91
|
+
cy.wait(1000);
|
92
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
93
|
+
fillInTheGapsDropdownPage.steps.expandDropdownInPreviewTab(0);
|
94
|
+
fillInTheGapsDropdownPage.steps.verifyRandomizeOptionOrder(optionsForDropdown);
|
95
|
+
fillInTheGapsDropdownPage.steps.verifyRerandomizedOptionsOrder(randomizedOptionsString);
|
96
|
+
cy.log('Selecting an option to collapse the dropdown');
|
97
|
+
fillInTheGapsDropdownPage.steps.selectOptionFromDropdownList(optionsForDropdown[0]);
|
98
|
+
});
|
99
|
+
|
100
|
+
it('When the user disables the \'Randomize options\' functionality, then the options should be displayed in the order in which the user has set them in the \'Dropdown options\' section in the preview tab dropdown', () => {
|
101
|
+
fillInTheGapsDropdownPage.steps.switchToEditTab();
|
102
|
+
fillInTheGapsDropdownPage.steps.uncheckRandomizeOptionsCheckbox();
|
103
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
104
|
+
fillInTheGapsDropdownPage.steps.expandDropdownInPreviewTab(0);
|
105
|
+
fillInTheGapsDropdownPage.steps.verifyDropdownOptionsPreviewTab(optionsForDropdown);
|
106
|
+
});
|
107
|
+
});
|
108
|
+
|
109
|
+
describe('Allow students to check answer: Edit tab', () => {
|
110
|
+
abortEarlySetup();
|
111
|
+
before(() => {
|
112
|
+
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
113
|
+
cy.barsPreLoaderWait();
|
114
|
+
});
|
115
|
+
|
116
|
+
fillInTheGapsDropdownPage.tests.verifyAllowStudentsToCheckAnswerLabelAndCheckboxCSS();
|
117
|
+
|
118
|
+
fillInTheGapsDropdownPage.tests.verifyMaximumAttemptsDropdownDisplayedWhenAllowStudentsToCheckAnswerIsChecked();
|
119
|
+
|
120
|
+
fillInTheGapsDropdownPage.tests.verifyMaxCheckAnswerAttemptsDropdown();
|
121
|
+
|
122
|
+
fillInTheGapsDropdownPage.tests.verifyAllowStudentsToCheckAnswerContentsCSSAndA11y();
|
123
|
+
});
|
124
|
+
|
125
|
+
describe('Allow students to check answer: Preview tab', () => {
|
126
|
+
abortEarlySetup();
|
127
|
+
before(() => {
|
128
|
+
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
129
|
+
cy.barsPreLoaderWait();
|
130
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown);
|
131
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, optionsForDropdown[0]);
|
132
|
+
});
|
133
|
+
|
134
|
+
it('When the user has added options and specified correct answer and points then on checking the \'Allow students to check answer\' checkbox the Check answer button should be displayed in the preview tab', () => {
|
135
|
+
fillInTheGapsDropdownPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
136
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
137
|
+
utilities.verifyInnerText(fillInTheGapsDropdownPage.checkAnswerButton(), 'Check answer');
|
138
|
+
});
|
139
|
+
|
140
|
+
it('When the user selects an answer in the dropdown and checks the answer then an icon should be displayed beside the selected option and the check answer button should be in enabled state', () => {
|
141
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
142
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsForDropdown[0] }]);
|
143
|
+
fillInTheGapsDropdownPage.steps.checkAnswer();
|
144
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
145
|
+
fillInTheGapsDropdownPage.steps.verifyCheckAnswerButtonEnabled();
|
146
|
+
});
|
147
|
+
|
148
|
+
it('When the user selects an option from the Maximum check answer attempts dropdown then the user should be able to check answer only those many times in the preview tab', () => {
|
149
|
+
fillInTheGapsDropdownPage.steps.switchToEditTab();
|
150
|
+
fillInTheGapsDropdownPage.steps.expandMaxCheckAnswerAttemptsDropdown();
|
151
|
+
fillInTheGapsDropdownPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('1');
|
152
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
153
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsForDropdown[0] }]);
|
154
|
+
fillInTheGapsDropdownPage.steps.checkAnswer();
|
155
|
+
fillInTheGapsDropdownPage.steps.verifyCheckAnswerButtonDisabled();
|
156
|
+
});
|
157
|
+
|
158
|
+
fillInTheGapsDropdownPage.tests.verifyDisabledCheckAnswerButtonWithCSSAndA11y();
|
159
|
+
|
160
|
+
it('When the user updates the value of \'Maximum check answer attempts\' dropdown, it should get reflected on the Preview tab', () => {
|
161
|
+
fillInTheGapsDropdownPage.steps.switchToEditTab();
|
162
|
+
fillInTheGapsDropdownPage.steps.expandMaxCheckAnswerAttemptsDropdown();
|
163
|
+
fillInTheGapsDropdownPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('3');
|
164
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
165
|
+
fillInTheGapsDropdownPage.steps.verifyCheckAnswerButtonEnabled();
|
166
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsForDropdown[0] }]);
|
167
|
+
fillInTheGapsDropdownPage.steps.checkAnswer();
|
168
|
+
fillInTheGapsDropdownPage.steps.verifyCheckAnswerButtonEnabled();
|
169
|
+
});
|
170
|
+
|
171
|
+
it('When the user selects \'No limit\' option from the dropdown then user should be able to check answer multiple times', () => {
|
172
|
+
fillInTheGapsDropdownPage.steps.switchToEditTab();
|
173
|
+
fillInTheGapsDropdownPage.steps.expandMaxCheckAnswerAttemptsDropdown();
|
174
|
+
fillInTheGapsDropdownPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('no limit');
|
175
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
176
|
+
fillInTheGapsDropdownPage.steps.verifyCheckAnswerButtonEnabled();
|
177
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsForDropdown[0] }]);
|
178
|
+
fillInTheGapsDropdownPage.steps.checkAnswer();
|
179
|
+
fillInTheGapsDropdownPage.steps.verifyCheckAnswerButtonEnabled();
|
180
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsForDropdown[1] }]);
|
181
|
+
fillInTheGapsDropdownPage.steps.checkAnswer();
|
182
|
+
fillInTheGapsDropdownPage.steps.verifyCheckAnswerButtonEnabled();
|
183
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsForDropdown[2] }]);
|
184
|
+
fillInTheGapsDropdownPage.steps.checkAnswer();
|
185
|
+
fillInTheGapsDropdownPage.steps.verifyCheckAnswerButtonEnabled();
|
186
|
+
});
|
187
|
+
});
|
188
|
+
});
|
@@ -60,7 +60,7 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
|
|
60
60
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyActiveStateOfDraggableOptionInSpecifyCorrectAnswerSection(0);
|
61
61
|
cy.log('checking default state of unselected option(s)')
|
62
62
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfUnselectedDraggableOptionsInSpecifyCorrectAnswerSection([1, 2, 3]);
|
63
|
-
cy.log('checking
|
63
|
+
cy.log('checking inactive state of all dropzones');
|
64
64
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection();
|
65
65
|
});
|
66
66
|
|
@@ -85,7 +85,7 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
|
|
85
85
|
fillInTheGapsOverImageDragAndDropPage.steps.clickOnDraggableOptionInSpecifyCorrectAnswerSection('Petals');
|
86
86
|
cy.log('Checking default state of deselected option')
|
87
87
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDraggableOptionsInSpecifyCorrectAnswerSection();
|
88
|
-
cy.log('
|
88
|
+
cy.log('checking inactive state of all dropzones');
|
89
89
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection();
|
90
90
|
});
|
91
91
|
|
@@ -230,7 +230,7 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
|
|
230
230
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyActiveStateOfDraggableOptionInPreviewTab(0);
|
231
231
|
cy.log('checking default state of unselected option(s)')
|
232
232
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfUnselectedDraggableOptionsInPreviewTab([1, 2, 3]);
|
233
|
-
cy.log('checking
|
233
|
+
cy.log('checking inactive state of all dropzones');
|
234
234
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInPreviewTab();
|
235
235
|
});
|
236
236
|
|
@@ -258,7 +258,7 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
|
|
258
258
|
fillInTheGapsOverImageDragAndDropPage.steps.clickOnDraggableOptionInPreviewTab('Petals');
|
259
259
|
cy.log('Checking default state of deselected option')
|
260
260
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDraggableOptionsInPreviewTab();
|
261
|
-
cy.log('
|
261
|
+
cy.log('checking inactive state of all dropzones');
|
262
262
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInPreviewTab();
|
263
263
|
});
|
264
264
|
|
@@ -387,7 +387,7 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
|
|
387
387
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyActiveStateOfDraggableOptionInSpecifyCorrectAnswerSection(0);
|
388
388
|
cy.log('checking default state of unselected option(s)')
|
389
389
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfUnselectedDraggableOptionsInSpecifyCorrectAnswerSection([1, 2, 3]);
|
390
|
-
cy.log('checking inactive state of all
|
390
|
+
cy.log('checking inactive state of all dropzones');
|
391
391
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection();
|
392
392
|
});
|
393
393
|
|
@@ -409,7 +409,7 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
|
|
409
409
|
fillInTheGapsOverImageDragAndDropPage.steps.clickOnDraggableOptionInSpecifyCorrectAnswerSection('Petals');
|
410
410
|
cy.log('Checking default state of deselected option')
|
411
411
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDraggableOptionsInSpecifyCorrectAnswerSection();
|
412
|
-
cy.log('
|
412
|
+
cy.log('checking inactive state of all dropzones');
|
413
413
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection();
|
414
414
|
});
|
415
415
|
|
@@ -565,7 +565,7 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
|
|
565
565
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyActiveStateOfDraggableOptionInPreviewTab(0);
|
566
566
|
cy.log('checking default state of unselected option(s)')
|
567
567
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfUnselectedDraggableOptionsInPreviewTab([1, 2, 3]);
|
568
|
-
cy.log('checking inactive state of all
|
568
|
+
cy.log('checking inactive state of all dropzones');
|
569
569
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInPreviewTab();
|
570
570
|
});
|
571
571
|
|
@@ -593,7 +593,7 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
|
|
593
593
|
fillInTheGapsOverImageDragAndDropPage.steps.clickOnDraggableOptionInPreviewTab('Petals');
|
594
594
|
cy.log('Checking default state of deselected option')
|
595
595
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDraggableOptionsInPreviewTab();
|
596
|
-
cy.log('
|
596
|
+
cy.log('checking inactive state of all dropzones');
|
597
597
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInPreviewTab();
|
598
598
|
});
|
599
599
|
|
@@ -164,7 +164,6 @@ describe('Create item page - fill in the gaps over image - drag and drop: Scorin
|
|
164
164
|
before(() => {
|
165
165
|
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
|
166
166
|
cy.barsPreLoaderWait();
|
167
|
-
cy.barsPreLoaderWait();
|
168
167
|
fillInTheGapsOverImageDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
|
169
168
|
fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
|
170
169
|
fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
|
@@ -15,6 +15,7 @@ describe('Create Item page - Fill in the gaps over image - dropdown: Specify cor
|
|
15
15
|
cy.barsPreLoaderWait();
|
16
16
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
17
17
|
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
18
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(10);
|
18
19
|
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(30);
|
19
20
|
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown);
|
20
21
|
});
|
@@ -24,13 +25,14 @@ describe('Create Item page - Fill in the gaps over image - dropdown: Specify cor
|
|
24
25
|
fillInTheGapsOverImageDropdownPage.tests.verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
|
25
26
|
});
|
26
27
|
|
27
|
-
describe('Specify correct answer section - \'
|
28
|
+
describe('Specify correct answer section - \'Alternative\' accordion', () => {
|
28
29
|
abortEarlySetup();
|
29
30
|
before(() => {
|
30
31
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
31
32
|
cy.barsPreLoaderWait();
|
32
33
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
33
34
|
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
35
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(10);
|
34
36
|
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(30);
|
35
37
|
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown);
|
36
38
|
});
|
@@ -48,7 +50,7 @@ describe('Create Item page - Fill in the gaps over image - dropdown: Specify cor
|
|
48
50
|
fillInTheGapsOverImageDropdownPage.steps.verifyAlternateAnswerAccordionIsExpanded(1);
|
49
51
|
});
|
50
52
|
|
51
|
-
fillInTheGapsOverImageDropdownPage.tests.verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('
|
53
|
+
fillInTheGapsOverImageDropdownPage.tests.verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Alternative');
|
52
54
|
|
53
55
|
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\'', () => {
|
54
56
|
fillInTheGapsOverImageDropdownPage.steps.addAlternativeAnswerAccordion(2);
|
@@ -286,57 +286,6 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
|
|
286
286
|
cy.barsPreLoaderWait();
|
287
287
|
});
|
288
288
|
|
289
|
-
|
290
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.caseSensitiveCheckbox(), 'exist');
|
291
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.caseSensitiveCheckboxLabel(), 'visible');
|
292
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.caseSensitiveCheckboxLabel(), `${conditionalCheckboxes[0]}`);
|
293
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.validateIfAnswerIsIncludedCheckbox(), 'exist');
|
294
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.validateIfAnswerIsIncludedCheckboxLabel(), 'visible');
|
295
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.validateIfAnswerIsIncludedCheckboxLabel(), `${conditionalCheckboxes[1]}`);
|
296
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.ignoreExtraSpacesCheckbox(), 'exist');
|
297
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.ignoreExtraSpacesCheckboxLabel(), 'visible');
|
298
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.ignoreExtraSpacesCheckboxLabel(), `${conditionalCheckboxes[2]}`);
|
299
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.ignoreSingleLetterMistakeCheckbox(), 'exist');
|
300
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.ignoreSingleLetterMistakeCheckboxLabel(), 'visible');
|
301
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.ignoreSingleLetterMistakeCheckboxLabel(), `${conditionalCheckboxes[3]}`);
|
302
|
-
fillInTheGapsOverImageTextPage.steps.verifyDefaultUncheckedStateOfConditionalCheckboxes();
|
303
|
-
});
|
304
|
-
|
305
|
-
it('User should be able to check a conditional checkbox', () => {
|
306
|
-
fillInTheGapsOverImageTextPage.steps.checkConditionalCheckbox(conditionalCheckboxes[0]);
|
307
|
-
});
|
308
|
-
|
309
|
-
it('When \'Validate if answer is included in the response\' checkbox is checked, then \'Ignore extra spaces\', \'Ignore single letter mistake\' checkboxes should be disabled', () => {
|
310
|
-
fillInTheGapsOverImageTextPage.steps.checkConditionalCheckbox(conditionalCheckboxes[1]);
|
311
|
-
utilities.verifyElementDisabled(fillInTheGapsOverImageTextPage.ignoreExtraSpacesCheckbox());
|
312
|
-
utilities.verifyElementDisabled(fillInTheGapsOverImageTextPage.ignoreSingleLetterMistakeCheckbox());
|
313
|
-
});
|
314
|
-
|
315
|
-
it('CSS of conditional checkboxes', () => {
|
316
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.caseSensitiveCheckboxLabel(), {
|
317
|
-
'color': css.color.checkboxLabel,
|
318
|
-
'font-size': css.fontSize.normal,
|
319
|
-
'font-weight': css.fontWeight.regular
|
320
|
-
});
|
321
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.caseSensitiveCheckbox().parent().find('rect').eq(1), {
|
322
|
-
'fill': css.color.activeButtons,
|
323
|
-
});
|
324
|
-
//disabled state
|
325
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.ignoreExtraSpacesCheckboxLabel(), {
|
326
|
-
'color': css.color.labelText,
|
327
|
-
'font-size': css.fontSize.normal,
|
328
|
-
'font-weight': css.fontWeight.regular
|
329
|
-
});
|
330
|
-
});
|
331
|
-
|
332
|
-
it('Accessibility of conditional checkboxes', () => {
|
333
|
-
cy.checkAccessibility(fillInTheGapsOverImageTextPage.caseSensitiveCheckboxLabel().parents('.scoring-type-checkbox-wrapper'));
|
334
|
-
});
|
335
|
-
|
336
|
-
it('When \'Validate if answer is included in the response\' checkbox is unchecked, then \'Ignore extra spaces\', \'Ignore single letter mistake\' checkboxes should be enabled', () => {
|
337
|
-
fillInTheGapsOverImageTextPage.steps.uncheckConditionalCheckbox(conditionalCheckboxes[1]);
|
338
|
-
utilities.verifyElementNotDisabled(fillInTheGapsOverImageTextPage.ignoreExtraSpacesCheckbox());
|
339
|
-
utilities.verifyElementNotDisabled(fillInTheGapsOverImageTextPage.ignoreSingleLetterMistakeCheckbox());
|
340
|
-
});
|
289
|
+
fillInTheGapsOverImageTextPage.tests.verifyConditionalCheckboxesSectionContents();
|
341
290
|
});
|
342
291
|
});
|
package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
2
|
-
import utilities from "../../../support/helpers/utilities";
|
3
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
3
|
const css = Cypress.env('css');
|
5
4
|
|
@@ -18,103 +17,7 @@ describe('Create Item page - Fill in the gaps over image - text: ', () => {
|
|
18
17
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
19
18
|
});
|
20
19
|
|
21
|
-
|
22
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.responseAccordionAnswersLabel(), 'Answers');
|
23
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseAccordionAnswersLabel(), 'visible');
|
24
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection(), '');
|
25
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection(), 'visible');
|
26
|
-
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection(), 1);
|
27
|
-
});
|
28
|
-
|
29
|
-
it('When there is a single input field, then answer input field should not have numeration and delete button ', () => {
|
30
|
-
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.responseAccordionAnswerInputFieldWrapper(), 1);
|
31
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseAccordionAnswerNumeration(), 'notExist');
|
32
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseAccordionAnswerDeleteButton(), 'notExist');
|
33
|
-
});
|
34
|
-
|
35
|
-
it('\'Add alternate\' button should be displayed', () => {
|
36
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.responseAccordionAddAlternateButtonLabel(), 'Add alternate');
|
37
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseAccordionAddAlternateButtonLabel(), 'visible');
|
38
|
-
});
|
39
|
-
|
40
|
-
it('When user has not entered text inside answer input field and clicks on \'Add alternate\' answer then \'Error: Answer is required.\' error message should be displayed', () => {
|
41
|
-
fillInTheGapsOverImageTextPage.steps.addAlternateAnswerInResponseAccordion(0);
|
42
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.errorMessage(), 'Error: Answer is required.');
|
43
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.errorMessage(), 'visible');
|
44
|
-
});
|
45
|
-
|
46
|
-
it('When user enters text inside answer input field, then error message should disappear', () => {
|
47
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }]);
|
48
|
-
fillInTheGapsOverImageTextPage.steps.verifyErrorMessageIsNotDisplayed();
|
49
|
-
});
|
50
|
-
|
51
|
-
it('When the user clicks on the \'Add Alternate\' button, then one alternate answer input field should be displayed', () => {
|
52
|
-
fillInTheGapsOverImageTextPage.steps.addAlternateAnswerInResponseAccordion(0);
|
53
|
-
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection(), 2);
|
54
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseAccordionAddAlternateButton(), 'visible');
|
55
|
-
});
|
56
|
-
|
57
|
-
it('Each input field should be appropriately numbered, and a delete button should be provided for each input field', () => {
|
58
|
-
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionAnswerInputFieldNumeration(0);
|
59
|
-
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionAnswerInputFieldDeleteButton(0);
|
60
|
-
});
|
61
|
-
|
62
|
-
it('When user hovers over delete button, then tooltip \'Delete\' should be displayed', () => {
|
63
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionAnswerDeleteButton(), 0)
|
64
|
-
.verifyTooltip('Delete');
|
65
|
-
});
|
66
|
-
|
67
|
-
it('When no input is provided in answer input field, then placeholder text \'Enter answer\' should be displayed in the answer input field', () => {
|
68
|
-
fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldPlaceholder(1);
|
69
|
-
});
|
70
|
-
|
71
|
-
it('When the user clicks on the \'Add Alternate\' button without entering text in the newly added alternate answer input field, then an error message should be displayed, indicating \'Error: Answer is required.\'', () => {
|
72
|
-
fillInTheGapsOverImageTextPage.steps.addAlternateAnswerInResponseAccordion(0);
|
73
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.errorMessage(), 'Error: Answer is required.');
|
74
|
-
});
|
75
|
-
|
76
|
-
it('When user adds text in alternate input field and clicks on \'Add alternate\' button, then then a third alternate answer input field should be displayed and error message should disappear', () => {
|
77
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 1, responseText: 'Leaf' }]);
|
78
|
-
fillInTheGapsOverImageTextPage.steps.verifyErrorMessageIsNotDisplayed();
|
79
|
-
fillInTheGapsOverImageTextPage.steps.addAlternateAnswerInResponseAccordion(0);
|
80
|
-
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection(), 3);
|
81
|
-
});
|
82
|
-
|
83
|
-
it('CSS of answer input field', { tags: 'css' }, () => {
|
84
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.responseAccordionAnswersLabel(), {
|
85
|
-
'color': css.color.labels,
|
86
|
-
'font-size': css.fontSize.normal,
|
87
|
-
'font-weight': css.fontWeight.semibold,
|
88
|
-
});
|
89
|
-
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection(), 1), {
|
90
|
-
'color': css.color.text,
|
91
|
-
'font-size': css.fontSize.default,
|
92
|
-
'font-weight': css.fontWeight.regular,
|
93
|
-
});
|
94
|
-
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionAnswerNumeration(), 1), {
|
95
|
-
'color': css.color.labels,
|
96
|
-
'font-size': css.fontSize.default,
|
97
|
-
'font-weight': css.fontWeight.semibold,
|
98
|
-
});
|
99
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionAnswerDeleteButton(), 1)
|
100
|
-
.find('button')
|
101
|
-
.verifyPseudoClassBeforeProperty('color', css.color.deleteIcon);
|
102
|
-
});
|
103
|
-
|
104
|
-
it('Accessibility of response accordion', { tags: 'a11y' }, () => {
|
105
|
-
cy.checkAccessibility(fillInTheGapsOverImageTextPage.responseAccordion());
|
106
|
-
});
|
107
|
-
|
108
|
-
it('When provided input is cleared from answer input field, then placeholder text should be displayed again in the answer input field', () => {
|
109
|
-
fillInTheGapsOverImageTextPage.steps.clearAnswerInputField(0);
|
110
|
-
fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldPlaceholder(0);
|
111
|
-
});
|
112
|
-
|
113
|
-
it('When user deletes input field, then alternate answer field should be deleted and each input field should have appropriate numeration and delete button', () => {
|
114
|
-
fillInTheGapsOverImageTextPage.steps.deleteResponseAccordionAnswerInputField(0, 0);
|
115
|
-
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionAnswerInputFieldNumeration(0);
|
116
|
-
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionAnswerInputFieldDeleteButton(0);
|
117
|
-
});
|
20
|
+
fillInTheGapsOverImageTextPage.tests.verifyAnswerInputFieldEditTab();
|
118
21
|
});
|
119
22
|
|
120
23
|
describe('Accepted student input - Edit tab functionality', () => {
|
@@ -127,67 +30,7 @@ describe('Create Item page - Fill in the gaps over image - text: ', () => {
|
|
127
30
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
128
31
|
});
|
129
32
|
|
130
|
-
|
131
|
-
fillInTheGapsOverImageTextPage.steps.verifyAcceptedStudentTypeActiveButton(0, 'Text');
|
132
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Hi23(^^)' }]);
|
133
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: 'Hi23(^^)' }]);
|
134
|
-
});
|
135
|
-
|
136
|
-
it('When user selects \'Number\' in accepted student input, then text inside the answer input field should only include numbers part from the previously entered input', () => {
|
137
|
-
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(0, 'Number');
|
138
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '23' }]);
|
139
|
-
});
|
140
|
-
|
141
|
-
it('User should not be able to enter characters or special symbols i.e. answer input field should only contain numbers', () => {
|
142
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'ABc^12' }]);
|
143
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '12' }]);
|
144
|
-
});
|
145
|
-
|
146
|
-
it('User should be able to enter negative numbers in answer input field', () => {
|
147
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: '-5' }]);
|
148
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '-5' }]);
|
149
|
-
});
|
150
|
-
|
151
|
-
it('User should be able to add zero in input field', () => {
|
152
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: '0' }]);
|
153
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '0' }]);
|
154
|
-
});
|
155
|
-
|
156
|
-
it('User should be able to enter decimal numbers in answer input field', () => {
|
157
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: '29.54' }]);
|
158
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '29.54' }]);
|
159
|
-
});
|
160
|
-
|
161
|
-
it('When user selects \'Integer\' in accepted student input, then text inside the answer input field should only include whole numbers part from the previously entered input', () => {
|
162
|
-
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(0, 'Integer');
|
163
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '2954' }]);
|
164
|
-
});
|
165
|
-
|
166
|
-
it('When \'Integer\' is selected in accepted student input, then user should not be able to add characters or special symbols i.e. input field should only include whole numbers', () => {
|
167
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: '29hi*5k4.5' }]);
|
168
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '29545' }]);
|
169
|
-
});
|
170
|
-
|
171
|
-
it('User should be able to add zero in input field', () => {
|
172
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: '0' }]);
|
173
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '0' }]);
|
174
|
-
});
|
175
|
-
|
176
|
-
it('User should not be able to add negative number i.e. input field should only include positive whole numbers', () => {
|
177
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: '-44' }]);
|
178
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '44' }]);
|
179
|
-
});
|
180
|
-
|
181
|
-
it('When user selects \'Text\' in accepted student input again, then answer input field should contain text from previously added input', () => {
|
182
|
-
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(0, 'Text');
|
183
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '44' }]);
|
184
|
-
});
|
185
|
-
|
186
|
-
it('When user adds alternate answer input field, then accepted student input should be applied on both the response answer input fields in the response accordion', () => {
|
187
|
-
fillInTheGapsOverImageTextPage.steps.addAlternateAnswerInResponseAccordion(0);
|
188
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 1, responseText: 'Hi12' }]);
|
189
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 1, responseText: '12' }]);
|
190
|
-
});
|
33
|
+
fillInTheGapsOverImageTextPage.tests.verifyAcceptedStudentInputEditTabFunctionality();
|
191
34
|
|
192
35
|
it('When user adds multiple text container and set different accepted student input then it should be applied appropriately', () => {
|
193
36
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
@@ -206,58 +49,7 @@ describe('Create Item page - Fill in the gaps over image - text: ', () => {
|
|
206
49
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
207
50
|
});
|
208
51
|
|
209
|
-
|
210
|
-
fillInTheGapsOverImageTextPage.steps.verifyAcceptedStudentTypeActiveButton(0, 'Text');
|
211
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
212
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower23^^' }]);
|
213
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower23^^' }]);
|
214
|
-
});
|
215
|
-
|
216
|
-
it('When user selects \'Number\' in accepted student input in edit tab, then user should be able to enter only numbers inside text container in preview tab', () => {
|
217
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
218
|
-
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(0, 'Number');
|
219
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
220
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower232&' }]);
|
221
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '232' }]);
|
222
|
-
});
|
223
|
-
|
224
|
-
it('User should be able to enter decimal numbers inside text container in preview tab', () => {
|
225
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '23.2' }]);
|
226
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '23.2' }]);
|
227
|
-
});
|
228
|
-
|
229
|
-
it('User should be able to enter negative numbers inside text container in preview tab', () => {
|
230
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '-6' }]);
|
231
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '-6' }]);
|
232
|
-
});
|
233
|
-
|
234
|
-
it('User should be able to enter zero inside text container in preview tab', () => {
|
235
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '0' }]);
|
236
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '0' }]);
|
237
|
-
});
|
238
|
-
|
239
|
-
it('When user selects \'Integer\' in accepted student input in edit tab, then user should be able to add only whole numbers inside text container', () => {
|
240
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
241
|
-
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(0, 'Integer');
|
242
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
243
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower232&*' }]);
|
244
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '232' }]);
|
245
|
-
});
|
246
|
-
|
247
|
-
it('When user has selected \'Integer\' in accepted student input, then user should not be able to add decimal numbers in the text container', () => {
|
248
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '22.4' }]);
|
249
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '224' }]);
|
250
|
-
});
|
251
|
-
|
252
|
-
it('When user has selected \'Integer\' in accepted student input, then user should not be able to add negative number inside text container i.e. input field should only include positive whole numbers.', () => {
|
253
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '-5' }]);
|
254
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '5' }]);
|
255
|
-
});
|
256
|
-
|
257
|
-
it('User should be able to enter zero inside text container in preview tab', () => {
|
258
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '0' }]);
|
259
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '0' }]);
|
260
|
-
});
|
52
|
+
fillInTheGapsOverImageTextPage.tests.verifyAcceptedStudentInputPreviewTabFunctionality();
|
261
53
|
|
262
54
|
it('When user adds multiple text container and sets different accepted student input in edit tab then it should be applied appropriately in preview tab', () => {
|
263
55
|
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|