itemengine-cypress-automation 1.0.576 → 1.0.578-IEI-7079-de6e553.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +205 -0
  2. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +205 -0
  3. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +205 -0
  4. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +248 -1
  5. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +247 -0
  6. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +223 -0
  7. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +223 -0
  8. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +175 -0
  9. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +223 -0
  10. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePointsLocked.js +191 -0
  11. package/cypress/e2e/ILC/ChartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePointsLocked.js +184 -24
  12. package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +177 -0
  13. package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +206 -0
  14. package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +205 -0
  15. package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +228 -0
  16. package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +229 -1
  17. package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +229 -1
  18. package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +206 -0
  19. package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +183 -0
  20. package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +206 -0
  21. package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePointsLocked.js +184 -0
  22. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +164 -10
  23. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +165 -11
  24. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +165 -11
  25. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +164 -14
  26. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +121 -10
  27. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +167 -16
  28. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +178 -15
  29. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +121 -10
  30. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +165 -13
  31. package/cypress/pages/chartsBarPage.js +44 -1
  32. package/cypress/pages/chartsDotPlotPage.js +99 -1
  33. package/cypress/pages/chartsLinePage.js +48 -1
  34. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  import { chartsDotPlotPage } from "../../../../pages";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
3
  const css = Cypress.env('css');
4
+ const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
4
5
 
5
6
  describe('Create item page - Charts - Dot plot: Partial different weights', () => {
6
7
  before(() => {
@@ -24,14 +25,14 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
24
25
  chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });
25
26
  chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
26
27
  chartsDotPlotPage.steps.allotPartialDifferentWeightsPoints({ 0: 2, 1: 3, 2: 3, 3: 1, 4: 2, 5: 2 });
27
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 1, min: 1, interval: 1, defaultDots: 0 });
28
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });
28
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
29
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
29
30
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
30
31
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
31
32
  chartsDotPlotPage.steps.clickOnAddAlternativeAnswerButton(1);
32
33
  chartsDotPlotPage.steps.allotPartialDifferentWeightsPoints({ 0: 3, 1: 4, 2: 5, 3: 2, 4: 3, 5: 3 });
33
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 1, min: 1, interval: 1, defaultDots: 0 });
34
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 2, min: 1, interval: 1, defaultDots: 0 });
34
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
35
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
35
36
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
36
37
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
37
38
  // chartsDotPlotPage.steps.checkAllowStudentToCheckAnswerCheckbox();
@@ -72,6 +73,8 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
72
73
 
