itemengine-cypress-automation 1.0.573-IEI-7065-Improve-test-coverage-for-essay-response-c25d1ee.0 → 1.0.573-IEI-7079-ed54ea2.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 (50) 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 +24 -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/EssayResponse/additionalSettings.js +2 -8
  23. package/cypress/e2e/ILC/EssayResponse/additionalSettingsBasic.js +0 -15
  24. package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +1 -14
  25. package/cypress/e2e/ILC/EssayResponse/editTabBasicSections.js +5 -155
  26. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +4 -116
  27. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +0 -93
  28. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions4.js +0 -114
  29. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +1 -11
  30. package/cypress/e2e/ILC/EssayResponse/previewAddTable.js +2 -29
  31. package/cypress/e2e/ILC/EssayResponse/previewContentsForAllViews.smoke.js +1 -11
  32. package/cypress/e2e/ILC/EssayResponse/previewEditTable.js +0 -75
  33. package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +0 -13
  34. package/cypress/e2e/ILC/EssayResponse/studentViewSettings.js +0 -71
  35. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +164 -10
  36. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +165 -11
  37. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +165 -11
  38. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +24 -14
  39. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +18 -10
  40. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +26 -16
  41. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +25 -15
  42. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +18 -10
  43. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +24 -13
  44. package/cypress/pages/chartsBarPage.js +44 -1
  45. package/cypress/pages/chartsDotPlotPage.js +99 -1
  46. package/cypress/pages/chartsLinePage.js +48 -1
  47. package/cypress/pages/components/equationEditorSectionCommonComponent.js +0 -21
  48. package/cypress/pages/components/essayResponseCommonComponents.js +1 -20
  49. package/cypress/pages/essayResponsePage.js +0 -2
  50. package/package.json +1 -1
@@ -240,30 +240,6 @@ describe('Essay Response Preview: Edit Table functionality', () => {
240
240
  essayResponsePage.steps.verifyContentOfTableStandardCell(3, 'Standard cell');
241
241
  });
242
242
 
