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
@@ -0,0 +1,285 @@
1
+ import { chartsBarPage, correctAnswerViewPage, itemPreviewPage, studentViewPage } from "../../../../pages";
2
+ import { gradingViewPage } from "../../../../pages";
3
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
4
+ import utilities from "../../../../support/helpers/utilities";
5
+ const css = Cypress.env('css');
6
+
7
+ let gradingAndCorrectAnsView = ['Grading view', 'Correct answer view']
8
+ const views = utilities.getViews(gradingAndCorrectAnsView);
9
+ var itemReferenceID = "";
10
+ const barBackgroundColor = ['rgb(46, 169, 89)', 'rgb(6, 117, 244)', 'rgb(219, 124, 0)', 'rgb(156, 105, 39)', 'rgb(219, 60, 0)'];
11
+
12
+
13
+ describe('Create item page - Charts - Bar horizontal orientation: Grading view, Correct answer view contents', () => {
14
+ before(() => {
15
+ cy.loginAs('admin');
16
+ });
17
+
18
+ if (views.includes('Grading view')) {
19
+ describe('Grading view contents', { tags: 'smoke' }, () => {
20
+ abortEarlySetup();
21
+ before(() => {
22
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
23
+ cy.barsPreLoaderWait();
24
+ chartsBarPage.steps.selectHorizontalDirectionRadioButton();
25
+ chartsBarPage.steps.addTextInQuestionInstructionsInputField('Set the bar on the chart for the profits of the years');
26
+ chartsBarPage.steps.selectAddBarOrPointToolbarOption();
27
+ chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
28
+ chartsBarPage.steps.setGraphTitle('Graph of profits');
29
+ chartsBarPage.steps.setXAxisLabel('Profit');
30
+ chartsBarPage.steps.setYAxisLabel('Year');
31
+ chartsBarPage.steps.setMaxYValue(20);
32
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 1, range: 20 }, 'horizontal');
33
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 1, value: 2, range: 20 }, 'horizontal');
34
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 2, value: 3, range: 20 }, 'horizontal');
35
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 3, value: 4, range: 20 }, 'horizontal');
36
+ chartsBarPage.steps.lockBar(1);
37
+ chartsBarPage.steps.allotPoints(10);
38
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 2, range: 20 }, 'horizontal');
39
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 2, value: 5, range: 20 }, 'horizontal');
40
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 3, value: 1, range: 20 }, 'horizontal');
41
+ chartsBarPage.steps.addBarOrPointInChartInSpecifyCorrectAnswerSection();
42
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 4, value: 8, range: 20 }, 'horizontal');
43
+ chartsBarPage.steps.clickOnSaveQuestionButton();
44
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
45
+ //Global variable issue, not working inside before
46
+ itemPreviewPage.referenceID()
47
+ .invoke('text')
48
+ .then(($refID) => {
49
+ itemReferenceID = $refID;
50
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
51
+ chartsBarPage.steps.addBarOrPointInChartInPreviewTab();
52
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 5, range: 20 }, 'horizontal');
53
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 10, range: 20 }, 'horizontal');
54
+ studentViewPage.steps.submitResponse();
55
+ studentViewPage.steps.clickOnGoToGradingViewButton();
56
+ });
57
+ });
58
+
59
+ it('Question instructions should be visible', () => {
60
+ utilities.verifyInnerText(chartsBarPage.questionInstructionsText(), 'Set the bar on the chart for the profits of the years');
61
+ utilities.verifyElementVisibilityState(chartsBarPage.questionInstructionsText(), 'visible');
62
+ });
63
+
64
+ it('Graph title, Y axis label and X axis label set by the user should be displayed in the chart', () => {
65
+ utilities.verifyInnerText(chartsBarPage.previewTabGraphTitle(), 'Graph of profits');
66
+ utilities.verifyInnerText(chartsBarPage.previewTabXAxisLabelButton(), 'Profit');
67
+ utilities.verifyInnerText(chartsBarPage.previewTabYAxisLabelButton(), 'Year');
68
+ });
69
+
70
+ it('Toolbar, toolbar options and control actions(Undo, Redo, Reset) should not be displayed', () => {
71
+ utilities.verifyElementVisibilityState(chartsBarPage.previewTabTool(), 'notExist');
72
+ utilities.verifyElementVisibilityState(chartsBarPage.previewTabToolBarWrapper(), 'notExist');
73
+ });
74
+
75
+ it('The response submitted by the student should be displayed in grading view', () => {
76
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 0, barValue: 1, range: 20 });
77
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 1, barValue: 2, range: 20 });
78
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 2, barValue: 5, range: 20 });
79
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 3, barValue: 4, range: 20 });
80
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 4, barValue: 10, range: 20 });
81
+ });
82
+
83
+ it('The locked bar should have lock icon displayed in it', () => {
84
+ chartsBarPage.steps.verifyBarIsLockedInPreviewTab(1);
85
+ });
86
+
87
+ it('Correct and Incorrect icons should be displayed in each bar graph and locked bar should not have any correct or incorrect icon', () => {
88
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
89
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
90
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
91
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
92
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
93
+ });
94
+
95
+ it('\'Your answer is incorrect\' label should be displayed', () => {
96
+ chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
97
+ });
98
+
99
+ it('All the bar graphs in grading view should be non-editable', () => {
100
+ chartsBarPage.steps.verifyDragHandleNotVisible();
101
+ for (let index = 0; index < 5; index++) {
102
+ utilities.triggerMouseover(utilities.getNthElement(chartsBarPage.previewTabBar(), index));
103
+ utilities.verifyElementVisibilityState(chartsBarPage.barAndPointTooltipWrapper(), 'notExist');
104
+ }
105
+ });
106
+
107
+ it('Correct answer label should be displayed', () => {
108
+ utilities.verifyInnerText(chartsBarPage.correctAnswersLabel(), 'Correct answers');
109
+ utilities.verifyElementVisibilityState(chartsBarPage.correctAnswersLabel(), 'visible');
110
+ });
111
+
112
+ it('Correct answer should be displayed in the correct answer section', () => {
113
+ chartsBarPage.steps.verifyBarHeightInCorrectAnswerSection({ barIndex: 0, barValue: 2, range: 20 });
114
+ chartsBarPage.steps.verifyBarHeightInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 20 });
115
+ chartsBarPage.steps.verifyBarHeightInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 20 });
116
+ chartsBarPage.steps.verifyBarHeightInCorrectAnswerSection({ barIndex: 3, barValue: 1, range: 20 });
117
+ chartsBarPage.steps.verifyBarHeightInCorrectAnswerSection({ barIndex: 4, barValue: 8, range: 20 });
118
+ chartsBarPage.steps.verifyBarCorrectIconInCorrectAnswerSection(0);
119
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInCorrectAnswerSection(1);
120
+ chartsBarPage.steps.verifyBarCorrectIconInCorrectAnswerSection(2);
121
+ chartsBarPage.steps.verifyBarCorrectIconInCorrectAnswerSection(3);
122
+ chartsBarPage.steps.verifyBarCorrectIconInCorrectAnswerSection(4);
123
+ chartsBarPage.steps.verifyGraphTitleInCorrectAnswerSection('Graph of profits');
124
+ chartsBarPage.steps.verifyXAxisLabelInCorrectAnswerSection('Profit');
125
+ chartsBarPage.steps.verifyYAxisLabelInCorrectAnswerSection('Year');
126
+ });
127
+
128
+ it('Points and the total score should be displayed', () => {
129
+ gradingViewPage.steps.verifyGradingViewScore(0, 10);
130
+ });
131
+
132
+ it('CSS of grading view', { tags: 'css' }, () => {
133
+ utilities.verifyCSS(chartsBarPage.previewTabGraphTitle(), {
134
+ 'color': css.color.text,
135
+ 'font-size': css.fontSize.default,
136
+ 'font-weight': css.fontWeight.bold
137
+ });
138
+ utilities.verifyCSS(chartsBarPage.previewTabYAxisLabelButton(), {
139
+ 'color': css.color.text,
140
+ 'font-size': css.fontSize.default,
141
+ 'font-weight': css.fontWeight.bold
142
+ });
143
+ utilities.verifyCSS(chartsBarPage.previewTabXAxisLabelButton(), {
144
+ 'color': css.color.text,
145
+ 'font-size': css.fontSize.default,
146
+ 'font-weight': css.fontWeight.bold
147
+ });
148
+ utilities.verifyCSS(chartsBarPage.previewTabBar().eq(0), {
149
+ 'background-color': barBackgroundColor[0]
150
+ });
151
+ utilities.verifyCSS(chartsBarPage.previewTabBar().eq(1), {
152
+ 'background-color': barBackgroundColor[1]
153
+ });
154
+ utilities.verifyCSS(chartsBarPage.previewTabBar().eq(2), {
155
+ 'background-color': barBackgroundColor[2]
156
+ });
157
+ utilities.verifyCSS(chartsBarPage.previewTabBar().eq(3), {
158
+ 'background-color': barBackgroundColor[3]
159
+ });
160
+ utilities.verifyCSS(chartsBarPage.previewTabBar().eq(4), {
161
+ 'background-color': barBackgroundColor[4]
162
+ });
163
+ utilities.verifyCSS(chartsBarPage.barLockIcon(), {
164
+ 'background-color': css.color.defaultBackground,
165
+ });
166
+ });
167
+
168
+ it('Accessibility of grading view', { tags: 'a11y' }, () => {
169
+ cy.checkAccessibility(chartsBarPage.previewTabBar().parents('[class*="question-preview-wrapper"]'));
170
+ });
171
+ });
172
+ }
173
+
174
+ if (views.includes('Correct answer view')) {
175
+ describe('Correct answer view contents', { tags: 'smoke' }, () => {
176
+ abortEarlySetup();
177
+ before(() => {
178
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
179
+ cy.barsPreLoaderWait();
180
+ chartsBarPage.steps.selectHorizontalDirectionRadioButton();
181
+ chartsBarPage.steps.addTextInQuestionInstructionsInputField('Set the bar on the chart for the profits of the years');
182
+ chartsBarPage.steps.selectAddBarOrPointToolbarOption();
183
+ chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
184
+ chartsBarPage.steps.setGraphTitle('Graph of profits');
185
+ chartsBarPage.steps.setXAxisLabel('Profit');
186
+ chartsBarPage.steps.setYAxisLabel('Year');
187
+ chartsBarPage.steps.setMaxYValue(20);
188
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 1, range: 20 }, 'horizontal');
189
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 1, value: 2, range: 20 }, 'horizontal');
190
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 2, value: 3, range: 20 }, 'horizontal');
191
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 3, value: 4, range: 20 }, 'horizontal');
192
+ chartsBarPage.steps.lockBar(1);
193
+ chartsBarPage.steps.allotPoints(10);
194
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 2, range: 20 }, 'horizontal');
195
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 2, value: 5, range: 20 }, 'horizontal');
196
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 3, value: 1, range: 20 }, 'horizontal');
197
+ chartsBarPage.steps.addBarOrPointInChartInSpecifyCorrectAnswerSection();
198
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 4, value: 8, range: 20 }, 'horizontal');
199
+ chartsBarPage.steps.clickOnSaveQuestionButton();
200
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
201
+ //Global variable issue, not working inside before
202
+ itemPreviewPage.referenceID()
203
+ .invoke('text')
204
+ .then(($refID) => {
205
+ itemReferenceID = $refID
206
+ cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
207
+ });
208
+ });
209
+
210
+ it('Question instructions should be visible', () => {
211
+ utilities.verifyInnerText(chartsBarPage.questionInstructionsText(), 'Set the bar on the chart for the profits of the years');
212
+ utilities.verifyElementVisibilityState(chartsBarPage.questionInstructionsText(), 'visible');
213
+ });
214
+
215
+ it('Graph title, Y axis label and X axis label set by the user should be displayed in the chart', () => {
216
+ utilities.verifyInnerText(chartsBarPage.previewTabGraphTitle(), 'Graph of profits');
217
+ utilities.verifyInnerText(chartsBarPage.previewTabXAxisLabelButton(), 'Profit');
218
+ utilities.verifyInnerText(chartsBarPage.previewTabYAxisLabelButton(), 'Year');
219
+ });
220
+
221
+ it('Toolbar and control actions(Undo, Redo, Reset) should not be displayed', () => {
222
+ utilities.verifyElementVisibilityState(chartsBarPage.previewTabTool(), 'notExist');
223
+ utilities.verifyElementVisibilityState(chartsBarPage.previewTabToolBarWrapper(), 'notExist');
224
+ });
225
+
226
+ it('The correct answer set by user should be displayed in the correct answer view', () => {
227
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 0, barValue: 2, range: 20 });
228
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 1, barValue: 2, range: 20 });
229
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 2, barValue: 5, range: 20 });
230
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 3, barValue: 1, range: 20 });
231
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 4, barValue: 8, range: 20 });
232
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
233
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
234
+ chartsBarPage.steps.verifyBarIsLockedInPreviewTab(1);
235
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
236
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
237
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
238
+ });
239
+
240
+ it('The points alloted to the question should be displayed', () => {
241
+ correctAnswerViewPage.steps.verifyAvailablePoints(10);
242
+ });
243
+
244
+ it('CSS of correct answer section', { tags: 'css' }, () => {
245
+ utilities.verifyCSS(chartsBarPage.previewTabGraphTitle(), {
246
+ 'color': css.color.text,
247
+ 'font-size': css.fontSize.default,
248
+ 'font-weight': css.fontWeight.bold
249
+ });
250
+ utilities.verifyCSS(chartsBarPage.previewTabYAxisLabelButton(), {
251
+ 'color': css.color.text,
252
+ 'font-size': css.fontSize.default,
253
+ 'font-weight': css.fontWeight.bold
254
+ });
255
+ utilities.verifyCSS(chartsBarPage.previewTabXAxisLabelButton(), {
256
+ 'color': css.color.text,
257
+ 'font-size': css.fontSize.default,
258
+ 'font-weight': css.fontWeight.bold
259
+ });
260
+ utilities.verifyCSS(chartsBarPage.previewTabBar().eq(0), {
261
+ 'background-color': barBackgroundColor[0]
262
+ });
263
+ utilities.verifyCSS(chartsBarPage.previewTabBar().eq(1), {
264
+ 'background-color': barBackgroundColor[1]
265
+ });
266
+ utilities.verifyCSS(chartsBarPage.previewTabBar().eq(2), {
267
+ 'background-color': barBackgroundColor[2]
268
+ });
269
+ utilities.verifyCSS(chartsBarPage.previewTabBar().eq(3), {
270
+ 'background-color': barBackgroundColor[3]
271
+ });
272
+ utilities.verifyCSS(chartsBarPage.previewTabBar().eq(4), {
273
+ 'background-color': barBackgroundColor[4]
274
+ });
275
+ utilities.verifyCSS(chartsBarPage.barLockIcon(), {
276
+ 'background-color': css.color.defaultBackground,
277
+ });
278
+ });
279
+
280
+ it('Accessibility of correct answer section', { tags: 'a11y' }, () => {
281
+ cy.checkAccessibility(chartsBarPage.previewTabBar().parents('[class*="question-preview-wrapper"]'));
282
+ });
283
+ });
284
+ }
285
+ });