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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +3 -6
  2. package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +2 -4
  3. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +3 -7
  4. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +2 -0
  5. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/additionalSettings.js +154 -0
  6. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/dropzoneAlternateAnswerPopup.js +170 -0
  7. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/dropzoneSettings.js +335 -0
  8. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabBasicSection.js +142 -0
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/headerSection.js +76 -0
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  11. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +8 -8
  12. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +341 -0
  13. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettingsForGroupedLayout.js +241 -0
  14. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +1 -1
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettingsForGroupedLayout.js +3 -3
  16. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +350 -0
  17. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToCorrectPoints.js +356 -0
  18. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +402 -0
  19. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +4 -4
  20. package/cypress/e2e/ILC/SimpleCalculator/editTabFunctionality.js +242 -0
  21. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +11 -16
  22. package/cypress/e2e/ILC/TextEntryMath/checkAnswerFunctionalityForAllViews.smoke.js +4 -6
  23. package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +3 -4
  24. package/cypress/fixtures/theme/ilc.json +2 -0
  25. package/cypress/pages/audioResponsePage.js +1 -1
  26. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +1 -1
  27. package/cypress/pages/components/correctIncorrectAnswerLabelComponent.js +1 -1
  28. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +35 -5
  29. package/cypress/pages/components/imageCanvasComponent.js +1 -1
  30. package/cypress/pages/components/index.js +2 -1
  31. package/cypress/pages/components/questionInputFieldComponent.js +31 -0
  32. package/cypress/pages/components/responseAreaSettingsPopupComponent.js +74 -0
  33. package/cypress/pages/drawingResponsePage.js +1 -1
  34. package/cypress/pages/fillInTheGapsDragAndDropPage.js +318 -62
  35. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +2 -26
  36. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +24 -1
  37. package/cypress/pages/simpleCalculatorPage.js +140 -10
  38. package/cypress/pages/textEntryMathPage.js +3 -2
  39. package/package.json +2 -2