243
- it('When user clicks on \'Insert Above\' button then a new identical row should be inserted above (item preview)', () => {
244
- cy.log('Saving question to switch to item preview context.');
245
- essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
246
- essayResponsePage.steps.switchToPreviewTab(); // Item preview context
247
- cy.log('Right clicking in header cell to open edit table flyout.');
248
- essayResponsePage.steps.openEditTablePopupThroughHeaderCell(0);
249
- essayResponsePage.steps.clickOnEditTableInsertAboveButton();
250
- cy.log('Opening flyout through a standard cell to insert another row above it.');
251
- essayResponsePage.steps.openEditTablePopupThroughNormalCell(1);
252
- essayResponsePage.steps.clickOnEditTableInsertAboveButton();
253
- essayResponsePage.steps.verifyTableHeaderRowCellCount(6);
254
- essayResponsePage.steps.verifyTableRowHeaderCellCount(0, 3);
255
- essayResponsePage.steps.verifyTableRowHeaderCellCount(1, 3);
256
- essayResponsePage.steps.verifyTableRowHeaderCellCount(2, 1);
257
- essayResponsePage.steps.verifyTableRowStandardCellCount(2, 2);
258
- essayResponsePage.steps.verifyTableRowHeaderCellCount(3, 1);
259
- essayResponsePage.steps.verifyTableRowStandardCellCount(3, 2);
260
- essayResponsePage.steps.verifyContentOfTableHeaderCell(7, 'Header cell');
261
- essayResponsePage.steps.verifyContentOfTableStandardCell(3, 'Standard cell');
262
- cy.log('Returning to edit mode for subsequent tests.');
263
- essayResponsePage.steps.switchToEditTab();
264
- essayResponsePage.steps.clickOnEditQuestionButton();
265
- });
266
-
267
243
  it('When user clicks on \'Insert Below\' button, then a new row should be inserted below the row in which the user had focused. Also the newly inserted row should be identical to the row in which user had focused.', () => {
268
244
  cy.log('Pre-step: Right click in the required cell to open edit table flyout.');
269
245
  essayResponsePage.steps.openEditTablePopupThroughHeaderCell(0);
@@ -283,28 +259,6 @@ describe('Essay Response Preview: Edit Table functionality', () => {
283
259
  essayResponsePage.steps.verifyContentOfTableStandardCell(1, 'Standard cell');
284
260
  });
285
261
 
286
- it('When user clicks on \'Insert Below\' button then a new identical row should be inserted below (item preview)', () => {
287
- cy.log('Saving question to switch to item preview context.');
288
- essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
289
- essayResponsePage.steps.switchToPreviewTab();
290
- essayResponsePage.steps.openEditTablePopupThroughHeaderCell(0);
291
- essayResponsePage.steps.clickOnEditTableInsertBelowButton();
292
- essayResponsePage.steps.openEditTablePopupThroughNormalCell(1);
293
- essayResponsePage.steps.clickOnEditTableInsertBelowButton();
294
- essayResponsePage.steps.verifyTableHeaderRowCellCount(6);
295
- essayResponsePage.steps.verifyTableRowHeaderCellCount(0, 3);
296
- essayResponsePage.steps.verifyTableRowHeaderCellCount(1, 3);
297
- essayResponsePage.steps.verifyTableRowHeaderCellCount(2, 1);
298
- essayResponsePage.steps.verifyTableRowStandardCellCount(2, 2);
299
- essayResponsePage.steps.verifyTableRowHeaderCellCount(3, 1);
300
- essayResponsePage.steps.verifyTableRowStandardCellCount(3, 2);
301
- essayResponsePage.steps.verifyContentOfTableHeaderCell(6, 'Header cell');
302
- essayResponsePage.steps.verifyContentOfTableStandardCell(1, 'Standard cell');
303
- cy.log('Returning to edit mode for subsequent tests.');
304
- essayResponsePage.steps.switchToEditTab();
305
- essayResponsePage.steps.clickOnEditQuestionButton();
306
- });
307
-
308
262
  it('When user clicks on \'Delete Row\' button then, the row in which it had focused should be deleted.', () => {
309
263
  cy.log('Pre-step: Right click in the required cell to open edit table flyout.');
310
264
  essayResponsePage.steps.openEditTablePopupThroughHeaderCell(0);
@@ -316,22 +270,6 @@ describe('Essay Response Preview: Edit Table functionality', () => {
316
270
  essayResponsePage.steps.verifyContentOfTableStandardCell(1, 'Standard cell');
317
271
  });
318
272
 
319
- it('When user clicks on \'Delete Row\' button then the focused row should be deleted (item preview)', () => {
320
- cy.log('Saving question to switch to item preview context.');
321
- essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
322
- essayResponsePage.steps.switchToPreviewTab();
323
- essayResponsePage.steps.openEditTablePopupThroughHeaderCell(0);
324
- essayResponsePage.steps.clickOnEditTableDeleteRowButton();
325
- essayResponsePage.steps.verifyTableRowCount(1);
326
- essayResponsePage.steps.verifyTableRowHeaderCellCount(0, 1);
327
- essayResponsePage.steps.verifyTableRowStandardCellCount(0, 2);
328
- essayResponsePage.steps.verifyContentOfTableHeaderCell(0, 'Header cell');
329
- essayResponsePage.steps.verifyContentOfTableStandardCell(1, 'Standard cell');
330
- cy.log('Returning to edit mode for subsequent tests.');
331
- essayResponsePage.steps.switchToEditTab();
332
- essayResponsePage.steps.clickOnEditQuestionButton();
333
- });
334
-
335
273
  it('When user deletes the header row by clicking on the \'Delete Row\' button, then in edit table flyout the \'Add Header Row\' checkbox should be unchecked.', () => {
336
274
  cy.log('Pre-step: Right click in the required cell to open edit table flyout and click on Delete Row button.');
337
275
  essayResponsePage.steps.openEditTablePopupThroughHeaderCell(0);
@@ -339,19 +277,6 @@ describe('Essay Response Preview: Edit Table functionality', () => {
339
277
  essayResponsePage.steps.openEditTablePopupThroughNormalCell(0);
340
278
  essayResponsePage.steps.verifyUncheckedStateOfEditTableAddRowHeaderCheckbox();
341
279
  });
342
-
343
- it('When header row is deleted then the Add Header Row checkbox should be unchecked (item preview)', () => {
344
- cy.log('Saving question to switch to item preview context.');
345
- essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
346
- essayResponsePage.steps.switchToPreviewTab();
347
- essayResponsePage.steps.openEditTablePopupThroughHeaderCell(0);
348
- essayResponsePage.steps.clickOnEditTableDeleteRowButton();
349
- essayResponsePage.steps.openEditTablePopupThroughNormalCell(0);
350
- essayResponsePage.steps.verifyUncheckedStateOfEditTableAddRowHeaderCheckbox();
351
- cy.log('Returning to edit mode for subsequent tests.');
352
- essayResponsePage.steps.switchToEditTab();
353
- essayResponsePage.steps.clickOnEditQuestionButton();
354
- });
355
280
  });
356
281
 
357
282
  describe('Edit \'Add header row\' and \'Highlight first column\' checkboxes.', () => {
@@ -161,19 +161,6 @@ describe('Essay Response Preview: Hyperlink', () => {
161
161
  utilities.verifyInnerText(essayResponsePage.previewInputFieldHyperlinkText(), 'Link')
162
162
  });
163
163
 
164
- it('When user adds both \'Display text\' as well as \'URL\' in the hyperlink popup and clicks on Ok button, then the hyperlink with the added display text and URL should be displayed in the response field of item preview', () => {
165
- essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
166
- essayResponsePage.steps.switchToPreviewTab();
167
- essayResponsePage.steps.enterTextInHyperlinkDialogboxDisplayTextInputField('Link');
168
- essayResponsePage.steps.enterTextInHyperlinkDialogBoxURLInputField(`${Cypress.config().baseUrl}`);
169
- essayResponsePage.steps.clickOnHyperLinkDialogBoxOkButton();
170
- utilities.verifyInnerText(essayResponsePage.previewInputFieldHyperlinkText(), 'Link')
171
- essayResponsePage.steps.switchToEditTab();
172
- essayResponsePage.steps.clickOnEditQuestionButton();
173
- essayResponsePage.steps.switchToPreviewTab();
174
- essayResponsePage.steps.enterTextInHyperlinkDialogboxDisplayTextInputField('Link');
175
- });
176
-
177
164
  it('CSS of the hyperlink in response field', { tags: 'css' }, () => {
178
165
  utilities.verifyCSS(essayResponsePage.previewInputFieldHyperlinkText(), {
179
166
  'color': css.color.linkText,
@@ -123,53 +123,6 @@ describe('Create Item page - Short text response : Student view settings', () =>
123
123
  });
124
124
  });
125
125
 
126
- describe('Student view settings : Display character count, Display word count - Item preview functionality', () => {
127
- abortEarlySetup();
128
- before(() => {
129
- essayResponsePage.steps.navigateToCreateQuestion('essay response');
130
- cy.barsPreLoaderWait();
131
- essayResponsePage.steps.checkCharacterRadioButton();
132
- });
133
-
134
- it('When \'Display character count\' checkbox is unchecked, then \'Character\' label and count should not be displayed in item preview', () => {
135
- essayResponsePage.steps.verifyDisplayCharacterCountCheckboxUnchecked();
136
- essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
137
- essayResponsePage.steps.switchToPreviewTab();
138
- utilities.verifyElementVisibilityState(essayResponsePage.characterWordCountLabelPreviewTab(), 'hidden');
139
- });
140
-
141
- it('When \'Display character count\' checkbox is checked, then on switching to preview tab \'Character\' label and count should be displayed and count should be zero by default in item preview', () => {
142
- essayResponsePage.steps.switchToEditTab();
143
- essayResponsePage.steps.clickOnEditQuestionButton();
144
- essayResponsePage.steps.checkDisplayCharacterCountCheckbox();
145
- essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
146
- essayResponsePage.steps.switchToPreviewTab();
147
- utilities.verifyInnerText(essayResponsePage.characterWordCountLabelPreviewTab(), 'Characters: 0');
148
- utilities.verifyElementVisibilityState(essayResponsePage.characterWordCountLabelPreviewTab(), 'visible');
149
- });
150
-
151
- it('When user enters text in response field, then character count should be updated in item preview', () => {
152
- essayResponsePage.steps.enterTextInResponseField('Flowers are blooming');
153
- utilities.verifyInnerText(essayResponsePage.characterWordCountLabelPreviewTab(), 'Characters: 18');
154
- });
155
-
156
- it('When user selects word in set limit section and checks \'Display word count\' checkbox , then \'Word\' label and count should be displayed in item preview', () => {
157
- essayResponsePage.steps.switchToEditTab();
158
- essayResponsePage.steps.clickOnEditQuestionButton();
159
- essayResponsePage.steps.selectWordRadioButton();
160
- essayResponsePage.steps.checkDisplayWordCountCheckbox();
161
- essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
162
- essayResponsePage.steps.switchToPreviewTab();
163
- utilities.verifyInnerText(essayResponsePage.characterWordCountLabelPreviewTab(), 'Words: 0');
164
- utilities.verifyElementVisibilityState(essayResponsePage.characterWordCountLabelPreviewTab(), 'visible');
165
- });
166
-
167
- it('When user enters text in response field, then character count should be updated in item preview', () => {
168
- essayResponsePage.steps.enterTextInResponseField('Flowers are blooming');
169
- utilities.verifyInnerText(essayResponsePage.characterWordCountLabelPreviewTab(), 'Words: 3');
170
- });
171
- });
172
-
173
126
  describe('Student view settings : Spell check - Preview tab functionality', () => {
174
127
  abortEarlySetup();
175
128
  before(() => {
@@ -190,28 +143,4 @@ describe('Create Item page - Short text response : Student view settings', () =>
190
143
  essayResponsePage.steps.verifySpellCheckOfResponseFieldPreviewTabEnabled();
191
144
  });
192
145
  });
193
-
194
- describe('Student view settings : Spell check - Item preview', () => {
195
- abortEarlySetup();
196
- before(() => {
197
- essayResponsePage.steps.navigateToCreateQuestion('essay response');
198
- cy.barsPreLoaderWait();
199
- essayResponsePage.steps.uncheckSpellCheckCheckbox();
200
- essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
201
- essayResponsePage.steps.switchToPreviewTab();
202
- });
203
-
204
- it('When the \'Spell check\' checkbox is unchecked, the response field should have \'spellcheck\' attribute set as \'false\' in item preview', () => {
205
- essayResponsePage.steps.verifySpellCheckOfResponseFieldPreviewTabDisabled();
206
- });
207
-
208
- it('When the \'Spell check\' checkbox is checked, the response field should have \'spellcheck\' attribute set as \'true\' in item preview', () => {
209
- essayResponsePage.steps.switchToEditTab();
210
- essayResponsePage.steps.clickOnEditQuestionButton();
211
- essayResponsePage.steps.checkSpellCheckCheckbox();
212
- essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
213
- essayResponsePage.steps.switchToPreviewTab();
214
- essayResponsePage.steps.verifySpellCheckOfResponseFieldPreviewTabEnabled();
215
- });
216
- });
217
146
  });
@@ -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 : All or nothing with alternative answers', () => {
5
7
  before(() => {
6
8
  cy.loginAs('admin');
@@ -24,12 +26,12 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
24
26
  chartsDotPlotPage.steps.lockDotColumn({ point: 1, min: 1, interval: 1 });
25
27
  chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });
26
28
  chartsDotPlotPage.steps.allotPoints(12);
27
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });
29
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
28
30
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
29
31
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
30
32
  chartsDotPlotPage.steps.clickOnAddAlternativeAnswerButton(1);
31
33
  chartsDotPlotPage.steps.allotPoints(30);
32
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 2, min: 1, interval: 1, defaultDots: 0 });
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();
@@ -68,6 +70,8 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
68
70
 
69
71
  it('When the user attempts the question with responses from the correct accordion, then the user should be awarded points for correct accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed in responses from correct accordion in attempted dot plot chart, correct answer section should not be displayed and a status message with text \'Your answer is correct\' should be displayed above the question preview', () => {
70
72
  chartsDotPlotPage.steps.resetQuestionPreview();
73
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 1, min: 1, interval: 1, defaultDots: 1 });
74
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
71
75
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
72
76
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
73
77
  chartsDotPlotPage.steps.verifyPreviewScore(12, 30);
@@ -79,6 +83,9 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
79
83
  chartsDotPlotPage.steps.verifyEmptyDotColumnPreviewTab({ point: 5, min: 1, interval: 1 })
80
84
  chartsDotPlotPage.steps.verifyEmptyDotColumnPreviewTab({ point: 6, min: 1, interval: 1 });
81
85
  chartsDotPlotPage.steps.verifyCorrectAnswerSectionNotExists();
86
+ if (alternativeAnswerCheck === 'true') {
87
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleNotExists();
88
+ }
82
89
  chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
83
90
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
84
91
  /*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 responses from correct accordion, a status message with text \'Your answer is correct\' should be displayed above the question preview')
@@ -95,7 +102,7 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
95
102
 
96
103
  it('When the user attempts the question with alternative accordion response, then the user should be awarded with full points and on switching to \'Grading\' view, correct icons should be displayed in responses from alternative accordion in dot column grid, correct answer section should be displayed with responses from alternate accordion and a status message with text \'Your answer is correct\' should be displayed', () => {
97
104
  chartsDotPlotPage.steps.resetQuestionPreview();
98
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
105
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
99
106
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
100
107
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
101
108
  chartsDotPlotPage.steps.verifyPreviewScore(30, 30);
@@ -107,6 +114,9 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
107
114
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 5, min: 1, interval: 1 })
108
115
  chartsDotPlotPage.steps.verifyEmptyDotColumnPreviewTab({ point: 6, min: 1, interval: 1 });
109
116
  chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
117
+ if (alternativeAnswerCheck === 'true') {
118
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleNotExists();
119
+ }
110
120
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
111
121
  /*cy.log('When the user has attempted the question with alternative accordion dot column and clicks on \'Check answer\' button, then correct icon should be displayed in responses from alternative accordion, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
112
122
  chartsDotPlotPage.steps.checkAnswer();
@@ -121,7 +131,7 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
121
131
 
122
132
  it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed in dot column attempted/set from correct accordion , correct answer section should be displayed with responses from alternate accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
123
133
  chartsDotPlotPage.steps.resetQuestionPreview();
124
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1 });
134
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
125
135
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
126
136
  chartsDotPlotPage.steps.verifyPreviewScore(0, 30);
127
137
  chartsDotPlotPage.steps.switchToGradingView();
@@ -138,6 +148,24 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
138
148
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
139
149
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
140
150
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
151
+ if (alternativeAnswerCheck === 'true') {
152
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(30 points)');
153
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
154
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
155
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
156
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
157
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
158
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
159
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(12 points)');
160
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
161
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
162
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
163
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
164
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
165
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
166
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
167
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
168
+ }
141
169
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
142
170
  /*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 the responses from correct accordion, no icon/border should be displayed for unselected responses from correct accordion and a status message with text \'Your answer is incorrect\' should be displayed')
143
171
  chartsDotPlotPage.steps.checkAnswer();
@@ -152,7 +180,7 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
152
180
 
153
181
  it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed in the dot column from alternate accordion and incorrect icon should be displayed in dot column set incorrectly and correct answer section should be displayed with responses from alternate accordion, a status message with text \'Your answer is incorrect\' should be displayed', () => {
154
182
  chartsDotPlotPage.steps.resetQuestionPreview();
155
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
183
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
156
184
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
157
185
  chartsDotPlotPage.steps.verifyPreviewScore(0, 30);
158
186
  chartsDotPlotPage.steps.switchToGradingView();
@@ -169,6 +197,24 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
169
197
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
170
198
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
171
199
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
200
+ if (alternativeAnswerCheck === 'true') {
201
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(30 points)');
202
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
203
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
204
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
205
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
206
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
207
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
208
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(12 points)');
209
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
210
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
211
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
212
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
213
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
214
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
215
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
216
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
217
+ }
172
218
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
173
219
  /*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 the dot column from alternate accordion and incorrect icon should be displayed in dot column set incorrectly, a status message with text \'Your answer is incorrect\' should be displayed');
174
220
  chartsDotPlotPage.steps.checkAnswer();
@@ -183,7 +229,7 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
183
229
 
184
230
  it('When the user attempts the question partially correct with all the responses correct as per the correct accordion but one dot column incomplete, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed in the dot column from the correct accordion, incorrect icon should be displayed in the responses from the alternative accordion, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion', () => {
185
231
  chartsDotPlotPage.steps.resetQuestionPreview();
186
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1 });
232
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
187
233
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
188
234
  chartsDotPlotPage.steps.verifyPreviewScore(0, 30);
189
235
  chartsDotPlotPage.steps.switchToGradingView();
@@ -200,6 +246,24 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
200
246
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
201
247
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
202
248
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
249
+ if (alternativeAnswerCheck === 'true') {
250
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(30 points)');
251
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
252
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
253
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
254
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
255
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
256
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
257
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(12 points)');
258
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
259
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
260
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
261
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
262
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
263
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
264
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
265
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
266
+ }
203
267
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
204
268
  /*cy.log('When the user has attempted the question with partially correct with all the dot column correct as per the alternative accordion but one dot column unselected 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 responses from the alternative accordion and a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed');
205
269
  chartsDotPlotPage.steps.checkAnswer();
@@ -231,6 +295,24 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
231
295
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
232
296
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
233
297
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
298
+ if (alternativeAnswerCheck === 'true') {
299
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(30 points)');
300
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
301
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
302
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
303
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
304
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
305
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
306
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(12 points)');
307
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
308
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
309
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
310
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
311
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
312
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
313
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
314
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
315
+ }
234
316
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
235
317
  /*cy.log('When the user attempts the question with more answers from the correct accordion than the alternate accordion and clicks on \'Check answer\' button, then correct icon should be displayed in the alternate accordion responses, incorrect icons should be displayed on the correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
236
318
  chartsDotPlotPage.steps.checkAnswer();
@@ -246,7 +328,7 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
246
328
 
247
329
  it('When the user attempts the question with more answers from the alternate accordion than the correct accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed in the alternate accordion responses, incorrect icons should be displayed on the correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should be displayed with the correct answers from the alternate accordion', () => {
248
330
  chartsDotPlotPage.steps.resetQuestionPreview();
249
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
331
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
250
332
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
251
333
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
252
334
  chartsDotPlotPage.steps.verifyPreviewScore(0, 30);
@@ -264,6 +346,24 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
264
346
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
265
347
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
266
348
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
349
+ if (alternativeAnswerCheck === 'true') {
350
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(30 points)');
351
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
352
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
353
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
354
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
355
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
356
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
357
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(12 points)');
358
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
359
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
360
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
361
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
362
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
363
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
364
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
365
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
366
+ }
267
367
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
268
368
  /*cy.log('When the user attempts the question with more answers from the alternate accordion than the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed in the alternate accordion responses, incorrect icons should be displayed on the correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
269
369
  chartsDotPlotPage.steps.checkAnswer();
@@ -279,7 +379,7 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
279
379
 
280
380
  it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, correct icon should be displayed in the dot column from alternate accordion, incorrect icon should be displayed in the dot column from accordion accordion, correct answer section should be displayed with responses from alternate accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
281
381
  chartsDotPlotPage.steps.resetQuestionPreview();
282
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
382
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
283
383
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
284
384
  chartsDotPlotPage.steps.verifyPreviewScore(0, 30);
285
385
  chartsDotPlotPage.steps.switchToGradingView();
@@ -296,6 +396,24 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
296
396
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
297
397
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
298
398
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
399
+ if (alternativeAnswerCheck === 'true') {
400
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(30 points)');
401
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
402
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
403
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
404
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
405
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
406
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
407
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(12 points)');
408
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
409
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
410
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
411
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
412
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
413
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
414
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
415
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
416
+ }
299
417
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
300
418
  /*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 the dot column from correct answer accordion, incorrect icon should be displayed in the dot column from alternative answer accordion and a status message with text \'Your answer is incorrect\' should be displayed')
301
419
  chartsDotPlotPage.steps.checkAnswer();
@@ -311,7 +429,7 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
311
429
  it('Race condition : When the user attempts the question with the common dot column between correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, correct icon should be in the attempted common dot column and incorrect icon should be displayed in dot column set incorrectly, correct answer section should be displayed with responses from alternate accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
312
430
  chartsDotPlotPage.steps.resetQuestionPreview();
313
431
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
314
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(0, { point: 2, min: 1, interval: 1 });
432
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1, defaultDots: 2 });
315
433
  chartsDotPlotPage.steps.verifyPreviewScore(0, 30);
316
434
  chartsDotPlotPage.steps.switchToGradingView();
317
435
  chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 1 });
@@ -327,6 +445,24 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
327
445
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
328
446
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
329
447
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
448
+ if (alternativeAnswerCheck === 'true') {
449
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(30 points)');
450
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
451
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
452
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
453
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
454
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
455
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
456
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(12 points)');
457
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
458
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
459
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
460
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
461
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
462
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
463
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
464
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
465
+ }
330
466
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
331
467
  /*cy.log('When the user has attempted the question with common dot column between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be in the attempted common dot column and incorrect icon should be displayed in dot column set incorrectly and a status message with text \'Your answer is incorrect\' should be displayed')
332
468
  chartsDotPlotPage.steps.checkAnswer();
@@ -342,7 +478,7 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
342
478
  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 incorrect dot column in dot column grid, correct answer section should be displayed with responses from alternate accordion and a status message with text \'Your answer is incorrect\' should be displayed', () => {
343
479
  chartsDotPlotPage.steps.resetQuestionPreview();
344
480
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 6, min: 1, interval: 1, defaultDots: 0 });
345
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(0, { point: 2, min: 1, interval: 1 });
481
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1, defaultDots: 2 });
346
482
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 4, min: 1, interval: 1, defaultDots: 0 });
347
483
  chartsDotPlotPage.steps.verifyPreviewScore(0, 30);
348
484
  chartsDotPlotPage.steps.switchToGradingView();
@@ -359,6 +495,24 @@ describe('Create item page - Charts - Dot plot : All or nothing with alternative
359
495
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 1 });
360
496
  chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 1 });
361
497
  chartsDotPlotPage.steps.verifyEmptyDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 1 });
498
+ if (alternativeAnswerCheck === 'true') {
499
+ chartsDotPlotPage.steps.verifyCorrectAnswersLabelAndPointVisible('(30 points)');
500
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleExists();
501
+ chartsDotPlotPage.steps.disableShowAlternativeAnswersToggle();
502
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
503
+ chartsDotPlotPage.steps.verifyAlternativeAnswersSectionNotExist();
504
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
505
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleChecked();
506
+ chartsDotPlotPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(12 points)');
507
+ chartsDotPlotPage.steps.verifyLockedDotColumnAlternateAnswerSection({ point: 1, min: 1, interval: 1 });
508
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 2, min: 1, interval: 1 });
509
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 3, min: 1, interval: 1 });
510
+ chartsDotPlotPage.steps.verifyCorrectDotColumnAlternateAnswerSection({ point: 4, min: 1, interval: 1 });
511
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 5, min: 1, interval: 1 });
512
+ chartsDotPlotPage.steps.verifyEmptyDotColumnAlternateAnswerSection({ point: 6, min: 1, interval: 1 });
513
+ chartsDotPlotPage.steps.clickShowAlternativeAnswersToggle();
514
+ chartsDotPlotPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
515
+ }
362
516
  chartsDotPlotPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
363
517
  /*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed in incorrect responses and status message with text \'Your answer is incorrect\' should be displayed')
364
518
  chartsDotPlotPage.steps.checkAnswer();