itemengine-cypress-automation 1.0.223-minorFix-f2741aa.0 → 1.0.223

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/customizePlaybackControls.js +1 -1
  2. package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +12 -5
  3. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/allOrNothingScoringForAllViews.smoke.js +370 -0
  4. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/gradingViewAndCorrectAnswerView.smoke.js +285 -0
  5. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/previewContentsForAllViews.smoke.js +629 -0
  6. package/cypress/e2e/ILC/ChartsBar/Scoring/addAndDeleteBarAllOrNothingScoring.js +4 -2
  7. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +5 -4
  8. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +2 -1
  9. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +2 -1
  10. package/cypress/e2e/ILC/ChartsBar/Scoring/manuallyAndNonScored.js +2 -1
  11. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightBasic.js +2 -1
  12. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +11 -10
  13. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +2 -1
  14. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +2 -1
  15. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightBasic.js +2 -1
  16. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +2 -1
  17. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +2 -1
  18. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +2 -1
  19. package/cypress/e2e/ILC/ChartsBar/Scoring/toleranceThresholdScoring.js +2 -1
  20. package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +2 -1
  21. package/cypress/e2e/ILC/ChartsBar/gridSettings.js +8 -5
  22. package/cypress/e2e/ILC/ChartsBar/selectChartTypeSection.js +12 -12
  23. package/cypress/e2e/ILC/ChartsLine/editTabScoringSection.js +1 -1
  24. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +0 -1
  25. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +3 -2
  26. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionBasic.js +2 -2
  27. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsGreaterThanAlternativePoints.js +2 -2
  28. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettings.js +4 -2
  29. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettingsBasic.js +2 -1
  30. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -1
  31. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -2
  32. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/draggableOptions.js +0 -2
  33. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/pagination.js +2 -2
  34. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationDraggableOptionsPanel.js +6 -3
  35. package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabBasicSection.js +7 -6
  36. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
  37. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +4 -0
  38. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +17 -11
  39. package/cypress/e2e/ILC/FeedbackScaleNew/additionalSettings.js +11 -11
  40. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +8 -8
  41. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
  42. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
  43. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAndDropdownMenuSection.js +3 -4
  44. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownSettings.js +3 -1
  45. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
  46. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialDifferentWeightsBasic.js +4 -4
  47. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  48. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/allOrNothingForAllViews.smoke.js +2 -1
  49. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
  50. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  51. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
  52. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownAndDropdownMenuSection.js +2 -4
  53. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
  54. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +1 -0
  55. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -1
  56. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +6 -6
  57. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  58. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
  59. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsBasic.js +1 -0
  60. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +3 -3
  61. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
  62. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +6 -6
  63. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  64. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
  65. package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
  66. package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +53 -44
  67. package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +4 -6
  68. package/cypress/e2e/ILC/GridFill/customizeLayoutFillImageBackgroundImage.js +2 -2
  69. package/cypress/e2e/ILC/ImageHighlight/Scoring/manuallyAndNonScored.js +2 -1
  70. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  71. package/cypress/e2e/ILC/ImageHighlight/Scoring/singleSelectionPreviewScoring.js +9 -9
  72. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -1
  73. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +3 -1
  74. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
  75. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
  76. package/cypress/e2e/ILC/ListOrderingDropdown/minimumScoringPenaltyPointsAndRoundingDropdown.js +3 -3
  77. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +6 -6
  78. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  79. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
  80. package/cypress/e2e/ILC/Matching/additionalSettings.js +1 -0
  81. package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +8 -56
  82. package/cypress/e2e/ILC/Matching/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -4
  83. package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +2 -1
  84. package/cypress/e2e/ILC/Matching/toolSettings.js +1 -1
  85. package/cypress/e2e/ILC/MultipleSelection/editTabScoringSection.js +1 -1
  86. package/cypress/e2e/ILC/MultipleSelection/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -4
  87. package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsBasic.js +6 -6
  88. package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsWithAlternativeAnswer.js +1 -0
  89. package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsWithAlternativeAnswer.js +12 -12
  90. package/cypress/e2e/ILC/MultipleSelection/previewContentsForAllViews.smoke.js +1 -1
  91. package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +48 -48
  92. package/cypress/e2e/ILC/MultipleSelectionGridNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -2
  93. package/cypress/e2e/ILC/NumberLine/LayoutSection.js +22 -25
  94. package/cypress/e2e/ILC/NumberLine/additionalSettings.js +23 -3
  95. package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +96 -7
  96. package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +12 -2
  97. package/cypress/e2e/ILC/NumberLine/numberLineSection.js +4 -6
  98. package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +1 -2
  99. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +3 -2
  100. package/cypress/e2e/ILC/NumberLine/toolSettings.js +1 -1
  101. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/layoutSection.js +3 -5
  102. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +12 -3
  103. package/cypress/e2e/ILC/NumberLineLabel/specifyCorrectAnswerSection.js +1 -1
  104. package/cypress/e2e/ILC/NumberLineLabel/toolSettings.js +1 -1
  105. package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +2 -1
  106. package/cypress/e2e/ILC/SingleSelection/allOrNothingBasicForAllViews.smoke.js +2 -1
  107. package/cypress/e2e/ILC/SingleSelection/allOrNothingWithAlternativeAnswer.js +9 -9
  108. package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +2 -0
  109. package/cypress/e2e/ILC/SingleSelection/previewContents.smoke.js +1 -1
  110. package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +3 -3
  111. package/cypress/e2e/ILC/SingleSelectionGridNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -2
  112. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +20 -0
  113. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +214 -0
  114. package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +2 -1
  115. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +1 -6
  116. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +1 -2
  117. package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/audioOverviewAndTranscript.js +3 -2
  118. package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/customizePlayerLayoutSettings.js +2 -2
  119. package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/standardAudioPlayerStyle.js +3 -3
  120. package/cypress/e2e/ILC/VideoResponseNew/studentViewSettingsCompactRecorderStyle.js +3 -1
  121. package/cypress/e2e/ILC/chartsDotsPlot/additionalSettings.js +6 -6
  122. package/cypress/e2e/ILC/chartsDotsPlot/editTabScoring.js +4 -4
  123. package/cypress/e2e/ILC/chartsDotsPlot/minimumScoringPenaltyPointsAndRoundingDropdown.js +5 -5
  124. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +3 -1
  125. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +4 -2
  126. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -1
  127. package/cypress/e2e/ILC/chartsDotsPlot/scoring/manualAndNonScoredScoring.js +9 -7
  128. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsBasic.js +62 -60
  129. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +29 -27
  130. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +45 -45
  131. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +28 -28
  132. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsBasic.js +48 -34
  133. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +41 -38
  134. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +26 -26
  135. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +41 -38
  136. package/cypress/e2e/ILC/chartsDotsPlot/scoring/toleranceThresholdScoring.js +7 -5
  137. package/cypress/pages/audioPlayerPage.js +2 -2
  138. package/cypress/pages/audioResponsePage.js +1 -0
  139. package/cypress/pages/chartsBarPage.js +177 -76
  140. package/cypress/pages/chartsDotPlotPage.js +28 -43
  141. package/cypress/pages/components/additionalSettingsPanel.js +5 -2
  142. package/cypress/pages/components/barAndLineChartComponent.js +1 -1
  143. package/cypress/pages/components/chartsCommonComponent.js +28 -0
  144. package/cypress/pages/components/colorPopupComponent.js +2 -0
  145. package/cypress/pages/components/createQuestionBasePage.js +1 -0
  146. package/cypress/pages/components/draggableOptionsSectionComponent.js +1 -0
  147. package/cypress/pages/components/editCategoryFlyout.js +6 -4
  148. package/cypress/pages/components/essayResponseCommonComponents.js +1 -1
  149. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +3 -0
  150. package/cypress/pages/components/gridQuestionCommonComponent.js +2 -4
  151. package/cypress/pages/components/imageCanvasComponent.js +7 -5
  152. package/cypress/pages/components/layoutSectionComponent.js +4 -3
  153. package/cypress/pages/components/numberLineCommonComponent.js +38 -21
  154. package/cypress/pages/components/opacityComponent.js +1 -0
  155. package/cypress/pages/components/optionsWrapperComponent.js +1 -0
  156. package/cypress/pages/components/questionInstructionsComponent.js +1 -1
  157. package/cypress/pages/components/responseAreaSettingsPopupComponent.js +8 -0
  158. package/cypress/pages/components/scoringSectionBaseEditTab.js +5 -2
  159. package/cypress/pages/components/toolSettingsComponent.js +1 -0
  160. package/cypress/pages/contentBlocksPage.js +1 -0
  161. package/cypress/pages/dragAndDropIntoCategoriesPage.js +9 -2
  162. package/cypress/pages/fillInTheGapsDropdownPage.js +16 -1
  163. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +16 -1
  164. package/cypress/pages/fillInTheGapsOverImageTextPage.js +20 -1
  165. package/cypress/pages/graphingPage.js +43 -10
  166. package/cypress/pages/gridFillPage.js +11 -3
  167. package/cypress/pages/matchingPage.js +2 -0
  168. package/cypress/pages/numberLineLabelPage.js +1 -1
  169. package/cypress/pages/numberLinePage.js +25 -24
  170. package/cypress/pages/readingRulerPage.js +6 -2
  171. package/cypress/pages/rulerPage.js +1 -0
  172. package/cypress/pages/shortTextResponsePage.js +3 -1
  173. package/cypress/pages/singleSelectionPage.js +25 -2
  174. package/cypress/pages/textSelectionPage.js +1 -1
  175. package/cypress/pages/videoResponsePage.js +7 -2
  176. package/package.json +2 -2
  177. /package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/allSupportedFileTypes.js +0 -0
  178. /package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/barAudioPlayerStyle.js +0 -0
  179. /package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/compactAudioPlayerStyle.js +0 -0
  180. /package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/headerSection.js +0 -0
  181. /package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/previewContents.smoke.js +0 -0
  182. /package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/studentViewSettings.js +0 -0
  183. /package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/uploadAndAddAudioFile.js +0 -0
  184. /package/cypress/fixtures/uploads/{sample10Sec.mp3 → sampleAudio.mp3} +0 -0
