itemengine-cypress-automation 1.0.129 → 1.0.131-updateILCrepo6March-02c78d1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +210 -0
  2. package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +91 -0
  3. package/cypress/e2e/ILC/ContentBlocks/styleAndLayoutCustomizationSection.js +392 -0
  4. package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +1 -1
  5. package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +1 -1
  6. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +2 -1
  7. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +2 -1
  8. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +1 -0
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +152 -0
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +196 -0
  11. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +195 -0
  12. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +288 -0
  13. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/manuallyAndNonScored.js +141 -0
  14. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +245 -0
  15. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +413 -0
  16. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +218 -0
  17. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +245 -0
  18. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +163 -0
  19. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +224 -0
  20. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +196 -0
  21. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +224 -0
  22. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +83 -0
  23. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +653 -0
  24. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +180 -0
  25. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabScoringSection.js +229 -0
  26. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/specifyCorrectAnswerSection.js +90 -0
  27. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/switchingCasesBetweenOptionsLayout.js +50 -0
  28. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +204 -0
  29. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +204 -0
  30. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +298 -0
  31. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingPenaltyScoring.js +63 -0
  32. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/manuallyAndNonScored.js +111 -0
  33. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +231 -0
  34. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsBasic.js +90 -0
  35. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
  36. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +232 -0
  37. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +231 -0
  38. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsBasic.js +138 -0
  39. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +213 -0
  40. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +186 -0
  41. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +214 -0
  42. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAndDropdownMenuSection.js +161 -0
  43. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +328 -0
  44. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +144 -0
  45. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabScoringSection.js +250 -0
  46. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +75 -0
  47. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  48. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +74 -0
  49. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +188 -0
  50. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +8 -8
  51. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
  52. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +4 -2
  53. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +1 -52
  54. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +3 -211
  55. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +39 -3
  56. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -8
  57. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -1
  58. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -50
  59. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/conditionalCheckboxScoring.js +325 -0
  60. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +1 -146
  61. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
  62. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +78 -0
  63. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +265 -0
  64. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +75 -0
  65. package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  66. package/cypress/e2e/ILC/FillInTheGapsTextNew/responseAnswersAndAcceptedStudentInput.js +56 -0
  67. package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +40 -2
  68. package/cypress/e2e/ILC/FillInTheGapsTextNew/specialCharactersSection.js +249 -0
  69. package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +64 -0
  70. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +128 -0
  71. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +889 -0
  72. package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +168 -0
  73. package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +203 -0
  74. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +222 -0
  75. package/cypress/e2e/ILC/SimpleCalculator/calculatorFunctionality.js +349 -0
  76. package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +132 -0
  77. package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +35 -7
  78. package/cypress/e2e/ILC/UploadResponse/studentViewSettingsSection.js +213 -0
  79. package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +41 -0
  80. package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +377 -0
  81. package/cypress/e2e/ILC/UploadResponse/uploadResponsePreview.js +161 -0
  82. package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +250 -0
  83. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
  84. package/cypress/fixtures/theme/ilc.json +6 -1
  85. package/cypress/fixtures/uploadResponseFileType.js +5 -0
  86. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +13 -13
  87. package/cypress/pages/components/customizeSpecialCharacterComponent.js +24 -6
  88. package/cypress/pages/components/draggableOptionContainer.js +1 -0
  89. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +42 -4
  90. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +149 -5
  91. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +954 -77
  92. package/cypress/pages/components/questionInputFieldComponent.js +1 -1
  93. package/cypress/pages/components/questionInstructionsComponent.js +2 -1
  94. package/cypress/pages/contentBlocksPage.js +515 -0
  95. package/cypress/pages/drawingResponsePage.js +2 -2
  96. package/cypress/pages/fillInTheGapsDragAndDropPage.js +359 -3
  97. package/cypress/pages/fillInTheGapsDropdownPage.js +21 -1
  98. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +5 -57
  99. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +3 -24
  100. package/cypress/pages/fillInTheGapsOverImageTextPage.js +1 -435
  101. package/cypress/pages/fillInTheGapsTextPage.js +9 -2
  102. package/cypress/pages/graphingPage.js +484 -0
  103. package/cypress/pages/index.js +4 -1
  104. package/cypress/pages/simpleCalculatorPage.js +310 -0
  105. package/cypress/pages/uploadResponsePage.js +260 -92
  106. package/package.json +2 -2
  107. package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +0 -242
  108. package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +0 -99
  109. package/cypress/e2e/ILC/Passage/passageEditTab.js +0 -241
  110. package/cypress/e2e/ILC/Passage/passageHeaderSection.js +0 -73
  111. package/cypress/e2e/ILC/Passage/passagePreviewTab.js +0 -246
