itemengine-cypress-automation 1.0.577-IEI-7065-Improve-test-coverage-for-essay-response-1a0a73e.0 → 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
@@ -2,6 +2,8 @@ import { chartsDotPlotPage } from "../../../../pages";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
3
  const css = Cypress.env('css');
4
4
 
5
+ const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
6
+
5
7
  describe('Create item page - Charts - Dot plot: Partial different with alternative answers', () => {
6
8
  before(() => {
7
9
  cy.loginAs('admin');
@@ -22,14 +24,14 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
22
24
  chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });
23
25
  chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
24
26
  chartsDotPlotPage.steps.allotPartialDifferentWeightsPoints({ 0: 3, 1: 4, 2: 5, 3: 2, 4: 3, 5: 3 });
25
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 1, min: 1, interval: 1, defaultDots: 0 });
26
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });
27
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
28
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
27
29
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
28
30
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
29
31
  chartsDotPlotPage.steps.clickOnAddAlternativeAnswerButton(1);
30
32
  chartsDotPlotPage.steps.allotPartialDifferentWeightsPoints({ 0: 2, 1: 3, 2: 3, 3: 1, 4: 2, 5: 2 });
31
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 1, min: 1, interval: 1, defaultDots: 0 });
32
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 2, min: 1, interval: 1, defaultDots: 0 });
33
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
34
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
33
35
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
34
36
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
35
37
  //chartsDotPlotPage.steps.checkAllowStudentToCheckAnswerCheckbox();
@@ -70,6 +72,8 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
70
72
 
71
73
  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, a status message and correct answer section should not be displayed', () => {
72
74
  chartsDotPlotPage.steps.resetQuestionPreview();
75
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
76
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
73
77
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
74
78
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
75
79
  chartsDotPlotPage.steps.verifyPreviewScore(20, 20);
@@ -82,6 +86,9 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
82
86
  chartsDotPlotPage.steps.verifyEmptyDotColumnPreviewTab({ point: 6, min: 1, interval: 1 });
83
87
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
84
88
  chartsDotPlotPage.steps.verifyCorrectAnswerSectionNotExists();