@@ -229,7 +229,7 @@ describe('Create Item page - Audio response: Customize playback controls', () =>
229
229
  audioResponsePage.steps.addWaitToRecordAudio(3000);
230
230
  audioResponsePage.steps.stopRecordingCompactPreview();
231
231
  audioResponsePage.steps.startPlaybackCompactPreview();
232
- utilities.verifyElementDisabled(audioResponsePage.compactPreviewPausePlaybackButton());
232
+ utilities.verifyElementDisabledClass(audioResponsePage.compactPreviewPlaybackButton());
233
233
  });
234
234
  });
235
235
 
@@ -187,6 +187,7 @@ describe('Create item page - Audio response: Student view settings', () => {
187
187
  audioResponsePage.steps.switchToPreviewTab();
188
188
  audioResponsePage.steps.startRecordingStandardPreview();
189
189
  audioResponsePage.steps.waitForRecordingToStartStandardPreview();
190
+ audioResponsePage.steps.addWaitToRecordAudio(8000);
190
191
  audioResponsePage.steps.stopRecordingStandardPreview();
191
192
  audioResponsePage.steps.verifyResponseIsRecordedHelpText();
192
193
  utilities.verifyElementVisibilityState(audioResponsePage.progressBar(), 'notExist');
@@ -199,8 +200,10 @@ describe('Create item page - Audio response: Student view settings', () => {
199
200
  audioResponsePage.steps.switchToPreviewTab();
200
201
  audioResponsePage.steps.startRecordingBarPreview();
201
202
  audioResponsePage.steps.waitForRecordingToStartBarPreview();
203
+ audioResponsePage.steps.addWaitToRecordAudio(5000);
202
204
  audioResponsePage.steps.stopRecordingBarPreview();
203
- audioResponsePage.steps.verifyResponseIsRecordedHelpText();
205
+ //Need to remove comment once https://redmine.zeuslearning.com/issues/577968 is resolved
206
+ //audioResponsePage.steps.verifyResponseIsRecordedHelpText();
204
207
  utilities.verifyElementVisibilityState(audioResponsePage.progressBar(), 'visible');
205
208
  });
206
209
 
@@ -405,7 +408,8 @@ describe('Create item page - Audio response: Student view settings', () => {
405
408
  utilities.verifyElementNotDisabled(audioResponsePage.standardPreviewRetakeButton());
406
409
  });
407
410
 
408
- it('For "Standard" mode, When there is no retake limit set, then on hovering over the retake recording button, then retake limits should not be displayed on retake recording button tooltip', () => {
411
+ //Remove skip once https://redmine.zeuslearning.com/issues/566924 is resolved
412
+ it.skip('For "Standard" mode, When there is no retake limit set, then on hovering over the retake recording button, then retake limits should not be displayed on retake recording button tooltip', () => {
409
413
  audioResponsePage.standardPreviewRetakeButton()
410
414
  .verifyTooltip('Retake recording');
411
415
  });
@@ -453,11 +457,13 @@ describe('Create item page - Audio response: Student view settings', () => {
453
457
  utilities.verifyInnerText(audioResponsePage.recordingStatusText(), 'Recording...');
454
458
  audioResponsePage.steps.waitForRecordingToStartBarPreview();
455
459
  audioResponsePage.steps.stopRecordingBarPreview();
456
- audioResponsePage.steps.verifyResponseIsRecordedHelpText();
460
+ //Need to remove comment once https://redmine.zeuslearning.com/issues/577968 is resolved
461
+ // audioResponsePage.steps.verifyResponseIsRecordedHelpText();
457
462
  utilities.verifyElementNotDisabled(audioResponsePage.barPreviewRetakeButton());
458
463
  });
459
464
 
460
- it('For "Bar" mode, When there is no retake limit set, then on hovering over the retake recording button, then retake limits should not be displayed on retake recording button tooltip', () => {
465
+ //Remove skip once https://redmine.zeuslearning.com/issues/566924 is resolved
466
+ it.skip('For "Bar" mode, When there is no retake limit set, then on hovering over the retake recording button, then retake limits should not be displayed on retake recording button tooltip', () => {
461
467
  audioResponsePage.barPreviewRetakeButton()
462
468
  .verifyTooltip('Retake recording');
463
469
  });
@@ -513,7 +519,8 @@ describe('Create item page - Audio response: Student view settings', () => {
513
519
  utilities.verifyElementNotDisabled(audioResponsePage.barPreviewRetakeButton());
514
520
  });
515
521
 
516
- it('For "Compact" mode, When there is no retake limit set, then on hovering over the retake recording button, then retake limits should not be displayed on retake recording button tooltip', () => {
522
+ //Remove skip once https://redmine.zeuslearning.com/issues/566924 is resolved
523
+ it.skip('For "Compact" mode, When there is no retake limit set, then on hovering over the retake recording button, then retake limits should not be displayed on retake recording button tooltip', () => {
517
524
  audioResponsePage.barPreviewRetakeButton()
518
525
  .verifyTooltip('Retake recording');
519
526
  });
@@ -0,0 +1,370 @@
1
+ import { dialogBoxBase, chartsBarPage, gradingViewPage, itemPreviewPage, studentViewPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+ import utilities from "../../../../support/helpers/utilities";
4
+ const grepTags = Cypress.env('grepTags');
5
+ let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
6
+ const views = utilities.getViews(correctAnswerViews);
7
+ var itemReferenceID = "";
8
+
9
+ describe('Create item page - Charts - Bar horizontal orientation: All or nothing ', () => {
10
+ before(() => {
11
+ cy.loginAs('admin');
12
+ });
13
+
14
+ if (!grepTags || !grepTags.includes('smoke')) {
15
+ describe('Question preview modes: Student view and Grading view', () => {
16
+ abortEarlySetup();
17
+ before(() => {
18
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
19
+ cy.barsPreLoaderWait();
20
+ chartsBarPage.steps.selectHorizontalDirectionRadioButton();
21
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 1, range: 10 }, 'horizontal');
22
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 1, value: 2, range: 10 }, 'horizontal');
23
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 2, value: 3, range: 10 }, 'horizontal');
24
+ chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
25
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 3, value: 4, range: 10 }, 'horizontal');
26
+ chartsBarPage.steps.switchToPreviewTab();
27
+ });
28
+
29
+ chartsBarPage.tests.verifyPreviewModesAndScoreWhenPointsAndCorrectAnswersIsNotSet();
30
+
31
+ it('When the user sets correct answer responses and allots points, then the alloted points should be displayed in the preview tab', () => {
32
+ chartsBarPage.steps.switchToEditTab();
33
+ chartsBarPage.steps.allotPoints(20);
34
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 2, range: 10 }, 'horizontal');
35
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 1, value: 5, range: 10 }, 'horizontal');
36
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 2, value: 1, range: 10 }, 'horizontal');
37
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 3, value: 8, range: 10 }, 'horizontal');
38
+ chartsBarPage.steps.switchToPreviewTab();
39
+ chartsBarPage.steps.verifyPreviewScore(0, 20);
40
+ });
41
+
42
+ it('When the user attempts question in preview tab and switches to edit tab, then on re-switching to the preview tab, users response should not persist', () => {
43
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 7, range: 10 }, 'horizontal');
44
+ chartsBarPage.steps.resetQuestionPreview();
45
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 0, barValue: 1, range: 10 });
46
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 1, barValue: 2, range: 10 });
47
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 2, barValue: 3, range: 10 });
48
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 3, barValue: 4, range: 10 });
49
+ });
50
+ });
51
+ };
52
+
53
+ views.forEach((view) => {
54
+ describe(`Charts - Bar: All or nothing scoring - ${view}`, { tags: 'smoke' }, () => {
55
+ abortEarlySetup();
56
+ before(() => {
57
+ switch (view) {
58
+ case 'Question preview':
59
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
60
+ cy.barsPreLoaderWait();
61
+ chartsBarPage.steps.selectHorizontalDirectionRadioButton();
62
+ chartsBarPage.steps.addTextInQuestionInstructionsInputField('Set the bar on the chart for the profits of the years');
63
+ chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
64
+ chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
65
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 3, range: 10 }, 'horizontal');
66
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 1, value: 2, range: 10 }, 'horizontal');
67
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 3, value: 3, range: 10 }, 'horizontal');
68
+ chartsBarPage.steps.lockBar(1);
69
+ chartsBarPage.steps.allotPoints(20);
70
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 3, range: 10 }, 'horizontal');
71
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 2, value: 6, range: 10 }, 'horizontal');
72
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 3, value: 5, range: 10 }, 'horizontal');
73
+ chartsBarPage.steps.switchToPreviewTab();
74
+ break;
75
+ case 'Item preview':
76
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
77
+ itemPreviewPage.steps.switchToPreviewTab();
78
+ break;
79
+ case 'Grading view':
80
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
81
+ break;
82
+ }
83
+ });
84
+
85
+ beforeEach(() => {
86
+ switch (view) {
87
+ case 'Question preview':
88
+ chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
89
+ chartsBarPage.steps.resetQuestionPreview();
90
+ break;
91
+ case 'Item preview':
92
+ itemPreviewPage.steps.switchToStudentView();
93
+ itemPreviewPage.steps.resetQuestionPreview();
94
+ break;
95
+ case 'Grading view':
96
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
97
+ break;
98
+ }
99
+ });
100
+
101
+ if (view === 'Question preview') {
102
+ after(() => {
103
+ chartsBarPage.steps.clickOnSaveQuestionButton();
104
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
105
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
106
+ });
107
+ };
108
+
109
+ it('When the user selects \'Grading\' view without attempting the question, the correct answer should be displayed in the correct answer section graph and your answer is incorrect status message should be displayed', () => {
110
+ if (view === 'Grading view') {
111
+ studentViewPage.steps.submitResponse();
112
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
113
+ studentViewPage.steps.clickOnGoToGradingViewButton();
114
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
115
+ } else {
116
+ chartsBarPage.steps.switchToGradingView();
117
+ chartsBarPage.steps.verifyPreviewScore(0, 20);
118
+ }
119
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
120
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
121
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
122
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
123
+ chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
124
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
125
+ chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
126
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
127
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
128
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
129
+ });
130
+
131
+ //Fully incorrect case
132
+ it('When the user incorrectly sets a bar which was correct by default, then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed, incorrect icons should be displayed on the incorrectly attempted bars and correct answer section should be displayed with the correct answers', () => {
133
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 5, range: 10 }, 'horizontal');
134
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 2, range: 10 }, 'horizontal');
135
+ if (view === 'Grading view') {
136
+ studentViewPage.steps.submitResponse();
137
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
138
+ studentViewPage.steps.clickOnGoToGradingViewButton();
139
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
140
+ } else {
141
+ chartsBarPage.steps.verifyPreviewScore(0, 20);
142
+ chartsBarPage.steps.switchToGradingView();
143
+ }
144
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
145
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
146
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
147
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
148
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
149
+ chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
150
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
151
+ chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
152
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
153
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
154
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
155
+ });
156
+
157
+ //Partially correct cases
158
+ it('When the user incorrectly sets a bar which was set to 0 and correct by default, then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed, incorrect icons should be displayed on the incorrectly attempted bars and correct answer section should be displayed with the correct answers', () => {
159
+ if (view === 'Grading view') {
160
+ studentViewPage.steps.clearResponses();
161
+ }
162
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 5, range: 10 }, 'horizontal');
163
+ if (view === 'Grading view') {
164
+ studentViewPage.steps.submitResponse();
165
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
166
+ studentViewPage.steps.clickOnGoToGradingViewButton();
167
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
168
+ } else {
169
+ chartsBarPage.steps.verifyPreviewScore(0, 20);
170
+ chartsBarPage.steps.switchToGradingView();
171
+ }
172
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
173
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
174
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
175
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
176
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
177
+ chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
178
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
179
+ chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
180
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
181
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
182
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
183
+ });
184
+
185
+ it('When the user attempts the question partially correct by incorrectly setting a bar which was incorrect by default, then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed, correct icons should be displayed on the correctly attempted bars, incorrect icons should be displayed on the incorrectly attempted bars and correct answer section should be displayed with the correct answers', () => {
186
+ if (view === 'Grading view') {
187
+ studentViewPage.steps.clearResponses();
188
+ }
189
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 2, range: 10 }, 'horizontal');
190
+ if (view === 'Grading view') {
191
+ studentViewPage.steps.submitResponse();
192
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
193
+ studentViewPage.steps.clickOnGoToGradingViewButton();
194
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
195
+ } else {
196
+ chartsBarPage.steps.verifyPreviewScore(0, 20);
197
+ chartsBarPage.steps.switchToGradingView();
198
+ }
199
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
200
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
201
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
202
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
203
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
204
+ chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
205
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
206
+ chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
207
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
208
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
209
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
210
+ });
211
+
212
+ it('When the user attempts the question partially correct by incorrectly setting a bar to zero which was incorrect by default, then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed, correct icons should be displayed on the correctly attempted bars, incorrect icons should be displayed on the incorrectly attempted bars and correct answer section should be displayed with the correct answers', () => {
213
+ if (view === 'Grading view') {
214
+ studentViewPage.steps.clearResponses();
215
+ }
216
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 0, range: 10 }, 'horizontal');
217
+ if (view === 'Grading view') {
218
+ studentViewPage.steps.submitResponse();
219
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
220
+ studentViewPage.steps.clickOnGoToGradingViewButton();
221
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
222
+ } else {
223
+ chartsBarPage.steps.verifyPreviewScore(0, 20);
224
+ chartsBarPage.steps.switchToGradingView();
225
+ }
226
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
227
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
228
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
229
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
230
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
231
+ chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
232
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
233
+ chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
234
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
235
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
236
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
237
+ });
238
+
239
+ it('When the user attempts the question partially correct by incorrectly setting a bar which was set to zero by default, then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed, correct icons should be displayed on the correctly attempted bars, incorrect icons should be displayed on the incorrectly attempted bars and correct answer section should be displayed with the correct answers', () => {
240
+ if (view === 'Grading view') {
241
+ studentViewPage.steps.clearResponses();
242
+ }
243
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 9, range: 10 }, 'horizontal');
244
+ if (view === 'Grading view') {
245
+ studentViewPage.steps.submitResponse();
246
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
247
+ studentViewPage.steps.clickOnGoToGradingViewButton();
248
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
249
+ } else {
250
+ chartsBarPage.steps.verifyPreviewScore(0, 20);
251
+ chartsBarPage.steps.switchToGradingView();
252
+ }
253
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
254
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
255
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
256
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
257
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
258
+ chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
259
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
260
+ chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
261
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
262
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
263
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
264
+ });
265
+
266
+ it('When the user attempts the question partially correct by setting all bars correctly except 1 then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed, correct icons should be displayed on the correctly attempted bars and incorrect icons should be displayed on the incorrectly attempted bars and correct answer section should be displayed with the correct answers', () => {
267
+ if (view === 'Grading view') {
268
+ studentViewPage.steps.clearResponses();
269
+ }
270
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 5, range: 10 }, 'horizontal');
271
+ if (view === 'Grading view') {
272
+ studentViewPage.steps.submitResponse();
273
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
274
+ studentViewPage.steps.clickOnGoToGradingViewButton();
275
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
276
+ } else {
277
+ chartsBarPage.steps.verifyPreviewScore(0, 20);
278
+ chartsBarPage.steps.switchToGradingView();
279
+ }
280
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
281
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
282
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
283
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
284
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
285
+ chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
286
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
287
+ chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
288
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
289
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
290
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
291
+ });
292
+
293
+ //Fully correct
294
+ it('When the user attempts the question correctly then the user should be awarded with full points and on switching to grading view \'Your answer is correct\' should be displayed, correct icons should be displayed on the correctly attempted bars and the correct answer section graph should not be displayed', () => {
295
+ if (view === 'Grading view') {
296
+ studentViewPage.steps.clearResponses();
297
+ }
298
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 6, range: 10 }, 'horizontal');
299
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 5, range: 10 }, 'horizontal');
300
+ if (view === 'Grading view') {
301
+ studentViewPage.steps.submitResponse();
302
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
303
+ studentViewPage.steps.clickOnGoToGradingViewButton();
304
+ gradingViewPage.steps.verifyGradingViewScore(20, 20);
305
+ } else {
306
+ chartsBarPage.steps.verifyPreviewScore(20, 20);
307
+ chartsBarPage.steps.switchToGradingView();
308
+ }
309
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
310
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
311
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
312
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
313
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
314
+ chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
315
+ chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
316
+ });
317
+ });
318
+ });
319
+
320
+ if (!grepTags || !grepTags.includes('smoke')) {
321
+ describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
322
+ abortEarlySetup();
323
+ before(() => {
324
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
325
+ cy.barsPreLoaderWait();
326
+ chartsBarPage.steps.selectHorizontalDirectionRadioButton();
327
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 1, range: 10 }, 'horizontal');
328
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 1, value: 2, range: 10 }, 'horizontal');
329
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 2, value: 3, range: 10 }, 'horizontal');
330
+ chartsBarPage.steps.allotPoints(20);
331
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 4, range: 10 }, 'horizontal');
332
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 1, value: 5, range: 10 }, 'horizontal');
333
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 2, value: 6, range: 10 }, 'horizontal');
334
+ });
335
+
336
+ 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', () => {
337
+ chartsBarPage.steps.expandMinimumScoringDropdown();
338
+ chartsBarPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
339
+ chartsBarPage.steps.allotMinimumPoints(2);
340
+ chartsBarPage.steps.switchToPreviewTab();
341
+ chartsBarPage.steps.switchToGradingView();
342
+ chartsBarPage.steps.verifyPreviewScore(2, 20);
343
+ chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
344
+ });
345
+
346
+ 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', () => {
347
+ chartsBarPage.steps.resetQuestionPreview();
348
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 2, range: 10 }, 'horizontal');
349
+ chartsBarPage.steps.verifyPreviewScore(2, 20);
350
+ chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
351
+ });
352
+
353
+ it('When the user selects \'Award minimum score only if attempted\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with 0 points', () => {
354
+ chartsBarPage.steps.switchToEditTab();
355
+ chartsBarPage.steps.expandMinimumScoringDropdown();
356
+ chartsBarPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
357
+ chartsBarPage.steps.allotMinimumPoints(2);
358
+ chartsBarPage.steps.switchToPreviewTab();
359
+ chartsBarPage.steps.switchToGradingView();
360
+ chartsBarPage.steps.verifyPreviewScore(0, 20);
361
+ chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
362
+ });
363
+
364
+ 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', () => {
365
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 2, range: 10 }, 'horizontal');
366
+ chartsBarPage.steps.verifyPreviewScore(2, 20);
367
+ });
368
+ });
369
+ };
370
+ });