itemengine-cypress-automation 1.0.193-packageUpdated-b3f3d0b.0 → 1.0.193

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +3 -3
  2. package/cypress/e2e/ILC/AudioPlayerNew/audioOverviewAndTranscript.js +568 -0
  3. package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +4 -4
  4. package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +5 -5
  5. package/cypress/e2e/ILC/AudioPlayerNew/customizePlayerLayoutSettings.js +2 -2
  6. package/cypress/e2e/ILC/AudioPlayerNew/headerSection.js +125 -0
  7. package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +5 -5
  8. package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +4 -4
  9. package/cypress/e2e/ILC/AudioPlayerNew/studentViewSettings.js +3 -3
  10. package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +19 -17
  11. package/cypress/e2e/ILC/ChartsBar/previewContentsForAllViews.smoke.js +7 -4
  12. package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +366 -0
  13. package/cypress/e2e/ILC/ChartsLine/checkAnswerFunctionalityForAllViews.smoke.js +183 -0
  14. package/cypress/e2e/ILC/ChartsLine/gradingViewAndCorrectAnswerView.smoke.js +281 -0
  15. package/cypress/e2e/ILC/ChartsLine/previewContentsForAllViews.smoke.js +595 -0
  16. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +8 -8
  17. package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +241 -0
  18. package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +241 -0
  19. package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternatePoints.js +285 -0
  20. package/cypress/e2e/ILC/ImageHighlight/Scoring/manuallyAndNonScored.js +164 -0
  21. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +281 -0
  22. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsScoring.js +467 -0
  23. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +250 -0
  24. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeigtsCorrectPointsGreaterThanAlternativePoints.js +281 -0
  25. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +260 -0
  26. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsScoring.js +184 -0
  27. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +229 -0
  28. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +261 -0
  29. package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +409 -0
  30. package/cypress/e2e/ILC/chartsDotsPlot/checkAnswerFunctionalityForAllViews.smoke.js +199 -0
  31. package/cypress/e2e/ILC/chartsDotsPlot/gradingViewAndCorrectAnswerView.smoke.js +223 -0
  32. package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +402 -0
  33. package/cypress/pages/audioPlayerPage.js +229 -9
  34. package/cypress/pages/chartsBarPage.js +2 -70
  35. package/cypress/pages/chartsDotPlotPage.js +986 -3
  36. package/cypress/pages/chartsLinePage.js +368 -9
  37. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +0 -1
  38. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
  39. package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
  40. package/cypress/pages/components/barAndLineChartComponent.js +27 -1
  41. package/cypress/pages/components/chartsCommonComponent.js +31 -2
  42. package/cypress/pages/components/createQuestionBasePage.js +1 -0
  43. package/cypress/pages/components/layoutSectionComponent.js +2 -2
  44. package/cypress/pages/components/singleMultipleSelectionModeComponent.js +5 -0
  45. package/cypress/pages/components/toolSettingsComponent.js +2 -2
  46. package/cypress/pages/feedbackScalePage.js +1 -1
  47. package/cypress/pages/gridFillPage.js +13 -6
  48. package/cypress/pages/imageHighlightPage.js +308 -2
  49. package/cypress/pages/numberLinePage.js +40 -16
  50. package/cypress/pages/videoResponsePage.js +350 -6
  51. package/package.json +1 -1