89
+ if (alternativeAnswerCheck === 'true') {
90
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleNotExists();
91
+ }
85
92
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
86
93
  /*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, a status message and correct answer section should not be displayed')
87
94
  chartsDotPlotPage.steps.checkAnswer();
@@ -97,7 +104,8 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
97
104
 
98
105
  it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with points specified for alternative accordion (less than full points) and on switching to \'Grading\' view, correct icon should be displayed in dot column attempted correctly, a status message and correct answer section should not be displayed', () => {
99
106
  chartsDotPlotPage.steps.resetQuestionPreview();
100
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
107
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
108
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
101
109
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
102
110
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
103
111
  chartsDotPlotPage.steps.verifyPreviewScore(13, 20);
@@ -110,6 +118,9 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
110
118
  chartsDotPlotPage.steps.verifyEmptyDotColumnPreviewTab({ point: 6, min: 1, interval: 1 });
111
119
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
112
120
  chartsDotPlotPage.steps.verifyCorrectAnswerSectionNotExists();
121
+ if (alternativeAnswerCheck === 'true') {
122
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleNotExists();
123
+ }
113
124
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
114
125
  /*(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, a status message and correct answer section should not be displayed')
115
126
  chartsDotPlotPage.steps.checkAnswer();
@@ -125,7 +136,8 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
125
136
 
126
137
  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 correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed in dot column responses from correct accordion and incorrect icon should be displayed in dot column set incorrectly, a status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
127
138
  chartsDotPlotPage.steps.resetQuestionPreview();
128
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1 });
139
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
140
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
129
141
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
130
142
  chartsDotPlotPage.steps.verifyPreviewScore(15, 20);
131
143
  chartsDotPlotPage.steps.switchToGradingView();
@@ -144,6 +156,25 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
144
156
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
145
157
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1});
146
158
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
159
+ //alternative answer
160
+ if (alternativeAnswerCheck === 'true') {
161
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 3 pts, 4 pts, 5 pts, 2 pts, 3 pts, 3 pts)');
162
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
163
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
164
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
165
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
166
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
167
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
168
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 2 pts, 3 pts, 3 pts, 1 pt, 2 pts, 2 pts)');
169
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
170
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
171
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
172
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
173
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
174
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
175
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
176
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
177
+ }
147
178
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
148
179
  /*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 responses from correct accordion and incorrect icon should be displayed in dot column set incorrectly, a status message should not be displayed and correct answer section should not be displayed')
149
180
  chartsDotPlotPage.steps.checkAnswer();
@@ -159,7 +190,8 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
159
190
 
160
191
  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 attempted correctly from alternate accordion, incorrect icon should be displayed in dot column set incorrectly, a status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
161
192
  chartsDotPlotPage.steps.resetQuestionPreview();
162
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
193
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
194
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
163
195
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
164
196
  chartsDotPlotPage.steps.verifyPreviewScore(10, 20);
165
197
  chartsDotPlotPage.steps.switchToGradingView();
@@ -178,6 +210,25 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
178
210
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
179
211
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1});
180
212
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
213
+ //alternative answer
214
+ if (alternativeAnswerCheck === 'true') {
215
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 3 pts, 4 pts, 5 pts, 2 pts, 3 pts, 3 pts)');
216
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
217
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
218
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
219
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
220
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
221
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
222
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 2 pts, 3 pts, 3 pts, 1 pt, 2 pts, 2 pts)');
223
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
224
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
225
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
226
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
227
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
228
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
229
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
230
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
231
+ }
181
232
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
182
233
  /*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 from alternate accordion, incorrect icon should be displayed in dot column set incorrectly, a status message should not be displayed and correct answer section should not be displayed')
183
234
  chartsDotPlotPage.steps.checkAnswer();
@@ -193,7 +244,8 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
193
244
 
194
245
  it('When the user attempts the question partially correct with all the responses correct as per the alternate accordion but one response incomplete, 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 attempted correctly from correct accordion, incorrect icon should be displayed in dot column attempted from alternate accordion and a status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
195
246
  chartsDotPlotPage.steps.resetQuestionPreview();
196
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
247
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
248
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
197
249
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
198
250
  chartsDotPlotPage.steps.verifyPreviewScore(14, 20);
199
251
  chartsDotPlotPage.steps.switchToGradingView();
@@ -212,6 +264,25 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
212
264
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
213
265
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1});
214
266
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
267
+ //alternative answer
268
+ if (alternativeAnswerCheck === 'true') {
269
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 3 pts, 4 pts, 5 pts, 2 pts, 3 pts, 3 pts)');
270
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
271
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
272
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
273
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
274
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
275
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
276
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 2 pts, 3 pts, 3 pts, 1 pt, 2 pts, 2 pts)');
277
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
278
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
279
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
280
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
281
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
282
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
283
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
284
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
285
+ }
215
286
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
216
287
  /*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 the dot column from the correct accordion, incorrect icon should be displayed in the dot column from the alternative accordion and, a status message should not be displayed and correct answer section should not be displayed')
217
288
  chartsDotPlotPage.steps.checkAnswer();
@@ -227,7 +298,8 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
227
298
 
228
299
  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 attempted correctly from correct accordion, incorrect icon should be displayed in dot column attempted from the alternative accordion as score achieved from the correct responses is more than alternate responses, a status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
229
300
  chartsDotPlotPage.steps.resetQuestionPreview();
230
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1 });
301
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
302
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
231
303
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
232
304
  chartsDotPlotPage.steps.verifyPreviewScore(10, 20);
233
305
  chartsDotPlotPage.steps.switchToGradingView();
@@ -246,6 +318,25 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
246
318
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
247
319
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1});
248
320
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
321
+ //alternative answer
322
+ if (alternativeAnswerCheck === 'true') {
323
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 3 pts, 4 pts, 5 pts, 2 pts, 3 pts, 3 pts)');
324
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
325
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
326
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
327
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
328
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
329
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
330
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 2 pts, 3 pts, 3 pts, 1 pt, 2 pts, 2 pts)');
331
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
332
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
333
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
334
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
335
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
336
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
337
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
338
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
339
+ }
249
340
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
250
341
  /*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 attempted correctly from correct accordion, incorrect icon should be displayed in dot column set incorrectly from the alternative accordion, a status message should not be displayed and correct answer section should not be displayed')
251
342
  chartsDotPlotPage.steps.checkAnswer();
@@ -261,8 +352,9 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
261
352
 
262
353
  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 attempted correctly, incorrect icon should be displayed in dot column set incorrectly, correct/incorrect status message should be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
263
354
  chartsDotPlotPage.steps.resetQuestionPreview();
355
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
264
356
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
265
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(0, { point: 2, min: 1, interval: 1 });
357
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1, defaultDots: 2 });
266
358
  chartsDotPlotPage.steps.verifyPreviewScore(14, 20);
267
359
  chartsDotPlotPage.steps.switchToGradingView();
268
360
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 1, min: 1, interval: 1 });
@@ -279,6 +371,25 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
279
371
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
280
372
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
281
373
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1});
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, 3 pts, 3 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 - 2 pts, 3 pts, 3 pts, 1 pt, 2 pts, 2 pts)');
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 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 set incorrectly, a status message should not be displayed and correct answer section should not be displayed')
284
395
  chartsDotPlotPage.steps.checkAnswer();
@@ -294,7 +405,8 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
294
405
 
295
406
  it('When the user attempts the question incorrectly, then the user should be awarded points for correct dot column and on switching to \'Grading\' view, incorrect icon should be displayed in dot column attempted incorrectly, a status message should not be displayed and correct answer section with all correct answers should be displayed', () => {
296
407
  chartsDotPlotPage.steps.resetQuestionPreview();
297
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(0, { point: 2, min: 1, interval: 1 });
408
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
409
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1, defaultDots: 2 });
298
410
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 6, min: 1, interval: 1, defaultDots: 0 });
299
411
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 5, min: 1, interval: 1, defaultDots: 0 });
300
412
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 4, min: 1, interval: 1, defaultDots: 0 });
@@ -314,6 +426,25 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
314
426
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
315
427
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1});
316
428
  chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
429
+ //alternative answer
430
+ if (alternativeAnswerCheck === 'true') {
431
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 3 pts, 4 pts, 5 pts, 2 pts, 3 pts, 3 pts)');
432
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
433
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
434
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
435
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
436
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
437
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
438
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 2 pts, 3 pts, 3 pts, 1 pt, 2 pts, 2 pts)');
439
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
440
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
441
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
442
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
443
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
444
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
445
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
446
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
447
+ }
317
448
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
318
449
  /*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 should not be displayed and correct answer section should not be displayed')
319
450
  chartsDotPlotPage.steps.checkAnswer();
@@ -333,22 +464,23 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
333
464
  chartsDotPlotPage.steps.deleteAlternativeAnswerAccordion(0);
334
465
  chartsDotPlotPage.steps.addAlternativeAnswerAccordion(1);
335
466
  chartsDotPlotPage.steps.allotPartialDifferentWeightsPoints({ 0: 1.5, 1: 2, 2: 3, 3: 3, 4: 3.5, 5: 18 });
336
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 1, min: 1, interval: 1, defaultDots: 0 });
337
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 2, min: 1, interval: 1, defaultDots: 0 });
467
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
468
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 2, min: 1, interval: 1, defaultDots: 2 });
338
469
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 3, min: 1, interval: 1, defaultDots: 0 });
339
470
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 4, min: 1, interval: 1, defaultDots: 0 });
340
471
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 5, min: 1, interval: 1, defaultDots: 0 });
341
472
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 6, min: 1, interval: 1, defaultDots: 0 });
342
473
  chartsDotPlotPage.steps.expandCorrectAnswerAccordion();
343
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 1, min: 1, interval: 1 });
344
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 2, min: 1, interval: 1 });
474
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
475
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
345
476
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 3, min: 1, interval: 1 });
346
477
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 4, min: 1, interval: 1 });
347
478
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 5, min: 1, interval: 1, defaultDots: 0 });
348
479
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 6, min: 1, interval: 1, defaultDots: 0 });
349
480
  chartsDotPlotPage.steps.allotPartialDifferentWeightsPoints({ 0: 0.5, 1: 1, 2: 3, 3: 2, 4: 2.5, 5: 16 });
350
481
  chartsDotPlotPage.steps.switchToPreviewTab();
351
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 2, min: 1, interval: 1 });
482
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
483
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1, defaultDots: 2 });
352
484
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 3, min: 1, interval: 1, defaultDots: 0 });
353
485
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 4, min: 1, interval: 1, defaultDots: 0 });
354
486
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 5, min: 1, interval: 1, defaultDots: 0 });
@@ -369,6 +501,25 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
369
501
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
370
502
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
371
503
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
504
+ //alternative answer
505
+ if (alternativeAnswerCheck === 'true') {
506
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(Points per response in order of appearance - 1.5 pts, 2 pts, 3 pts, 3 pts, 3.5 pts, 18 pts)');
507
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
508
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
509
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
510
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
511
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
512
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
513
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(Points per response in order of appearance - 0.5 pts, 1 pt, 3 pts, 2 pts, 2.5 pts, 16 pts)');
514
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
515
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
516
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
517
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
518
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
519
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
520
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
521
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
522
+ }
372
523
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
373
524
  /*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 correct accordion, incorrect icons icons should be displayed beside the incorrectly answered responses, correct/incorrect answer label should not be displayed, correct answer section should not be displayed')
374
525
  chartsDotPlotPage.steps.checkAnswer();