itemengine-cypress-automation 1.0.169-uploadResponseMigration-83ab996.0 → 1.0.169
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +83 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +200 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +56 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +95 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +71 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +72 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +71 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +22 -11
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +161 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +308 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +216 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +336 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +570 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +214 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +356 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +299 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +18 -7
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +11 -6
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +355 -0
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +2 -36
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +22 -34
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +8 -24
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +5 -25
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +68 -114
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +67 -111
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +71 -123
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +41 -63
- package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +21 -25
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +50 -85
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +68 -115
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +54 -98
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +72 -120
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
- package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +309 -0
- package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/Matching/toolSettings.js +72 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +1033 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +28 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +236 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +239 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +278 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +178 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +407 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +273 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +278 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +228 -0
- package/cypress/e2e/ILC/NumberLine/additionalSettings.js +120 -0
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +659 -0
- package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +149 -0
- package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +151 -0
- package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +171 -0
- package/cypress/e2e/ILC/NumberLine/headerSection.js +76 -0
- package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +54 -0
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +200 -0
- package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +67 -0
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +135 -0
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +73 -0
- package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +372 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +1014 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +235 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +235 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +235 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +457 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +342 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +342 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +342 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +155 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +314 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +275 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +314 -0
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +290 -0
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +142 -0
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +137 -0
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
- package/cypress/fixtures/theme/ilc.json +14 -26
- package/cypress/pages/brainingCampManipulativePage.js +122 -0
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/colorPopupComponent.js +2 -2
- package/cypress/pages/components/defaultToolDropdown.js +77 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +629 -2
- package/cypress/pages/components/index.js +3 -0
- package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
- package/cypress/pages/components/measuringToolComponent.js +2 -2
- package/cypress/pages/components/resetPopupComponent.js +74 -0
- package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
- package/cypress/pages/components/setPointsPopupBase.js +6 -4
- package/cypress/pages/components/specifyRowsAndColumnsComponent.js +60 -3
- package/cypress/pages/components/toolSettingsComponent.js +80 -12
- package/cypress/pages/components/toolsAndControlsComponent.js +69 -0
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +0 -8
- package/cypress/pages/feedbackScalePage copy.js +716 -0
- package/cypress/pages/feedbackScalePage.js +591 -449
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +3 -1
- package/cypress/pages/graphingPage.js +9 -145
- package/cypress/pages/gridFillPage.js +135 -120
- package/cypress/pages/highlightPage.js +0 -394
- package/cypress/pages/index.js +5 -2
- package/cypress/pages/matchingPage.js +78 -20
- package/cypress/pages/multipleSelectionGridPage.js +88 -1
- package/cypress/pages/numberLinePage.js +723 -0
- package/cypress/pages/singleSelectionGridPage.js +86 -0
- package/cypress/pages/textSelectionPage.js +582 -0
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +1 -38
- package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +0 -1
- package/cypress/support/migrationHelpers/migrationScript.js +0 -4
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +2 -34
- package/package.json +2 -2
@@ -0,0 +1,407 @@
|
|
1
|
+
import { numberLinePage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
const unselectedToolOption = ['Left/down ray', 'Right/up ray', 'Left/down ray w/ hollow pt', 'Right/up ray w/ hollow pt'];
|
4
|
+
const range = 20;
|
5
|
+
|
6
|
+
describe('Create item page - Number line: Partial equal weights', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe(`Number line: Partial equal weights scoring`, () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
numberLinePage.steps.navigateToCreateQuestion('Number line');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
numberLinePage.steps.addTextInQuestionInstructionsInputField('Plot points on the number line');
|
17
|
+
numberLinePage.steps.selectToolOptions(unselectedToolOption);
|
18
|
+
numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Point');
|
19
|
+
numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer([{ x: 2, xRange: range }]);
|
20
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer([{ x: 2, xRange: range }]);
|
21
|
+
numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Segment right/up hollow pt');
|
22
|
+
numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer([{ x: -4, xRange: range }]);
|
23
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer([{ x: -4, xRange: range }, { x: -5, xRange: range }]);
|
24
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLineSpecifyCorrectAnswer([{ x1: -5, x1Range: range, x2: -4, x2Range: range }]);
|
25
|
+
numberLinePage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
26
|
+
numberLinePage.steps.allotPoints(20);
|
27
|
+
numberLinePage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
28
|
+
numberLinePage.steps.switchToPreviewTab();
|
29
|
+
});
|
30
|
+
|
31
|
+
it('When the user selects \'Grading\' view without attempting the question, the correct answer should be displayed in the correct answer section number line and your answer is status message should not be displayed', () => {
|
32
|
+
numberLinePage.steps.switchToGradingView();
|
33
|
+
numberLinePage.steps.verifyPreviewScore(0, 20);
|
34
|
+
numberLinePage.steps.verifyPointsNotExistOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
35
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLineNotExistPreviewTab([{ x1: -5, x1Range: range, x2: -4, x2Range: range }]);
|
36
|
+
numberLinePage.steps.verifyCorrectPointsOnNumberLineCorrectAnswerSection([{ x: 2, xRange: range }]);
|
37
|
+
numberLinePage.steps.verifyCorrectLineSegmentOnNumberLineCorrectAnswerSection([{ x1: -5, x1Range: range, x2: -4, x2Range: range }]);
|
38
|
+
numberLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
39
|
+
cy.log('When the user selects \'Check answer\' button without attempting the question, the correct answer section should be not displayed')
|
40
|
+
numberLinePage.steps.checkAnswer();
|
41
|
+
numberLinePage.steps.verifyPointsNotExistOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
42
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLineNotExistPreviewTab([{ x1: -5, x1Range: range, x2: -4, x2Range: range }]);
|
43
|
+
numberLinePage.steps.verifyCorrectAnswerSectionNotExist();
|
44
|
+
});
|
45
|
+
|
46
|
+
it('When the user attempts the question incorrectly then the user should be awarded with 0 points and on switching to grading view the attempted number line should be displayed incorrect and the the correct answers should be displayed in the correct answer section number line', () => {
|
47
|
+
numberLinePage.steps.resetQuestionPreview();
|
48
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Segment');
|
49
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 8, xRange: range }]);
|
50
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 8, xRange: range }, { x: 7, xRange: range }]);
|
51
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLinePreviewTab([{ x1: 8, x1Range: range, x2: 7, x2Range: range }]);
|
52
|
+
numberLinePage.steps.verifyPreviewScore(0, 20);
|
53
|
+
numberLinePage.steps.switchToGradingView();
|
54
|
+
//Preview tab
|
55
|
+
numberLinePage.steps.verifyIncorrectPointsOnNumberLinePreviewTab([{ x: 8, xRange: range }, { x: 7, xRange: range }]);
|
56
|
+
numberLinePage.steps.verifyIncorrectLineSegmentOnNumberLinePreviewTab([{ x1: 8, x1Range: range, x2: 7, x2Range: range }]);
|
57
|
+
//Correct answer section
|
58
|
+
numberLinePage.steps.verifyCorrectPointsOnNumberLineCorrectAnswerSection([{ x: 2, xRange: range }]);
|
59
|
+
numberLinePage.steps.verifyCorrectLineSegmentOnNumberLineCorrectAnswerSection([{ x1: -5, x1Range: range, x2: -4, x2Range: range }]);
|
60
|
+
numberLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
61
|
+
cy.log('When the user attempts the question incorrectly then the user should be awarded with 0 points and on selecting Check answer button the attempted number line should be displayed incorrect')
|
62
|
+
numberLinePage.steps.checkAnswer();
|
63
|
+
numberLinePage.steps.verifyIncorrectPointsOnNumberLinePreviewTab([{ x: 8, xRange: range }, { x: 7, xRange: range }]);
|
64
|
+
numberLinePage.steps.verifyIncorrectLineSegmentOnNumberLinePreviewTab([{ x1: 8, x1Range: range, x2: 7, x2Range: range }]);
|
65
|
+
numberLinePage.steps.verifyCorrectAnswerSectionNotExist();
|
66
|
+
});
|
67
|
+
|
68
|
+
it('When the user attempts the question partially correct then the user should be awarded with points of the correctly attempted response and on switching to grading view the attempted number line should be displayed correct and the the correct answers should be displayed in the correct answer section number line', () => {
|
69
|
+
numberLinePage.steps.resetQuestionPreview();
|
70
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Point');
|
71
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
72
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
73
|
+
numberLinePage.steps.verifyPreviewScore(10, 20);
|
74
|
+
numberLinePage.steps.switchToGradingView();
|
75
|
+
//Preview tab
|
76
|
+
numberLinePage.steps.verifyCorrectPointsOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
77
|
+
//Correct answer section
|
78
|
+
numberLinePage.steps.verifyCorrectPointsOnNumberLineCorrectAnswerSection([{ x: 2, xRange: range }]);
|
79
|
+
numberLinePage.steps.verifyCorrectLineSegmentOnNumberLineCorrectAnswerSection([{ x1: -5, x1Range: range, x2: -4, x2Range: range }]);
|
80
|
+
numberLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
81
|
+
cy.log('When the user attempts the question partially correct then the user should be awarded with points of the correctly attempted response and on selecting Check answer button the attempted number line should be displayed correct')
|
82
|
+
numberLinePage.steps.checkAnswer();
|
83
|
+
numberLinePage.steps.verifyCorrectPointsOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
84
|
+
numberLinePage.steps.verifyCorrectAnswerSectionNotExist();
|
85
|
+
});
|
86
|
+
|
87
|
+
it('When the user attempts the question partially correct with an incorrect response then the user should be awarded with points of the correctly attempted response and on switching to grading view the attempted number line should be displayed correct for the correct response and incorrect for the incorrect response and the the correct answers should be displayed in the correct answer section number line', () => {
|
88
|
+
numberLinePage.steps.resetQuestionPreview();
|
89
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Segment right/up hollow pt');
|
90
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: -4, xRange: range }]);
|
91
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: -4, xRange: range }, { x: -5, xRange: range }]);
|
92
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLinePreviewTab([{ x1: -5, x1Range: range, x2: -4, x2Range: range }]);
|
93
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Segment left/down hollow pt');
|
94
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 6, xRange: range }]);
|
95
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 6, xRange: range }, { x: 5, xRange: range }]);
|
96
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLinePreviewTab([{ x1: 5, x1Range: range, x2: 6, x2Range: range }]);
|
97
|
+
numberLinePage.steps.verifyPreviewScore(10, 20);
|
98
|
+
numberLinePage.steps.switchToGradingView();
|
99
|
+
//Preview tab
|
100
|
+
numberLinePage.steps.verifyCorrectPointsOnNumberLinePreviewTab([{ x: -4, xRange: range }, { x: -5, xRange: range }]);
|
101
|
+
numberLinePage.steps.verifyCorrectLineSegmentOnNumberLinePreviewTab([{ x1: -5, x1Range: range, x2: -4, x2Range: range }]);
|
102
|
+
numberLinePage.steps.verifyIncorrectPointsOnNumberLinePreviewTab([{ x: 6, xRange: range }, { x: 5, xRange: range }]);
|
103
|
+
numberLinePage.steps.verifyIncorrectLineSegmentOnNumberLinePreviewTab([{ x1: 5, x1Range: range, x2: 6, x2Range: range }]);
|
104
|
+
//Correct answer section
|
105
|
+
numberLinePage.steps.verifyCorrectPointsOnNumberLineCorrectAnswerSection([{ x: 2, xRange: range }]);
|
106
|
+
numberLinePage.steps.verifyCorrectLineSegmentOnNumberLineCorrectAnswerSection([{ x1: -5, x1Range: range, x2: -4, x2Range: range }]);
|
107
|
+
numberLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
108
|
+
cy.log('When the user attempts the question partially correct with an incorrect response then the user should be awarded with points of the correctly attempted response and on selecting Check answer button the attempted number line should be displayed correct for the correct response and incorrect for the incorrect response')
|
109
|
+
numberLinePage.steps.checkAnswer();
|
110
|
+
numberLinePage.steps.verifyCorrectPointsOnNumberLinePreviewTab([{ x: -4, xRange: range }, { x: -5, xRange: range }]);
|
111
|
+
numberLinePage.steps.verifyCorrectLineSegmentOnNumberLinePreviewTab([{ x1: -5, x1Range: range, x2: -4, x2Range: range }]);
|
112
|
+
numberLinePage.steps.verifyIncorrectPointsOnNumberLinePreviewTab([{ x: 6, xRange: range }, { x: 5, xRange: range }]);
|
113
|
+
numberLinePage.steps.verifyIncorrectLineSegmentOnNumberLinePreviewTab([{ x1: 5, x1Range: range, x2: 6, x2Range: range }]);
|
114
|
+
numberLinePage.steps.verifyCorrectAnswerSectionNotExist();
|
115
|
+
});
|
116
|
+
|
117
|
+
it('When the user attempts the question correctly then the user should be awarded with full points and on switching to grading view the attempted number line should be displayed correct and the correct answer section number line should not be displayed', () => {
|
118
|
+
numberLinePage.steps.resetQuestionPreview();
|
119
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Point');
|
120
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
121
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
122
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Segment right/up hollow pt');
|
123
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: -4, xRange: range }]);
|
124
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: -4, xRange: range }, { x: -5, xRange: range }]);
|
125
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLinePreviewTab([{ x1: -5, x1Range: range, x2: -4, x2Range: range }]);
|
126
|
+
numberLinePage.steps.verifyPreviewScore(20, 20);
|
127
|
+
numberLinePage.steps.switchToGradingView();
|
128
|
+
//Preview tab
|
129
|
+
numberLinePage.steps.verifyCorrectPointsOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
130
|
+
numberLinePage.steps.verifyCorrectPointsOnNumberLinePreviewTab([{ x: -4, xRange: range }, { x: -5, xRange: range }]);
|
131
|
+
numberLinePage.steps.verifyCorrectLineSegmentOnNumberLinePreviewTab([{ x1: -5, x1Range: range, x2: -4, x2Range: range }]);
|
132
|
+
numberLinePage.steps.verifyCorrectAnswerSectionNotExist();
|
133
|
+
numberLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
134
|
+
cy.log('When the user attempts the question correctly then the user should be awarded with full points and on selecting Check answer the attempted number line should be displayed correct and the correct answer section number line should not be displayed')
|
135
|
+
numberLinePage.steps.checkAnswer();
|
136
|
+
numberLinePage.steps.verifyCorrectPointsOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
137
|
+
numberLinePage.steps.verifyCorrectPointsOnNumberLinePreviewTab([{ x: -4, xRange: range }, { x: -5, xRange: range }]);
|
138
|
+
numberLinePage.steps.verifyCorrectLineSegmentOnNumberLinePreviewTab([{ x1: -5, x1Range: range, x2: -4, x2Range: range }]);
|
139
|
+
numberLinePage.steps.verifyCorrectAnswerSectionNotExist();
|
140
|
+
});
|
141
|
+
});
|
142
|
+
|
143
|
+
describe('Question preview: Auto scored - Partial equal weights: Minimum scoring', () => {
|
144
|
+
abortEarlySetup();
|
145
|
+
before(() => {
|
146
|
+
numberLinePage.steps.navigateToCreateQuestion('Number line');
|
147
|
+
cy.barsPreLoaderWait();
|
148
|
+
numberLinePage.steps.addTextInQuestionInstructionsInputField('Plot points on the number line');
|
149
|
+
numberLinePage.steps.selectToolOptions(unselectedToolOption);
|
150
|
+
numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Point');
|
151
|
+
numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer([{ x: 2, xRange: range }]);
|
152
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer([{ x: 2, xRange: range }]);
|
153
|
+
numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Segment right/up hollow pt');
|
154
|
+
numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer([{ x: -4, xRange: range }]);
|
155
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer([{ x: -4, xRange: range }, { x: -5, xRange: range }]);
|
156
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLineSpecifyCorrectAnswer([{ x1: -5, x1Range: range, x2: -4, x2Range: range }]);
|
157
|
+
numberLinePage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
158
|
+
numberLinePage.steps.allotPoints(20);
|
159
|
+
numberLinePage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
160
|
+
});
|
161
|
+
|
162
|
+
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', () => {
|
163
|
+
numberLinePage.steps.expandMinimumScoringDropdown();
|
164
|
+
numberLinePage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
|
165
|
+
numberLinePage.steps.allotMinimumPoints(2);
|
166
|
+
numberLinePage.steps.switchToPreviewTab();
|
167
|
+
numberLinePage.steps.switchToGradingView();
|
168
|
+
numberLinePage.steps.verifyPreviewScore(2, 20);
|
169
|
+
numberLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
170
|
+
});
|
171
|
+
|
172
|
+
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', () => {
|
173
|
+
numberLinePage.steps.resetQuestionPreview();
|
174
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Segment');
|
175
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 8, xRange: range }]);
|
176
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 8, xRange: range }, { x: 7, xRange: range }]);
|
177
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLinePreviewTab([{ x1: 8, x1Range: range, x2: 7, x2Range: range }]);
|
178
|
+
numberLinePage.steps.verifyPreviewScore(2, 20);
|
179
|
+
numberLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
180
|
+
});
|
181
|
+
|
182
|
+
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', () => {
|
183
|
+
numberLinePage.steps.switchToEditTab();
|
184
|
+
numberLinePage.steps.expandMinimumScoringDropdown();
|
185
|
+
numberLinePage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
186
|
+
numberLinePage.steps.allotMinimumPoints(2);
|
187
|
+
numberLinePage.steps.switchToPreviewTab();
|
188
|
+
numberLinePage.steps.switchToGradingView();
|
189
|
+
numberLinePage.steps.verifyPreviewScore(0, 20);
|
190
|
+
numberLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
191
|
+
});
|
192
|
+
|
193
|
+
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', () => {
|
194
|
+
numberLinePage.steps.resetQuestionPreview();
|
195
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Segment');
|
196
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 8, xRange: range }]);
|
197
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 8, xRange: range }, { x: 7, xRange: range }]);
|
198
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLinePreviewTab([{ x1: 8, x1Range: range, x2: 7, x2Range: range }]);
|
199
|
+
numberLinePage.steps.verifyPreviewScore(2, 20);
|
200
|
+
});
|
201
|
+
});
|
202
|
+
|
203
|
+
describe('Question preview: Auto scored - Partial equal weights: Rounding', () => {
|
204
|
+
abortEarlySetup();
|
205
|
+
before(() => {
|
206
|
+
numberLinePage.steps.navigateToCreateQuestion('Number line');
|
207
|
+
cy.barsPreLoaderWait();
|
208
|
+
numberLinePage.steps.selectToolOptions(unselectedToolOption);
|
209
|
+
numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Point');
|
210
|
+
numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer([{ x: 2, xRange: range }]);
|
211
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer([{ x: 2, xRange: range }]);
|
212
|
+
numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Segment right/up hollow pt');
|
213
|
+
numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer([{ x: -4, xRange: range }]);
|
214
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer([{ x: -4, xRange: range }, { x: -5, xRange: range }]);
|
215
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLineSpecifyCorrectAnswer([{ x1: -5, x1Range: range, x2: -4, x2Range: range }]);
|
216
|
+
numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Right/up ray');
|
217
|
+
numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer([{ x: 3, xRange: range }]);
|
218
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer([{ x: 3, xRange: range }]);
|
219
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLineSpecifyCorrectAnswer([{ x1: 3, x1Range: range, x2: 8.69, x2Range: range }]);
|
220
|
+
numberLinePage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
221
|
+
});
|
222
|
+
|
223
|
+
it('When the user sets \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an response such that points of the correctly attempted responses 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', () => {
|
224
|
+
numberLinePage.steps.expandRoundingDropdown();
|
225
|
+
numberLinePage.steps.selectOptionFromRoundingDropdown('round down if <= 0.99');
|
226
|
+
numberLinePage.steps.allotPoints(11);
|
227
|
+
numberLinePage.steps.switchToPreviewTab();
|
228
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Point');
|
229
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
230
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
231
|
+
numberLinePage.steps.verifyPreviewScore(3, 11);
|
232
|
+
});
|
233
|
+
|
234
|
+
it('When the user has set \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value equal to 0.99, then the points awarded should be rounded down to the nearest integer value', () => {
|
235
|
+
cy.log('Points allocation based on the test case requirements.');
|
236
|
+
numberLinePage.steps.switchToEditTab();
|
237
|
+
numberLinePage.steps.allotPoints(8.97);
|
238
|
+
numberLinePage.steps.switchToPreviewTab();
|
239
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Point');
|
240
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
241
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
242
|
+
numberLinePage.steps.verifyPreviewScore(2, 8.97);
|
243
|
+
});
|
244
|
+
|
245
|
+
it('When the user sets \'Rounding\' to \'Round down if <=0.50\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value less than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
246
|
+
numberLinePage.steps.switchToEditTab();
|
247
|
+
numberLinePage.steps.expandRoundingDropdown();
|
248
|
+
numberLinePage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50');
|
249
|
+
cy.log('Points allocation based on the test case requirements.');
|
250
|
+
numberLinePage.steps.allotPoints(10);
|
251
|
+
numberLinePage.steps.switchToPreviewTab();
|
252
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Point');
|
253
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
254
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
255
|
+
numberLinePage.steps.verifyPreviewScore(3, 10);
|
256
|
+
});
|
257
|
+
|
258
|
+
it('When the user has set \'Rounding\' to \'Round down if <=0.50\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value equal to 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
259
|
+
cy.log('Points allocation based on the test case requirements.');
|
260
|
+
numberLinePage.steps.switchToEditTab();
|
261
|
+
numberLinePage.steps.allotPoints(4.5);
|
262
|
+
numberLinePage.steps.switchToPreviewTab();
|
263
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Point');
|
264
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
265
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
266
|
+
numberLinePage.steps.verifyPreviewScore(1, 4.5);
|
267
|
+
});
|
268
|
+
|
269
|
+
it('When the user sets \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value less than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
270
|
+
numberLinePage.steps.switchToEditTab();
|
271
|
+
numberLinePage.steps.expandRoundingDropdown();
|
272
|
+
numberLinePage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50; Round up if > 0.50');
|
273
|
+
cy.log('Points allocation based on the test case requirements.');
|
274
|
+
numberLinePage.steps.allotPoints(10);
|
275
|
+
numberLinePage.steps.switchToPreviewTab();
|
276
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Point');
|
277
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
278
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
279
|
+
numberLinePage.steps.verifyPreviewScore(3, 10);
|
280
|
+
});
|
281
|
+
|
282
|
+
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 response such that points of the correctly attempted responses has decimal value equal to 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
283
|
+
cy.log('Points allocation based on the test case requirements.');
|
284
|
+
numberLinePage.steps.switchToEditTab();
|
285
|
+
numberLinePage.steps.allotPoints(4.5);
|
286
|
+
numberLinePage.steps.switchToPreviewTab();
|
287
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Point');
|
288
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
289
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
290
|
+
numberLinePage.steps.verifyPreviewScore(1, 4.5);
|
291
|
+
});
|
292
|
+
|
293
|
+
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 response such that points of the correctly attempted responses has decimal value greater than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
294
|
+
cy.log('Points allocation based on the test case requirements.');
|
295
|
+
numberLinePage.steps.switchToEditTab();
|
296
|
+
numberLinePage.steps.allotPoints(11);
|
297
|
+
numberLinePage.steps.switchToPreviewTab();
|
298
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Point');
|
299
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
300
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
301
|
+
numberLinePage.steps.verifyPreviewScore(4, 11);
|
302
|
+
});
|
303
|
+
|
304
|
+
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', () => {
|
305
|
+
cy.log('Pre-step: Setting penalty scoring to \'Penalty points for the entire question\', allotting penalty points')
|
306
|
+
numberLinePage.steps.switchToEditTab();
|
307
|
+
numberLinePage.steps.expandPenaltyScoringDropdown();
|
308
|
+
numberLinePage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
|
309
|
+
numberLinePage.steps.allotPenaltyPoints(4);
|
310
|
+
numberLinePage.steps.switchToPreviewTab();
|
311
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Segment');
|
312
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 8, xRange: range }]);
|
313
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 8, xRange: range }, { x: 7, xRange: range }]);
|
314
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLinePreviewTab([{ x1: 8, x1Range: range, x2: 7, x2Range: range }]);
|
315
|
+
numberLinePage.steps.verifyPreviewScore(0, 11);
|
316
|
+
});
|
317
|
+
|
318
|
+
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', () => {
|
319
|
+
numberLinePage.steps.switchToEditTab();
|
320
|
+
numberLinePage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
|
321
|
+
numberLinePage.steps.switchToPreviewTab();
|
322
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Segment');
|
323
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 8, xRange: range }]);
|
324
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 8, xRange: range }, { x: 7, xRange: range }]);
|
325
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLinePreviewTab([{ x1: 8, x1Range: range, x2: 7, x2Range: range }]);
|
326
|
+
numberLinePage.steps.verifyPreviewScore(-4, 11);
|
327
|
+
});
|
328
|
+
});
|
329
|
+
|
330
|
+
describe('Question preview: Auto scored - Partial equal weights: Penalty scoring with \'Round negative score to zero\' unchecked', () => {
|
331
|
+
abortEarlySetup();
|
332
|
+
before(() => {
|
333
|
+
numberLinePage.steps.navigateToCreateQuestion('Number line');
|
334
|
+
cy.barsPreLoaderWait();
|
335
|
+
numberLinePage.steps.selectToolOptions(unselectedToolOption);
|
336
|
+
numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Point');
|
337
|
+
numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer([{ x: 2, xRange: range }]);
|
338
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer([{ x: 2, xRange: range }]);
|
339
|
+
numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Segment right/up hollow pt');
|
340
|
+
numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer([{ x: -4, xRange: range }]);
|
341
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer([{ x: -4, xRange: range }, { x: -5, xRange: range }]);
|
342
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLineSpecifyCorrectAnswer([{ x1: -5, x1Range: range, x2: -4, x2Range: range }]);
|
343
|
+
numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Right/up ray');
|
344
|
+
numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer([{ x: 3, xRange: range }]);
|
345
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer([{ x: 3, xRange: range }]);
|
346
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLineSpecifyCorrectAnswer([{ x1: 3, x1Range: range, x2: 8.69, x2Range: range }]);
|
347
|
+
numberLinePage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
348
|
+
numberLinePage.steps.allotPoints(27);
|
349
|
+
numberLinePage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
350
|
+
});
|
351
|
+
|
352
|
+
//Penalty points for the entire question
|
353
|
+
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', () => {
|
354
|
+
numberLinePage.steps.expandPenaltyScoringDropdown();
|
355
|
+
numberLinePage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
|
356
|
+
numberLinePage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
|
357
|
+
numberLinePage.steps.allotPenaltyPoints(2);
|
358
|
+
numberLinePage.steps.switchToPreviewTab();
|
359
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Segment');
|
360
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 8, xRange: range }]);
|
361
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 8, xRange: range }, { x: 7, xRange: range }]);
|
362
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLinePreviewTab([{ x1: 8, x1Range: range, x2: 7, x2Range: range }]);
|
363
|
+
numberLinePage.steps.verifyPreviewScore(-2, 27);
|
364
|
+
});
|
365
|
+
|
366
|
+
it('When the user attempts the question correctly along with an incorrect response, then penalty points should get deducted from the awarded points', () => {
|
367
|
+
numberLinePage.steps.resetQuestionPreview();
|
368
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Point');
|
369
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
370
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 2, xRange: range }]);
|
371
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Segment');
|
372
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 8, xRange: range }]);
|
373
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 8, xRange: range }, { x: 7, xRange: range }]);
|
374
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLinePreviewTab([{ x1: 8, x1Range: range, x2: 7, x2Range: range }]);
|
375
|
+
numberLinePage.steps.verifyPreviewScore(7, 27);
|
376
|
+
});
|
377
|
+
|
378
|
+
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', () => {
|
379
|
+
numberLinePage.steps.resetQuestionPreview();
|
380
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Point');
|
381
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 2, xRange: range }, { x: 0, xRange: range }]);
|
382
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 2, xRange: range }, { x: 0, xRange: range }]);
|
383
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Segment');
|
384
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 8, xRange: range }]);
|
385
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 8, xRange: range }, { x: 7, xRange: range }]);
|
386
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLinePreviewTab([{ x1: 8, x1Range: range, x2: 7, x2Range: range }]);
|
387
|
+
numberLinePage.steps.verifyPreviewScore(7, 27);
|
388
|
+
});
|
389
|
+
|
390
|
+
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', () => {
|
391
|
+
numberLinePage.steps.switchToEditTab();
|
392
|
+
numberLinePage.steps.expandMinimumScoringDropdown();
|
393
|
+
numberLinePage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
394
|
+
numberLinePage.steps.allotMinimumPoints(3);
|
395
|
+
numberLinePage.steps.switchToPreviewTab();
|
396
|
+
numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Segment');
|
397
|
+
numberLinePage.steps.plotPointOnNumberLinePreviewTab([{ x: 8, xRange: range }]);
|
398
|
+
numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab([{ x: 8, xRange: range }, { x: 7, xRange: range }]);
|
399
|
+
numberLinePage.steps.verifyLineSegmentOnNumberLinePreviewTab([{ x1: 8, x1Range: range, x2: 7, x2Range: range }]);
|
400
|
+
numberLinePage.steps.verifyPreviewScore(3, 27);
|
401
|
+
cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
|
402
|
+
numberLinePage.steps.switchToEditTab();
|
403
|
+
numberLinePage.steps.expandMinimumScoringDropdown();
|
404
|
+
numberLinePage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
|
405
|
+
});
|
406
|
+
});
|
407
|
+
});
|