@@ -0,0 +1,402 @@
1
+ import { graphingPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+ import utilities from "../../../../support/helpers/utilities";
4
+ const unselectedToolOption = ['Circle', 'Parabola', 'Sine', 'Polygon'];
5
+ const css = Cypress.env('css');
6
+
7
+ describe('Create Item page - Graphing: All or nothing with alternative answer', () => {
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ describe('All or nothing scoring with correct answer greater than alternative points', () => {
13
+ abortEarlySetup();
14
+ before(() => {
15
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
16
+ cy.barsPreLoaderWait();
17
+ graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
18
+ graphingPage.steps.selectToolOptions(unselectedToolOption);
19
+ graphingPage.steps.checkPatternBackground();
20
+ graphingPage.steps.checkSnapToGridCheckbox();
21
+ graphingPage.steps.selectGraphToolOptionEditTab('Line');
22
+ graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
23
+ graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
24
+ graphingPage.steps.selectGraphToolOptionEditTab('Circle');
25
+ graphingPage.steps.plotPointsOnGraphEditTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
26
+ graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
27
+ //Correct answer
28
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Polygon');
29
+ 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 }]);
30
+ 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 }]);
31
+ //Common answer
32
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Circle');
33
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
34
+ graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
35
+ graphingPage.steps.allotPoints(20);
36
+ //Alternative answer
37
+ graphingPage.steps.addAlternativeAnswerAccordion(1);
38
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Vector');
39
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
40
+ graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
41
+ //Common answer
42
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Circle');
43
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
44
+ graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
45
+ graphingPage.steps.allotPoints(12);
46
+ graphingPage.steps.checkAllowStudentToCheckAnswerCheckbox();
47
+ graphingPage.steps.switchToPreviewTab();
48
+ });
49
+
50
+ it('When the user selects \'Grading\' view without attempting the question, the correct answer should be displayed in the correct answer section graph', () => {
51
+ graphingPage.steps.verifyPreviewScore(0, 20);
52
+ graphingPage.steps.switchToGradingView();
53
+
54
+ //Preview tab
55
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
56
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
57
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
58
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
59
+
60
+ //Correct answer section
61
+ utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 2);
62
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
63
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
64
+ utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 1);
65
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
66
+ utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
67
+
68
+ //Correct/incorrect icon
69
+ utilities.verifyElementVisibilityState(graphingPage.correctIncorrectStatusMessageText(), 'notExist');
70
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
71
+ 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 }]);
72
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
73
+
74
+ cy.log('When the user switches to \'Grading view\' without attempting the question and clicks on \'Check answer\' button, status message and correct answer section should not be displayed')
75
+ graphingPage.steps.checkAnswer();
76
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
77
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
78
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
79
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
80
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
81
+ });
82
+
83
+ it('When the user attempts the question with responses from the correct accordion, then the user should be awarded full points and on switching to \'Grading\' view the attempted graph should be displayed correct, a status message with text \'Your answer is correct\' should be displayed above the question preview, correct answer section should not be displayed', () => {
84
+ graphingPage.steps.resetQuestionPreview();
85
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Polygon');
86
+ 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 }]);
87
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Circle');
88
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
89
+ graphingPage.steps.verifyPreviewScore(20, 20);
90
+ graphingPage.steps.switchToGradingView();
91
+
92
+ //Preview tab
93
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 2);
94
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
95
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
96
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
97
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
98
+ utilities.verifyElementCount(graphingPage.graphPolygonPreviewTab(), 1);
99
+ 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 }]);
100
+
101
+ //Correct/incorrect icon
102
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
103
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
104
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
105
+
106
+ cy.log('When the user attempts the question with responses from the correct accordion and clicks on \'Check answer\' button, the attempted graph should be displayed correct, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
107
+ graphingPage.steps.checkAnswer();
108
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 2);
109
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
110
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
111
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
112
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
113
+ utilities.verifyElementCount(graphingPage.graphPolygonPreviewTab(), 1);
114
+ 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 }]);
115
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
116
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
117
+ });
118
+
119
+ it('CSS of Correct answer state', { tags: 'css' }, () => {
120
+ utilities.verifyCSS(graphingPage.correctIncorrectStatusMessageText().find('[class*="Graphingstyles__BoldCorrect"]'), {
121
+ 'color': css.color.text,
122
+ 'font-size': css.fontSize.default,
123
+ 'font-weight': css.fontWeight.bold
124
+ });
125
+ utilities.verifyCSS(graphingPage.correctIncorrectStatusMessageText().find('.title-casing'), {
126
+ 'color': css.color.text,
127
+ 'font-size': css.fontSize.default,
128
+ 'font-weight': css.fontWeight.regular
129
+ });
130
+ utilities.verifyCSS(graphingPage.correctIncorrectStatusMessageText().find('svg path'), {
131
+ 'fill': css.color.correctAnswer,
132
+ });
133
+ utilities.verifyCSS(graphingPage.graphPolygonPreviewTab(), {
134
+ 'fill': css.color.correctAnswer,
135
+ });
136
+ utilities.verifyCSS(graphingPage.previewScoreText(), {
137
+ 'background-color': css.color.correctAnswer
138
+ });
139
+ });
140
+
141
+ it('Accessibility of correct answer state', { tags: 'a11y' }, () => {
142
+ cy.checkAccessibility(graphingPage.previewTabQuestionWrapper());
143
+ });
144
+
145
+ it('When the user attempts the question with alternative accordion response, then the user should be awarded with points specified for alternative accordion (less than full points) and on switching to \'Grading\' view, the attempted graph should be displayed correct, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
146
+ graphingPage.steps.resetQuestionPreview();
147
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Vector');
148
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
149
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Circle');
150
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
151
+ graphingPage.steps.verifyPreviewScore(12, 20);
152
+ graphingPage.steps.switchToGradingView();
153
+
154
+ //Preview tab
155
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 2);
156
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
157
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
158
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
159
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
160
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
161
+
162
+ //Correct/incorrect icon
163
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct')
164
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
165
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
166
+
167
+ cy.log('When the user attempts the question with responses from the alternative accordion and clicks on \'Check answer\' button, the attempted graph should be displayed correct, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
168
+ graphingPage.steps.checkAnswer();
169
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 2);
170
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
171
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
172
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
173
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
174
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
175
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
176
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
177
+ });
178
+
179
+ it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, the attempted graph should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion should be displayed', () => {
180
+ graphingPage.steps.resetQuestionPreview();
181
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Polygon');
182
+ 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 }]);
183
+ graphingPage.steps.verifyPreviewScore(0, 20);
184
+ graphingPage.steps.switchToGradingView();
185
+
186
+ //Preview tab
187
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
188
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
189
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
190
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
191
+ utilities.verifyElementCount(graphingPage.graphPolygonPreviewTab(), 1);
192
+ 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 }]);
193
+
194
+ //Correct answer section
195
+ utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 2);
196
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
197
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
198
+ utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 1);
199
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
200
+ utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
201
+
202
+ //Correct/incorrect icon
203
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
204
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
205
+ 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 }]);
206
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
207
+
208
+ cy.log('When the user attempts the question with partially correct responses exclusively from the correct accordion and clicks on \'Check answer\' button, the attempted graph should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
209
+ graphingPage.steps.checkAnswer();
210
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
211
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
212
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
213
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
214
+ utilities.verifyElementCount(graphingPage.graphPolygonPreviewTab(), 1);
215
+ 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 }]);
216
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
217
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
218
+ });
219
+
220
+ it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, the attempted graph should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion should be displayed', () => {
221
+ graphingPage.steps.resetQuestionPreview();
222
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Vector');
223
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
224
+ graphingPage.steps.verifyPreviewScore(0, 20);
225
+ graphingPage.steps.switchToGradingView();
226
+
227
+ //Preview tab
228
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
229
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
230
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
231
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
232
+ utilities.verifyElementCount(graphingPage.graphLineSegmentsPreviewTab(), 1);
233
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
234
+
235
+ //Correct answer section
236
+ utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 2);
237
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
238
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
239
+ utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 1);
240
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
241
+ utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
242
+
243
+ //Correct/incorrect icon
244
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
245
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
246
+ 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 }]);
247
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
248
+
249
+ cy.log('When the user attempts the question with partially correct responses exclusively from the alternative accordion and clicks on \'Check answer\' button, the attempted graph should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
250
+ graphingPage.steps.checkAnswer();
251
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
252
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
253
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
254
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
255
+ utilities.verifyElementCount(graphingPage.graphLineSegmentsPreviewTab(), 1);
256
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
257
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
258
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
259
+ });
260
+
261
+ it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, the correctly attempted graph should be displayed correct and incorrectly attempted should be displayed for the alternative accordion graph, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion should be displayed', () => {
262
+ graphingPage.steps.resetQuestionPreview();
263
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Vector');
264
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
265
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Polygon');
266
+ 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 }]);
267
+ graphingPage.steps.verifyPreviewScore(0, 20);
268
+ graphingPage.steps.switchToGradingView();
269
+
270
+ //Preview tab
271
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
272
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
273
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
274
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
275
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
276
+ utilities.verifyElementCount(graphingPage.graphPolygonPreviewTab(), 1);
277
+ 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 }]);
278
+
279
+ //Correct answer section
280
+ utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 2);
281
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
282
+ utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 1);
283
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
284
+ utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
285
+
286
+ //Correct/incorrect icon
287
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
288
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
289
+ 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 }]);
290
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
291
+
292
+ cy.log('When the user attempts the question with equal number responses from the correct and alternative accordion and clicks on \'Check answer\' button, the attempted graph should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
293
+ graphingPage.steps.checkAnswer();
294
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
295
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
296
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
297
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
298
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
299
+ utilities.verifyElementCount(graphingPage.graphPolygonPreviewTab(), 1);
300
+ 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 }]);
301
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
302
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
303
+ });
304
+
305
+ it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, the attempted response should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion should be displayed', () => {
306
+ graphingPage.steps.resetQuestionPreview();
307
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Circle');
308
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
309
+ graphingPage.steps.verifyPreviewScore(0, 20);
310
+ graphingPage.steps.switchToGradingView();
311
+
312
+ //Preview tab
313
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 2);
314
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
315
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
316
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
317
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
318
+
319
+ //Correct answer section
320
+ utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 2);
321
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
322
+ utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 1);
323
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
324
+ utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
325
+
326
+ //Correct/incorrect icon
327
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
328
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
329
+ 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 }]);
330
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
331
+
332
+ cy.log('When the user attempts the question with common response from the alternative accordion and clicks on \'Check answer\' button, the attempted graph should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
333
+ graphingPage.steps.checkAnswer();
334
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 2);
335
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
336
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
337
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
338
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
339
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
340
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
341
+ });
342
+
343
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers should be displayed', () => {
344
+ graphingPage.steps.resetQuestionPreview();
345
+ graphingPage.steps.selectGraphToolOptionPreviewTab('Circle');
346
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -2, xRange: 20, y: 1, yRange: 20 }, { x: -4, xRange: 20, y: 1, yRange: 20 }]);
347
+ graphingPage.steps.verifyPreviewScore(0, 20);
348
+ graphingPage.steps.switchToGradingView();
349
+
350
+ //Preview tab
351
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 2);
352
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
353
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: -2, xRange: 20, y: 1, yRange: 20 }, { x: -4, xRange: 20, y: 1, yRange: 20 }]);
354
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
355
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
356
+
357
+ //Correct answer section
358
+ utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 2);
359
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
360
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
361
+ utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 1);
362
+ graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
363
+ utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
364
+
365
+ //Correct/incorrect icon
366
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
367
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
368
+ 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 }]);
369
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
370
+
371
+ cy.log('When the user has attempted the question with incorrect responses and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
372
+ graphingPage.steps.checkAnswer();
373
+ utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 2);
374
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
375
+ graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: -2, xRange: 20, y: 1, yRange: 20 }, { x: -4, xRange: 20, y: 1, yRange: 20 }]);
376
+ utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
377
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
378
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
379
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
380
+ });
381
+
382
+ it('CSS of incorrect answer state', { tags: 'css' }, () => {
383
+ utilities.verifyCSS(graphingPage.correctIncorrectStatusMessageText().find('[class*="Graphingstyles__BoldCorrect"]'), {
384
+ 'color': css.color.text,
385
+ 'font-size': css.fontSize.default,
386
+ 'font-weight': css.fontWeight.bold
387
+ });
388
+ utilities.verifyCSS(graphingPage.correctIncorrectStatusMessageText().find('.title-casing'), {
389
+ 'color': css.color.text,
390
+ 'font-size': css.fontSize.default,
391
+ 'font-weight': css.fontWeight.regular
392
+ });
393
+ utilities.verifyCSS(graphingPage.correctIncorrectStatusMessageText().find('svg path'), {
394
+ 'fill': css.color.incorrectAnswer,
395
+ });
396
+ });
397
+
398
+ it('Accessibility of incorrect answer state', { tags: 'a11y' }, () => {
399
+ cy.checkAccessibility(graphingPage.previewTabQuestionWrapper());
400
+ });
401
+ });
402
+ });
@@ -131,15 +131,15 @@ describe('Create item page - Graphing - Preview contents in all views', () => {
131
131
 
132
132
  it('User should be able to draw a segment using the \'Segment\' tool option', () => {
133
133
  graphingPage.steps.selectGraphToolOptionPreviewTab('Segment');
134
- graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 7, xRange: 20, y: -2, yRange: 20 }, { x: 9, xRange: 20, y: -4, yRange: 20 }]);
135
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 7, xRange: 20, y: -2, yRange: 20 }, { x: 9, xRange: 20, y: -4, yRange: 20 }]);
134
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 7, xRange: 20, y: -2, yRange: 20 }, { x: 5, xRange: 20, y: -4, yRange: 20 }]);
135
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 7, xRange: 20, y: -2, yRange: 20 }, { x: 5, xRange: 20, y: -4, yRange: 20 }]);
136
136
  utilities.verifyElementCount(graphingPage.graphLineSegmentsPreviewTab(), 3);
137
137
  });
138
138
 
139
139
  it('User should be able to draw a vector using the \'Vector\' tool option', () => {
140
140
  graphingPage.steps.selectGraphToolOptionPreviewTab('Vector');
141
- graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 9, xRange: 20, y: 0, yRange: 20 }, { x: 9, xRange: 20, y: 2, yRange: 20 }]);
142
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 9, xRange: 20, y: 0, yRange: 20 }, { x: 9, xRange: 20, y: 2, yRange: 20 }]);
141
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 2, xRange: 20, y: 0, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }]);
142
+ graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 0, yRange: 20 }, { x: 2, xRange: 20, y: 2, yRange: 20 }]);
143
143
  utilities.verifyElementCount(graphingPage.graphLineSegmentsPreviewTab(), 4);
144
144
  });
145
145