@@ -0,0 +1,889 @@
1
+ import { graphingPage, gradingViewPage, itemPreviewPage, studentViewPage, dialogBoxBase } from "../../../pages";
2
+ import { equationEditorFlyout } from "../../../pages/components";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ import utilities from "../../../support/helpers/utilities";
5
+ const grepTags = Cypress.env('grepTags');
6
+ let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
7
+ const unselectedToolOption = ['Circle', 'Parabola', 'Sine', 'Polygon'];
8
+ const views = utilities.getViews(correctAnswerViews);
9
+ var itemReferenceID = "";
10
+ const css = Cypress.env('css');
11
+
12
+ describe('Create Item page - Graphing: All or nothing ', () => {
13
+ before(() => {
14
+ cy.loginAs('admin');
15
+ });
16
+
17
+ if (!grepTags || !grepTags.includes('smoke')) {
18
+ describe('Question preview modes: Student view and Grading view', () => {
19
+ abortEarlySetup();
20
+ before(() => {
21
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
22
+ cy.barsPreLoaderWait();
23
+ graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
24
+ graphingPage.steps.selectToolOptions(unselectedToolOption);
25
+ graphingPage.steps.checkSnapToGridCheckbox();
26
+ graphingPage.steps.checkPatternBackground();
27
+ graphingPage.steps.selectGraphToolOptionEditTab('Line');
28
+ graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
29
+ graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
30
+ graphingPage.steps.selectGraphToolOptionEditTab('Circle');
31
+ graphingPage.steps.plotPointsOnGraphEditTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
32
+ graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
33
+ graphingPage.steps.switchToPreviewTab();
34
+ });
35
+
36
+ graphingPage.tests.verifyPreviewModesAndScoreWhenPointsAndCorrectAnswersIsNotSet();
37
+
38
+ it('When the user sets correct answer responses and allots points, then the alloted points should be displayed in the preview tab', () => {
39
+ graphingPage.steps.switchToEditTab();
40
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Polygon');
41
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: -3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: -4, yRange: 20 }, { x: -3, xRange: 20, y: 4, yRange: 20 }]);
42
+ graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: -3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: -4, yRange: 20 }, { x: -3, xRange: 20, y: 4, yRange: 20 }]);
43
+ graphingPage.steps.allotPoints(20);
44
+ graphingPage.steps.switchToPreviewTab();
45
+ graphingPage.steps.verifyPreviewScore(0, 20);
46
+ });
47
+
48
+ it('When the user attempts question in preview tab and switches to edit tab, then on re-switching to the preview tab, users response should not persist', () => {
49
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Polygon');
50
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: -4, yRange: 20 }, { x: -3, xRange: 20, y: 4, yRange: 20 }]);
51
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: -3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: -4, yRange: 20 }, { x: -3, xRange: 20, y: 4, yRange: 20 }]);
52
+ utilities.verifyElementVisibilityState(graphingPage.graphPolygonPreviewTab(), 'visible');
53
+ graphingPage.steps.resetQuestionPreview();
54
+ utilities.verifyElementVisibilityState(graphingPage.graphPolygonPreviewTab(), 'notExist');
55
+ });
56
+ });
57
+ };
58
+
59
+ views.forEach((view) => {
60
+ describe(`Graphing: All or nothing scoring - ${view}`, { tags: 'smoke' }, () => {
61
+ abortEarlySetup();
62
+ before(() => {
63
+ switch (view) {
64
+ case 'Question preview':
65
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
66
+ cy.barsPreLoaderWait();
67
+ graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
68
+ graphingPage.steps.selectToolOptions(unselectedToolOption);
69
+ graphingPage.steps.checkPatternBackground();
70
+ graphingPage.steps.checkSnapToGridCheckbox();
71
+ graphingPage.steps.selectGraphToolOptionEditTab('Line');
72
+ graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
73
+ graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
74
+ graphingPage.steps.selectGraphToolOptionEditTab('Circle');
75
+ graphingPage.steps.plotPointsOnGraphEditTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
76
+ graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
77
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Polygon');
78
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
79
+ graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
80
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Vector');
81
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
82
+ graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
83
+ graphingPage.steps.allotPoints(20);
84
+ graphingPage.steps.switchToPreviewTab();
85
+ break;
86
+ case 'Item preview':
87
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
88
+ itemPreviewPage.steps.switchToPreviewTab();
89
+ break;
90
+ case 'Grading view':
91
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
92
+ break;
93
+ }
94
+ });
95
+
96
+ beforeEach(() => {
97
+ switch (view) {
98
+ case 'Question preview':
99
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
100
+ graphingPage.steps.resetQuestionPreview();
101
+ break;
102
+ case 'Item preview':
103
+ itemPreviewPage.steps.switchToStudentView();
104
+ itemPreviewPage.steps.resetQuestionPreview();
105
+ break;
106
+ case 'Grading view':
107
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
108
+ break;
109
+ }
110
+ });
111
+
112
+ if (view === 'Question preview') {
113
+ after(() => {
114
+ graphingPage.steps.clickOnSaveQuestionButton();
115
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
116
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
117
+ });
118
+ };
119
+
120
+ it('When the user selects \'Grading\' view without attempting the question, the correct answer should be displayed in the correct answer section graph', () => {
121
+ if (view === 'Grading view') {
122
+ studentViewPage.steps.submitResponse();
123
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
124
+ studentViewPage.steps.clickOnGoToGradingViewButton();
125
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
126
+ }
127
+ if (view === 'Question preview' || view === 'Item preview') {
128
+ graphingPage.steps.switchToGradingView();
129
+ graphingPage.steps.verifyPreviewScore(0, 20);
130
+ }
131
+ //Preview tab
132
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
133
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
134
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
135
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
136
+
137
+ //Correct answer section
138
+ utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 1);
139
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
140
+ utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 2);
141
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
142
+ utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
143
+
144
+ //Correct/incorrect icon
145
+ utilities.verifyElementVisibilityState(graphingPage.correctIncorrectStatusMessageText(), 'notExist');
146
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
147
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
148
+ });
149
+
150
+ it('When the user attempts the question incorrectly then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the attempted graph should be displayed incorrect and the the correct answers should be displayed in the correct answer section graph', () => {
151
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Circle');
152
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -2, xRange: 20, y: 1, yRange: 20 }, { x: -4, xRange: 20, y: 1, yRange: 20 }]);
153
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: -2, xRange: 20, y: 1, yRange: 20 }, { x: -4, xRange: 20, y: 1, yRange: 20 }]);
154
+ if (view === 'Grading view') {
155
+ studentViewPage.steps.submitResponse();
156
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
157
+ studentViewPage.steps.clickOnGoToGradingViewButton();
158
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
159
+ }
160
+ if (view === 'Question preview' || view === 'Item preview') {
161
+ graphingPage.steps.verifyPreviewScore(0, 20);
162
+ graphingPage.steps.switchToGradingView();
163
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 2);
164
+ }
165
+ //Preview tab
166
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
167
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: -2, xRange: 20, y: 1, yRange: 20 }, { x: -4, xRange: 20, y: 1, yRange: 20 }]);
168
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
169
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
170
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: -2, xRange: 20, y: 1, yRange: 20 }, { x: -4, xRange: 20, y: 1, yRange: 20 }]);
171
+
172
+ //Correct answer section
173
+ utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 1);
174
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
175
+ utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 2);
176
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
177
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
178
+ utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
179
+
180
+ //Correct/incorrect icon
181
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
182
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
183
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
184
+ });
185
+
186
+ it('When the user attempts the question partially correct then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the attempted graph should be displayed correct and the the correct answers should be displayed in the correct answer section graph', () => {
187
+ if (view === 'Grading view') {
188
+ studentViewPage.steps.clearResponses();
189
+ }
190
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Vector');
191
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
192
+ if (view === 'Grading view') {
193
+ studentViewPage.steps.submitResponse();
194
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
195
+ studentViewPage.steps.clickOnGoToGradingViewButton();
196
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
197
+ }
198
+ if (view === 'Question preview' || view === 'Item preview') {
199
+ graphingPage.steps.verifyPreviewScore(0, 20);
200
+ graphingPage.steps.switchToGradingView();
201
+ utilities.verifyElementCount(graphingPage.graphLineSegmentsPreviewTab(), 1);
202
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
203
+ }
204
+ //Preview tab
205
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
206
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
207
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
208
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
209
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
210
+
211
+ //Correct answer section
212
+ utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 1);
213
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
214
+ utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 2);
215
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
216
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
217
+ utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
218
+
219
+ //Correct/incorrect icon
220
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
221
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
222
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
223
+ });
224
+
225
+ it('When the user attempts the question partially correct with an incorrect response then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the attempted graph 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 graph', () => {
226
+ if (view === 'Grading view') {
227
+ studentViewPage.steps.clearResponses();
228
+ }
229
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Polygon');
230
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: -4, yRange: 20 }, { x: -3, xRange: 20, y: 4, yRange: 20 }]);
231
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Polygon');
232
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
233
+ if (view === 'Grading view') {
234
+ studentViewPage.steps.submitResponse();
235
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
236
+ studentViewPage.steps.clickOnGoToGradingViewButton();
237
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
238
+ }
239
+ if (view === 'Question preview' || view === 'Item preview') {
240
+ graphingPage.steps.verifyPreviewScore(0, 20);
241
+ graphingPage.steps.switchToGradingView();
242
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
243
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
244
+ utilities.verifyElementCount(graphingPage.graphPolygonPreviewTab(), 2);
245
+ }
246
+ //Preview tab
247
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
248
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
249
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: -3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: -4, yRange: 20 }, { x: -3, xRange: 20, y: 4, yRange: 20 }]);
250
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
251
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
252
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: -3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: -4, yRange: 20 }, { x: -3, xRange: 20, y: 4, yRange: 20 }]);
253
+
254
+ //Correct answer section
255
+ utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 1);
256
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
257
+ utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 2);
258
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
259
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
260
+ utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
261
+
262
+ //Correct/incorrect icon
263
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
264
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
265
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
266
+ });
267
+
268
+ it('When the user attempts the question correctly then the user should be awarded with full points and on switching to grading view \'Your answer is correct\' should be displayed and the attempted graph should be displayed correct and the correct answer section graph should not be displayed', () => {
269
+ if (view === 'Grading view') {
270
+ studentViewPage.steps.clearResponses();
271
+ }
272
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Polygon');
273
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
274
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Vector');
275
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
276
+
277
+ if (view === 'Grading view') {
278
+ studentViewPage.steps.submitResponse();
279
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
280
+ studentViewPage.steps.clickOnGoToGradingViewButton();
281
+ gradingViewPage.steps.verifyGradingViewScore(20, 20);
282
+ }
283
+ if (view === 'Question preview' || view === 'Item preview') {
284
+ graphingPage.steps.verifyPreviewScore(20, 20);
285
+ graphingPage.steps.switchToGradingView();
286
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
287
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
288
+ utilities.verifyElementCount(graphingPage.graphPolygonPreviewTab(), 1);
289
+ }
290
+ //Preview tab
291
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
292
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
293
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
294
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
295
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
296
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
297
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
298
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
299
+ });
300
+ });
301
+ });
302
+
303
+ describe('Graphing: Line tool - All or nothing', { tags: 'smoke' }, () => {
304
+ abortEarlySetup();
305
+ before(() => {
306
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
307
+ cy.barsPreLoaderWait();
308
+ graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
309
+ graphingPage.steps.checkPatternBackground();
310
+ graphingPage.steps.checkSnapToGridCheckbox();
311
+ graphingPage.steps.selectGraphToolOptionEditTab('Line');
312
+ graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
313
+ graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
314
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Line');
315
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 4, yRange: 20 }]);
316
+ graphingPage.steps.allotPoints(20);
317
+ graphingPage.steps.switchToPreviewTab();
318
+ });
319
+
320
+ it('When user attempts the question using the same point on the graph then the answer should be treated as correct', () => {
321
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Line');
322
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 4, yRange: 20 }]);
323
+ graphingPage.steps.switchToGradingView();
324
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 4, yRange: 20 }]);
325
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
326
+ });
327
+
328
+ it('When user attempts the question using different points but the same line then they should be treated as correct', () => {
329
+ graphingPage.steps.resetQuestionPreview();
330
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Line');
331
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 2, xRange: 20, y: 6, yRange: 20 }]);
332
+ graphingPage.steps.switchToGradingView();
333
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 2, xRange: 20, y: 6, yRange: 20 }]);
334
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
335
+ });
336
+
337
+ it('When the user attempts the question by clicking an extra point on the line then it should be treated as incorrect', () => {
338
+ graphingPage.steps.resetQuestionPreview();
339
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Line');
340
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 4, yRange: 20 }]);
341
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Point');
342
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -4, xRange: 20, y: -4, yRange: 20 }]);
343
+ graphingPage.steps.switchToGradingView();
344
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 4, yRange: 20 }]);
345
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: -4, xRange: 20, y: -4, yRange: 20 }]);
346
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
347
+ });
348
+
349
+ it('When the user attempts the question by plotting only points and the line is not created then it should be treated as correct', () => {
350
+ graphingPage.steps.resetQuestionPreview();
351
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Point');
352
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 4, yRange: 20 }]);
353
+ graphingPage.steps.switchToGradingView();
354
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 4, yRange: 20 }]);
355
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
356
+ });
357
+
358
+ it('When the user attempts the question using any other tool apart from \'Line\' then it should be treated as incorrect', () => {
359
+ graphingPage.steps.resetQuestionPreview();
360
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Segment');
361
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 4, yRange: 20 }]);
362
+ graphingPage.steps.switchToGradingView();
363
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 4, yRange: 20 }]);
364
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
365
+ });
366
+ });
367
+
368
+ describe('Graphing: Point and label tool - All or nothing', { tags: 'smoke' }, () => {
369
+ abortEarlySetup();
370
+ before(() => {
371
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
372
+ cy.barsPreLoaderWait();
373
+ graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
374
+ graphingPage.steps.checkPatternBackground();
375
+ graphingPage.steps.checkSnapToGridCheckbox();
376
+ graphingPage.steps.selectGraphToolOptionEditTab('Line');
377
+ graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
378
+ graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
379
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Point');
380
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 1, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 3, yRange: 20 }]);
381
+ graphingPage.steps.allotPoints(20);
382
+ graphingPage.steps.switchToPreviewTab();
383
+ });
384
+
385
+ it('When the user attempts the question with all the points as set in the specify correct answer section then the answer should be treated as correct', () => {
386
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Point');
387
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 3, yRange: 20 }]);
388
+ graphingPage.steps.switchToGradingView();
389
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 3, yRange: 20 }]);
390
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
391
+ });
392
+
393
+ it('When the user attempts the question with partial points then the answer should be treated as incorrect', () => {
394
+ graphingPage.steps.resetQuestionPreview();
395
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Point');
396
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }]);
397
+ graphingPage.steps.switchToGradingView();
398
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }]);
399
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
400
+ });
401
+
402
+ it('When the user attempts the question with the correct points and an incorrect point then the answer should be treated as incorrect', () => {
403
+ graphingPage.steps.resetQuestionPreview();
404
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Point');
405
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 3, yRange: 20 }, { x: -4, xRange: 20, y: -2, yRange: 20 }]);
406
+ graphingPage.steps.switchToGradingView();
407
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 3, yRange: 20 }]);
408
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: -4, xRange: 20, y: -2, yRange: 20 }])
409
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
410
+ });
411
+
412
+ //Label
413
+ it('When the user tries to add an label without attempting the question, the user should not be able to do so', () => {
414
+ graphingPage.steps.switchToEditTab();
415
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Label');
416
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 1, xRange: 20, y: 1, yRange: 20 }]);
417
+ graphingPage.steps.enterTextInGraphLabelInputField('This is a text label');
418
+ graphingPage.steps.switchToPreviewTab();
419
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Label');
420
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 2, xRange: 20, y: 2, yRange: 20 }]);
421
+ utilities.verifyElementVisibilityState(graphingPage.graphLabelInputField(), 'notExist');
422
+ });
423
+
424
+ it('When the user attempts the question without the label then the answer should be treated as incorrect', () => {
425
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Point');
426
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 3, yRange: 20 }]);
427
+ graphingPage.steps.switchToGradingView();
428
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 3, yRange: 20 }]);
429
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
430
+ });
431
+
432
+ it('When the user attempts the question and then adds the label as set in the specify correct answer section then the answer should be treated as correct', () => {
433
+ graphingPage.steps.resetQuestionPreview();
434
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Point');
435
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 3, yRange: 20 }]);
436
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Label');
437
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }]);
438
+ graphingPage.steps.enterTextInGraphLabelInputField('This is a text label');
439
+ graphingPage.steps.switchToGradingView();
440
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 3, yRange: 20 }]);
441
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
442
+ graphingPage.graphLabelInputField()
443
+ .verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
444
+ utilities.verifyCSS(graphingPage.graphLabelInputField(), {
445
+ 'border-color': css.color.correctAnswer
446
+ });
447
+ });
448
+
449
+ it('When the user attempts the question with incorrect casing of the label then the answer should be treated as incorrect', () => {
450
+ graphingPage.steps.resetQuestionPreview();
451
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Point');
452
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 3, yRange: 20 }]);
453
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Label');
454
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }]);
455
+ graphingPage.steps.enterTextInGraphLabelInputField('this is a text label');
456
+ graphingPage.steps.switchToGradingView();
457
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 3, yRange: 20 }]);
458
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
459
+ graphingPage.graphLabelInputField()
460
+ .verifyPseudoClassBeforeProperty('color', css.color.incorrectAnswer);
461
+ utilities.verifyCSS(graphingPage.graphLabelInputField(), {
462
+ 'border-color': css.color.incorrectAnswer
463
+ });
464
+ });
465
+
466
+ it('When the user attempts the question with the label at incorrect point then the answer should be treated as incorrect', () => {
467
+ graphingPage.steps.resetQuestionPreview();
468
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Point');
469
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 3, yRange: 20 }]);
470
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Label');
471
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 2, xRange: 20, y: 2, yRange: 20 }]);
472
+ graphingPage.steps.enterTextInGraphLabelInputField('This is a text label');
473
+ graphingPage.steps.switchToGradingView();
474
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 3, yRange: 20 }]);
475
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
476
+ graphingPage.graphLabelInputField()
477
+ .verifyPseudoClassBeforeProperty('color', css.color.incorrectAnswer);
478
+ utilities.verifyCSS(graphingPage.graphLabelInputField(), {
479
+ 'border-color': css.color.incorrectAnswer
480
+ });
481
+ });
482
+ });
483
+
484
+ describe('Graphing: Ray tool - All or nothing', { tags: 'smoke' }, () => {
485
+ abortEarlySetup();
486
+ before(() => {
487
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
488
+ cy.barsPreLoaderWait();
489
+ graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
490
+ graphingPage.steps.checkPatternBackground();
491
+ graphingPage.steps.checkSnapToGridCheckbox();
492
+ graphingPage.steps.selectGraphToolOptionEditTab('Line');
493
+ graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
494
+ graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
495
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Ray');
496
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 6, yRange: 20 }]);
497
+ graphingPage.steps.allotPoints(20);
498
+ graphingPage.steps.switchToPreviewTab();
499
+ });
500
+
501
+ it('When the user attempts the question correctly with the same points as set in the Specify correct answer section then the answer should be treated as correct', () => {
502
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Ray');
503
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 6, yRange: 20 }]);
504
+ graphingPage.steps.switchToGradingView();
505
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 6, yRange: 20 }]);
506
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
507
+ });
508
+
509
+ it('When the user attempts the question correctly with the different points as set in the Specify correct answer section then the answer should be treated as incorrect', () => {
510
+ graphingPage.steps.resetQuestionPreview();
511
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Ray');
512
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 7, xRange: 20, y: 7, yRange: 20 }]);
513
+ graphingPage.steps.switchToGradingView();
514
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 7, xRange: 20, y: 7, yRange: 20 }]);
515
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
516
+ });
517
+
518
+ it('When the user attempts the question correctly but using combination of \'Segment\' and \'Ray\' then the answer should be treated as incorrect', () => {
519
+ graphingPage.steps.resetQuestionPreview();
520
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Segment');
521
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 3, xRange: 20, y: 3, yRange: 20 }]);
522
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Ray');
523
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 3, xRange: 20, y: 3, yRange: 20 }, { x: 7, xRange: 20, y: 7, yRange: 20 }]);
524
+ graphingPage.steps.switchToGradingView();
525
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 3, xRange: 20, y: 3, yRange: 20 }, { x: 7, xRange: 20, y: 7, yRange: 20 }]);
526
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
527
+ });
528
+
529
+ it('When the user attempts the question using another tool then the answer should be treated as incorrect', () => {
530
+ graphingPage.steps.resetQuestionPreview();
531
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Vector');
532
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 6, yRange: 20 }]);
533
+ graphingPage.steps.switchToGradingView();
534
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 6, yRange: 20 }]);
535
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
536
+ });
537
+ });
538
+
539
+ describe('Graphing: Segment tool - All or nothing', { tags: 'smoke' }, () => {
540
+ abortEarlySetup();
541
+ before(() => {
542
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
543
+ cy.barsPreLoaderWait();
544
+ graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
545
+ graphingPage.steps.selectToolOptions(['Polygon']);
546
+ graphingPage.steps.checkPatternBackground();
547
+ graphingPage.steps.checkSnapToGridCheckbox();
548
+ graphingPage.steps.selectGraphToolOptionEditTab('Line');
549
+ graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
550
+ graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
551
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Segment');
552
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 2, xRange: 20, y: -2, yRange: 20 }, { x: 2, xRange: 20, y: -2, yRange: 20 }, { x: -2, xRange: 20, y: -2, yRange: 20 }, { x: -2, xRange: 20, y: -2, yRange: 20 }, { x: 2, xRange: 20, y: -2, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }]);
553
+ graphingPage.steps.allotPoints(20);
554
+ graphingPage.steps.switchToPreviewTab();
555
+ });
556
+
557
+ it('When the user attempts the question as set in the specify correct answer section then it should be treated as correct', () => {
558
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Segment');
559
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 2, xRange: 20, y: -2, yRange: 20 }, { x: 2, xRange: 20, y: -2, yRange: 20 }, { x: -2, xRange: 20, y: -2, yRange: 20 }, { x: -2, xRange: 20, y: -2, yRange: 20 }, { x: 2, xRange: 20, y: -2, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }]);
560
+ graphingPage.steps.switchToGradingView();
561
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 2, xRange: 20, y: -2, yRange: 20 }, { x: 2, xRange: 20, y: -2, yRange: 20 }, { x: -2, xRange: 20, y: -2, yRange: 20 }, { x: -2, xRange: 20, y: -2, yRange: 20 }, { x: 2, xRange: 20, y: -2, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }]);
562
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
563
+ });
564
+
565
+ it('When the user attempts any one segment then it should be treated as correct but the question should be treated as incorrect', () => {
566
+ graphingPage.steps.resetQuestionPreview();
567
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Segment');
568
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 2, xRange: 20, y: -2, yRange: 20 }]);
569
+ graphingPage.steps.switchToGradingView();
570
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 2, xRange: 20, y: -2, yRange: 20 }]);
571
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
572
+ });
573
+
574
+ it('When the user attempts the question correctly but using the \'Polygon\' tool then the answer should be treated as incorrect', () => {
575
+ graphingPage.steps.resetQuestionPreview();
576
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Polygon');
577
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 2, xRange: 20, y: -2, yRange: 20 }, { x: -2, xRange: 20, y: -2, yRange: 20 }, { x: 2, xRange: 20, y: -2, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }]);
578
+ graphingPage.steps.switchToGradingView();
579
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 2, xRange: 20, y: 2, yRange: 20 }, { x: 2, xRange: 20, y: -2, yRange: 20 }, { x: -2, xRange: 20, y: -2, yRange: 20 }, { x: 2, xRange: 20, y: -2, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }]);
580
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
581
+ });
582
+ });
583
+
584
+ describe('Graphing: Vector tool - All or nothing', { tags: 'smoke' }, () => {
585
+ abortEarlySetup();
586
+ before(() => {
587
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
588
+ cy.barsPreLoaderWait();
589
+ graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
590
+ graphingPage.steps.checkPatternBackground();
591
+ graphingPage.steps.checkSnapToGridCheckbox();
592
+ graphingPage.steps.selectGraphToolOptionEditTab('Line');
593
+ graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
594
+ graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
595
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Vector');
596
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 4, yRange: 20 }]);
597
+ graphingPage.steps.allotPoints(20);
598
+ graphingPage.steps.switchToPreviewTab();
599
+ });
600
+
601
+ it('When the user attempts the question as set in the specify correct answer section then it should be treated as correct', () => {
602
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Vector');
603
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 4, yRange: 20 }]);
604
+ graphingPage.steps.switchToGradingView();
605
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 4, yRange: 20 }]);
606
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
607
+ });
608
+
609
+ it('When user attempts the question using different points but the same line then they should be treated as correct', () => {
610
+ graphingPage.steps.resetQuestionPreview();
611
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Vector');
612
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 2, xRange: 20, y: 6, yRange: 20 }]);
613
+ graphingPage.steps.switchToGradingView();
614
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 2, xRange: 20, y: 6, yRange: 20 }]);
615
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
616
+ });
617
+
618
+ it('When the user attempts the question correctly but using the \'Ray\' tool then the answer should be treated as incorrect', () => {
619
+ graphingPage.steps.resetQuestionPreview();
620
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Ray');
621
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 2, xRange: 20, y: 6, yRange: 20 }]);
622
+ graphingPage.steps.switchToGradingView();
623
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 2, xRange: 20, y: 6, yRange: 20 }]);
624
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
625
+ });
626
+ });
627
+
628
+ describe('Graphing: Circle tool - All or nothing', { tags: 'smoke' }, () => {
629
+ abortEarlySetup();
630
+ before(() => {
631
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
632
+ cy.barsPreLoaderWait();
633
+ graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
634
+ graphingPage.steps.selectToolOptions(['Circle']);
635
+ graphingPage.steps.checkPatternBackground();
636
+ graphingPage.steps.checkSnapToGridCheckbox();
637
+ graphingPage.steps.selectGraphToolOptionEditTab('Line');
638
+ graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
639
+ graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
640
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Circle');
641
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
642
+ graphingPage.steps.allotPoints(20);
643
+ graphingPage.steps.switchToPreviewTab();
644
+ });
645
+
646
+ it('When the user attempts the question exactly on the same points as set in the specify correct answer section it should be treated as correct', () => {
647
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Circle');
648
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
649
+ graphingPage.steps.switchToGradingView();
650
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
651
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
652
+ });
653
+
654
+ it('When the user attempts the question using different points but same radius and center then the question should be treated as correct', () => {
655
+ graphingPage.steps.resetQuestionPreview();
656
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Circle');
657
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 5, xRange: 20, y: 0, yRange: 20 }]);
658
+ graphingPage.steps.switchToGradingView();
659
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 5, xRange: 20, y: 0, yRange: 20 }]);
660
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
661
+ });
662
+
663
+ it('When the user attempts the question using different center but same radius then the question should be treated as correct', () => {
664
+ graphingPage.steps.resetQuestionPreview();
665
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Circle');
666
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }, { x: 1, xRange: 20, y: 6, yRange: 20 }]);
667
+ graphingPage.steps.switchToGradingView();
668
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }, { x: 1, xRange: 20, y: 6, yRange: 20 }]);
669
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
670
+ });
671
+
672
+ it('When the user attempts the question using different center and radius then the question should be treated as correct', () => {
673
+ graphingPage.steps.resetQuestionPreview();
674
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Circle');
675
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }, { x: 1, xRange: 20, y: 5, yRange: 20 }]);
676
+ graphingPage.steps.switchToGradingView();
677
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 1, xRange: 20, y: 1, yRange: 20 }, { x: 1, xRange: 20, y: 5, yRange: 20 }]);
678
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
679
+ });
680
+ });
681
+
682
+ describe('Graphing: Parabola tool - All or nothing', { tags: 'smoke' }, () => {
683
+ abortEarlySetup();
684
+ before(() => {
685
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
686
+ cy.barsPreLoaderWait();
687
+ graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
688
+ graphingPage.steps.selectToolOptions(['Parabola']);
689
+ graphingPage.steps.checkPatternBackground();
690
+ graphingPage.steps.checkSnapToGridCheckbox();
691
+ graphingPage.steps.selectGraphToolOptionEditTab('Line');
692
+ graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
693
+ graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
694
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Parabola');
695
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 1, xRange: 20, y: 1, yRange: 20 }]);
696
+ graphingPage.steps.allotPoints(20);
697
+ graphingPage.steps.switchToPreviewTab();
698
+ });
699
+
700
+ it('When the user attempts the question exactly on the same points as set in the specify correct answer section it should be treated as correct', () => {
701
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Parabola');
702
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 1, xRange: 20, y: 1, yRange: 20 }]);
703
+ graphingPage.steps.switchToGradingView();
704
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 1, xRange: 20, y: 1, yRange: 20 }]);
705
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
706
+ });
707
+
708
+ it('When the user attempts the question using different points but same parabola then the question should be treated as correct', () => {
709
+ graphingPage.steps.resetQuestionPreview();
710
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Parabola');
711
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 3, xRange: 20, y: 9, yRange: 20 }]);
712
+ graphingPage.steps.switchToGradingView();
713
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 3, xRange: 20, y: 9, yRange: 20 }]);
714
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
715
+ });
716
+
717
+ it('When the user attempts the question using with a shifted parabola on the x-axis then the question should be treated as incorrect', () => {
718
+ graphingPage.steps.resetQuestionPreview();
719
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Parabola');
720
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 1, xRange: 20, y: 0, yRange: 20 }, { x: 3, xRange: 20, y: 9, yRange: 20 }]);
721
+ graphingPage.steps.switchToGradingView();
722
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 1, xRange: 20, y: 0, yRange: 20 }, { x: 3, xRange: 20, y: 9, yRange: 20 }]);
723
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
724
+ });
725
+
726
+ it('When the user attempts the question using with a shifted parabola on the y-axis then the question should be treated as incorrect', () => {
727
+ graphingPage.steps.resetQuestionPreview();
728
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Parabola');
729
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 3, xRange: 20, y: 9, yRange: 20 }]);
730
+ graphingPage.steps.switchToGradingView();
731
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 3, xRange: 20, y: 9, yRange: 20 }]);
732
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
733
+ });
734
+ });
735
+
736
+ describe('Graphing: Sine tool - All or nothing', { tags: 'smoke' }, () => {
737
+ abortEarlySetup();
738
+ before(() => {
739
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
740
+ cy.barsPreLoaderWait();
741
+ graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
742
+ graphingPage.steps.selectToolOptions(['Sine']);
743
+ graphingPage.steps.checkPatternBackground();
744
+ graphingPage.steps.checkSnapToGridCheckbox();
745
+ graphingPage.steps.selectGraphToolOptionEditTab('Line');
746
+ graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
747
+ graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
748
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Sine');
749
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 1, xRange: 20, y: 1, yRange: 20 }]);
750
+ graphingPage.steps.allotPoints(20);
751
+ graphingPage.steps.switchToPreviewTab();
752
+ });
753
+
754
+ it('When the user attempts the question exactly on the same points as set in the specify correct answer section it should be treated as correct', () => {
755
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Sine');
756
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 1, xRange: 20, y: 1, yRange: 20 }]);
757
+ graphingPage.steps.switchToGradingView();
758
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 1, xRange: 20, y: 1, yRange: 20 }]);
759
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
760
+ });
761
+
762
+ it('When the user attempts the question using different points but same sine wave then the question should be treated as correct', () => {
763
+ graphingPage.steps.resetQuestionPreview();
764
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Sine');
765
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 4, xRange: 20, y: 0, yRange: 20 }, { x: 5, xRange: 20, y: 1, yRange: 20 }]);
766
+ graphingPage.steps.switchToGradingView();
767
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 4, xRange: 20, y: 0, yRange: 20 }, { x: 5, xRange: 20, y: 1, yRange: 20 }]);
768
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
769
+ });
770
+
771
+ it('When the user attempts the question with incorrect sine wave then the question should be treated as incorrect', () => {
772
+ graphingPage.steps.resetQuestionPreview();
773
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Sine');
774
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 2, xRange: 20, y: 0, yRange: 20 }, { x: 3, xRange: 20, y: -1, yRange: 20 }]);
775
+ graphingPage.steps.switchToGradingView();
776
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 2, xRange: 20, y: 0, yRange: 20 }, { x: 3, xRange: 20, y: -1, yRange: 20 }]);
777
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
778
+ });
779
+
780
+ it('When the user attempts the question with increased amplitude of sine wave then the question should be treated as incorrect', () => {
781
+ graphingPage.steps.resetQuestionPreview();
782
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Sine');
783
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }]);
784
+ graphingPage.steps.switchToGradingView();
785
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }]);
786
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
787
+ });
788
+ });
789
+
790
+ describe('Graphing: Polygon tool - All or nothing', { tags: 'smoke' }, () => {
791
+ abortEarlySetup();
792
+ before(() => {
793
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
794
+ cy.barsPreLoaderWait();
795
+ graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
796
+ graphingPage.steps.selectToolOptions(['Polygon']);
797
+ graphingPage.steps.checkPatternBackground();
798
+ graphingPage.steps.checkSnapToGridCheckbox();
799
+ graphingPage.steps.selectGraphToolOptionEditTab('Line');
800
+ graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
801
+ graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
802
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Polygon');
803
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 1, xRange: 20, y: 4, yRange: 20 }, { x: 1, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 1, xRange: 20, y: 4, yRange: 20 }]);
804
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Polygon');
805
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 1, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 0, yRange: 20 }, { x: 1, xRange: 20, y: 0, yRange: 20 }, { x: 1, xRange: 20, y: 2, yRange: 20 }]);
806
+ graphingPage.steps.allotPoints(20);
807
+ graphingPage.steps.switchToPreviewTab();
808
+ });
809
+
810
+ it('When the user attempts the question same as in the specify correct answer section then the question should be treated as correct', () => {
811
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Polygon');
812
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 1, xRange: 20, y: 4, yRange: 20 }, { x: 1, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 1, xRange: 20, y: 4, yRange: 20 }]);
813
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Polygon');
814
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 1, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 0, yRange: 20 }, { x: 1, xRange: 20, y: 0, yRange: 20 }, { x: 1, xRange: 20, y: 2, yRange: 20 }]);
815
+ graphingPage.steps.switchToGradingView();
816
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 1, xRange: 20, y: 4, yRange: 20 }, { x: 1, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 1, xRange: 20, y: 4, yRange: 20 }]);
817
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 1, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 2, yRange: 20 }, { x: 3, xRange: 20, y: 0, yRange: 20 }, { x: 1, xRange: 20, y: 0, yRange: 20 }, { x: 1, xRange: 20, y: 2, yRange: 20 }]);
818
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
819
+ });
820
+
821
+ it('When the user attempts the question as a single polygon combining both the polygons then the question should be treated as incorrect', () => {
822
+ graphingPage.steps.resetQuestionPreview();
823
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Polygon');
824
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 1, xRange: 20, y: 4, yRange: 20 }, { x: 1, xRange: 20, y: 0, yRange: 20 }, { x: 3, xRange: 20, y: 0, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 1, xRange: 20, y: 4, yRange: 20 }]);
825
+ graphingPage.steps.switchToGradingView();
826
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 1, xRange: 20, y: 4, yRange: 20 }, { x: 1, xRange: 20, y: 0, yRange: 20 }, { x: 3, xRange: 20, y: 0, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 1, xRange: 20, y: 4, yRange: 20 }]);
827
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
828
+ });
829
+ });
830
+
831
+ if (!grepTags || !grepTags.includes('smoke')) {
832
+ describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
833
+ abortEarlySetup();
834
+ before(() => {
835
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
836
+ cy.barsPreLoaderWait();
837
+ graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
838
+ graphingPage.steps.selectToolOptions(['Circle', 'Polygon']);
839
+ graphingPage.steps.checkPatternBackground();
840
+ graphingPage.steps.checkSnapToGridCheckbox();
841
+ graphingPage.steps.selectGraphToolOptionEditTab('Line');
842
+ graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
843
+ graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
844
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Polygon');
845
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
846
+ graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
847
+ graphingPage.steps.allotPoints(20);
848
+ });
849
+
850
+ 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', () => {
851
+ graphingPage.steps.expandMinimumScoringDropdown();
852
+ graphingPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
853
+ graphingPage.steps.allotMinimumPoints(2);
854
+ graphingPage.steps.switchToPreviewTab();
855
+ graphingPage.steps.switchToGradingView();
856
+ graphingPage.steps.verifyPreviewScore(2, 20);
857
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
858
+ });
859
+
860
+ 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', () => {
861
+ graphingPage.steps.resetQuestionPreview();
862
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Circle');
863
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -2, xRange: 20, y: 1, yRange: 20 }, { x: -4, xRange: 20, y: 1, yRange: 20 }]);
864
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: -2, xRange: 20, y: 1, yRange: 20 }, { x: -4, xRange: 20, y: 1, yRange: 20 }]);
865
+ graphingPage.steps.verifyPreviewScore(2, 20);
866
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
867
+ });
868
+
869
+ 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', () => {
870
+ graphingPage.steps.switchToEditTab();
871
+ graphingPage.steps.expandMinimumScoringDropdown();
872
+ graphingPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
873
+ graphingPage.steps.allotMinimumPoints(2);
874
+ graphingPage.steps.switchToPreviewTab();
875
+ graphingPage.steps.switchToGradingView();
876
+ graphingPage.steps.verifyPreviewScore(0, 20);
877
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
878
+ });
879
+
880
+ 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', () => {
881
+ graphingPage.steps.resetQuestionPreview();
882
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Circle');
883
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -2, xRange: 20, y: 1, yRange: 20 }, { x: -4, xRange: 20, y: 1, yRange: 20 }]);
884
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: -2, xRange: 20, y: 1, yRange: 20 }, { x: -4, xRange: 20, y: 1, yRange: 20 }]);
885
+ graphingPage.steps.verifyPreviewScore(2, 20);
886
+ });
887
+ });
888
+ };
889
+ });