@@ -0,0 +1,409 @@
1
+ import { chartsDotPlotPage, gradingViewPage, itemPreviewPage, studentViewPage, dialogBoxBase } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const grepTags = Cypress.env('grepTags');
5
+ let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
6
+ const views = utilities.getViews(correctAnswerViews);
7
+ var itemReferenceID = "";
8
+ const css = Cypress.env('css');
9
+
10
+ describe('Create Item page - Charts - Dot: All or nothing ', () => {
11
+ before(() => {
12
+ cy.loginAs('admin');
13
+ });
14
+
15
+ if (!grepTags || !grepTags.includes('smoke')) {
16
+ describe('Question preview modes: Student view and Grading view', () => {
17
+ abortEarlySetup();
18
+ before(() => {
19
+ chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
20
+ cy.barsPreLoaderWait();
21
+ chartsDotPlotPage.steps.addTextInQuestionInstructionsInputField('Dot plot');
22
+ chartsDotPlotPage.steps.selectDotPlot();
23
+ chartsDotPlotPage.steps.switchToPreviewTab();
24
+ });
25
+
26
+ chartsDotPlotPage.tests.verifyPreviewModesAndScoreWhenPointsAndCorrectAnswersIsNotSet();
27
+
28
+ it('When the user sets correct answer responses and allots points, then the alloted points should be displayed in the preview tab', () => {
29
+ chartsDotPlotPage.steps.switchToEditTab();
30
+ chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(1, { point: 1, min: 1, interval: 0.25, defaultDots: 0 });
31
+ chartsDotPlotPage.steps.lockDotColumn({ point: 1, min: 1, interval: 0.25 });
32
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 5, min: 1, interval: 0.25, defaultDots: 0 });
33
+ chartsDotPlotPage.steps.allotPoints(20);
34
+ chartsDotPlotPage.steps.switchToPreviewTab();
35
+ chartsDotPlotPage.steps.verifyPreviewScore(0, 20);
36
+ });
37
+
38
+ 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', () => {
39
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 4, min: 1, interval: 0.25, defaultDots: 0 });
40
+ chartsDotPlotPage.steps.resetQuestionPreview();
41
+ chartsDotPlotPage.steps.verifyDotNotExistPreviewTab({ point: 4, min: 1, interval: 0.25 })
42
+ });
43
+ });
44
+ };
45
+
46
+ views.forEach((view) => {
47
+ describe(` Charts - Dot: All or nothing scoring - ${view}`, { tags: 'smoke' }, () => {
48
+ abortEarlySetup();
49
+ before(() => {
50
+ switch (view) {
51
+ case 'Question preview':
52
+ chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
53
+ cy.barsPreLoaderWait();
54
+ chartsDotPlotPage.steps.addTextInQuestionInstructionsInputField('Dot plot');
55
+ chartsDotPlotPage.steps.selectDotPlot();
56
+ chartsDotPlotPage.steps.enterTextInMinInputField(1);
57
+ chartsDotPlotPage.steps.verifyTextInMinInputField(1);
58
+ chartsDotPlotPage.steps.enterTextInMaxInputField(6);
59
+ chartsDotPlotPage.steps.verifyTextInMaxInputField(6);
60
+ chartsDotPlotPage.steps.setGraphTitle('Five-day observation');
61
+ chartsDotPlotPage.steps.setXAxisLabel('Days');
62
+ //locked column
63
+ chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(1, { point: 1, min: 1, interval: 0.25, defaultDots: 0 });
64
+ chartsDotPlotPage.steps.lockDotColumn({ point: 1, min: 1, interval: 0.25 });
65
+ //adding more dots
66
+ chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(4, { point: 2, min: 1, interval: 0.25, defaultDots: 0 });
67
+ //adding less dots
68
+ chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(1, { point: 3, min: 1, interval: 0.25, defaultDots: 0 });
69
+ //adding equal dots
70
+ chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(4, { point: 4, min: 1, interval: 0.25, defaultDots: 0 });
71
+ chartsDotPlotPage.steps.allotPoints(20);
72
+ //adding more dots
73
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 2, min: 1, interval: 0.25, defaultDots: 0 });
74
+ //adding less dots
75
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 3, min: 1, interval: 0.25, defaultDots: 0 });
76
+ //adding equal dots
77
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 4, min: 1, interval: 0.25, defaultDots: 0 });
78
+ //exclusive to specify correct answer
79
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(5, { point: 5, min: 1, interval: 0.25, defaultDots: 0 });
80
+ chartsDotPlotPage.steps.switchToPreviewTab();
81
+ break;
82
+ case 'Item preview':
83
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
84
+ itemPreviewPage.steps.switchToPreviewTab();
85
+ break;
86
+ case 'Grading view':
87
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
88
+ break;
89
+ }
90
+ });
91
+
92
+ beforeEach(() => {
93
+ switch (view) {
94
+ case 'Question preview':
95
+ chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
96
+ chartsDotPlotPage.steps.resetQuestionPreview();
97
+ break;
98
+ case 'Item preview':
99
+ itemPreviewPage.steps.switchToStudentView();
100
+ itemPreviewPage.steps.resetQuestionPreview();
101
+ break;
102
+ case 'Grading view':
103
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
104
+ break;
105
+ }
106
+ });
107
+
108
+ if (view === 'Question preview') {
109
+ after(() => {
110
+ chartsDotPlotPage.steps.clickOnSaveQuestionButton();
111
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
112
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
113
+ });
114
+ };
115
+
116
+ it('When the user selects \'Grading\' view without attempting the question, then by default correct dot column should have correct icons, incorrect dot column should have incorrect icons, the correct answer should be displayed in the correct answer section number line axis and your answer is incorrect status message should be displayed', () => {
117
+ if (view === 'Grading view') {
118
+ studentViewPage.steps.submitResponse();
119
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
120
+ studentViewPage.steps.clickOnGoToGradingViewButton();
121
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
122
+ } else {
123
+ chartsDotPlotPage.steps.switchToGradingView();
124
+ chartsDotPlotPage.steps.verifyPreviewScore(0, 20);
125
+ }
126
+ chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 0.25 });
127
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25 });
128
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
129
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 0.25 });
130
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
131
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
132
+ chartsDotPlotPage.steps.verifyLockedDotColumnCorrectAnswerSection({ point: 1, min: 1, interval: 0.25 });
133
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 2, min: 1, interval: 0.25 });
134
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 3, min: 1, interval: 0.25 });
135
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 0.25 });
136
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
137
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
138
+ chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
139
+ });
140
+
141
+ 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 dot column should be displayed incorrect and the correct answer should be displayed in the correct answer section number line axis', () => {
142
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 4, min: 1, interval: 0.25 });
143
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 6, min: 1, interval: 0.25, defaultDots: 0 });
144
+ if (view === 'Grading view') {
145
+ studentViewPage.steps.submitResponse();
146
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
147
+ studentViewPage.steps.clickOnGoToGradingViewButton();
148
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
149
+ } else {
150
+ chartsDotPlotPage.steps.verifyPreviewScore(0, 20);
151
+ chartsDotPlotPage.steps.switchToGradingView();
152
+ }
153
+ //Preview tab
154
+ chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 0.25 });
155
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25 });
156
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
157
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 0.25 });
158
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
159
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 0.25 });
160
+ //correct answer section
161
+ chartsDotPlotPage.steps.verifyLockedDotColumnCorrectAnswerSection({ point: 1, min: 1, interval: 0.25 });
162
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 2, min: 1, interval: 0.25 });
163
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 3, min: 1, interval: 0.25 });
164
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 0.25 });
165
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
166
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
167
+ chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
168
+ });
169
+
170
+ it('When the user attempts the question by adding more dots than required in the dot columns having dots by default, 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 dot column should be displayed incorrect and the correct answer should be displayed in the correct answer section number line axis', () => {
171
+ if (view === 'Grading view') {
172
+ studentViewPage.steps.clearResponses();
173
+ };
174
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 3, min: 1, interval: 0.25 });
175
+ if (view === 'Grading view') {
176
+ studentViewPage.steps.submitResponse();
177
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
178
+ studentViewPage.steps.clickOnGoToGradingViewButton();
179
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
180
+ } else {
181
+ chartsDotPlotPage.steps.verifyPreviewScore(0, 20);
182
+ chartsDotPlotPage.steps.switchToGradingView();
183
+ }
184
+ //Preview tab
185
+ chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 0.25 });
186
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25 });
187
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
188
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 0.25 });
189
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
190
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
191
+ //Correct answer section
192
+ chartsDotPlotPage.steps.verifyLockedDotColumnCorrectAnswerSection({ point: 1, min: 1, interval: 0.25 });
193
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 2, min: 1, interval: 0.25 });
194
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 3, min: 1, interval: 0.25 });
195
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 0.25 });
196
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
197
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
198
+ chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
199
+ });
200
+
201
+ it('When the user attempts the question by setting fewer dots than required in the dot columns having dots by default, 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 dot column should be displayed incorrect and the correct answer should be displayed in the correct answer section number line axis', () => {
202
+ if (view === 'Grading view') {
203
+ studentViewPage.steps.clearResponses();
204
+ };
205
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 2, min: 1, interval: 0.25 });
206
+ if (view === 'Grading view') {
207
+ studentViewPage.steps.submitResponse();
208
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
209
+ studentViewPage.steps.clickOnGoToGradingViewButton();
210
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
211
+ } else {
212
+ chartsDotPlotPage.steps.verifyPreviewScore(0, 20);
213
+ chartsDotPlotPage.steps.switchToGradingView();
214
+ }
215
+ //Preview tab
216
+ chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 0.25 });
217
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25 });
218
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
219
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 0.25 });
220
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
221
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
222
+ //correct answer section
223
+ chartsDotPlotPage.steps.verifyLockedDotColumnCorrectAnswerSection({ point: 1, min: 1, interval: 0.25 });
224
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 2, min: 1, interval: 0.25 });
225
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 3, min: 1, interval: 0.25 });
226
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 0.25 });
227
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
228
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
229
+ chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
230
+ });
231
+
232
+ it('When the user attempts the question by removing all the dots to dot column that is not supposed to be empty, 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 dot column should be displayed incorrect and the correct answer should be displayed in the correct answer section number line axis', () => {
233
+ if (view === 'Grading view') {
234
+ studentViewPage.steps.clearResponses();
235
+ };
236
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(0, { point: 2, min: 1, interval: 0.25 });
237
+ if (view === 'Grading view') {
238
+ studentViewPage.steps.submitResponse();
239
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
240
+ studentViewPage.steps.clickOnGoToGradingViewButton();
241
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
242
+ } else {
243
+ chartsDotPlotPage.steps.verifyPreviewScore(0, 20);
244
+ chartsDotPlotPage.steps.switchToGradingView();
245
+ }
246
+ //Preview tab
247
+ chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 0.25 });
248
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25, defaultDots: 0 });
249
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
250
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 0.25 });
251
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
252
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
253
+ //correct answer section
254
+ chartsDotPlotPage.steps.verifyLockedDotColumnCorrectAnswerSection({ point: 1, min: 1, interval: 0.25 });
255
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 2, min: 1, interval: 0.25 });
256
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 3, min: 1, interval: 0.25 });
257
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 0.25 });
258
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
259
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
260
+ chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
261
+ });
262
+
263
+ it('When the user attempts the question by adding dots to the dot columns that is supposed to be empty, 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 dot column should be displayed incorrect and the correct answer should be displayed in the correct answer section number line axis', () => {
264
+ if (view === 'Grading view') {
265
+ studentViewPage.steps.clearResponses();
266
+ };
267
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 6, min: 1, interval: 0.25, defaultDots: 0 });
268
+ if (view === 'Grading view') {
269
+ studentViewPage.steps.submitResponse();
270
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
271
+ studentViewPage.steps.clickOnGoToGradingViewButton();
272
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
273
+ } else {
274
+ chartsDotPlotPage.steps.verifyPreviewScore(0, 20);
275
+ chartsDotPlotPage.steps.switchToGradingView();
276
+ }
277
+ //Preview tab
278
+ chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 0.25 });
279
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25 });
280
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
281
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 0.25 });
282
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
283
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 0.25 });
284
+ //correct answer section
285
+ chartsDotPlotPage.steps.verifyLockedDotColumnCorrectAnswerSection({ point: 1, min: 1, interval: 0.25 });
286
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 2, min: 1, interval: 0.25 });
287
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 3, min: 1, interval: 0.25 });
288
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 0.25 });
289
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 0.25 });
290
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
291
+ chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
292
+ });
293
+
294
+ it('When the user attempts the question by changing number of dots in the dot columns which have the correct number of dots by default and setting a dot column correctly, then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the incorrectly attempted dot column should be displayed incorrect, correctly attempted dot column should be displayed correct, and the correct answer should be displayed in the correct answer section number line axis', () => {
295
+ if (view === 'Grading view') {
296
+ studentViewPage.steps.clearResponses();
297
+ };
298
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 4, min: 1, interval: 0.25 });
299
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 0.25, defaultDots: 0 });
300
+ if (view === 'Grading view') {
301
+ studentViewPage.steps.submitResponse();
302
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
303
+ studentViewPage.steps.clickOnGoToGradingViewButton();
304
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
305
+ } else {
306
+ chartsDotPlotPage.steps.verifyPreviewScore(0, 20);
307
+ chartsDotPlotPage.steps.switchToGradingView();
308
+ }
309
+ //Preview tab
310
+ chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 0.25 });
311
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25 });
312
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
313
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 0.25 });
314
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
315
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
316
+ //correct answer section
317
+ chartsDotPlotPage.steps.verifyLockedDotColumnCorrectAnswerSection({ point: 1, min: 1, interval: 0.25 });
318
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 2, min: 1, interval: 0.25 });
319
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 3, min: 1, interval: 0.25 });
320
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 0.25 });
321
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
322
+ chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
323
+ chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
324
+ });
325
+
326
+ it('When the user attempts the question correctly, the user should be awarded with full points and on switching to grading view, \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
327
+ if (view === 'Grading view') {
328
+ studentViewPage.steps.clearResponses();
329
+ };
330
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 0.25 });
331
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 0.25 });
332
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 0.25, defaultDots: 0 });
333
+ if (view === 'Grading view') {
334
+ studentViewPage.steps.submitResponse();
335
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
336
+ studentViewPage.steps.clickOnGoToGradingViewButton();
337
+ gradingViewPage.steps.verifyGradingViewScore(20, 20);
338
+ } else {
339
+ chartsDotPlotPage.steps.verifyPreviewScore(20, 20);
340
+ chartsDotPlotPage.steps.switchToGradingView();
341
+ }
342
+ chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 0.25 });
343
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25 });
344
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
345
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 0.25 });
346
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 0.25 });
347
+ chartsDotPlotPage.steps.verifyCorrectAnswerSectionNotExists();
348
+ });
349
+
350
+ });
351
+ });
352
+
353
+ if (!grepTags || !grepTags.includes('smoke')) {
354
+ describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
355
+ abortEarlySetup();
356
+ before(() => {
357
+ chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
358
+ cy.barsPreLoaderWait();
359
+ chartsDotPlotPage.steps.addTextInQuestionInstructionsInputField('Dot plot');
360
+ chartsDotPlotPage.steps.selectDotPlot();
361
+ chartsDotPlotPage.steps.enterTextInMinInputField(1);
362
+ chartsDotPlotPage.steps.verifyTextInMinInputField(1);
363
+ chartsDotPlotPage.steps.enterTextInMaxInputField(6);
364
+ chartsDotPlotPage.steps.verifyTextInMaxInputField(6);
365
+ chartsDotPlotPage.steps.setGraphTitle('Five-day observation');
366
+ chartsDotPlotPage.steps.setXAxisLabel('Days');
367
+ chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(2, { point: 1, min: 1, interval: 0.25, defaultDots: 0 });
368
+ chartsDotPlotPage.steps.lockDotColumn({ point: 1, min: 1, interval: 0.25 });
369
+ chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(1, { point: 2, min: 1, interval: 0.25, defaultDots: 0 });
370
+ chartsDotPlotPage.steps.allotPoints(10);
371
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 3, min: 1, interval: 0.25, defaultDots: 0 });
372
+ });
373
+
374
+ 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', () => {
375
+ chartsDotPlotPage.steps.expandMinimumScoringDropdown();
376
+ chartsDotPlotPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
377
+ chartsDotPlotPage.steps.allotMinimumPoints(2);
378
+ chartsDotPlotPage.steps.switchToPreviewTab();
379
+ chartsDotPlotPage.steps.switchToGradingView();
380
+ chartsDotPlotPage.steps.verifyPreviewScore(2, 20);
381
+ chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
382
+ });
383
+
384
+ 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', () => {
385
+ chartsDotPlotPage.steps.resetQuestionPreview();
386
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 3, min: 1, interval: 0.25 });
387
+ chartsDotPlotPage.steps.verifyPreviewScore(2, 20);
388
+ chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
389
+ });
390
+
391
+ 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', () => {
392
+ chartsDotPlotPage.steps.switchToEditTab();
393
+ chartsDotPlotPage.steps.expandMinimumScoringDropdown();
394
+ chartsDotPlotPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
395
+ chartsDotPlotPage.steps.allotMinimumPoints(2);
396
+ chartsDotPlotPage.steps.switchToPreviewTab();
397
+ chartsDotPlotPage.steps.switchToGradingView();
398
+ chartsDotPlotPage.steps.verifyPreviewScore(0, 20);
399
+ chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
400
+ });
401
+
402
+ 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', () => {
403
+ chartsDotPlotPage.steps.resetQuestionPreview();
404
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 3, min: 1, interval: 0.25, defaultDots });
405
+ chartsDotPlotPage.steps.verifyPreviewScore(2, 20);
406
+ });
407
+ });
408
+ };
409
+ });
@@ -0,0 +1,199 @@
1
+ import { chartsDotPlotPage, itemPreviewPage, studentViewPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ var itemReferenceID = "";
5
+ const checkAnswerViews = ['Question preview', 'Item preview', 'Student view'];
6
+ const views = utilities.getViews(checkAnswerViews);
7
+
8
+ describe('Create item page - Charts : Dot - Check answer functionality', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ views.forEach((view) => {
14
+ //Note: Remove after https://redmine.zeuslearning.com/issues/549542 is fixed
15
+ const checkAnswer = (view) => {
16
+ switch (view) {
17
+ case 'Question preview':
18
+ case 'Item preview':
19
+ chartsDotPlotPage.steps.checkAnswer();
20
+ break;
21
+ case 'Student view':
22
+ studentViewPage.steps.checkAnswer();
23
+ break;
24
+ default:
25
+ throw new Error(`Unsupported page identifier: ${view}`);
26
+ }
27
+ };
28
+
29
+ describe(`${view} - Check answer functionality`, { tags: 'smoke' }, () => {
30
+ abortEarlySetup();
31
+ before(() => {
32
+ switch (view) {
33
+ case 'Question preview':
34
+ chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
35
+ cy.barsPreLoaderWait();
36
+ chartsDotPlotPage.steps.addTextInQuestionInstructionsInputField('Dot plot');
37
+ chartsDotPlotPage.steps.selectDotPlot();
38
+ chartsDotPlotPage.steps.enterTextInMinInputField(1);
39
+ chartsDotPlotPage.steps.verifyTextInMinInputField(1);
40
+ chartsDotPlotPage.steps.enterTextInMaxInputField(6);
41
+ chartsDotPlotPage.steps.verifyTextInMaxInputField(6);
42
+ chartsDotPlotPage.steps.setGraphTitle('Five-day observation');
43
+ chartsDotPlotPage.steps.setXAxisLabel('Days');
44
+ //locked column
45
+ chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(1, { point: 1, min: 1, interval: 0.25, defaultDots: 0 });
46
+ chartsDotPlotPage.steps.lockDotColumn({ point: 1, min: 1, interval: 0.25 });
47
+ //adding more dots
48
+ chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(4, { point: 2, min: 1, interval: 0.25, defaultDots: 0 });
49
+ //adding less dots
50
+ chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(1, { point: 3, min: 1, interval: 0.25, defaultDots: 0 });
51
+ //adding equal dots
52
+ chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(4, { point: 4, min: 1, interval: 0.25, defaultDots: 0 });
53
+ chartsDotPlotPage.steps.allotPoints(20);
54
+ //adding more dots
55
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 2, min: 1, interval: 0.25, defaultDots: 0 });
56
+ //adding less dots
57
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 3, min: 1, interval: 0.25, defaultDots: 0 });
58
+ //adding equal dots
59
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 4, min: 1, interval: 0.25, defaultDots: 0 });
60
+ //exclusive to specify correct answer
61
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(5, { point: 5, min: 1, interval: 0.25, defaultDots: 0 });
62
+ chartsDotPlotPage.steps.checkAllowStudentToCheckAnswerCheckbox();
63
+ chartsDotPlotPage.steps.switchToPreviewTab();
64
+ break;
65
+ case 'Item preview':
66
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
67
+ itemPreviewPage.steps.switchToPreviewTab();
68
+ break;
69
+ case 'Student view':
70
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
71
+ break;
72
+ }
73
+ });
74
+
75
+ beforeEach(() => {
76
+ switch (view) {
77
+ case 'Question preview':
78
+ chartsDotPlotPage.steps.verifyCorrectAnswerSectionNotExists();
79
+ chartsDotPlotPage.steps.resetQuestionPreview();
80
+ break;
81
+ case 'Item preview':
82
+ chartsDotPlotPage.steps.verifyCorrectAnswerSectionNotExists();
83
+ itemPreviewPage.steps.resetQuestionPreview();
84
+ break;
85
+ case 'Student view':
86
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
87
+ break;
88
+ }
89
+ });
90
+
91
+ if (view === 'Question preview') {
92
+ after(() => {
93
+ chartsDotPlotPage.steps.clickOnSaveQuestionButton();
94
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
95
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
96
+ });
97
+ };
98
+
99
+ it('When the user clicks \'Check answer\' button without attempting the question, then \'Your answer is incorrect\' status message should be displayed and by default correct dot column should have correct icons, incorrect dot column should have incorrect icons', () => {
100
+ checkAnswer(view);
101
+ chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 0.25 });
102
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25 });
103
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
104
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 0.25 });
105
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
106
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
107
+ chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
108
+ });
109
+
110
+ it('When the user attempts the question incorrectly then on clicking \'Check answer\' button, \'Your answer is incorrect\' should be displayed and the attempted dot column should be displayed incorrect', () => {
111
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(0, { point: 4, min: 1, interval: 0.25 });
112
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 6, min: 1, interval: 0.25, defaultDots: 0 });
113
+ checkAnswer(view);
114
+ chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 0.25 });
115
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25 });
116
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
117
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 0.25, defaultDots: 0 });
118
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
119
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 0.25 });
120
+ chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
121
+ });
122
+
123
+ it('When the user attempts the question by adding more dots than required in the dot column having dots by default, then on clicking \'Check answer\' button, \'Your answer is incorrect\' should be displayed and the attempted dot column should be displayed incorrect', () => {
124
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 3, min: 1, interval: 0.25 });
125
+ checkAnswer(view);
126
+ chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 0.25 });
127
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25 });
128
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
129
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 0.25 });
130
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
131
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
132
+ chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
133
+ });
134
+
135
+ it('When the user attempts the question by setting fewer dots than required in the dot columns having dots by default, then on clicking \'Check answer\' button, \'Your answer is incorrect\' should be displayed and the attempted dot column should be displayed incorrect', () => {
136
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 2, min: 1, interval: 0.25 });
137
+ checkAnswer(view);
138
+ chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 0.25 });
139
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25 });
140
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
141
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 0.25 });
142
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
143
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
144
+ chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
145
+ });
146
+
147
+ it('When the user attempts the question by removing all the dots to dot column that is not supposed to be empty, then on clicking \'Check answer\' button, \'Your answer is incorrect\' should be displayed and the attempted dot column should be displayed incorrect', () => {
148
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(0, { point: 2, min: 1, interval: 0.25 });
149
+ checkAnswer(view);
150
+ chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 0.25 });
151
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25, defaultDots:0 });
152
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
153
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 0.25 });
154
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
155
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
156
+ chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
157
+ });
158
+
159
+ it('When the user attempts the question by adding dots to the dot columns that is supposed to be empty, then on clicking \'Check answer\' button, \'Your answer is incorrect\' should be displayed and the attempted dot column should be displayed incorrect', () => {
160
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 6, min: 1, interval: 0.25, defaultDots: 0 });
161
+ checkAnswer(view);
162
+ chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 0.25 });
163
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25 });
164
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
165
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 0.25 });
166
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
167
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 0.25 });
168
+ chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
169
+ });
170
+
171
+ it('When the user attempts the question by changing number of dots in the dot columns which have the correct number of dots by default and setting a dot column correctly, then on clicking \'Check answer\' button, \'Your answer is incorrect\' should be displayed and incorrectly attempted dot column should be displayed incorrect and correctly attempted dot column should be displayed correct', () => {
172
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 4, min: 1, interval: 0.25 });
173
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 0.25, defaultDots: 0 });
174
+ checkAnswer(view);
175
+ chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 0.25 });
176
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25 });
177
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
178
+ chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 0.25 });
179
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 0.25 });
180
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
181
+ chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
182
+ });
183
+
184
+ it('When the user attempts the question correctly, the user should be awarded with full points, then on clicking \'Check answer\' button, \'Your answer is correct\' should be displayed and the attempted dot columns should be displayed correct', () => {
185
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 0.25 });
186
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 0.25 });
187
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 0.25, defaultDots: 0 });
188
+ checkAnswer(view);
189
+ chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 0.25 });
190
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25 });
191
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
192
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 4, min: 1, interval: 0.25 });
193
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
194
+ chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
195
+ chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
196
+ });
197
+ });
198
+ });
199
+ });