itemengine-cypress-automation 1.0.224 → 1.0.225

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +9 -5
  2. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/allOrNothingScoringForAllViews.smoke.js +8 -6
  3. package/cypress/e2e/ILC/ChartsBar/Scoring/addAndDeleteBarAllOrNothingScoring.js +2 -1
  4. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +1 -1
  5. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +2 -1
  6. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +2 -1
  7. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +2 -3
  8. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +2 -2
  9. package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +2 -1
  10. package/cypress/e2e/ILC/ChartsBar/editTabScoringSection.js +2 -2
  11. package/cypress/e2e/ILC/ChartsBar/gridSettings.js +3 -3
  12. package/cypress/e2e/ILC/ChartsBar/selectChartTypeSection.js +11 -10
  13. package/cypress/e2e/ILC/ChartsLine/Scoring/addAndDeletePointAllOrNothingScoring.js +307 -0
  14. package/cypress/e2e/ILC/ChartsLine/Scoring/manuallyAndNonScored.js +282 -0
  15. package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +387 -0
  16. package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +280 -0
  17. package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +280 -0
  18. package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +340 -0
  19. package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +255 -0
  20. package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +230 -0
  21. package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +354 -0
  22. package/cypress/e2e/ILC/ChartsLine/Scoring/toleranceThresholdScoring.js +143 -0
  23. package/cypress/e2e/ILC/ChartsLine/additionalSettings.js +4 -2
  24. package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +2 -2
  25. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +1 -2
  26. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +5 -6
  27. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +1 -1
  28. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
  29. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +2 -1
  30. package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabBasicSection.js +1 -0
  31. package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +50 -126
  32. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +1 -1
  33. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +2 -2
  34. package/cypress/e2e/ILC/EssayResponseMath/mathCharacters.js +8 -6
  35. package/cypress/e2e/ILC/FeedbackScaleNew/editTabBasicSection.js +2 -1
  36. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +6 -7
  37. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/dropzoneSettings.js +1 -0
  38. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/specifyCorrectAnswerSection.js +2 -1
  39. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/additionalSettingsBasic.js +4 -3
  40. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownSettings.js +6 -4
  41. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialDifferentWeightsBasic.js +2 -2
  42. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/specifyCorrectAnswerSection.js +2 -1
  43. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +2 -1
  44. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +3 -3
  45. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +2 -1
  46. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +3 -2
  47. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +2 -1
  48. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +3 -2
  49. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -1
  50. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +10 -8
  51. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +3 -2
  52. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +3 -2
  53. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +3 -2
  54. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +3 -2
  55. package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +3 -2
  56. package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +7 -5
  57. package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +32 -21
  58. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeigtsCorrectPointsGreaterThanAlternativePoints.js +2 -2
  59. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  60. package/cypress/e2e/ILC/ImageHighlight/backgroundImageAndCanvasProperties.js +4 -3
  61. package/cypress/e2e/ILC/ImageHighlight/customiseHighlightStyle.js +1 -1
  62. package/cypress/e2e/ILC/ImageHighlight/editTabScoring.js +1 -1
  63. package/cypress/e2e/ILC/ImageHighlight/imageHighlightStyle.js +6 -6
  64. package/cypress/e2e/ILC/ImageHighlight/minimumScoringPenaltyPointsAndRoundingDropdown.js +8 -6
  65. package/cypress/e2e/ILC/ListOrderingDropdown/specifyCorrectAnswerSection.js +5 -3
  66. package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/setPointsPopup.js +2 -1
  67. package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/specifyCorrectAnswerSection.js +2 -1
  68. package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/studentViewSettings.js +2 -1
  69. package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +2 -1
  70. package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +2 -1
  71. package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +1 -3
  72. package/cypress/e2e/ILC/Matching/toolSettings.js +1 -1
  73. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +2 -1
  74. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +2 -1
  75. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +1 -1
  76. package/cypress/e2e/ILC/MultipleSelectionGridNew/additionalSettings.js +4 -2
  77. package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +4 -3
  78. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +2 -2
  79. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
  80. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
  81. package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +2 -2
  82. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +11 -11
  83. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +5 -5
  84. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +7 -7
  85. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +3 -3
  86. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +15 -15
  87. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +7 -7
  88. package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +2 -2
  89. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +14 -14
  90. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +3 -3
  91. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +1 -1
  92. package/cypress/e2e/ILC/NumberLineLabel/editTabBasicSection.js +17 -2
  93. package/cypress/e2e/ILC/NumberLineLabel/editTabScoring.js +8 -8
  94. package/cypress/e2e/ILC/NumberLineLabel/layoutSection.js +15 -28
  95. package/cypress/e2e/ILC/NumberLineLabel/manuallyAndNonScoredEditTab.js +4 -4
  96. package/cypress/e2e/ILC/NumberLineLabel/numberLineSection.js +5 -5
  97. package/cypress/e2e/ILC/NumberLineLabel/studentViewSettings.js +4 -2
  98. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/layoutSection.js +28 -42
  99. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/numberLineSection.js +5 -5
  100. package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +6 -4
  101. package/cypress/e2e/ILC/ShortTextResponseNew/manuallyAndNonScoredScoring.js +2 -1
  102. package/cypress/e2e/ILC/SingleSelectionGridNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -2
  103. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +113 -112
  104. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +1 -1
  105. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +66 -65
  106. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +1 -0
  107. package/cypress/e2e/ILC/TextSelection/minimumScoringPenaltyPointsAndRoundingDropdown.js +8 -4
  108. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +2 -1
  109. package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +2 -1
  110. package/cypress/e2e/ILC/VideoResponseNew/studentViewSettingsStandardRecorderStyle.js +3 -2
  111. package/cypress/e2e/ILC/chartsDotsPlot/additionalSettings.js +4 -2
  112. package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +2 -2
  113. package/cypress/e2e/ILC/chartsDotsPlot/minimumScoringPenaltyPointsAndRoundingDropdown.js +3 -3
  114. package/cypress/e2e/ILC/chartsDotsPlot/numberLineAxisSettings.js +4 -4
  115. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +3 -3
  116. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +2 -1
  117. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -1
  118. package/cypress/e2e/ILC/chartsDotsPlot/scoring/manualAndNonScoredScoring.js +4 -3
  119. package/cypress/e2e/ILC/chartsDotsPlot/selectChartTypeSection.js +2 -2
  120. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +14 -7
  121. package/cypress/pages/audioResponsePage.js +14 -2
  122. package/cypress/pages/chartsDotPlotPage.js +28 -1
  123. package/cypress/pages/chartsLinePage.js +16 -3
  124. package/cypress/pages/components/additionalSettingsPanel.js +0 -3
  125. package/cypress/pages/components/chartsCommonComponent.js +5 -1
  126. package/cypress/pages/components/createCustomCategoryFlyout.js +47 -12
  127. package/cypress/pages/components/customizeMathCharacterComponent.js +1 -1
  128. package/cypress/pages/components/equationEditorFlyout.js +12 -13
  129. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +2 -1
  130. package/cypress/pages/components/playbackControlsBaseComponent.js +1 -1
  131. package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
  132. package/cypress/pages/dragAndDropIntoCategoriesPage.js +2 -2
  133. package/cypress/pages/essayResponseMathPage.js +19 -10
  134. package/cypress/pages/essayResponsePage.js +16 -10
  135. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +9 -5
  136. package/cypress/pages/imageHighlightPage.js +46 -29
  137. package/cypress/pages/matchingPage.js +1 -1
  138. package/cypress/pages/numberLineLabelPage.js +25 -28
  139. package/cypress/pages/numberLinePage.js +9 -2
  140. package/cypress/pages/shortTextResponsePage.js +33 -9
  141. package/package.json +1 -1
