itemengine-cypress-automation 1.0.128 → 1.0.130
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/e2e/migration/migration.js +4 -41
- package/cypress/e2e/migration/migration10.js +6 -43
- package/cypress/e2e/migration/migration2.js +6 -43
- package/cypress/e2e/migration/migration3.js +6 -43
- package/cypress/e2e/migration/migration4.js +6 -43
- package/cypress/e2e/migration/migration5.js +6 -43
- package/cypress/e2e/migration/migration6.js +6 -43
- package/cypress/e2e/migration/migration7.js +6 -43
- package/cypress/e2e/migration/migration8.js +6 -43
- package/cypress/e2e/migration/migration9.js +6 -43
- 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/cypress/support/commands.js +33 -1
- package/package.json +1 -1
- 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
@@ -1,7 +1,7 @@
|
|
1
1
|
import { fillInTheGapsTextPage } from "../../../../pages";
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
3
|
|
4
|
-
describe('Create item page - Fill in the gaps
|
4
|
+
describe('Create item page - Fill in the gaps with text: Partial different weights', () => {
|
5
5
|
before(() => {
|
6
6
|
cy.loginAs('admin');
|
7
7
|
});
|
@@ -86,149 +86,4 @@ describe('Create item page - Fill in the gaps over image - text: Partial differe
|
|
86
86
|
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
87
87
|
});
|
88
88
|
});
|
89
|
-
|
90
|
-
describe('Question preview: Auto scored - Partial different weights: Minimum scoring', () => {
|
91
|
-
abortEarlySetup();
|
92
|
-
before(() => {
|
93
|
-
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
94
|
-
cy.barsPreLoaderWait();
|
95
|
-
fillInTheGapsTextPage.steps.addResponseAreaInQuestionField();
|
96
|
-
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }]);
|
97
|
-
fillInTheGapsTextPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
98
|
-
fillInTheGapsTextPage.steps.allotPartialDifferentWeightsPoints({ 0: 1, 1: 6, 2: 5 });
|
99
|
-
fillInTheGapsTextPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
100
|
-
});
|
101
|
-
|
102
|
-
it('When the user selects \'Award minimum score\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with minimum points', () => {
|
103
|
-
fillInTheGapsTextPage.steps.expandMinimumScoringDropdown();
|
104
|
-
fillInTheGapsTextPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
|
105
|
-
fillInTheGapsTextPage.steps.allotMinimumPoints(2);
|
106
|
-
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
107
|
-
fillInTheGapsTextPage.steps.switchToGradingView();
|
108
|
-
fillInTheGapsTextPage.steps.verifyPreviewScore(2, 12);
|
109
|
-
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
110
|
-
});
|
111
|
-
|
112
|
-
it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
|
113
|
-
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
114
|
-
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'Roots' }]);
|
115
|
-
fillInTheGapsTextPage.steps.verifyPreviewScore(2, 12);
|
116
|
-
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
117
|
-
});
|
118
|
-
|
119
|
-
it('When the user selects \'Award minimum score only if attempted\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with 0 points', () => {
|
120
|
-
fillInTheGapsTextPage.steps.switchToEditTab();
|
121
|
-
fillInTheGapsTextPage.steps.expandMinimumScoringDropdown();
|
122
|
-
fillInTheGapsTextPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
123
|
-
fillInTheGapsTextPage.steps.allotMinimumPoints(2);
|
124
|
-
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
125
|
-
fillInTheGapsTextPage.steps.switchToGradingView();
|
126
|
-
fillInTheGapsTextPage.steps.verifyPreviewScore(0, 12);
|
127
|
-
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
128
|
-
});
|
129
|
-
|
130
|
-
it('When the user has selected \'Award minimum score only if attempted\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
|
131
|
-
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
132
|
-
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'Roots' }]);
|
133
|
-
fillInTheGapsTextPage.steps.verifyPreviewScore(2, 12);
|
134
|
-
});
|
135
|
-
|
136
|
-
it('When the user attempts the question partially correct such that points of the correctly attempted option are greater than minimum points, then the user should be awarded with points as per the correctly attempted response', () => {
|
137
|
-
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
138
|
-
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'Stem' }]);
|
139
|
-
fillInTheGapsTextPage.steps.verifyPreviewScore(5, 12);
|
140
|
-
});
|
141
|
-
|
142
|
-
it('When the user attempts the question partially correct such that minimum points are greater than points of the correctly attempted option, then the user should be awarded with minimum points', () => {
|
143
|
-
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
144
|
-
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
145
|
-
fillInTheGapsTextPage.steps.verifyPreviewScore(2, 12);
|
146
|
-
});
|
147
|
-
});
|
148
|
-
|
149
|
-
describe('Question preview: Auto scored - Partial different weights: Rounding', () => {
|
150
|
-
abortEarlySetup();
|
151
|
-
before(() => {
|
152
|
-
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
153
|
-
cy.barsPreLoaderWait();
|
154
|
-
fillInTheGapsTextPage.steps.uploadFile('highlightImage.jpg');
|
155
|
-
fillInTheGapsTextPage.steps.verifyImageIsUploaded();
|
156
|
-
fillInTheGapsTextPage.steps.insertResponseArea(10);
|
157
|
-
fillInTheGapsTextPage.steps.insertResponseArea(40);
|
158
|
-
fillInTheGapsTextPage.steps.insertResponseArea(60);
|
159
|
-
fillInTheGapsTextPage.steps.insertResponseArea(80);
|
160
|
-
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }, { responseIndex: 3, responseText: 'Roots' }]);
|
161
|
-
fillInTheGapsTextPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
162
|
-
fillInTheGapsTextPage.steps.allotPartialDifferentWeightsPoints({ 0: 2.67, 1: 1.99, 2: 1.34, 3: 4.5 });
|
163
|
-
});
|
164
|
-
|
165
|
-
it('When the user sets \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value greater than 0.5 and less than 0.99, then the points awarded should be rounded down to the nearest integer value', () => {
|
166
|
-
fillInTheGapsTextPage.steps.expandRoundingDropdown();
|
167
|
-
fillInTheGapsTextPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.99');
|
168
|
-
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
169
|
-
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
170
|
-
fillInTheGapsTextPage.steps.verifyPreviewScore(2, 10.5);
|
171
|
-
});
|
172
|
-
|
173
|
-
it('When the user has set \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value equal to 0.99, then the points awarded should be rounded down to the nearest integer value', () => {
|
174
|
-
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
175
|
-
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Leaf' }]);
|
176
|
-
fillInTheGapsTextPage.steps.verifyPreviewScore(1, 10.5);
|
177
|
-
});
|
178
|
-
|
179
|
-
it('When the user sets \'Rounding\' to \'Round down if <=0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value less than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
180
|
-
fillInTheGapsTextPage.steps.switchToEditTab();
|
181
|
-
fillInTheGapsTextPage.steps.expandRoundingDropdown();
|
182
|
-
fillInTheGapsTextPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50');
|
183
|
-
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
184
|
-
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'Stem' }]);
|
185
|
-
fillInTheGapsTextPage.steps.verifyPreviewScore(1, 10.5);
|
186
|
-
});
|
187
|
-
|
188
|
-
it('When the user has set \'Rounding\' to \'Round down if <=0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value equal to 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
189
|
-
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
190
|
-
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 3, responseText: 'Roots' }]);
|
191
|
-
fillInTheGapsTextPage.steps.verifyPreviewScore(4, 10.5);
|
192
|
-
});
|
193
|
-
|
194
|
-
it('When the user sets \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value less than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
195
|
-
fillInTheGapsTextPage.steps.switchToEditTab();
|
196
|
-
fillInTheGapsTextPage.steps.expandRoundingDropdown();
|
197
|
-
fillInTheGapsTextPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50; Round up if > 0.50');
|
198
|
-
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
199
|
-
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'Stem' }]);
|
200
|
-
fillInTheGapsTextPage.steps.verifyPreviewScore(1, 10.5);
|
201
|
-
});
|
202
|
-
|
203
|
-
it('When the user has set \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value equal to 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
204
|
-
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
205
|
-
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 3, responseText: 'Roots' }]);
|
206
|
-
fillInTheGapsTextPage.steps.verifyPreviewScore(4, 10.5);
|
207
|
-
});
|
208
|
-
|
209
|
-
it('When the user has set \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value greater than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
210
|
-
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
211
|
-
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
212
|
-
fillInTheGapsTextPage.steps.verifyPreviewScore(3, 10.5);
|
213
|
-
});
|
214
|
-
|
215
|
-
it('When \'Round negative score to zero\' is in checked state and the user attempts the question incorrectly, then the user should be awarded with 0 points', () => {
|
216
|
-
cy.log('Pre-step: Setting penalty scoring to \'Penalty points for the entire question\', allotting penalty points')
|
217
|
-
fillInTheGapsTextPage.steps.switchToEditTab();
|
218
|
-
fillInTheGapsTextPage.steps.expandPenaltyScoringDropdown();
|
219
|
-
fillInTheGapsTextPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
|
220
|
-
fillInTheGapsTextPage.steps.allotPenaltyPoints(4);
|
221
|
-
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
222
|
-
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Seed' }]);
|
223
|
-
fillInTheGapsTextPage.steps.verifyPreviewScore(0, 10.5);
|
224
|
-
});
|
225
|
-
|
226
|
-
it('When the user unchecks \'Round negative score to zero\' checkbox and the user attempts the question incorrectly, then the user should be awarded with negative points', () => {
|
227
|
-
fillInTheGapsTextPage.steps.switchToEditTab();
|
228
|
-
fillInTheGapsTextPage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
|
229
|
-
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
230
|
-
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Seed' }]);
|
231
|
-
fillInTheGapsTextPage.steps.verifyPreviewScore(-4, 10.5);
|
232
|
-
});
|
233
|
-
});
|
234
89
|
});
|
@@ -0,0 +1,300 @@
|
|
1
|
+
import { fillInTheGapsTextPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Create item page - Fill in the gaps with text: Partial different weights', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Question preview: Auto scored - Partial different weights: Minimum scoring', () => {
|
10
|
+
abortEarlySetup();
|
11
|
+
before(() => {
|
12
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
13
|
+
cy.barsPreLoaderWait();
|
14
|
+
fillInTheGapsTextPage.steps.addResponseAreaInQuestionField();
|
15
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }]);
|
16
|
+
fillInTheGapsTextPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
17
|
+
fillInTheGapsTextPage.steps.allotPartialDifferentWeightsPoints({ 0: 1, 1: 6, 2: 5 });
|
18
|
+
fillInTheGapsTextPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
19
|
+
});
|
20
|
+
|
21
|
+
it('When the user selects \'Award minimum score\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with minimum points', () => {
|
22
|
+
fillInTheGapsTextPage.steps.expandMinimumScoringDropdown();
|
23
|
+
fillInTheGapsTextPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
|
24
|
+
fillInTheGapsTextPage.steps.allotMinimumPoints(2);
|
25
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
26
|
+
fillInTheGapsTextPage.steps.switchToGradingView();
|
27
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(2, 12);
|
28
|
+
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
29
|
+
});
|
30
|
+
|
31
|
+
it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
|
32
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
33
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'Roots' }]);
|
34
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(2, 12);
|
35
|
+
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
36
|
+
});
|
37
|
+
|
38
|
+
it('When the user selects \'Award minimum score only if attempted\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with 0 points', () => {
|
39
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
40
|
+
fillInTheGapsTextPage.steps.expandMinimumScoringDropdown();
|
41
|
+
fillInTheGapsTextPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
42
|
+
fillInTheGapsTextPage.steps.allotMinimumPoints(2);
|
43
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
44
|
+
fillInTheGapsTextPage.steps.switchToGradingView();
|
45
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(0, 12);
|
46
|
+
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
47
|
+
});
|
48
|
+
|
49
|
+
it('When the user has selected \'Award minimum score only if attempted\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
|
50
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
51
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'Roots' }]);
|
52
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(2, 12);
|
53
|
+
});
|
54
|
+
|
55
|
+
it('When the user attempts the question partially correct such that points of the correctly attempted option are greater than minimum points, then the user should be awarded with points as per the correctly attempted response', () => {
|
56
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
57
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'Stem' }]);
|
58
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(5, 12);
|
59
|
+
});
|
60
|
+
|
61
|
+
it('When the user attempts the question partially correct such that minimum points are greater than points of the correctly attempted option, then the user should be awarded with minimum points', () => {
|
62
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
63
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
64
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(2, 12);
|
65
|
+
});
|
66
|
+
});
|
67
|
+
|
68
|
+
describe('Question preview: Auto scored - Partial different weights: Rounding', () => {
|
69
|
+
abortEarlySetup();
|
70
|
+
before(() => {
|
71
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
72
|
+
cy.barsPreLoaderWait();
|
73
|
+
fillInTheGapsTextPage.steps.addResponseArea();
|
74
|
+
fillInTheGapsTextPage.steps.addResponseArea();
|
75
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }, { responseIndex: 3, responseText: 'Roots' }]);
|
76
|
+
fillInTheGapsTextPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
77
|
+
fillInTheGapsTextPage.steps.allotPartialDifferentWeightsPoints({ 0: 2.67, 1: 1.99, 2: 1.34, 3: 4.5 });
|
78
|
+
});
|
79
|
+
|
80
|
+
it('When the user sets \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value greater than 0.5 and less than 0.99, then the points awarded should be rounded down to the nearest integer value', () => {
|
81
|
+
fillInTheGapsTextPage.steps.expandRoundingDropdown();
|
82
|
+
fillInTheGapsTextPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.99');
|
83
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
84
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
85
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(2, 10.5);
|
86
|
+
});
|
87
|
+
|
88
|
+
it('When the user has set \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value equal to 0.99, then the points awarded should be rounded down to the nearest integer value', () => {
|
89
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
90
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Leaf' }]);
|
91
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(1, 10.5);
|
92
|
+
});
|
93
|
+
|
94
|
+
it('When the user sets \'Rounding\' to \'Round down if <=0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value less than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
95
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
96
|
+
fillInTheGapsTextPage.steps.expandRoundingDropdown();
|
97
|
+
fillInTheGapsTextPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50');
|
98
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
99
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'Stem' }]);
|
100
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(1, 10.5);
|
101
|
+
});
|
102
|
+
|
103
|
+
it('When the user has set \'Rounding\' to \'Round down if <=0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value equal to 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
104
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
105
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 3, responseText: 'Roots' }]);
|
106
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(4, 10.5);
|
107
|
+
});
|
108
|
+
|
109
|
+
it('When the user sets \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value less than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
110
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
111
|
+
fillInTheGapsTextPage.steps.expandRoundingDropdown();
|
112
|
+
fillInTheGapsTextPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50; Round up if > 0.50');
|
113
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
114
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'Stem' }]);
|
115
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(1, 10.5);
|
116
|
+
});
|
117
|
+
|
118
|
+
it('When the user has set \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value equal to 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
119
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
120
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 3, responseText: 'Roots' }]);
|
121
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(4, 10.5);
|
122
|
+
});
|
123
|
+
|
124
|
+
it('When the user has set \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value greater than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
125
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
126
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
127
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(3, 10.5);
|
128
|
+
});
|
129
|
+
|
130
|
+
it('When \'Round negative score to zero\' is in checked state and the user attempts the question incorrectly, then the user should be awarded with 0 points', () => {
|
131
|
+
cy.log('Pre-step: Setting penalty scoring to \'Penalty points for the entire question\', allotting penalty points')
|
132
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
133
|
+
fillInTheGapsTextPage.steps.expandPenaltyScoringDropdown();
|
134
|
+
fillInTheGapsTextPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
|
135
|
+
fillInTheGapsTextPage.steps.allotPenaltyPoints(4);
|
136
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
137
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Seed' }]);
|
138
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(0, 10.5);
|
139
|
+
});
|
140
|
+
|
141
|
+
it('When the user unchecks \'Round negative score to zero\' checkbox and the user attempts the question incorrectly, then the user should be awarded with negative points', () => {
|
142
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
143
|
+
fillInTheGapsTextPage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
|
144
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
145
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Seed' }]);
|
146
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(-4, 10.5);
|
147
|
+
});
|
148
|
+
});
|
149
|
+
|
150
|
+
describe('Question preview: Auto scored - Partial different weights: Penalty scoring with \'Round negative score to zero\' unchecked', () => {
|
151
|
+
abortEarlySetup();
|
152
|
+
before(() => {
|
153
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
154
|
+
cy.barsPreLoaderWait();
|
155
|
+
fillInTheGapsTextPage.steps.addResponseArea();
|
156
|
+
fillInTheGapsTextPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
157
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }]);
|
158
|
+
fillInTheGapsTextPage.steps.allotPartialDifferentWeightsPoints({ 0: 9, 1: 6, 2: 5 });
|
159
|
+
fillInTheGapsTextPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
160
|
+
});
|
161
|
+
|
162
|
+
//Penalty points for the entire question
|
163
|
+
it('When the user sets penalty scoring to \'Penalty points for the entire question\', allots penalty points and attempts the question incorrectly, then the user should be awarded with negative points', () => {
|
164
|
+
fillInTheGapsTextPage.steps.expandPenaltyScoringDropdown();
|
165
|
+
fillInTheGapsTextPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
|
166
|
+
fillInTheGapsTextPage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
|
167
|
+
fillInTheGapsTextPage.steps.allotPenaltyPoints(4);
|
168
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
169
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Seed' }]);
|
170
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(-4, 20);
|
171
|
+
});
|
172
|
+
|
173
|
+
it('When the user attempts the question correctly along with an incorrect response, then penalty points should get deducted from the awarded points', () => {
|
174
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
175
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Seed' }]);
|
176
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(5, 20);
|
177
|
+
});
|
178
|
+
|
179
|
+
it('When the user attempts the question correctly along with multiple incorrect responses, then penalty points should get deducted from the awarded points only once, the deducted penalty points should not increase as per number of attempted incorrect responses', () => {
|
180
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
181
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Seed' }, { responseIndex: 2, responseText: 'Branch' }]);
|
182
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(5, 20);
|
183
|
+
});
|
184
|
+
|
185
|
+
it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
|
186
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
187
|
+
fillInTheGapsTextPage.steps.expandMinimumScoringDropdown();
|
188
|
+
fillInTheGapsTextPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
189
|
+
fillInTheGapsTextPage.steps.allotMinimumPoints(3);
|
190
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
191
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Roots' }]);
|
192
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(3, 20);
|
193
|
+
cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
|
194
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
195
|
+
fillInTheGapsTextPage.steps.expandMinimumScoringDropdown();
|
196
|
+
fillInTheGapsTextPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
|
197
|
+
});
|
198
|
+
|
199
|
+
//Penalty points for each incorrect text container - Specify total penalty points
|
200
|
+
it('When the user sets penalty scoring to \'Penalty points for each incorrect text container\', and \'Specify total penalty points\' radio button in checked state, allots total penalty points and attempts the question incorrectly, then the user should be awarded with negative points of all the empty and incorrect text container', () => {
|
201
|
+
fillInTheGapsTextPage.steps.expandPenaltyScoringDropdown();
|
202
|
+
fillInTheGapsTextPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for each incorrect text container');
|
203
|
+
fillInTheGapsTextPage.steps.allotTotalPenaltyPoints(4);
|
204
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
205
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Roots' }]);
|
206
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(-3.99, 20);
|
207
|
+
});
|
208
|
+
|
209
|
+
it('When the user attempts the question correctly along with an incorrect option, then penalty points should get deducted from the awarded points', () => {
|
210
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
211
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Roots' }]);
|
212
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(12.67, 20);
|
213
|
+
});
|
214
|
+
|
215
|
+
it('When the user attempts the question correctly along with multiple incorrect options, then Penalty points for each incorrect text container should get deducted from the awarded points', () => {
|
216
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
217
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Seed' }, { responseIndex: 2, responseText: 'Branch' }]);
|
218
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(12.67, 20);
|
219
|
+
});
|
220
|
+
|
221
|
+
it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
|
222
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
223
|
+
fillInTheGapsTextPage.steps.expandMinimumScoringDropdown();
|
224
|
+
fillInTheGapsTextPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
225
|
+
fillInTheGapsTextPage.steps.allotMinimumPoints(3);
|
226
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
227
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Roots' }]);
|
228
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(3, 20);
|
229
|
+
cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
|
230
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
231
|
+
fillInTheGapsTextPage.steps.expandMinimumScoringDropdown();
|
232
|
+
fillInTheGapsTextPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
|
233
|
+
});
|
234
|
+
|
235
|
+
//Penalty points for each incorrect text container - Specify points for each incorrect text container
|
236
|
+
it('When the user has set penalty scoring to \'Penalty points for each incorrect text container\', and \'Specify total penalty points\' radio button in checked state, allots total penalty points and attempts the question incorrectly, then the user should be awarded with negative points for the incorrect and empty dropzone', () => {
|
237
|
+
fillInTheGapsTextPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for each incorrect text container');
|
238
|
+
fillInTheGapsTextPage.steps.allotPenaltyPointsForEachIncorrectTextContainer(4);
|
239
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
240
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Roots' }]);
|
241
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(-12, 20);
|
242
|
+
});
|
243
|
+
|
244
|
+
it('When the user attempts the question correctly along with an incorrect option, then penalty points should get deducted from the awarded points', () => {
|
245
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
246
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Roots' }]);
|
247
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(10, 20);
|
248
|
+
});
|
249
|
+
|
250
|
+
it('When the user attempts the question correctly along with multiple incorrect options, then Penalty points for each incorrect text container should get deducted from the awarded points', () => {
|
251
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
252
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Branch' }, { responseIndex: 2, responseText: 'Roots' }]);
|
253
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(1, 20);
|
254
|
+
});
|
255
|
+
|
256
|
+
it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
|
257
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
258
|
+
fillInTheGapsTextPage.steps.expandMinimumScoringDropdown();
|
259
|
+
fillInTheGapsTextPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
260
|
+
fillInTheGapsTextPage.steps.allotMinimumPoints(3);
|
261
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
262
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Roots' }]);
|
263
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(3, 20);
|
264
|
+
cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
|
265
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
266
|
+
fillInTheGapsTextPage.steps.expandMinimumScoringDropdown();
|
267
|
+
fillInTheGapsTextPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
|
268
|
+
});
|
269
|
+
|
270
|
+
// Penalty points for each incorrect text container - Automatically set penalty for each incorrect text container to total points / no. of incorrect text container
|
271
|
+
it('When the user has set penalty scoring to \'Penalty points for each incorrect text container\', and checks \'Automatically set penalty for each incorrect text container to total points / no. of incorrect text container\' checkbox and attempts the question incorrectly, then the user should be awarded with negative points for the incorrect and empty dropzone', () => {
|
272
|
+
fillInTheGapsTextPage.steps.checkAutomaticallySetPenaltyPointsCheckbox();
|
273
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
274
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Roots' }]);
|
275
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(-20.01, 20);
|
276
|
+
});
|
277
|
+
|
278
|
+
it('When the user attempts the question correctly along with an incorrect option, then penalty points should get deducted from the awarded points', () => {
|
279
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
280
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Roots' }]);
|
281
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(7.33, 20);
|
282
|
+
});
|
283
|
+
|
284
|
+
it('When the user attempts the question correctly along with multiple incorrect options, then penalty points for each incorrect option should get deducted from the awarded points', () => {
|
285
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
286
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Branch' }, { responseIndex: 2, responseText: 'Roots' }]);
|
287
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(-4.34, 20);
|
288
|
+
});
|
289
|
+
|
290
|
+
it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
|
291
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
292
|
+
fillInTheGapsTextPage.steps.expandMinimumScoringDropdown();
|
293
|
+
fillInTheGapsTextPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
294
|
+
fillInTheGapsTextPage.steps.allotMinimumPoints(3);
|
295
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
296
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Roots' }]);
|
297
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(3, 20);
|
298
|
+
});
|
299
|
+
});
|
300
|
+
});
|
package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
import { fillInTheGapsTextPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Create item page - Fill in the gaps with text: Response level alternate answer basic scoring', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Auto scored - All or nothing with response level alternate answers', () => {
|
10
|
+
abortEarlySetup();
|
11
|
+
before(() => {
|
12
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
13
|
+
cy.barsPreLoaderWait();
|
14
|
+
fillInTheGapsTextPage.steps.deleteAResponseArea(0);
|
15
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }]);
|
16
|
+
fillInTheGapsTextPage.steps.addAlternateAnswerInResponseAccordion(0);
|
17
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 1, responseText: 'Fruit' }]);
|
18
|
+
fillInTheGapsTextPage.steps.allotPoints(15);
|
19
|
+
fillInTheGapsTextPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
20
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
21
|
+
});
|
22
|
+
|
23
|
+
it('When the user selects \'Grading\' view without attempting the question, response area numeration should be displayed, correct answers section should be displayed with the first correct answer set in the response accordion', () => {
|
24
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(0, 15);
|
25
|
+
fillInTheGapsTextPage.steps.switchToGradingView();
|
26
|
+
fillInTheGapsTextPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
27
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaNumeration();
|
28
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower']);
|
29
|
+
});
|
30
|
+
|
31
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed besides the incorrect response, a status message with text \'Your answer is incorrect\' and correct answer section with the first correct answer set in the response accordion should be displayed', () => {
|
32
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Roots' }]);
|
33
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(0, 15);
|
34
|
+
fillInTheGapsTextPage.steps.switchToGradingView();
|
35
|
+
fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(0);
|
36
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
37
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower']);
|
38
|
+
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
39
|
+
cy.log('When the user attempts the question incorrectly and clicks on \'Check answer\' button, incorrect icon should be displayed besides the incorrect response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
40
|
+
fillInTheGapsTextPage.steps.checkAnswer();
|
41
|
+
fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(0);
|
42
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
43
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
44
|
+
});
|
45
|
+
|
46
|
+
it('When user attempts the question correctly with the first correct answer set for the response accordion, then the user should be awarded full points and on switching to \'Grading\' view, then correct icon should be displayed beside the correct response, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
47
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
48
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
49
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(15, 15);
|
50
|
+
fillInTheGapsTextPage.steps.switchToGradingView();
|
51
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
|
52
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
53
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
54
|
+
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
55
|
+
cy.log('When user attempts the question correctly with the first correct answer set for the response accordion and clicks on \'Check answer\' button, then correct icon should be displayed beside the correct response, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
56
|
+
fillInTheGapsTextPage.steps.checkAnswer();
|
57
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
|
58
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
59
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
60
|
+
});
|
61
|
+
|
62
|
+
it('When the user attempts the question with the alternate answer set for the response accordion, then the user should be awarded full points and on switching to \'Grading\' view, then correct icon should be displayed beside the correct response, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
63
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
64
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Fruit' }]);
|
65
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(15, 15);
|
66
|
+
fillInTheGapsTextPage.steps.switchToGradingView();
|
67
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
|
68
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
69
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
70
|
+
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
71
|
+
cy.log('When the user attempts the question with the alternate answer set for the response accordion and clicks on \'Check answer\' button, then correct icon should be displayed beside the correct response, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
72
|
+
fillInTheGapsTextPage.steps.checkAnswer();
|
73
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
|
74
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
75
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
76
|
+
});
|
77
|
+
});
|
78
|
+
});
|