73
74
  it('When the user attempts the question with responses from the correct accordion, then the user should be awarded points of the correct accordion (less than full points) and on switching to \'Grading\' view, correct icon should be displayed in dot column attempted correctly, status message and correct answer section should not be displayed', () => {
74
75
  chartsDotPlotPage.steps.resetQuestionPreview();
76
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
77
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
75
78
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
76
79
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
77
80
  chartsDotPlotPage.steps.verifyPreviewScore(13, 20);
@@ -84,6 +87,9 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
84
87
  chartsDotPlotPage.steps.verifyEmptyDotColumnPreviewTab({ point: 6, min: 1, interval: 1 });
85
88
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
86
89
  chartsDotPlotPage.steps.verifyCorrectAnswerSectionNotExists();
90
+ if (alternativeAnswerCheck === 'true') {
91
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleNotExists();
92
+ }
87
93
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
88
94
  /* cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed in dot column attempted correctly, status message and correct answer section should not be displayed')
89
95
  chartsDotPlotPage.steps.checkAnswer();
@@ -99,7 +105,8 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
99
105
 
100
106
  it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with full points and on switching to \'Grading\' view, correct icon should be displayed in dot column attempted correctly, status message and correct answer section should not be displayed', () => {
101
107
  chartsDotPlotPage.steps.resetQuestionPreview();
102
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
108
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
109
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
103
110
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
104
111
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
105
112
  chartsDotPlotPage.steps.verifyPreviewScore(20, 20);
@@ -112,6 +119,9 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
112
119
  chartsDotPlotPage.steps.verifyEmptyDotColumnPreviewTab({ point: 6, min: 1, interval: 1});
113
120
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
114
121
  chartsDotPlotPage.steps.verifyCorrectAnswerSectionNotExists();
122
+ if (alternativeAnswerCheck === 'true') {
123
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleNotExists();
124
+ }
115
125
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
116
126
  /*cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed in dot column attempted correctly, status message and correct answer section should not be displayed')
117
127
  chartsDotPlotPage.steps.checkAnswer();
@@ -127,7 +137,8 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
127
137
 
128
138
  it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded with points of the correctly attempted responses according to the correct accordion and on switching to \'Grading\' view, correct icon should be displayed in dot column attempted correctly, incorrect icon should be displayed in dot column set to incorrectly, status message should not be displayed and correct answer section with all correct answers from the alternate accordion should be displayed', () => {
129
139
  chartsDotPlotPage.steps.resetQuestionPreview();
130
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1 });
140
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
141
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
131
142
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
132
143
  chartsDotPlotPage.steps.verifyPreviewScore(10, 20);
133
144
  chartsDotPlotPage.steps.switchToGradingView();
@@ -146,6 +157,25 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
146
157
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
147
158
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
148
159
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
160
+ //alternative answer
161
+ if (alternativeAnswerCheck === 'true') {
162
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 3 pts, 4 pts, 5 pts, 2 pts, 3 pts, 3 pts)');
163
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
164
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
165
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
166
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
167
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
168
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
169
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 2 pts, 3 pts, 3 pts, 1 pt, 2 pts, 2 pts)');
170
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
171
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
172
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
173
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
174
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
175
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
176
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
177
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
178
+ }
149
179
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
150
180
  /*cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed in dot column attempted correctly, incorrect icon should be displayed in dot column set to incorrectly, status message and correct answer section should not be displayed')
151
181
  chartsDotPlotPage.steps.checkAnswer();
@@ -161,7 +191,8 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
161
191
 
162
192
  it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded with points of the correctly attempted responses from the alternative accordion and on switching to \'Grading\' view, correct icons should be displayed in the correctly attempted dot column, incorrect icons should be displayed in the unattempted dot column, status message should not be displayed and correct answer section with all correct answers from the alternate accordion should be displayed', () => {
163
193
  chartsDotPlotPage.steps.resetQuestionPreview();
164
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
194
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
195
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
165
196
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
166
197
  chartsDotPlotPage.steps.verifyPreviewScore(15, 20);
167
198
  chartsDotPlotPage.steps.switchToGradingView();
@@ -180,6 +211,25 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
180
211
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
181
212
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
182
213
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
214
+ //alternative answer
215
+ if (alternativeAnswerCheck === 'true') {
216
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 3 pts, 4 pts, 5 pts, 2 pts, 3 pts, 3 pts)');
217
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
218
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
219
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
220
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
221
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
222
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
223
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 2 pts, 3 pts, 3 pts, 1 pt, 2 pts, 2 pts)');
224
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
225
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
226
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
227
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
228
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
229
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
230
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
231
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
232
+ }
183
233
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
184
234
  /* cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed in dot column attempted correctly, incorrect icon should be displayed in dot column set to incorrectly, status message and correct answer section should not be displayed')
185
235
  chartsDotPlotPage.steps.checkAnswer();
@@ -195,6 +245,7 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
195
245
 
196
246
  it('When the user attempts the question partially correct with all the responses correct as per the correct accordion but one response incomplete, then the user should be awarded with points of the correctly attempted responses and on switching to \'Grading\' view, correct icon should be displayed in dot column attempted correctly, incorrect icon should be displayed in dot column set to incorrectly, status message should not be displayed and correct answer section with all correct answers from the alternate accordion should be displayed', () => {
197
247
  chartsDotPlotPage.steps.resetQuestionPreview();
248
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
198
249
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
199
250
  chartsDotPlotPage.steps.verifyPreviewScore(13, 20);
200
251
  chartsDotPlotPage.steps.switchToGradingView();
@@ -212,6 +263,25 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
212
263
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
213
264
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
214
265
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
266
+ //alternative answer
267
+ if (alternativeAnswerCheck === 'true') {
268
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 3 pts, 4 pts, 5 pts, 2 pts, 3 pts, 3 pts)');
269
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
270
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
271
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
272
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
273
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
274
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
275
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 2 pts, 3 pts, 3 pts, 1 pt, 2 pts, 2 pts)');
276
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
277
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
278
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
279
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
280
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
281
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
282
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
283
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
284
+ }
215
285
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
216
286
  /*cy.log('When the user has attempted the question with partially correct with all the response correct as per the alternative accordion but one response incomplete and clicks on \'Check answer\' button, then correct icon should be displayed in dot column attempted correctly, incorrect icon should be displayed in dot column set to incorrectly, status message and correct answer section should not be displayed')
217
287
  chartsDotPlotPage.steps.checkAnswer();
@@ -227,7 +297,8 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
227
297
 
228
298
  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 with points of the correctly attempted responses and on switching to \'Grading\' view, correct icon should be displayed in dot column set correctly from alternate accordion, incorrect icon should be displayed in dot column set incorrectly from the correct accordion responses as score achieved from the alternative responses is more than correct responses, status message should not be displayed and correct answer section with all correct answers from the alternate accordion along with dropzone numeration should be displayed', () => {
229
299
  chartsDotPlotPage.steps.resetQuestionPreview();
230
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1 });
300
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
301
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
231
302
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
232
303
  chartsDotPlotPage.steps.verifyPreviewScore(11, 20);
233
304
  chartsDotPlotPage.steps.switchToGradingView();
@@ -245,6 +316,25 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
245
316
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
246
317
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
247
318
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
319
+ //alternative answer
320
+ if (alternativeAnswerCheck === 'true') {
321
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 3 pts, 4 pts, 5 pts, 2 pts, 3 pts, 3 pts)');
322
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
323
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
324
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
325
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
326
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
327
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
328
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 2 pts, 3 pts, 3 pts, 1 pt, 2 pts, 2 pts)');
329
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
330
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
331
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
332
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
333
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
334
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
335
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
336
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
337
+ }
248
338
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
249
339
  /*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed in dot column set correctly from alternate accordion, incorrect icon should be displayed in dot column set incorrectly from the correct accordion, a status message and correct answer section should not be displayed')
250
340
  chartsDotPlotPage.steps.checkAnswer();
@@ -260,8 +350,9 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
260
350
 
261
351
  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 with points of the correctly attempted responses from the tab that has more points alloted for the response and on switching to \'Grading\' view, correct icon should be displayed in common dot column attempted correctly, incorrect icon should be displayed in dot column attempted incorrectly, status message should not be displayed and correct answer section with all correct answers from the alternate accordion along with dropzone numeration should be displayed', () => {
262
352
  chartsDotPlotPage.steps.resetQuestionPreview();
353
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
263
354
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
264
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(0, { point: 2, min: 1, interval: 1 });
355
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1, defaultDots: 2 });
265
356
  chartsDotPlotPage.steps.verifyPreviewScore(13, 20);
266
357
  chartsDotPlotPage.steps.switchToGradingView();
267
358
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 1, min: 1, interval: 1 });
@@ -278,6 +369,25 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
278
369
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
279
370
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
280
371
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
372
+ //alternative answer
373
+ if (alternativeAnswerCheck === 'true') {
374
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 3 pts, 4 pts, 5 pts, 2 pts, 3 pts, 3 pts)');
375
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
376
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
377
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
378
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
379
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
380
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
381
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 2 pts, 3 pts, 3 pts, 1 pt, 2 pts, 2 pts)');
382
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
383
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
384
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
385
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
386
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
387
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
388
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
389
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
390
+ }
281
391
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
282
392
  /*cy.log('When the user has attempted the question with common response of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed in common dot column attempted correctly, incorrect icon should be displayed in dot column attempted incorrectly status message and correct answer section should not be displayed')
283
393
  chartsDotPlotPage.steps.checkAnswer();
@@ -293,7 +403,8 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
293
403
 
294
404
  it('When the user attempts the question incorrectly, then the user should be awarded with 0 points and on switching to \'Grading\' view, incorrect icon should be displayed in dot column attempted incorrectly, status message should not be displayed and correct answer section with all alternative answers along with dropzone numeration should be displayed', () => {
295
405
  chartsDotPlotPage.steps.resetQuestionPreview();
296
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(0, { point: 2, min: 1, interval: 1 });
406
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
407
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1, defaultDots: 2 });
297
408
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 4, min: 1, interval: 1, defaultDots: 0 });
298
409
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 5, min: 1, interval: 1, defaultDots: 0 });
299
410
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 6, min: 1, interval: 1, defaultDots: 0 });
@@ -313,6 +424,25 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
313
424
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
314
425
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
315
426
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
427
+ //alternative answer
428
+ if (alternativeAnswerCheck === 'true') {
429
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 3 pts, 4 pts, 5 pts, 2 pts, 3 pts, 3 pts)');
430
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
431
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
432
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
433
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
434
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
435
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
436
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 2 pts, 3 pts, 3 pts, 1 pt, 2 pts, 2 pts)');
437
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
438
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
439
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
440
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
441
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
442
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
443
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
444
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
445
+ }
316
446
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
317
447
  /*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icon should be displayed in dot column attempted incorrectly, a status message and correct answer section should not be displayed')
318
448
  chartsDotPlotPage.steps.checkAnswer();
@@ -332,21 +462,22 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
332
462
  chartsDotPlotPage.steps.deleteAlternativeAnswerAccordion(0);
333
463
  chartsDotPlotPage.steps.addAlternativeAnswerAccordion(1);
334
464
  chartsDotPlotPage.steps.allotPartialDifferentWeightsPoints({ 0: 1.5, 1: 1, 2: 2, 3: 2.5, 4: 2, 5: 16 });
335
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 1, min: 1, interval: 1, defaultDots: 0 });
336
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 2, min: 1, interval: 1, defaultDots: 0 });
465
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
466
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 2, min: 1, interval: 1, defaultDots: 2 });
337
467
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 3, min: 1, interval: 1, defaultDots: 0 });
338
468
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 4, min: 1, interval: 1, defaultDots: 0 });
339
469
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 5, min: 1, interval: 1, defaultDots: 0 });
340
470
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 6, min: 1, interval: 1, defaultDots: 0 });
341
471
  chartsDotPlotPage.steps.expandCorrectAnswerAccordion();
342
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 2, min: 1, interval: 1 });
472
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
343
473
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 3, min: 1, interval: 1 });
344
474
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 4, min: 1, interval: 1 });
345
475
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 5, min: 1, interval: 1, defaultDots: 0 });
346
476
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 6, min: 1, interval: 1, defaultDots: 0 });
347
477
  chartsDotPlotPage.steps.allotPartialDifferentWeightsPoints({ 0: 2, 1: 1.5, 2: 3, 3: 2.5, 4: 4, 5: 10 });
348
478
  chartsDotPlotPage.steps.switchToPreviewTab();
349
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1 });
479
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
480
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
350
481
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 3, min: 1, interval: 1, defaultDots: 0 });
351
482
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 4, min: 1, interval: 1, defaultDots: 0 });
352
483
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 5, min: 1, interval: 1, defaultDots: 0 });
@@ -367,6 +498,25 @@ describe('Create item page - Charts - Dot plot: Partial different weights', () =
367
498
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
368
499
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
369
500
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
501
+ //alternative answer
502
+ if (alternativeAnswerCheck === 'true') {
503
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 1.5 pts, 1 pt, 2 pts, 2.5 pts, 2 pts, 16 pts)');
504
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
505
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
506
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
507
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
508
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
509
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
510
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 2 pts, 1.5 pts, 3 pts, 2.5 pts, 4 pts, 10 pts)');
511
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
512
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
513
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
514
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
515
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
516
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
517
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
518
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
519
+ }
370
520
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
371
521
  /*cy.log('When user attempts the question correctly and clicks on the \'Check answer\' button, correct icons icons should be displayed beside the correct responses from the alternate accordion, incorrect icons icons should be displayed beside the incorrectly attempted responses, correct/incorrect answer label, correct answer section should not be displayed')
372
522
  chartsDotPlotPage.steps.checkAnswer();
@@ -1,6 +1,8 @@
1
1
  import { chartsDotPlotPage } from "../../../../pages";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
3
 
4
+ const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
5
+
4
6
  describe('Create item page - Charts - Dot plot: Partial different with alternative answers', () => {
5
7
  before(() => {
6
8
  cy.loginAs('admin');
@@ -21,14 +23,14 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
21
23
  chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });
22
24
  chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
23
25
  chartsDotPlotPage.steps.allotPartialDifferentWeightsPoints({ 0: 3, 1: 4, 2: 5, 3: 2, 4: 4, 5: 2 });
24
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 1, min: 1, interval: 1, defaultDots: 0 });
25
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });
26
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
27
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
26
28
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
27
29
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
28
30
  chartsDotPlotPage.steps.clickOnAddAlternativeAnswerButton(1);
29
31
  chartsDotPlotPage.steps.allotPartialDifferentWeightsPoints({ 0: 4, 1: 2, 2: 6, 3: 5, 4: 2, 5: 1 });
30
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 1, min: 1, interval: 1, defaultDots: 0 });
31
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 2, min: 1, interval: 1, defaultDots: 0 });
32
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
33
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
32
34
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
33
35
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
34
36
  //chartsDotPlotPage.steps.checkAllowStudentToCheckAnswerCheckbox();
@@ -69,6 +71,8 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
69
71
 
70
72
  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, correct icon should be displayed in dot column attempted correctly, correct/incorrect status message and correct answer section should not be displayed', () => {
71
73
  chartsDotPlotPage.steps.resetQuestionPreview();
74
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
75
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
72
76
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
73
77
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
74
78
  chartsDotPlotPage.steps.verifyPreviewScore(20, 20);
@@ -81,6 +85,9 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
81
85
  chartsDotPlotPage.steps.verifyEmptyDotColumnPreviewTab({ point: 6, min: 1, interval: 1 });
82
86
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
83
87
  chartsDotPlotPage.steps.verifyCorrectAnswerSectionNotExists();
88
+ if (alternativeAnswerCheck === 'true') {
89
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleNotExists();
90
+ }
84
91
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
85
92
  /*cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed in dot column attempted correctly, correct/incorrect status message and correct answer section should not be displayed')
86
93
  chartsDotPlotPage.steps.checkAnswer();
@@ -96,7 +103,8 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
96
103
 
97
104
  it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with full points and on switching to \'Grading\' view,correct icon should be displayed in dot column attempted correctly, correct/incorrect status message and correct answer section should not be displayed', () => {
98
105
  chartsDotPlotPage.steps.resetQuestionPreview();
99
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
106
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
107
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
100
108
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
101
109
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
102
110
  chartsDotPlotPage.steps.verifyPreviewScore(20, 20);
@@ -109,6 +117,9 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
109
117
  chartsDotPlotPage.steps.verifyEmptyDotColumnPreviewTab({ point: 6, min: 1, interval: 1 });
110
118
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
111
119
  chartsDotPlotPage.steps.verifyCorrectAnswerSectionNotExists();
120
+ if (alternativeAnswerCheck === 'true') {
121
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleNotExists();
122
+ }
112
123
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
113
124
  /*cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed in dot column attempted correctly, correct/incorrect status message and correct answer section should not be displayed')
114
125
  chartsDotPlotPage.steps.checkAnswer();
@@ -124,7 +135,8 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
124
135
 
125
136
  it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded points of the correct accordion and on switching to \'Grading\' view, correct icon should be displayed in dot column set correctly from correct accordion, incorrect icon should be displayed in dot column set incorrectly, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
126
137
  chartsDotPlotPage.steps.resetQuestionPreview();
127
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1 });
138
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
139
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
128
140
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
129
141
  chartsDotPlotPage.steps.verifyPreviewScore(15, 20);
130
142
  chartsDotPlotPage.steps.switchToGradingView();
@@ -143,6 +155,25 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
143
155
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
144
156
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
145
157
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
158
+ //alternative answer
159
+ if (alternativeAnswerCheck === 'true') {
160
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 3 pts, 4 pts, 5 pts, 2 pts, 4 pts, 2 pts)');
161
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
162
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
163
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
164
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
165
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
166
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
167
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 4 pts, 2 pts, 6 pts, 5 pts, 2 pts, 1 pt)');
168
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
169
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
170
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
171
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
172
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
173
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
174
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
175
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
176
+ }
146
177
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
147
178
  /*cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed in dot column set correctly from correct accordion, incorrect icon should be displayed in dot column set incorrectly, correct/incorrect status message and correct answer section should not be displayed')
148
179
  chartsDotPlotPage.steps.checkAnswer();
@@ -158,7 +189,8 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
158
189
 
159
190
  it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed in dot column set correctly from alternate accordion, incorrect icon should be displayed in dot column set incorrectly, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
160
191
  chartsDotPlotPage.steps.resetQuestionPreview();
161
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
192
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
193
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
162
194
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
163
195
  chartsDotPlotPage.steps.verifyPreviewScore(14, 20);
164
196
  chartsDotPlotPage.steps.switchToGradingView();
@@ -177,6 +209,25 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
177
209
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
178
210
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
179
211
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
212
+ //alternative answer
213
+ if (alternativeAnswerCheck === 'true') {
214
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 3 pts, 4 pts, 5 pts, 2 pts, 4 pts, 2 pts)');
215
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
216
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
217
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
218
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
219
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
220
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
221
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 4 pts, 2 pts, 6 pts, 5 pts, 2 pts, 1 pt)');
222
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
223
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
224
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
225
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
226
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
227
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
228
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
229
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
230
+ }
180
231
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
181
232
  /*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed in dot column set correctly from alternate accordion, incorrect icon should be displayed in dot column set incorrectly, correct/incorrect status message and correct answer section should not be displayed')
182
233
  chartsDotPlotPage.steps.checkAnswer();
@@ -192,7 +243,8 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
192
243
 
193
244
  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 points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed in dot column set correctly from correct accordion, incorrect icon should be displayed in dot column set incorrectly from alternate accordion, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
194
245
  chartsDotPlotPage.steps.resetQuestionPreview();
195
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
246
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
247
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
196
248
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
197
249
  chartsDotPlotPage.steps.verifyPreviewScore(11, 20);
198
250
  chartsDotPlotPage.steps.switchToGradingView();
@@ -211,6 +263,25 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
211
263
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
212
264
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
213
265
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
266
+ //alternative answer
267
+ if (alternativeAnswerCheck === 'true') {
268
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 3 pts, 4 pts, 5 pts, 2 pts, 4 pts, 2 pts)');
269
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
270
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
271
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
272
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
273
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
274
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
275
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 4 pts, 2 pts, 6 pts, 5 pts, 2 pts, 1 pt)');
276
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
277
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
278
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
279
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
280
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
281
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
282
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
283
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
284
+ }
214
285
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
215
286
  /* cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed in dot column set correctly, incorrect icon should be displayed in dot column set incorrectly, correct/incorrect status message and correct answer section should not be displayed')
216
287
  chartsDotPlotPage.steps.checkAnswer();
@@ -226,8 +297,9 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
226
297
 
227
298
  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 points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed in common dot column set correctly, incorrect icon should be displayed in dot column set incorrectly, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
228
299
  chartsDotPlotPage.steps.resetQuestionPreview();
300
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
229
301
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
230
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(0, { point: 2, min: 1, interval: 1 });
302
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1, defaultDots: 2 });
231
303
  chartsDotPlotPage.steps.verifyPreviewScore(16, 20);
232
304
  chartsDotPlotPage.steps.switchToGradingView();
233
305
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 1, min: 1, interval: 1 });
@@ -244,6 +316,25 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
244
316
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
245
317
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
246
318
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
319
+ //alternative answer
320
+ if (alternativeAnswerCheck === 'true') {
321
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 3 pts, 4 pts, 5 pts, 2 pts, 4 pts, 2 pts)');
322
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
323
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
324
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
325
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
326
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
327
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
328
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 4 pts, 2 pts, 6 pts, 5 pts, 2 pts, 1 pt)');
329
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
330
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
331
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
332
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
333
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
334
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
335
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
336
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
337
+ }
247
338
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
248
339
  /* cy.log('When the user has attempted the question with the common response between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed in common dot column set correctly, incorrect icon should be displayed in dot column set incorrectly, correct/incorrect status message and correct answer section should not be displayed')
249
340
  chartsDotPlotPage.steps.checkAnswer();
@@ -259,7 +350,8 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
259
350
 
260
351
  it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed in dot column set incorrectly, correct/incorrect status message should not be displayed and correct answer section with all correct answers ', () => {
261
352
  chartsDotPlotPage.steps.resetQuestionPreview();
262
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(0, { point: 2, min: 1, interval: 1 });
353
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
354
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1, defaultDots: 2 });
263
355
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 6, min: 1, interval: 1, defaultDots: 0 });
264
356
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 5, min: 1, interval: 1, defaultDots: 0 });
265
357
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 4, min: 1, interval: 1, defaultDots: 0 });
@@ -279,6 +371,25 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
279
371
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
280
372
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
281
373
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
374
+ //alternative answer
375
+ if (alternativeAnswerCheck === 'true') {
376
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 3 pts, 4 pts, 5 pts, 2 pts, 4 pts, 2 pts)');
377
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
378
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
379
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
380
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
381
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
382
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
383
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 4 pts, 2 pts, 6 pts, 5 pts, 2 pts, 1 pt)');
384
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
385
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
386
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
387
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
388
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
389
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
390
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
391
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
392
+ }
282
393
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
283
394
  /*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icon should be displayed in dot column set incorrectly, correct/incorrect status message and correct answer section should not be displayed')
284
395
  chartsDotPlotPage.steps.checkAnswer();