@@ -0,0 +1,340 @@
1
+ import { chartsLinePage } from "../../../../pages/chartsLinePage";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ describe('Create Item page - List ordering: Preview tab scoring', () => {
5
+ before(() => {
6
+ cy.loginAs('admin');
7
+ });
8
+
9
+ describe('Question preview: Auto scored - Partial different weights: Minimum scoring', () => {
10
+ abortEarlySetup();
11
+ before(() => {
12
+ chartsLinePage.steps.navigateToCreateQuestion('charts');
13
+ cy.barsPreLoaderWait();
14
+ chartsLinePage.steps.selectLineButton();
15
+ chartsLinePage.steps.addTextInQuestionInstructionsInputField('Set the points on the chart for the profits of the years');
16
+ chartsLinePage.steps.addBarOrPointInChartInSelectChartTypeSection();
17
+ chartsLinePage.steps.setPointValueInSelectChartTypeSection({ pointIndex: 0, value: 2, range: 10 });
18
+ chartsLinePage.steps.setPointValueInSelectChartTypeSection({ pointIndex: 1, value: 2, range: 10 });
19
+ chartsLinePage.steps.setPointValueInSelectChartTypeSection({ pointIndex: 3, value: 3, range: 10 });
20
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
21
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 1, value: 4, range: 10 });
22
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 2, value: 6, range: 10 });
23
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 3, value: 5, range: 10 });
24
+ chartsLinePage.steps.selectAutoScoredScoringSubtype('Partial different weights');
25
+ chartsLinePage.steps.allotPartialDifferentWeightsPoints({ 0: 1, 1: 6, 2: 3, 3: 2 });
26
+ });
27
+
28
+ it('When the user selects \'Award minimum score\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with minimum points', () => {
29
+ chartsLinePage.steps.expandMinimumScoringDropdown();
30
+ chartsLinePage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
31
+ chartsLinePage.steps.allotMinimumPoints(2);
32
+ chartsLinePage.steps.switchToPreviewTab();
33
+ chartsLinePage.steps.switchToGradingView();
34
+ chartsLinePage.steps.verifyPreviewScore(2, 12);
35
+ chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
36
+ });
37
+
38
+ it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
39
+ chartsLinePage.steps.resetQuestionPreview();
40
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 5, range: 10 });
41
+ chartsLinePage.steps.verifyPreviewScore(2, 12);
42
+ chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
43
+ });
44
+
45
+ it('When the user selects \'Award minimum score only if attempted\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then user should be awarded zero points', () => {
46
+ chartsLinePage.steps.switchToEditTab();
47
+ chartsLinePage.steps.expandMinimumScoringDropdown();
48
+ chartsLinePage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
49
+ chartsLinePage.steps.allotMinimumPoints(2);
50
+ chartsLinePage.steps.switchToPreviewTab();
51
+ chartsLinePage.steps.switchToGradingView();
52
+ chartsLinePage.steps.verifyPreviewScore(0, 12);
53
+ chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
54
+ });
55
+
56
+ it('When the user has selected \'Award minimum score only if attempted\' from the minimum scoring dropdown, attempts the question incorrectly, the user should be awarded with minimum points', () => {
57
+ chartsLinePage.steps.resetQuestionPreview();
58
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 5, range: 10 });
59
+ chartsLinePage.steps.verifyPreviewScore(2, 12);
60
+ });
61
+
62
+ it('When the user attempts the question partially correct such that points of the correctly attempted option are greater than minimum points, then the user should be awarded with points as per the correctly attempted response', () => {
63
+ chartsLinePage.steps.resetQuestionPreview();
64
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 5, range: 10 });
65
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 4, range: 10 });
66
+ chartsLinePage.steps.verifyPreviewScore(6, 12);
67
+ });
68
+
69
+ it('When the user attempts the question partially correct such that minimum points are greater than points of the correctly attempted option, then the user should be awarded with minimum points', () => {
70
+ chartsLinePage.steps.resetQuestionPreview();
71
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 3, range: 10 });
72
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 1, range: 10 });
73
+ chartsLinePage.steps.verifyPreviewScore(2, 12);
74
+ });
75
+ });
76
+
77
+ describe('Question preview: Auto scored - Partial different weights: Rounding', () => {
78
+ abortEarlySetup();
79
+ before(() => {
80
+ chartsLinePage.steps.navigateToCreateQuestion('charts');
81
+ cy.barsPreLoaderWait();
82
+ chartsLinePage.steps.selectLineButton();
83
+ chartsLinePage.steps.addBarOrPointInChartInSelectChartTypeSection();
84
+ chartsLinePage.steps.setPointValueInSelectChartTypeSection({ pointIndex: 0, value: 2, range: 10 });
85
+ chartsLinePage.steps.setPointValueInSelectChartTypeSection({ pointIndex: 1, value: 2, range: 10 });
86
+ chartsLinePage.steps.setPointValueInSelectChartTypeSection({ pointIndex: 3, value: 3, range: 10 });
87
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
88
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 1, value: 4, range: 10 });
89
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 2, value: 6, range: 10 });
90
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 3, value: 5, range: 10 });
91
+ chartsLinePage.steps.selectAutoScoredScoringSubtype('Partial different weights');
92
+ chartsLinePage.steps.allotPartialDifferentWeightsPoints({ 0: 2.67, 1: 1.99, 2: 1.34, 3: 4.5 });
93
+ });
94
+
95
+ it('When the user sets \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value greater than 0.5 and less than 0.99, then the points awarded should be rounded down to the nearest integer value', () => {
96
+ chartsLinePage.steps.expandRoundingDropdown();
97
+ chartsLinePage.steps.selectOptionFromRoundingDropdown('round down if <= 0.99');
98
+ chartsLinePage.steps.switchToPreviewTab();
99
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 3, range: 10 });
100
+ chartsLinePage.steps.verifyPreviewScore(2, 10.5);
101
+ });
102
+
103
+ it('When the user has set \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value equal to 0.99, then the points awarded should be rounded down to the nearest integer value', () => {
104
+ chartsLinePage.steps.resetQuestionPreview();
105
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 4, range: 10 });
106
+ chartsLinePage.steps.verifyPreviewScore(1, 10.5);
107
+ });
108
+
109
+ it('When the user sets \'Rounding\' to \'Round down if <=0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value less than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
110
+ chartsLinePage.steps.switchToEditTab();
111
+ chartsLinePage.steps.expandRoundingDropdown();
112
+ chartsLinePage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50');
113
+ chartsLinePage.steps.switchToPreviewTab();
114
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 6, range: 10 });
115
+ chartsLinePage.steps.verifyPreviewScore(1, 10.5);
116
+ });
117
+
118
+ it('When the user has set \'Rounding\' to \'Round down if <=0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value equal to 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
119
+ chartsLinePage.steps.resetQuestionPreview();
120
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 3, value: 5, range: 10 });
121
+ chartsLinePage.steps.verifyPreviewScore(4, 10.5);
122
+ });
123
+
124
+ it('When the user sets \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value less than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
125
+ chartsLinePage.steps.switchToEditTab();
126
+ chartsLinePage.steps.expandRoundingDropdown();
127
+ chartsLinePage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50; Round up if > 0.50');
128
+ chartsLinePage.steps.switchToPreviewTab();
129
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 6, range: 10 });
130
+ chartsLinePage.steps.verifyPreviewScore(1, 10.5);
131
+ });
132
+
133
+ it('When the user has set \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value equal to 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
134
+ chartsLinePage.steps.resetQuestionPreview();
135
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 3, value: 5, range: 10 });
136
+ chartsLinePage.steps.verifyPreviewScore(4, 10.5);
137
+ });
138
+
139
+ it('When the user has set \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value greater than 0.50, then the points awarded should be rounded up to the nearest integer value', () => {
140
+ chartsLinePage.steps.resetQuestionPreview();
141
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 3, range: 10 });
142
+ chartsLinePage.steps.verifyPreviewScore(3, 10.5);
143
+ });
144
+
145
+ it('When \'Round negative score to zero\' is in checked state and the user attempts the question incorrectly, then the user should be awarded with 0 points', () => {
146
+ cy.log('Pre-step: Setting penalty scoring to \'Penalty points for the entire question\', allotting penalty points')
147
+ chartsLinePage.steps.switchToEditTab();
148
+ chartsLinePage.steps.expandPenaltyScoringDropdown();
149
+ chartsLinePage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
150
+ chartsLinePage.steps.allotPenaltyPoints(4);
151
+ chartsLinePage.steps.switchToPreviewTab();
152
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 1, range: 10 });
153
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 1, range: 10 });
154
+ chartsLinePage.steps.verifyPreviewScore(0, 10.5);
155
+ });
156
+
157
+ it('When the user unchecks \'Round negative score to zero\' checkbox and the user attempts the question incorrectly, then the user should be awarded with negative points', () => {
158
+ chartsLinePage.steps.switchToEditTab();
159
+ chartsLinePage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
160
+ chartsLinePage.steps.switchToPreviewTab();
161
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 1, range: 10 });
162
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 1, range: 10 });
163
+ chartsLinePage.steps.verifyPreviewScore(-4, 10.5);
164
+ });
165
+ });
166
+
167
+ describe('Question preview: Auto scored - Partial different weights: Penalty scoring with \'Round negative score to zero\' unchecked', () => {
168
+ abortEarlySetup();
169
+ before(() => {
170
+ chartsLinePage.steps.navigateToCreateQuestion('charts');
171
+ cy.barsPreLoaderWait();
172
+ chartsLinePage.steps.selectLineButton();
173
+ chartsLinePage.steps.addBarOrPointInChartInSelectChartTypeSection();
174
+ chartsLinePage.steps.setPointValueInSelectChartTypeSection({ pointIndex: 0, value: 2, range: 10 });
175
+ chartsLinePage.steps.setPointValueInSelectChartTypeSection({ pointIndex: 1, value: 2, range: 10 });
176
+ chartsLinePage.steps.setPointValueInSelectChartTypeSection({ pointIndex: 3, value: 3, range: 10 });
177
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
178
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 1, value: 4, range: 10 });
179
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 2, value: 6, range: 10 });
180
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 3, value: 5, range: 10 });
181
+ chartsLinePage.steps.selectAutoScoredScoringSubtype('Partial different weights');
182
+ chartsLinePage.steps.allotPartialDifferentWeightsPoints({ 0: 9, 1: 6, 2: 3, 3: 2 });
183
+ //chartsLinePage.steps.checkAllowStudentToCheckAnswerCheckbox();
184
+ });
185
+
186
+ //Penalty points for the entire question
187
+ it('When the user sets penalty scoring to \'Penalty points for the entire question\', allots penalty points and attempts the question incorrectly, then the user should be awarded with negative points', () => {
188
+ chartsLinePage.steps.expandPenaltyScoringDropdown();
189
+ chartsLinePage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
190
+ chartsLinePage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
191
+ chartsLinePage.steps.allotPenaltyPoints(4);
192
+ chartsLinePage.steps.switchToPreviewTab();
193
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 1, range: 10 });
194
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 1, range: 10 });
195
+ chartsLinePage.steps.verifyPreviewScore(-4, 20);
196
+ });
197
+
198
+ it('When the user attempts the question correctly along with an incorrect response, then penalty points should get deducted from the awarded points', () => {
199
+ chartsLinePage.steps.resetQuestionPreview();
200
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 3, range: 10 });
201
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 1, range: 10 });
202
+ chartsLinePage.steps.verifyPreviewScore(5, 20);
203
+ });
204
+
205
+ it('When the user attempts the question correctly along with multiple incorrect responses, then penalty points should get deducted from the awarded points only once, the deducted penalty points should not increase as per number of attempted incorrect responses', () => {
206
+ chartsLinePage.steps.resetQuestionPreview();
207
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 3, range: 10 });
208
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 1, range: 10 });
209
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 1, range: 10 });
210
+ chartsLinePage.steps.verifyPreviewScore(5, 20);
211
+ });
212
+
213
+ it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
214
+ chartsLinePage.steps.switchToEditTab();
215
+ chartsLinePage.steps.expandMinimumScoringDropdown();
216
+ chartsLinePage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
217
+ chartsLinePage.steps.allotMinimumPoints(3);
218
+ chartsLinePage.steps.switchToPreviewTab();
219
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 1, range: 10 });
220
+ chartsLinePage.steps.verifyPreviewScore(3, 20);
221
+ cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
222
+ chartsLinePage.steps.switchToEditTab();
223
+ chartsLinePage.steps.expandMinimumScoringDropdown();
224
+ chartsLinePage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
225
+ });
226
+
227
+ //Penalty points for each incorrect option - Specify total penalty points
228
+ it('When the user sets penalty scoring to \'Penalty points for each incorrect bar\', and \'Specify total penalty points\' radio button in checked state, allots total penalty points and attempts the question incorrectly, then the user should be awarded with negative points of all the empty and incorrect option', () => {
229
+ chartsLinePage.steps.expandPenaltyScoringDropdown();
230
+ chartsLinePage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for each incorrect point');
231
+ chartsLinePage.steps.allotTotalPenaltyPoints(4);
232
+ chartsLinePage.steps.switchToPreviewTab();
233
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 1, range: 10 });
234
+ chartsLinePage.steps.verifyPreviewScore(-4, 20);
235
+ });
236
+
237
+ it('When the user attempts the question correctly along with an incorrect option, then penalty points should get deducted from the awarded points', () => {
238
+ chartsLinePage.steps.resetQuestionPreview();
239
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 3, range: 10 });
240
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 1, range: 10 });
241
+ chartsLinePage.steps.verifyPreviewScore(6, 20);
242
+ });
243
+
244
+ it('When the user attempts the question correctly along with multiple incorrect options, then penalty points for each incorrect option should get deducted from the awarded points', () => {
245
+ chartsLinePage.steps.resetQuestionPreview();
246
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 3, range: 10 });
247
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 1, range: 10 });
248
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 1, range: 10 });
249
+ chartsLinePage.steps.verifyPreviewScore(6, 20);
250
+ });
251
+
252
+ it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
253
+ chartsLinePage.steps.switchToEditTab();
254
+ chartsLinePage.steps.expandMinimumScoringDropdown();
255
+ chartsLinePage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
256
+ chartsLinePage.steps.allotMinimumPoints(3);
257
+ chartsLinePage.steps.switchToPreviewTab();
258
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 1, range: 10 });
259
+ chartsLinePage.steps.verifyPreviewScore(3, 20);
260
+ cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
261
+ chartsLinePage.steps.switchToEditTab();
262
+ chartsLinePage.steps.expandMinimumScoringDropdown();
263
+ chartsLinePage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
264
+ });
265
+
266
+ //Penalty points for each incorrect option - Specify points for each incorrect option
267
+ it('When the user has set penalty scoring to \'Penalty points for each incorrect bar\', and \'Specify total penalty points\' radio button in checked state, allots total penalty points and attempts the question incorrectly, then the user should be awarded with negative points for the incorrect options', () => {
268
+ chartsLinePage.steps.selectPenaltyPointsForEachIncorrectOptionType('specify points for each incorrect point');
269
+ chartsLinePage.steps.allotPenaltyPointsForEachIncorrectOption(4);
270
+ chartsLinePage.steps.switchToPreviewTab();
271
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 1, range: 10 });
272
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 1, range: 10 });
273
+ chartsLinePage.steps.verifyPreviewScore(-16, 20);
274
+ });
275
+
276
+ it('When the user attempts the question correctly along with an incorrect option, then penalty points should get deducted from the awarded points', () => {
277
+ chartsLinePage.steps.resetQuestionPreview();
278
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 3, range: 10 });
279
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 1, range: 10 });
280
+ chartsLinePage.steps.verifyPreviewScore(-3, 20);
281
+ });
282
+
283
+ it('When the user attempts the question correctly along with multiple incorrect options, then penalty points for each incorrect option should get deducted from the awarded points', () => {
284
+ chartsLinePage.steps.resetQuestionPreview();
285
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 3, range: 10 });
286
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 4, range: 10 });
287
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 1, range: 10 });
288
+ chartsLinePage.steps.verifyPreviewScore(7, 20);
289
+ });
290
+
291
+ it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
292
+ chartsLinePage.steps.switchToEditTab();
293
+ chartsLinePage.steps.expandMinimumScoringDropdown();
294
+ chartsLinePage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
295
+ chartsLinePage.steps.allotMinimumPoints(3);
296
+ chartsLinePage.steps.switchToPreviewTab();
297
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 1, range: 10 });
298
+ chartsLinePage.steps.verifyPreviewScore(3, 20);
299
+ cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
300
+ chartsLinePage.steps.switchToEditTab();
301
+ chartsLinePage.steps.expandMinimumScoringDropdown();
302
+ chartsLinePage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
303
+ });
304
+
305
+ //Penalty points for each incorrect option - Automatically set penalty for each incorrect option to total points / no. of incorrect option
306
+ it('When the user has set penalty scoring to \'Penalty points for each incorrect bar\', and checks \'Automatically set penalty for each incorrect option to total points / no. of incorrect option\' checkbox and attempts the question incorrectly, then the user should be awarded with negative points for the incorrect option', () => {
307
+ chartsLinePage.steps.checkAutomaticallySetPenaltyPointsCheckbox();
308
+ chartsLinePage.steps.switchToPreviewTab();
309
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 1, range: 10 });
310
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 1, range: 10 });
311
+ chartsLinePage.steps.verifyPreviewScore(-20, 20);
312
+ });
313
+
314
+ it('When the user attempts the question correctly along with an incorrect option, then penalty points should get deducted from the awarded points', () => {
315
+ chartsLinePage.steps.resetQuestionPreview();
316
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 3, range: 10 });
317
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 1, range: 10 });
318
+ chartsLinePage.steps.verifyPreviewScore(-6, 20);
319
+ });
320
+
321
+ it('When the user attempts the question correctly along with multiple incorrect options, then penalty points for each incorrect option should get deducted from the awarded points', () => {
322
+ chartsLinePage.steps.resetQuestionPreview();
323
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 3, range: 10 });
324
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 1, range: 10 });
325
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 3, value: 1, range: 10 });
326
+ chartsLinePage.steps.verifyPreviewScore(-6, 20);
327
+ });
328
+
329
+ it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
330
+ chartsLinePage.steps.switchToEditTab();
331
+ chartsLinePage.steps.expandMinimumScoringDropdown();
332
+ chartsLinePage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
333
+ chartsLinePage.steps.allotMinimumPoints(3);
334
+ chartsLinePage.steps.switchToPreviewTab();
335
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 1, range: 10 });
336
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 1, range: 10 });
337
+ chartsLinePage.steps.verifyPreviewScore(3, 20);
338
+ });
339
+ });
340
+ });
@@ -0,0 +1,255 @@
1
+ import { chartsLinePage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ describe('Create item page - Charts - Point: Partial equal weights scoring with alternative answer - When alternative answer points are more than correct answer points', () => {
5
+ before(() => {
6
+ cy.loginAs('admin');
7
+ });
8
+
9
+ describe('Question Preview: AutoScored - Partial equal weights with alternative answer: When alternative answer points are more than correct answer points', () => {
10
+ abortEarlySetup();
11
+ before(() => {
12
+ chartsLinePage.steps.navigateToCreateQuestion('charts');
13
+ cy.barsPreLoaderWait();
14
+ chartsLinePage.steps.selectLineButton();
15
+ chartsLinePage.steps.addTextInQuestionInstructionsInputField('Set the Point on the chart for the profits of the years');
16
+ chartsLinePage.steps.addBarOrPointInChartInSelectChartTypeSection();
17
+ chartsLinePage.steps.addBarOrPointInChartInSelectChartTypeSection();
18
+ chartsLinePage.steps.setPointValueInSelectChartTypeSection({ pointIndex: 0, value: 3, range: 10 });
19
+ chartsLinePage.steps.setPointValueInSelectChartTypeSection({ pointIndex: 1, value: 2, range: 10 });
20
+ chartsLinePage.steps.setPointValueInSelectChartTypeSection({ pointIndex: 3, value: 3, range: 10 });
21
+ chartsLinePage.steps.lockPoint(1);
22
+ chartsLinePage.steps.allotPoints(10);
23
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
24
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
25
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
26
+ chartsLinePage.steps.addAlternativeAnswerAccordion(1);
27
+ chartsLinePage.steps.allotPoints(20);
28
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 0, value: 4, range: 10 });
29
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
30
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 4, value: 6, range: 10 });
31
+ chartsLinePage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
32
+ chartsLinePage.steps.switchToPreviewTab();
33
+ });
34
+
35
+ //Need to remove skip once https://redmine.zeuslearning.com/issues/577535 , https://redmine.zeuslearning.com/issues/577716 is resolved
36
+ it.skip('When the user selects \'Grading\' view without attempting the question, then user should be provided with 0 points, correct icon should be displayed for bar set to correct by default, incorrect icon should be displayed for incorrect graph, the alternate accordion answer should be displayed in the correct answer section graph and incorrect status message should be displayed', () => {
37
+ chartsLinePage.steps.switchToGradingView();
38
+ chartsLinePage.steps.verifyPreviewScore(0, 20);
39
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(0);
40
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
41
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(2);
42
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(3);
43
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(4);
44
+ chartsLinePage.steps.verifyCorrectIncorrectStatusMessageNotExists();
45
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 4, range: 10 });
46
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
47
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 0, range: 10 });
48
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
49
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 6, range: 10 });
50
+ chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
51
+ });
52
+
53
+ it('When the user incorrectly attempts the answer, then the user should be awarded with points for the correctly set bars(in this case only the locked bar) and on switching to grading view, correct/incorrect status message should not be displayed, incorrect icons should be displayed on the incorrect bars and correct answer section should be displayed with the correct answers from the alternate accordion', () => {
54
+ chartsLinePage.steps.resetQuestionPreview();
55
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 5, range: 10 });
56
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 1, range: 10 });
57
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 4, value: 1, range: 10 });
58
+ chartsLinePage.steps.verifyPreviewScore(4, 20);
59
+ chartsLinePage.steps.switchToGradingView();
60
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'incorrect');
61
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
62
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'incorrect');
63
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
64
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'incorrect');
65
+ chartsLinePage.steps.verifyCorrectIncorrectStatusMessageNotExists();
66
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 4, range: 10 });
67
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
68
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 0, range: 10 });
69
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
70
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 6, range: 10 });
71
+ chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
72
+ });
73
+
74
+ it('When the user attempts the question with responses from the correct accordion, then the user should be awarded the points alloted for correct accordion and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed', () => {
75
+ chartsLinePage.steps.resetQuestionPreview();
76
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 5, range: 10 });
77
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 3, value: 4, range: 10 });
78
+ chartsLinePage.steps.verifyPreviewScore(10, 20);
79
+ chartsLinePage.steps.switchToGradingView();
80
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct');
81
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
82
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'correct');
83
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'correct');
84
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
85
+ chartsLinePage.steps.verifyCorrectIncorrectStatusMessageNotExists();
86
+ chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();
87
+ chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
88
+ });
89
+
90
+ it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed', () => {
91
+ chartsLinePage.steps.resetQuestionPreview();
92
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 4, range: 10 });
93
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 3, value: 4, range: 10 });
94
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 4, value: 6, range: 10 });
95
+ chartsLinePage.steps.verifyPreviewScore(20, 20);
96
+ chartsLinePage.steps.switchToGradingView();
97
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct');
98
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
99
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'correct');
100
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'correct');
101
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
102
+ chartsLinePage.steps.verifyCorrectIncorrectStatusMessageNotExists();
103
+ chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();
104
+ chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
105
+ });
106
+
107
+ it('When the user attempts the question with partially correct exclusively from the correct accordion, then the user should be awarded with points for the correctly set bars and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icons should be displayed on the incorrect bars, correct/incorrect status message should not be displayed and correct answer section should be displayed with the correct answers from the alternate accordion', () => {
108
+ chartsLinePage.steps.resetQuestionPreview();
109
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 5, range: 10 });
110
+ chartsLinePage.steps.verifyPreviewScore(8, 20);
111
+ chartsLinePage.steps.switchToGradingView();
112
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct');
113
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
114
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'correct');
115
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
116
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
117
+ chartsLinePage.steps.verifyCorrectIncorrectStatusMessageNotExists();
118
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 4, range: 10 });
119
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
120
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 0, range: 10 });
121
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
122
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 6, range: 10 });
123
+ chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
124
+ });
125
+
126
+ it('When the user attempts the question with partially correct exclusively from the alternative accordion, then the user should be awarded with points for the correctly set bars and on switching to \'Grading\' view, correct icon should be displayed besides the alternate answer responses, incorrect icons should be displayed on the incorrect bars correct/incorrect status message should not be displayed and correct answer section should be displayed with the correct answers from the alternate accordion', () => {
127
+ chartsLinePage.steps.resetQuestionPreview();
128
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 4, range: 10 });
129
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 4, value: 6, range: 10 });
130
+ chartsLinePage.steps.verifyPreviewScore(16, 20);
131
+ chartsLinePage.steps.switchToGradingView();
132
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct');
133
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
134
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'correct');
135
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
136
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
137
+ chartsLinePage.steps.verifyCorrectIncorrectStatusMessageNotExists();
138
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 4, range: 10 });
139
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
140
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 0, range: 10 });
141
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
142
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 6, range: 10 });
143
+ chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
144
+ });
145
+
146
+ it('When the user attempts the question with more answers from the correct accordion than the alternate accordion, then the user should be awarded with points for the correctly set bars from the alternate accordion and on switching to \'Grading\' view, correct icon should be displayed besides the alternate accordion responses, incorrect icons should be displayed on the correct accordion responses, correct/incorrect status message should not be displayed and correct answer section should be displayed with the correct answers from the alternate accordion', () => {
147
+ chartsLinePage.steps.resetQuestionPreview();
148
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 5, range: 10 });
149
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 4, value: 6, range: 10 });
150
+ chartsLinePage.steps.verifyPreviewScore(8, 20);
151
+ chartsLinePage.steps.switchToGradingView();
152
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'incorrect');
153
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
154
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'incorrect');
155
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
156
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
157
+ chartsLinePage.steps.verifyCorrectIncorrectStatusMessageNotExists();
158
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 4, range: 10 });
159
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
160
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 0, range: 10 });
161
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
162
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 6, range: 10 });
163
+ chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
164
+ });
165
+
166
+ it('When the user attempts the question with more answers from the alternate accordion than the correct accordion, then the user should be awarded with points for the correctly set bars from the alternate accordion and on switching to \'Grading\' view, correct icon should be displayed besides the alternate accordion responses, incorrect icons should be displayed on the correct accordion responses, correct/incorrect status message should not be displayed and correct answer section should be displayed with the correct answers from the alternate accordion', () => {
167
+ chartsLinePage.steps.resetQuestionPreview();
168
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 4, range: 10 });
169
+ chartsLinePage.steps.verifyPreviewScore(12, 20);
170
+ chartsLinePage.steps.switchToGradingView();
171
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct');
172
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
173
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'correct');
174
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
175
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'incorrect');
176
+ chartsLinePage.steps.verifyCorrectIncorrectStatusMessageNotExists();
177
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 4, range: 10 });
178
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
179
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 0, range: 10 });
180
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
181
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 6, range: 10 });
182
+ chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
183
+ });
184
+
185
+ 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 for the correctly set bars and on switching to \'Grading\' view, correct icon should be displayed besides the alternate accordion responses, incorrect icons should be displayed on the correct accordion responses, correct/incorrect status message should not be displayed and correct answer section should be displayed with the correct answers from the alternate accordion', () => {
186
+ chartsLinePage.steps.resetQuestionPreview();
187
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 1, range: 10 });
188
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 5, range: 10 });
189
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 4, value: 6, range: 10 });
190
+ chartsLinePage.steps.verifyPreviewScore(8, 20);
191
+ chartsLinePage.steps.switchToGradingView();
192
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'incorrect');
193
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
194
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'incorrect');
195
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
196
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
197
+ chartsLinePage.steps.verifyCorrectIncorrectStatusMessageNotExists();
198
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 4, range: 10 });
199
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
200
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 0, range: 10 });
201
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
202
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 6, range: 10 });
203
+ chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
204
+ });
205
+
206
+ 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 for the correctly set bars from the alternate accordion and on switching to \'Grading\' view, correct icon should be besides the common response, incorrect icons should be displayed on the incorrect bars, correct/incorrect status message should not be displayed and correct answer section should be displayed with the correct answers from the alternate accordion', () => {
207
+ chartsLinePage.steps.resetQuestionPreview();
208
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 1, range: 10 });
209
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 1, range: 10 });
210
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 3, value: 4, range: 10 });
211
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 4, value: 1, range: 10 });
212
+ chartsLinePage.steps.verifyPreviewScore(8, 20);
213
+ chartsLinePage.steps.switchToGradingView();
214
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'incorrect');
215
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
216
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'incorrect');
217
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'correct');
218
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'incorrect');
219
+ chartsLinePage.steps.verifyCorrectIncorrectStatusMessageNotExists();
220
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 4, range: 10 });
221
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
222
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 0, range: 10 });
223
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
224
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 6, range: 10 });
225
+ chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
226
+ });
227
+
228
+ it('Overachiever case: When the user attempts the question with more number of correct responses from the correct accordion than the alternative accordion but the score of the individual response from the alternative accordion overpowers the combined score of the correct accordion answers then on switching to the \'Grading view\', then points awarded should be of the correct accordion, correct icons should be displayed for the alternative accordion response, incorrect icon should be displayed for the correct accordion responses, correct/incorrect status message should not be displayed and correct answer section with a preview of the entire grid with correct answers from the correct accordion should be displayed', () => {
229
+ cy.log('Pre-step: Switching to Edit tab and allotting points to correct and alternative accordion such that the difference between the points is substantial')
230
+ chartsLinePage.steps.switchToEditTab();
231
+ chartsLinePage.steps.allotPoints(50);
232
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 3, value: 8, range: 10 });
233
+ chartsLinePage.steps.expandCorrectAnswerAccordion();
234
+ chartsLinePage.steps.allotPoints(10);
235
+ chartsLinePage.steps.switchToPreviewTab();
236
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 5, range: 10 });
237
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 3, value: 4, range: 10 });
238
+ chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 4, value: 6, range: 10 });
239
+ chartsLinePage.steps.verifyPreviewScore(12.5, 50);
240
+ chartsLinePage.steps.switchToGradingView();
241
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'incorrect');
242
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
243
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'incorrect');
244
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
245
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
246
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 4, range: 10 });
247
+ chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
248
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 0, range: 10 });
249
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 8, range: 10 });
250
+ chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 6, range: 10 });
251
+ chartsLinePage.steps.verifyCorrectIncorrectStatusMessageNotExists();
252
+ chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
253
+ });
254
+ });
255
+ });