itemengine-cypress-automation 1.0.278 → 1.0.280-RepoUpdate13thJan-133bc9f.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +21 -21
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +9 -9
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneBasic.js +7 -6
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +10 -9
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +11 -10
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettings.js +1 -1
- package/cypress/e2e/ILC/EditItem/editItem.ts +133 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +15 -15
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +14 -14
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +14 -14
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/blankResponseScoring.js +214 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/manuallyAndNonScored.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +14 -14
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +8 -8
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +14 -14
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +14 -14
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +8 -8
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +14 -14
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +14 -14
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +14 -14
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/blankResponseScoring.js +228 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/manuallyAndNonScored.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/blankResponseScoring.js +242 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/blankResponseScoring.js +245 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/blankResponseScoring.js +237 -0
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingGroupedScoring.js +4 -4
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +14 -14
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +14 -14
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +14 -14
- package/cypress/e2e/ILC/Matching/Scoring/blankResponseScoring.js +239 -0
- package/cypress/e2e/ILC/Matching/Scoring/manuallyAndNonScored.js +2 -2
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +2 -2
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsBasic.js +4 -4
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +14 -14
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +14 -14
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +14 -14
- package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +3 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/blankResponseScoring.js +212 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/manuallyAndNonScored.js +2 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsScoringBasic.js +2 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternatePoints.js +7 -7
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternatePoints.js +7 -7
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsBasic.js +4 -4
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/blankResponseScoring.js +366 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/blankResponseScoring.js +306 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +243 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +242 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +289 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +284 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +238 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +279 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsScoringBasic.js +641 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +278 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +228 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +234 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsScoringBasic.js +237 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAddEvaluation.js +134 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAlternateAnswer.js +138 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/blankResponseScoring.js +263 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasicForAlternateAnswer.js +166 -0
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +3 -3
- package/cypress/e2e/ILC/TextEntryMath/customSettings.js +3 -3
- package/cypress/e2e/ILC/TextEntryMath/customSettingsSeparators.ts +193 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +5 -5
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +8 -8
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +1 -1
- package/cypress/pages/components/customSettingsSeparatorsComponent.ts +17 -0
- package/cypress/pages/components/equationEditorFlyout.js +1 -1
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +1 -1
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +5 -1
- package/cypress/pages/components/gridQuestionCommonComponent.js +40 -0
- package/cypress/pages/components/optionsWrapperComponent.js +1 -1
- package/cypress/pages/createItemPage.js +38 -1
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +45 -3
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +35 -2
- package/cypress/pages/listOrderingPage.js +11 -11
- package/cypress/pages/matchingPage.js +31 -4
- package/cypress/pages/multipleSelectionPage.js +17 -2
- package/cypress/pages/readingRulerPage.js +5 -3
- package/cypress/pages/singleSelectionPage.js +3 -0
- package/cypress/pages/textEntryMathPage.js +19 -5
- package/package.json +1 -1
package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsScoringBasic.js
ADDED
@@ -0,0 +1,641 @@
|
|
1
|
+
import { textEntryMathPage } from "../../../../pages";
|
2
|
+
import { equationEditorFlyout } from "../../../../pages/components";
|
3
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
4
|
+
import utilities from "../../../../support/helpers/utilities";
|
5
|
+
|
6
|
+
describe('Create item page - Text Entry Math: Partial different weights', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Auto scored - Partial different weights', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Enter the correct answer in the response field');
|
17
|
+
textEntryMathPage.steps.addResponseArea();
|
18
|
+
textEntryMathPage.steps.addResponseArea();
|
19
|
+
textEntryMathPage.steps.addResponseArea();
|
20
|
+
textEntryMathPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
21
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
22
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
23
|
+
equationEditorFlyout.steps.clearAll();
|
24
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('CorrectOne');
|
25
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
26
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
27
|
+
textEntryMathPage.steps.focusInLayoutInputField(0);
|
28
|
+
textEntryMathPage.steps.addResponseContainer();
|
29
|
+
textEntryMathPage.steps.insertTextInEquationEditorTextArea('One');
|
30
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
31
|
+
textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(0);
|
32
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
33
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
|
34
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['six', 'multiply', 'two', 'equalTo', 'one', 'two'] }]);
|
35
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
36
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
37
|
+
textEntryMathPage.steps.focusInLayoutInputField(1);
|
38
|
+
textEntryMathPage.steps.addResponseContainer();
|
39
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['equalTo', 'one', 'two'] }]);
|
40
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
41
|
+
textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(1);
|
42
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(2);
|
43
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
|
44
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('9000%');
|
45
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
46
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
47
|
+
textEntryMathPage.steps.focusInLayoutInputField(2);
|
48
|
+
textEntryMathPage.steps.addResponseContainer();
|
49
|
+
textEntryMathPage.steps.insertTextInEquationEditorTextArea('%');
|
50
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
51
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
52
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
53
|
+
textEntryMathPage.steps.allotPartialDifferentWeightsPoints({ 0: 5, 1: 9, 2: 6 });
|
54
|
+
textEntryMathPage.steps.expandAdditionalSettings();
|
55
|
+
textEntryMathPage.steps.selectModalVisibilityTypeButton();
|
56
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
57
|
+
});
|
58
|
+
|
59
|
+
it('When the user selects \'Grading\' view without attempting the question, response numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers from the correct accordion and respective response numeration', () => {
|
60
|
+
textEntryMathPage.steps.switchToGradingView();
|
61
|
+
textEntryMathPage.steps.verifyPreviewScore(0, 20);
|
62
|
+
textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
|
63
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['CorrectOne', '6×2=12', '9000%']);
|
64
|
+
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
65
|
+
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
66
|
+
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
67
|
+
textEntryMathPage.steps.verifyCorrectIncorrectStatusMessageTextNotExist();
|
68
|
+
});
|
69
|
+
|
70
|
+
it('When the user attempts the question with correct responses, then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
71
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
72
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
73
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct');
|
74
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
75
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
76
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['six', 'multiply', 'two'] }]);
|
77
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
78
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(2);
|
79
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('9000');
|
80
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
81
|
+
textEntryMathPage.steps.verifyPreviewScore(20, 20);
|
82
|
+
textEntryMathPage.steps.switchToGradingView();
|
83
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
84
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(1);
|
85
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(2);
|
86
|
+
textEntryMathPage.steps.verifyCorrectAnswerSectionNotExists();
|
87
|
+
utilities.verifyElementVisibilityState(textEntryMathPage.correctAnswersContainer(), 'notExist');
|
88
|
+
});
|
89
|
+
|
90
|
+
it('When the user attempts the question partially correct with some correct, some incomplete, some incorrect options, then the user should be awarded points alloted to the responses and on switching to \'Grading\' view, green check-mark should be displayed besides the correct answer responses, red cross-mark should be displayed besides incorrect answer response, a status message should not be displayed and correct answer section with all correct answers along with numeration should be displayed', () => {
|
91
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
92
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
93
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['six', 'multiply', 'two'] }]);
|
94
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
95
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(2);
|
96
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('7.07e');
|
97
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
98
|
+
textEntryMathPage.steps.verifyPreviewScore(9, 20);
|
99
|
+
textEntryMathPage.steps.switchToGradingView();
|
100
|
+
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
101
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(1);
|
102
|
+
textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
|
103
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['CorrectOne', '6×2=12', '9000%']);
|
104
|
+
});
|
105
|
+
|
106
|
+
it('When the user attempts the question partially correct with all the responses correctly attempted but one response incomplete, then the user should be awarded points of the correctly attempted responses and on switching to \'Grading\' view, green check-mark should be displayed besides the correct answer responses, red cross-mark should be displayed besides incorrect answer response, a status message should not be displayed and correct answer section with all correct answers along with numeration should be displayed', () => {
|
107
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
108
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
109
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct');
|
110
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
111
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
112
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['six', 'multiply', 'two'] }]);
|
113
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
114
|
+
textEntryMathPage.steps.verifyPreviewScore(14, 20);
|
115
|
+
textEntryMathPage.steps.switchToGradingView();
|
116
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
117
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(1);
|
118
|
+
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
119
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['CorrectOne', '6×2=12', '9000%']);
|
120
|
+
});
|
121
|
+
|
122
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, correct answer section with all correct answers along with dropzone cell numeration should be displayed', () => {
|
123
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
124
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
125
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 1');
|
126
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
127
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
128
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 2');
|
129
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
130
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(2);
|
131
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 3');
|
132
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
133
|
+
textEntryMathPage.steps.verifyPreviewScore(0, 20);
|
134
|
+
textEntryMathPage.steps.switchToGradingView();
|
135
|
+
textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
|
136
|
+
textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
|
137
|
+
textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
|
138
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['CorrectOne', '6×2=12', '9000%']);
|
139
|
+
textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
140
|
+
});
|
141
|
+
});
|
142
|
+
|
143
|
+
describe('Question preview: Auto scored - Partial different weights: Minimum scoring', () => {
|
144
|
+
abortEarlySetup();
|
145
|
+
before(() => {
|
146
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
147
|
+
cy.barsPreLoaderWait();
|
148
|
+
textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Enter the correct answer in the response field');
|
149
|
+
textEntryMathPage.steps.addResponseArea();
|
150
|
+
textEntryMathPage.steps.addResponseArea();
|
151
|
+
textEntryMathPage.steps.addResponseArea();
|
152
|
+
textEntryMathPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
153
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
154
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
155
|
+
equationEditorFlyout.steps.clearAll();
|
156
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('CorrectOne');
|
157
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
158
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
159
|
+
textEntryMathPage.steps.focusInLayoutInputField(0);
|
160
|
+
textEntryMathPage.steps.addResponseContainer();
|
161
|
+
textEntryMathPage.steps.insertTextInEquationEditorTextArea('One');
|
162
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
163
|
+
textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(0);
|
164
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
165
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
|
166
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['six', 'multiply', 'two', 'equalTo', 'one', 'two'] }]);
|
167
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
168
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
169
|
+
textEntryMathPage.steps.focusInLayoutInputField(1);
|
170
|
+
textEntryMathPage.steps.addResponseContainer();
|
171
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['equalTo', 'one', 'two'] }]);
|
172
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
173
|
+
textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(1);
|
174
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(2);
|
175
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
|
176
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('9000%');
|
177
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
178
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
179
|
+
textEntryMathPage.steps.focusInLayoutInputField(2);
|
180
|
+
textEntryMathPage.steps.addResponseContainer();
|
181
|
+
textEntryMathPage.steps.insertTextInEquationEditorTextArea('%');
|
182
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
183
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
184
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
185
|
+
textEntryMathPage.steps.allotPartialDifferentWeightsPoints({ 0: 1, 1: 6, 2: 5 });
|
186
|
+
textEntryMathPage.steps.expandAdditionalSettings();
|
187
|
+
textEntryMathPage.steps.selectModalVisibilityTypeButton();
|
188
|
+
});
|
189
|
+
|
190
|
+
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', () => {
|
191
|
+
textEntryMathPage.steps.expandMinimumScoringDropdown();
|
192
|
+
textEntryMathPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
|
193
|
+
textEntryMathPage.steps.allotMinimumPoints(2);
|
194
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
195
|
+
textEntryMathPage.steps.switchToGradingView();
|
196
|
+
textEntryMathPage.steps.verifyPreviewScore(2, 12);
|
197
|
+
textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
198
|
+
});
|
199
|
+
|
200
|
+
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', () => {
|
201
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
202
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
203
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 1');
|
204
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
205
|
+
textEntryMathPage.steps.verifyPreviewScore(2, 12);
|
206
|
+
textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
207
|
+
});
|
208
|
+
|
209
|
+
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', () => {
|
210
|
+
textEntryMathPage.steps.switchToEditTab();
|
211
|
+
textEntryMathPage.steps.expandMinimumScoringDropdown();
|
212
|
+
textEntryMathPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
213
|
+
textEntryMathPage.steps.allotMinimumPoints(2);
|
214
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
215
|
+
textEntryMathPage.steps.switchToGradingView();
|
216
|
+
textEntryMathPage.steps.verifyPreviewScore(0, 12);
|
217
|
+
textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
218
|
+
});
|
219
|
+
|
220
|
+
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', () => {
|
221
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
222
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
223
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 1');
|
224
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
225
|
+
textEntryMathPage.steps.verifyPreviewScore(2, 12);
|
226
|
+
});
|
227
|
+
|
228
|
+
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', () => {
|
229
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
230
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
231
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 1');
|
232
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
233
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
234
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['six', 'multiply', 'two'] }]);
|
235
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
236
|
+
textEntryMathPage.steps.verifyPreviewScore(6, 12);
|
237
|
+
});
|
238
|
+
|
239
|
+
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', () => {
|
240
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
241
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
242
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct');
|
243
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
244
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
245
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 1');
|
246
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
247
|
+
textEntryMathPage.steps.verifyPreviewScore(2, 12);
|
248
|
+
});
|
249
|
+
});
|
250
|
+
|
251
|
+
describe('Question preview: Auto scored - Partial different weights: Rounding', () => {
|
252
|
+
abortEarlySetup();
|
253
|
+
before(() => {
|
254
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
255
|
+
cy.barsPreLoaderWait();
|
256
|
+
textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Enter the correct answer in the response field');
|
257
|
+
textEntryMathPage.steps.addResponseArea();
|
258
|
+
textEntryMathPage.steps.addResponseArea();
|
259
|
+
textEntryMathPage.steps.addResponseArea();
|
260
|
+
textEntryMathPage.steps.addResponseArea();
|
261
|
+
textEntryMathPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
262
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
263
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
264
|
+
equationEditorFlyout.steps.clearAll();
|
265
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('CorrectOne');
|
266
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
267
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
268
|
+
textEntryMathPage.steps.focusInLayoutInputField(0);
|
269
|
+
textEntryMathPage.steps.addResponseContainer();
|
270
|
+
textEntryMathPage.steps.insertTextInEquationEditorTextArea('One');
|
271
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
272
|
+
textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(0);
|
273
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
274
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
|
275
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['six', 'multiply', 'two', 'equalTo', 'one', 'two'] }]);
|
276
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
277
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
278
|
+
textEntryMathPage.steps.focusInLayoutInputField(1);
|
279
|
+
textEntryMathPage.steps.addResponseContainer();
|
280
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['equalTo', 'one', 'two'] }]);
|
281
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
282
|
+
textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(1);
|
283
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(2);
|
284
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
|
285
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('9000%');
|
286
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
287
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
288
|
+
textEntryMathPage.steps.focusInLayoutInputField(2);
|
289
|
+
textEntryMathPage.steps.addResponseContainer();
|
290
|
+
textEntryMathPage.steps.insertTextInEquationEditorTextArea('%');
|
291
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
292
|
+
textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(2);
|
293
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(3);
|
294
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(3);
|
295
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('7.07e');
|
296
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
297
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
298
|
+
textEntryMathPage.steps.focusInLayoutInputField(3);
|
299
|
+
textEntryMathPage.steps.addResponseContainer();
|
300
|
+
textEntryMathPage.steps.insertTextInEquationEditorTextArea('e');
|
301
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
302
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
303
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
304
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(2);
|
305
|
+
textEntryMathPage.steps.allotPartialDifferentWeightsPoints({ 0: 2.67, 1: 1.99, 2: 1.34, 3: 4.5 });
|
306
|
+
textEntryMathPage.steps.expandAdditionalSettings();
|
307
|
+
textEntryMathPage.steps.selectModalVisibilityTypeButton();
|
308
|
+
});
|
309
|
+
|
310
|
+
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', () => {
|
311
|
+
textEntryMathPage.steps.expandRoundingDropdown();
|
312
|
+
textEntryMathPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.99');
|
313
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
314
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
315
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct');
|
316
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
317
|
+
textEntryMathPage.steps.verifyPreviewScore(2, 10.5);
|
318
|
+
});
|
319
|
+
|
320
|
+
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', () => {
|
321
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
322
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
323
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['six', 'multiply', 'two'] }]);
|
324
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
325
|
+
textEntryMathPage.steps.verifyPreviewScore(1, 10.5);
|
326
|
+
});
|
327
|
+
|
328
|
+
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', () => {
|
329
|
+
textEntryMathPage.steps.switchToEditTab();
|
330
|
+
textEntryMathPage.steps.expandRoundingDropdown();
|
331
|
+
textEntryMathPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50');
|
332
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
333
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(2);
|
334
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('9000');
|
335
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
336
|
+
textEntryMathPage.steps.verifyPreviewScore(1, 10.5);
|
337
|
+
});
|
338
|
+
|
339
|
+
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', () => {
|
340
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
341
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(3);
|
342
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('7.07');
|
343
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
344
|
+
textEntryMathPage.steps.verifyPreviewScore(4, 10.5);
|
345
|
+
});
|
346
|
+
|
347
|
+
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', () => {
|
348
|
+
textEntryMathPage.steps.switchToEditTab();
|
349
|
+
textEntryMathPage.steps.expandRoundingDropdown();
|
350
|
+
textEntryMathPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50; Round up if > 0.50');
|
351
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
352
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(2);
|
353
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('9000');
|
354
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
355
|
+
textEntryMathPage.steps.verifyPreviewScore(1, 10.5);
|
356
|
+
});
|
357
|
+
|
358
|
+
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', () => {
|
359
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
360
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(3);
|
361
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('7.07');
|
362
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
363
|
+
textEntryMathPage.steps.verifyPreviewScore(4, 10.5);
|
364
|
+
});
|
365
|
+
|
366
|
+
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', () => {
|
367
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
368
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
369
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct');
|
370
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
371
|
+
textEntryMathPage.steps.verifyPreviewScore(3, 10.5);
|
372
|
+
});
|
373
|
+
|
374
|
+
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', () => {
|
375
|
+
cy.log('Pre-step: Setting penalty scoring to \'Penalty points for the entire question\', allotting penalty points')
|
376
|
+
textEntryMathPage.steps.switchToEditTab();
|
377
|
+
textEntryMathPage.steps.expandPenaltyScoringDropdown();
|
378
|
+
textEntryMathPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
|
379
|
+
textEntryMathPage.steps.allotPenaltyPoints(4);
|
380
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
381
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
382
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct');
|
383
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
384
|
+
textEntryMathPage.steps.verifyPreviewScore(0, 10.5);
|
385
|
+
});
|
386
|
+
|
387
|
+
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', () => {
|
388
|
+
textEntryMathPage.steps.switchToEditTab();
|
389
|
+
textEntryMathPage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
|
390
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
391
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
392
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect');
|
393
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
394
|
+
textEntryMathPage.steps.verifyPreviewScore(-4, 10.5);
|
395
|
+
});
|
396
|
+
});
|
397
|
+
|
398
|
+
describe('Question preview: Auto scored - Partial different weights: Penalty scoring with \'Round negative score to zero\' unchecked', () => {
|
399
|
+
abortEarlySetup();
|
400
|
+
before(() => {
|
401
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
402
|
+
cy.barsPreLoaderWait();
|
403
|
+
textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Enter the correct answer in the response field');
|
404
|
+
textEntryMathPage.steps.addResponseArea();
|
405
|
+
textEntryMathPage.steps.addResponseArea();
|
406
|
+
textEntryMathPage.steps.addResponseArea();
|
407
|
+
textEntryMathPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
408
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
409
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
410
|
+
equationEditorFlyout.steps.clearAll();
|
411
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('CorrectOne');
|
412
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
413
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
414
|
+
textEntryMathPage.steps.focusInLayoutInputField(0);
|
415
|
+
textEntryMathPage.steps.addResponseContainer();
|
416
|
+
textEntryMathPage.steps.insertTextInEquationEditorTextArea('One');
|
417
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
418
|
+
textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(0);
|
419
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
420
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
|
421
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['six', 'multiply', 'two', 'equalTo', 'one', 'two'] }]);
|
422
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
423
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
424
|
+
textEntryMathPage.steps.focusInLayoutInputField(1);
|
425
|
+
textEntryMathPage.steps.addResponseContainer();
|
426
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['equalTo', 'one', 'two'] }]);
|
427
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
428
|
+
textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(1);
|
429
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(2);
|
430
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
|
431
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('9000%');
|
432
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
433
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
434
|
+
textEntryMathPage.steps.focusInLayoutInputField(2);
|
435
|
+
textEntryMathPage.steps.addResponseContainer();
|
436
|
+
textEntryMathPage.steps.insertTextInEquationEditorTextArea('%');
|
437
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
438
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
439
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
440
|
+
textEntryMathPage.steps.allotPartialDifferentWeightsPoints({ 0: 9, 1: 6, 2: 5 });
|
441
|
+
textEntryMathPage.steps.expandAdditionalSettings();
|
442
|
+
textEntryMathPage.steps.selectModalVisibilityTypeButton();
|
443
|
+
});
|
444
|
+
|
445
|
+
//Penalty points for the entire question
|
446
|
+
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', () => {
|
447
|
+
textEntryMathPage.steps.expandPenaltyScoringDropdown();
|
448
|
+
textEntryMathPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
|
449
|
+
textEntryMathPage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
|
450
|
+
textEntryMathPage.steps.allotPenaltyPoints(4);
|
451
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
452
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
453
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect');
|
454
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
455
|
+
textEntryMathPage.steps.verifyPreviewScore(-4, 20);
|
456
|
+
});
|
457
|
+
|
458
|
+
it('When the user attempts the question correctly along with an incorrect response, then penalty points should get deducted from the awarded points', () => {
|
459
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
460
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
461
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct');
|
462
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
463
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
464
|
+
equationEditorFlyout.steps.enterEquationUsingPiSymbol();
|
465
|
+
textEntryMathPage.steps.verifyPreviewScore(5, 20);
|
466
|
+
});
|
467
|
+
|
468
|
+
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', () => {
|
469
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
470
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
471
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect');
|
472
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
473
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
474
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['six', 'multiply', 'two'] }]);
|
475
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
476
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(2);
|
477
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('7.07');
|
478
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
479
|
+
textEntryMathPage.steps.verifyPreviewScore(2, 20);
|
480
|
+
});
|
481
|
+
|
482
|
+
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', () => {
|
483
|
+
textEntryMathPage.steps.switchToEditTab();
|
484
|
+
textEntryMathPage.steps.expandMinimumScoringDropdown();
|
485
|
+
textEntryMathPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
486
|
+
textEntryMathPage.steps.allotMinimumPoints(3);
|
487
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
488
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
489
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect');
|
490
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
491
|
+
textEntryMathPage.steps.verifyPreviewScore(3, 20);
|
492
|
+
cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
|
493
|
+
textEntryMathPage.steps.switchToEditTab();
|
494
|
+
textEntryMathPage.steps.expandMinimumScoringDropdown();
|
495
|
+
textEntryMathPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
|
496
|
+
});
|
497
|
+
|
498
|
+
//Penalty points for each incorrect text container - Specify total penalty points
|
499
|
+
it('When the user sets penalty scoring to \'Penalty points for each incorrect dropzone\', 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 dropzone', () => {
|
500
|
+
textEntryMathPage.steps.expandPenaltyScoringDropdown();
|
501
|
+
textEntryMathPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for each incorrect text container');
|
502
|
+
textEntryMathPage.steps.allotTotalPenaltyPoints(4);
|
503
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
504
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
505
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect');
|
506
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
507
|
+
textEntryMathPage.steps.verifyPreviewScore(-4, 20);
|
508
|
+
});
|
509
|
+
|
510
|
+
it('When the user attempts the question correctly along with an incorrect option, then penalty points should get deducted from the awarded points', () => {
|
511
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
512
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
513
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct');
|
514
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
515
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
516
|
+
equationEditorFlyout.steps.enterEquationUsingPiSymbol();
|
517
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(2);
|
518
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('9000');
|
519
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
520
|
+
textEntryMathPage.steps.verifyPreviewScore(12.6667, 20);
|
521
|
+
});
|
522
|
+
|
523
|
+
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', () => {
|
524
|
+
textEntryMathPage.steps.switchToEditTab();
|
525
|
+
textEntryMathPage.steps.expandMinimumScoringDropdown();
|
526
|
+
textEntryMathPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
527
|
+
textEntryMathPage.steps.allotMinimumPoints(3);
|
528
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
529
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
530
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect');
|
531
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
532
|
+
textEntryMathPage.steps.verifyPreviewScore(3, 20);
|
533
|
+
cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
|
534
|
+
textEntryMathPage.steps.switchToEditTab();
|
535
|
+
textEntryMathPage.steps.expandMinimumScoringDropdown();
|
536
|
+
textEntryMathPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
|
537
|
+
});
|
538
|
+
|
539
|
+
//Penalty points for each incorrect dropzone - Specify points for each incorrect dropzone
|
540
|
+
it('When the user has set penalty scoring to \'Penalty points for each incorrect dropzone\', 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', () => {
|
541
|
+
textEntryMathPage.steps.selectPenaltyPointsForEachIncorrectOptionType('specify points for each incorrect text container');
|
542
|
+
textEntryMathPage.steps.allotPenaltyPointsForEachIncorrectOption(4);
|
543
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
544
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
545
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect');
|
546
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
547
|
+
textEntryMathPage.steps.verifyPreviewScore(-12, 20);
|
548
|
+
});
|
549
|
+
|
550
|
+
it('When the user attempts the question correctly along with an incorrect option, then penalty points should get deducted from the awarded points', () => {
|
551
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
552
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
553
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct');
|
554
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
555
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
556
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['six', 'multiply', 'two'] }]);
|
557
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
558
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(2);
|
559
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('7.07');
|
560
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
561
|
+
textEntryMathPage.steps.verifyPreviewScore(11, 20);
|
562
|
+
});
|
563
|
+
|
564
|
+
it('When the user attempts the question correctly along with multiple incorrect options, then penalty points for each incorrect dropzone should get deducted from the awarded points', () => {
|
565
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
566
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
567
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct');
|
568
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
569
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
570
|
+
equationEditorFlyout.steps.enterEquationUsingPiSymbol();
|
571
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(2);
|
572
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('7.07');
|
573
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
574
|
+
textEntryMathPage.steps.verifyPreviewScore(1, 20);
|
575
|
+
});
|
576
|
+
|
577
|
+
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', () => {
|
578
|
+
textEntryMathPage.steps.switchToEditTab();
|
579
|
+
textEntryMathPage.steps.expandMinimumScoringDropdown();
|
580
|
+
textEntryMathPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
581
|
+
textEntryMathPage.steps.allotMinimumPoints(3);
|
582
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
583
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
584
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect');
|
585
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
586
|
+
textEntryMathPage.steps.verifyPreviewScore(3, 20);
|
587
|
+
cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
|
588
|
+
textEntryMathPage.steps.switchToEditTab();
|
589
|
+
textEntryMathPage.steps.expandMinimumScoringDropdown();
|
590
|
+
textEntryMathPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
|
591
|
+
});
|
592
|
+
|
593
|
+
// Penalty points for each incorrect option - Automatically set penalty for each incorrect dropzone to total points / no. of incorrect dropzone
|
594
|
+
it('When the user has set penalty scoring to \'Penalty points for each incorrect dropzone\', and checks \'Automatically set penalty for each incorrect dropzone to total points / no. of incorrect dropzone\' checkbox and attempts the question incorrectly, then the user should be awarded with negative points for the incorrect and empty dropzone', () => {
|
595
|
+
textEntryMathPage.steps.checkAutomaticallySetPenaltyPointsCheckbox();
|
596
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
597
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
598
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect');
|
599
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
600
|
+
textEntryMathPage.steps.verifyPreviewScore(-20, 20);
|
601
|
+
});
|
602
|
+
|
603
|
+
it('When the user attempts the question correctly along with an incorrect option, then penalty points should get deducted from the awarded points', () => {
|
604
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
605
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
606
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct');
|
607
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
608
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
609
|
+
equationEditorFlyout.steps.enterEquationUsingPiSymbol();
|
610
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(2);
|
611
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('9000');
|
612
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
613
|
+
textEntryMathPage.steps.verifyPreviewScore(7.3333, 20);
|
614
|
+
});
|
615
|
+
|
616
|
+
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', () => {
|
617
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
618
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
619
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct');
|
620
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
621
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
622
|
+
equationEditorFlyout.steps.enterEquationUsingPiSymbol();
|
623
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(2);
|
624
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('7.07');
|
625
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
626
|
+
textEntryMathPage.steps.verifyPreviewScore(-4.3333, 20);
|
627
|
+
});
|
628
|
+
|
629
|
+
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', () => {
|
630
|
+
textEntryMathPage.steps.switchToEditTab();
|
631
|
+
textEntryMathPage.steps.expandMinimumScoringDropdown();
|
632
|
+
textEntryMathPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
633
|
+
textEntryMathPage.steps.allotMinimumPoints(3);
|
634
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
635
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
636
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect');
|
637
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
638
|
+
textEntryMathPage.steps.verifyPreviewScore(3, 20);
|
639
|
+
});
|
640
|
+
});
|
641
|
+
});
|