itemengine-cypress-automation 1.0.189-e2e-execution-crash-83cdbd4.0 → 1.0.190-7thMayFixes-fcaf7b8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (292) hide show
  1. package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +81 -0
  2. package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +620 -0
  3. package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +402 -0
  4. package/cypress/e2e/ILC/AudioPlayerNew/customizePlayerLayoutSettings.js +596 -0
  5. package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +162 -0
  6. package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +792 -0
  7. package/cypress/e2e/ILC/AudioPlayerNew/studentViewSettings.js +253 -0
  8. package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +313 -0
  9. package/cypress/e2e/ILC/AudioResponseNew/additionalSettingsBasic.js +1 -22
  10. package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +2 -2
  11. package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +1 -1
  12. package/cypress/e2e/ILC/AudioResponseNew/editAndPreviewTabScoringSection.js +1 -1
  13. package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +1 -0
  14. package/cypress/e2e/ILC/AudioResponseNew/headerSection.js +4 -20
  15. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
  16. package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +2 -11
  17. package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +366 -0
  18. package/cypress/e2e/ILC/ChartsBar/checkAnswerFunctionalityForAllViews.smoke.js +181 -0
  19. package/cypress/e2e/ILC/ChartsBar/gradingViewAndCorrectAnswerView.smoke.js +283 -0
  20. package/cypress/e2e/ILC/ChartsBar/previewContentsForAllViews.smoke.js +625 -0
  21. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettingsBasic.js +1 -1
  22. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
  23. package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +2 -2
  24. package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +0 -3
  25. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +3 -5
  26. package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabBasicSection.js +0 -4
  27. package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabScoring.js +0 -1
  28. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +6 -8
  29. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePageHeaderSection.js +4 -24
  30. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +0 -9
  31. package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +418 -29
  32. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
  33. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +0 -2
  34. package/cypress/e2e/ILC/EssayResponse/headerSection.js +3 -18
  35. package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +0 -1
  36. package/cypress/e2e/ILC/EssayResponseMath/mathCharacters.js +0 -1
  37. package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +29 -1
  38. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/headerSection.js +0 -5
  39. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
  40. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
  41. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +0 -4
  42. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
  43. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +3 -3
  44. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -0
  45. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/headerSection.js +5 -5
  46. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
  47. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +4 -4
  48. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +0 -4
  49. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
  50. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
  51. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  52. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
  53. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
  54. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +3 -4
  55. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  56. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +1 -2
  57. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +1 -0
  58. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -3
  59. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
  60. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
  61. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
  62. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
  63. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +2 -1
  64. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
  65. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +6 -6
  66. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +3 -2
  67. package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +11 -3
  68. package/cypress/e2e/ILC/GridFill/headerSection.js +4 -5
  69. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
  70. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +2 -2
  71. package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountAllOrNothingCorrectPointsGreaterThanAlternativePoints.js +143 -0
  72. package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountPartialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +132 -0
  73. package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountPartialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +143 -0
  74. package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountPartialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +144 -0
  75. package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountallOrNothingCorrectPointsEqualToAlternativePoints.js +143 -0
  76. package/cypress/e2e/ILC/GridFill/scoring/cellshadeCountAllOrNothingAlternativePointsGreaterThanCorrectPoints.js +131 -0
  77. package/cypress/e2e/ILC/GridFill/scoring/matchExactAndCellShadeCountCombinedScoring.js +87 -0
  78. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsCellShadeCountBasics.js +446 -0
  79. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
  80. package/cypress/e2e/ILC/ImageHighlight/allOrNothingForAllViews.smoke.js +276 -0
  81. package/cypress/e2e/ILC/ImageHighlight/checkAnswerFunctionalityForAllViews.smoke.js +141 -0
  82. package/cypress/e2e/ILC/ImageHighlight/previewContentsForAllViews.smoke.js +150 -0
  83. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +194 -0
  84. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +195 -0
  85. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +274 -0
  86. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingPenaltyScoring.js +48 -0
  87. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/manuallyAndNonScored.js +144 -0
  88. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +252 -0
  89. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsBasic.js +102 -0
  90. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +256 -0
  91. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +253 -0
  92. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +308 -0
  93. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +225 -0
  94. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsBasic.js +151 -0
  95. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +196 -0
  96. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +227 -0
  97. package/cypress/e2e/ILC/ListOrderingDropdown/additionalSettings.js +91 -0
  98. package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +230 -0
  99. package/cypress/e2e/ILC/ListOrderingDropdown/checkAnswerFunctionalityForAllViews.smoke.js +124 -0
  100. package/cypress/e2e/ILC/ListOrderingDropdown/editTabBasicSection.js +221 -0
  101. package/cypress/e2e/ILC/ListOrderingDropdown/editTabScoring.js +203 -0
  102. package/cypress/e2e/ILC/ListOrderingDropdown/manuallyAndNonScoredEditTab.js +71 -0
  103. package/cypress/e2e/ILC/ListOrderingDropdown/minimumScoringPenaltyPointsAndRoundingDropdown.js +197 -0
  104. package/cypress/e2e/ILC/ListOrderingDropdown/previewContentsForAllViews.smoke.js +201 -0
  105. package/cypress/e2e/ILC/ListOrderingDropdown/specifyCorrectAnswerSection.js +115 -0
  106. package/cypress/e2e/ILC/ListOrderingDropdown/studentViewSettings.js +183 -0
  107. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +216 -0
  108. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +214 -0
  109. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +273 -0
  110. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
  111. package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +128 -0
  112. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +279 -0
  113. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +109 -0
  114. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +278 -0
  115. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +278 -0
  116. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +335 -0
  117. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +250 -0
  118. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +161 -0
  119. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +216 -0
  120. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +252 -0
  121. package/cypress/e2e/ILC/ListOrderingNew/additionalSettings.js +118 -0
  122. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +243 -0
  123. package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
  124. package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +155 -0
  125. package/cypress/e2e/ILC/ListOrderingNew/editTabScoring.js +195 -0
  126. package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +78 -0
  127. package/cypress/e2e/ILC/ListOrderingNew/manuallyAndNonScoredEditTab.js +69 -0
  128. package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  129. package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +176 -0
  130. package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +112 -0
  131. package/cypress/e2e/ILC/ListOrderingNew/studentViewSettings.js +244 -0
  132. package/cypress/e2e/ILC/Matching/additionalSettings.js +1 -0
  133. package/cypress/e2e/ILC/Matching/headerSection.js +2 -2
  134. package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
  135. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +1 -0
  136. package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
  137. package/cypress/e2e/ILC/NumberLine/LayoutSection.js +209 -0
  138. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +23 -21
  139. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +5 -3
  140. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +8 -6
  141. package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +1 -1
  142. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +1 -1
  143. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +1 -1
  144. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +1 -1
  145. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +1 -1
  146. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +60 -3
  147. package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +3 -2
  148. package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +2 -9
  149. package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +2 -2
  150. package/cypress/e2e/ILC/NumberLine/headerSection.js +4 -4
  151. package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +33 -0
  152. package/cypress/e2e/ILC/NumberLine/numberLineSection.js +50 -0
  153. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +2 -2
  154. package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +1 -1
  155. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +3 -3
  156. package/cypress/e2e/ILC/NumberLine/toolSettings.js +2 -1
  157. package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +1 -1
  158. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +697 -0
  159. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +173 -0
  160. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/layoutSection.js +211 -0
  161. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +75 -0
  162. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +204 -0
  163. package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +231 -0
  164. package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +231 -0
  165. package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +231 -0
  166. package/cypress/e2e/ILC/NumberLineLabel/Scoring/manualAndNonScoredScoring.js +169 -0
  167. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +274 -0
  168. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsBasic.js +433 -0
  169. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +274 -0
  170. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +274 -0
  171. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +249 -0
  172. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsBasic.js +135 -0
  173. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +210 -0
  174. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +248 -0
  175. package/cypress/e2e/ILC/NumberLineLabel/additionalSettingsBasic.js +115 -0
  176. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +289 -0
  177. package/cypress/e2e/ILC/NumberLineLabel/checkAnswerFunctionalityForAllViews.smoke.js +154 -0
  178. package/cypress/e2e/ILC/NumberLineLabel/editTabBasicSection.js +326 -0
  179. package/cypress/e2e/ILC/NumberLineLabel/editTabScoring.js +234 -0
  180. package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +164 -0
  181. package/cypress/e2e/ILC/NumberLineLabel/headerSection.js +80 -0
  182. package/cypress/e2e/ILC/NumberLineLabel/layoutSection.js +204 -0
  183. package/cypress/e2e/ILC/NumberLineLabel/manuallyAndNonScoredEditTab.js +79 -0
  184. package/cypress/e2e/ILC/NumberLineLabel/minimumScoringPenaltyPointsAndRoundingDropdown.js +85 -0
  185. package/cypress/e2e/ILC/NumberLineLabel/numberLineSection.js +51 -0
  186. package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +120 -0
  187. package/cypress/e2e/ILC/NumberLineLabel/specifyCorrectAnswerSection.js +74 -0
  188. package/cypress/e2e/ILC/NumberLineLabel/studentViewSettings.js +183 -0
  189. package/cypress/e2e/ILC/NumberLineLabel/toolSettings.js +76 -0
  190. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/allOrNothingForAllViews.smoke.js +292 -0
  191. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/checkAnswerFunctionalityForAllViews.smoke.js +155 -0
  192. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +166 -0
  193. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/layoutSection.js +360 -0
  194. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/numberLineSection.js +80 -0
  195. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/previewContentsForAllViews.smoke.js +111 -0
  196. package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
  197. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +49 -1
  198. package/cypress/e2e/ILC/ShortTextResponseNew/editTabScoringSection.js +1 -1
  199. package/cypress/e2e/ILC/ShortTextResponseNew/headerSection.js +1 -7
  200. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -2
  201. package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
  202. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +2 -2
  203. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +5 -5
  204. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -1
  205. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -1
  206. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -1
  207. package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +0 -1
  208. package/cypress/e2e/ILC/TextSelection/additionalSettings.js +125 -0
  209. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -1
  210. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +2 -2
  211. package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +5 -4
  212. package/cypress/e2e/ILC/TextSelection/headerSection.js +73 -0
  213. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +6 -7
  214. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +179 -0
  215. package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +89 -0
  216. package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +436 -0
  217. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +277 -0
  218. package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +222 -0
  219. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +260 -0
  220. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +380 -0
  221. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
  222. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
  223. package/cypress/e2e/ILC/VideoResponseNew/additionalSettingsBasic.js +77 -0
  224. package/cypress/e2e/ILC/VideoResponseNew/customizePlaybackControls.js +313 -0
  225. package/cypress/e2e/ILC/VideoResponseNew/editAndPreviewTabScoringSection.js +99 -0
  226. package/cypress/e2e/ILC/VideoResponseNew/editTabBasicSection.js +171 -0
  227. package/cypress/e2e/ILC/VideoResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +179 -0
  228. package/cypress/e2e/ILC/VideoResponseNew/headerSection.js +79 -0
  229. package/cypress/e2e/ILC/VideoResponseNew/previewContentsForAllViews.smoke.js +201 -0
  230. package/cypress/e2e/ILC/VideoResponseNew/standardRecorderStyle.js +567 -0
  231. package/cypress/e2e/ILC/VideoResponseNew/studentViewSettings.js +192 -0
  232. package/cypress/fixtures/constants.js +1 -1
  233. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +1 -1
  234. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
  235. package/cypress/fixtures/theme/ilc.json +22 -18
  236. package/cypress/pages/audioPlayerPage.js +669 -445
  237. package/cypress/pages/audioResponsePage.js +10 -80
  238. package/cypress/pages/brainingCampManipulativePage.js +1 -1
  239. package/cypress/pages/chartsBarPage.js +517 -0
  240. package/cypress/pages/chartsDotPlotPage.js +8 -0
  241. package/cypress/pages/chartsLinePage.js +42 -0
  242. package/cypress/pages/components/allowTeachersToDownloadStudentResponseComponent.js +58 -0
  243. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +19 -26
  244. package/cypress/pages/components/autoScoredStudentViewSettings.js +7 -7
  245. package/cypress/pages/components/barAndLineChartComponent.js +123 -0
  246. package/cypress/pages/components/chartsCommonComponent.js +138 -0
  247. package/cypress/pages/components/commonComponents.js +1 -0
  248. package/cypress/pages/components/draggableOptionContainer.js +2 -1
  249. package/cypress/pages/components/equationEditorFlyout.js +3 -2
  250. package/cypress/pages/components/essayResponseCommonComponents.js +8 -2
  251. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -0
  252. package/cypress/pages/components/imageCanvasComponent.js +5 -4
  253. package/cypress/pages/components/index.js +8 -0
  254. package/cypress/pages/components/layoutSectionComponent.js +1156 -0
  255. package/cypress/pages/components/limitNumberOfRetakeComponent.js +90 -0
  256. package/cypress/pages/components/numberLineCommonComponent.js +685 -0
  257. package/cypress/pages/components/optionsWrapperComponent.js +13 -2
  258. package/cypress/pages/components/playbackControlsBaseComponent.js +20 -13
  259. package/cypress/pages/components/questionInputFieldComponent.js +2 -1
  260. package/cypress/pages/components/questionInstructionsComponent.js +3 -19
  261. package/cypress/pages/components/resetPopupComponent.js +7 -3
  262. package/cypress/pages/components/scoringSectionBaseEditTab.js +6 -17
  263. package/cypress/pages/components/singleMultipleSelectionModeComponent.js +16 -0
  264. package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +46 -0
  265. package/cypress/pages/components/toolSettingsComponent.js +6 -0
  266. package/cypress/pages/contentBlocksPage.js +19 -3
  267. package/cypress/pages/createItemPage.js +75 -8
  268. package/cypress/pages/dialogBoxBase.js +2 -2
  269. package/cypress/pages/dragAndDropIntoCategoriesPage.js +22 -24
  270. package/cypress/pages/drawingResponsePage.js +25 -4
  271. package/cypress/pages/feedbackScalePage.js +3 -0
  272. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +14 -0
  273. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +1 -1
  274. package/cypress/pages/graphingPage.js +19 -1
  275. package/cypress/pages/gridFillPage.js +47 -59
  276. package/cypress/pages/imageHighlightPage.js +364 -0
  277. package/cypress/pages/index.js +6 -1
  278. package/cypress/pages/itemPreviewSettingsPage.js +4 -0
  279. package/cypress/pages/listOrderingPage.js +561 -555
  280. package/cypress/pages/matchingPage.js +3 -2
  281. package/cypress/pages/multipleSelectionPage.js +23 -1
  282. package/cypress/pages/numberLineLabelPage.js +1093 -0
  283. package/cypress/pages/numberLinePage.js +696 -78
  284. package/cypress/pages/protractorPage.js +1 -1
  285. package/cypress/pages/readingRulerPage.js +1 -1
  286. package/cypress/pages/rulerPage.js +9 -5
  287. package/cypress/pages/textEntryMathPage.js +2 -2
  288. package/cypress/pages/textSelectionPage.js +461 -23
  289. package/cypress/pages/videoResponsePage.js +396 -83
  290. package/package.json +1 -1
  291. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
  292. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
@@ -0,0 +1,1093 @@
1
+ import constants from '../fixtures/constants';
2
+ import utilities from '../support/helpers/utilities';
3
+ import { createQuestionBasePage, questionInstructionsComponent, scoringSectionBaseEditTab, ckEditorToolbar, equationEditorFlyout, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, numberLineCommonComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, commonComponents, studentViewSettingsLabelComponent, randomizeOptionsComponent, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, toolSettingsComponent, layoutSectionComponent } from './components';
4
+ const css = Cypress.env('css');
5
+
6
+ const selectors = {
7
+ ...questionInstructionsComponent,
8
+ ...numberLineCommonComponent,
9
+ ...autoScoredScoringSectionMultiResponseType,
10
+ ...autoScoredSpecifyCorrectAnswerSection,
11
+ ...commonComponents,
12
+ ...autoScoredStudentViewSettings,
13
+ ...autoScoredScoringPreviewTab,
14
+ ...randomizeOptionsComponent,
15
+ ...additionalSettingsPanel,
16
+ partialEqualWeightsPointsPerResponseScore: () => cy.get('.alternate-points-points-per-value-span'),
17
+ snapToTicksCheckbox: () => cy.get('[data-ngie-testid="snap-to-ticks-checkbox"] input'),
18
+ snapToTicksLabel: () => cy.get('[data-ngie-testid="snap-to-ticks-checkbox"] .MuiFormControlLabel-label'),
19
+ //Label section
20
+ labelInputField: () => cy.get('.edit-question-enter-option-form-element [role="textbox"]'),
21
+ addLabelButton: () => cy.get('.inline-add-option-button-wrapper button'),
22
+ labelNumberLineTab: () => cy.get('[data-ngie-testid="label-number-line-tab"]'),
23
+ labelsLabel: () => cy.get('.options-label'),
24
+ labelNumeration: () => cy.get('[class*="SingleOptionstyle__AdornmentDiv"]'),
25
+ labelWrapper: () => cy.get('.edit-mcq-option-wrapper'),
26
+ deleteLabelButton: () => cy.get('.ngie-button[aria-label*="Delete label"]'),
27
+
28
+ //Specify correct answer section
29
+ draggableLabelsSpecifyCorrectAnswer: () => cy.get('.label-tool'),
30
+ labelContainerSpecifyCorrectAnswer: () => cy.get('.items-container'),
31
+
32
+ //Preview tab
33
+ draggableLabelsPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .label-tool'),
34
+ labelContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .items-container'),
35
+
36
+ //Correct answer section
37
+ numberLineCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox svg').eq(2),
38
+ numberLinePointCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').last().find('svg ellipse[display="inline"]')
39
+ }
40
+
41
+ const steps = {
42
+ ...createQuestionBasePage.steps,
43
+ ...questionInstructionsComponent.steps,
44
+ ...scoringSectionBaseEditTab.steps,
45
+ ...ckEditorToolbar.steps,
46
+ ...equationEditorFlyout.steps,
47
+ ...autoScoredScoringPreviewTab.steps,
48
+ ...autoScoredStudentViewSettings.steps,
49
+ ...numberLineCommonComponent.steps,
50
+ ...autoScoredSpecifyCorrectAnswerSection.steps,
51
+ ...autoScoredScoringSectionMultiResponseType.steps,
52
+ ...randomizeOptionsComponent.steps,
53
+ ...additionalSettingsPanel.steps,
54
+ ...commonComponents.steps,
55
+ ...layoutSectionComponent.steps,
56
+ navigateToLabelNumberLineTab: () => {
57
+ numberLineLabelPage.labelNumberLineTab()
58
+ .click();
59
+ },
60
+
61
+ addLabel: () => {
62
+ numberLineLabelPage.addLabelButton()
63
+ .click()
64
+ },
65
+
66
+ /**
67
+ * This function is used to focus in the label input field
68
+ * @param {number} index of the label input field
69
+ */
70
+ focusInLabelInputField: (index) => {
71
+ utilities.getNthElement(numberLineLabelPage.labelInputField(), index)
72
+ .click();
73
+ },
74
+
75
+ /**
76
+ * @param {number} index of label input field
77
+ * @param {string} textContent to enter text in the label input field
78
+ */
79
+ enterTextInLabelInputField: (index, textContent) => {
80
+ numberLineLabelPage.labelInputField()
81
+ .eq(index)
82
+ .type(textContent)
83
+ },
84
+
85
+ verifySnapToTicksCheckboxChecked: () => {
86
+ numberLineLabelPage.snapToTicksCheckbox()
87
+ .should('be.checked');
88
+ },
89
+
90
+ uncheckSnapToTicksCheckbox: () => {
91
+ numberLineLabelPage.snapToTicksCheckbox()
92
+ .click()
93
+ .should('not.be.checked');
94
+ },
95
+
96
+ checkSnapToTicksCheckbox: () => {
97
+ numberLineLabelPage.snapToTicksCheckbox()
98
+ .click()
99
+ numberLineLabelPage.steps.verifySnapToTicksCheckboxChecked();
100
+ },
101
+
102
+ /**
103
+ * This function triggers mouseover disabled delete button
104
+ * @param {number} index index of the delete button
105
+ */
106
+ mouseoverDisabledDeleteButton: (index) => {
107
+ utilities.getNthElement(numberLineLabelPage.deleteLabelButton(), index)
108
+ .trigger('mouseover', { force: true });
109
+ },
110
+
111
+ /**
112
+ * This function triggers mouseout disabled delete button
113
+ * @param {number} index index of the delete button
114
+ */
115
+ mouseoutDisabledDeleteButton: (index) => {
116
+ utilities.getNthElement(numberLineLabelPage.deleteLabelButton(), index)
117
+ .trigger('mouseout', { force: true });
118
+ },
119
+
120
+ /**
121
+ * @param {number} index of the option
122
+ * @description verify the enter option input field, drag handle, delete button and option numeration
123
+ */
124
+ verifyLabelsContents: (index) => {
125
+ numberLineLabelPage.labelWrapper()
126
+ .eq(index)
127
+ .within(() => {
128
+ numberLineLabelPage.labelInputField()
129
+ .should('have.attr', 'data-cke-editorplaceholder', 'Enter label');
130
+ commonComponents.dragHandleButton()
131
+ .should('exist');
132
+ numberLineLabelPage.deleteLabelButton()
133
+ .should('be.visible');
134
+ numberLineLabelPage.labelNumeration()
135
+ .should('have.text', index + 1);
136
+ });
137
+ },
138
+
139
+
140
+ /**
141
+ * @param {number} index of the label
142
+ * @description this function deletes the label
143
+ */
144
+ deleteLabel: (index) => {
145
+ numberLineLabelPage.deleteLabelButton()
146
+ .eq(index)
147
+ .click();
148
+ },
149
+
150
+ verifyDeleteLabelButtonDisabledState: () => {
151
+ numberLineLabelPage.deleteLabelButton()
152
+ .each(($element) => {
153
+ utilities.verifyElementDisabled(cy.wrap($element))
154
+ });
155
+ },
156
+
157
+ getLabelCount: () => {
158
+ return numberLineLabelPage.labelWrapper().its('length')
159
+ },
160
+
161
+ /**
162
+ * This function focuses in and out of the input field
163
+ * @param {string} inputFieldIndex index of input field
164
+ */
165
+ focusInAndOutOfLabelsInputField: (inputFieldIndex) => {
166
+ numberLineLabelPage.labelInputField()
167
+ .eq(inputFieldIndex)
168
+ .click()
169
+ .blur();
170
+ },
171
+
172
+ /**
173
+ * @description Verifies that the image in the Preview tab has the correct source and alt text.
174
+ * @param {number} index - The index of the option in the Preview tab.
175
+ */
176
+ verifyImageInLabelInputField: (index) => {
177
+ numberLineLabelPage.labelInputField()
178
+ .eq(index)
179
+ .find('img')
180
+ .should('have.attr', 'src', constants.foxImageLink)
181
+ .and('have.attr', 'alt', constants.foxImageAltText);
182
+ },
183
+
184
+ /**
185
+ * @description Verifies that the bold text in the Preview tab is correct.
186
+ * @param {number} index - The index of the option in the Preview tab.
187
+ */
188
+ verifyBoldTextInLabelInputField: (index) => {
189
+ numberLineLabelPage.labelInputField()
190
+ .eq(index)
191
+ .find('strong')
192
+ .should('have.text', 'This is a bold option');
193
+ },
194
+
195
+ /**
196
+ * @description Verifies that the equation text in the Preview tab is correct.
197
+ * @param {number} index - The index of the option in the Preview tab.
198
+ */
199
+ verifyEquationTextInLabelInputField: (index) => {
200
+ numberLineLabelPage.labelInputField()
201
+ .eq(index)
202
+ .find('[role="math"]')
203
+ .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
204
+ .contains(constants.CKEditorInputFieldEnteredEquationText);
205
+ },
206
+
207
+ /**
208
+ * This function enters text in labels input fields
209
+ * @param {string[]} labelsArray array of labels
210
+ */
211
+ enterTextInMultipleLabelInputFields: (labelsArray) => {
212
+ labelsArray.forEach((label, index) => {
213
+ numberLineLabelPage.labelInputField()
214
+ .eq(index)
215
+ .type(label)
216
+ .blur();
217
+ cy.log('Wait added to make sure all the labels are displayed in the label container')
218
+ cy.wait(200);
219
+ numberLineLabelPage.labelInputField()
220
+ .eq(index)
221
+ .should('have.text', label)
222
+ });
223
+ },
224
+
225
+ verifyPointsPerResponseLabel: () => {
226
+ utilities.verifyInnerText(autoScoredScoringSectionMultiResponseType.pointsPerResponseLabel(), 'Points per response:\n-');
227
+ utilities.verifyElementVisibilityState(autoScoredScoringSectionMultiResponseType.pointsPerResponseLabel(), 'visible');
228
+ },
229
+
230
+ /**
231
+ * @param {number} points - The expected points value to be verified.
232
+ * @description Verifies the partial equal weights points per response score for a specific option in the specify correct answer section for a multi-response type question.
233
+ */
234
+ verifyPartialEqualWeightsPointsPerResponseScore: (points) => {
235
+ utilities.verifyInnerText(numberLineLabelPage.partialEqualWeightsPointsPerResponseScore(), points);
236
+ },
237
+
238
+ //Specify correct answer section
239
+ /**
240
+ * This function clicks and drops label on the specify correct answer section line
241
+ * @param {string} label to be dropped on the number line
242
+ * @param {(horizontal|vertical)} orientation of the number line
243
+ * @param {number} range of the number line
244
+ * @param {number} coordinate of the number line to drop the label
245
+ */
246
+ clickAndDropLabelOnNumberLineSpecifyCorrectAnswer: (label, orientation, range, coordinate) => {
247
+ numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
248
+ .contains(label)
249
+ .click();
250
+ numberLineLabelPage.numberLineSpecifyCorrectAnswer()
251
+ .then(($graphElement) => {
252
+ if (orientation === 'horizontal') {
253
+ const graphWidth = $graphElement[0].clientWidth;
254
+ const graphHeight = 180;
255
+ const originX = graphWidth / 2;
256
+ const originY = graphHeight / 2;
257
+ const xPixel = originX + coordinate * (graphWidth / range);
258
+ numberLineLabelPage.numberLineSpecifyCorrectAnswer()
259
+ .click(xPixel, originY, { force: true });
260
+ } else {
261
+ numberLineLabelPage.labelContainerSpecifyCorrectAnswer()
262
+ .then(($element) => {
263
+ const graphWidth = 642;
264
+ let graphHeight = $graphElement[0].clientHeight;
265
+ let containerHeight = $element[0].clientHeight;
266
+ graphHeight = graphHeight - containerHeight - 32;
267
+ const originX = graphWidth / 2;
268
+ const originY = graphHeight / 2;
269
+ const yPixel = originY - coordinate * (graphHeight / range);
270
+ numberLineLabelPage.numberLineSpecifyCorrectAnswer()
271
+ .click(originX, yPixel, { force: true });
272
+ });
273
+ }
274
+ });
275
+ },
276
+
277
+ /**
278
+ * This function clicks and drops the label back in the container
279
+ * @param {string} label to be clicked and dropped
280
+ */
281
+ clickAndDropLabelInContainerSpecifyCorrectAnswer: (label) => {
282
+ numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
283
+ .contains(label)
284
+ .click();
285
+ numberLineLabelPage.labelContainerSpecifyCorrectAnswer()
286
+ .click({ force: true });
287
+ },
288
+
289
+ /**
290
+ * This function verifies plotted points on the number line on the Edit tab.
291
+ * @param {number} range - The range of x coordinates.
292
+ * @param {number[]} coordinates - An array containing x coordinates to be plotted on the graph.
293
+ */
294
+ verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer: (range, coordinates) => {
295
+ coordinates.forEach(x => {
296
+ numberLineLabelPage.numberLineSpecifyCorrectAnswer()
297
+ .then(($graphElement) => {
298
+ let graphWidth = $graphElement[0].clientWidth;
299
+ const originX = graphWidth / 2;
300
+ const xPixel = originX + x * (graphWidth / range);
301
+ cy.get(`.ngie-accordion .ngie-jxgbox svg ellipse[cx*="${Math.floor(xPixel)}"]`)
302
+ .should('exist');
303
+ });
304
+ });
305
+ },
306
+
307
+ /**
308
+ * This function verifies plotted points on the number line do not exist on the preview tab.
309
+ * @param {number} range - The range of x coordinates.
310
+ * @param {number[]} coordinates - An array containing x coordinates to be plotted on the graph.
311
+ */
312
+ verifyPointsNotExistOnNumberLineSpecifyCorrectAnswer: (range, coordinates) => {
313
+ coordinates.forEach(x => {
314
+ numberLineLabelPage.numberLineSpecifyCorrectAnswer()
315
+ .then(($graphElement) => {
316
+ const graphWidth = $graphElement[0].clientWidth;
317
+ const originX = graphWidth / 2;
318
+ const xPixel = originX + x * (graphWidth / range);
319
+ cy.get(`.ngie-accordion .ngie-jxgbox svg ellipse[cx*="${Math.floor(xPixel)}"]`)
320
+ .should('not.exist');
321
+ });
322
+ });
323
+ },
324
+
325
+ /**
326
+ * @description Verifies that the image in the Preview tab has the correct source and alt text.
327
+ * @param {number} index - The index of the option in the Preview tab.
328
+ */
329
+ verifyImageInPreviewTab: (index) => {
330
+ numberLineLabelPage.draggableLabelsPreviewTab()
331
+ .eq(index)
332
+ .find('img')
333
+ .should('have.attr', 'src', constants.foxImageLink)
334
+ .and('have.attr', 'alt', constants.foxImageAltText);
335
+ },
336
+
337
+ /**
338
+ * @description Verifies that the bold text in the Preview tab is correct.
339
+ * @param {number} index - The index of the option in the Preview tab.
340
+ */
341
+ verifyBoldTextInPreviewTab: (index) => {
342
+ numberLineLabelPage.draggableLabelsPreviewTab()
343
+ .eq(index)
344
+ .find('strong')
345
+ .should('have.text', 'This is a bold option');
346
+ },
347
+
348
+ /**
349
+ * @description Verifies that the equation text in the Preview tab is correct.
350
+ * @param {number} index - The index of the option in the Preview tab.
351
+ */
352
+ verifyEquationTextInPreviewTab: (index) => {
353
+ numberLineLabelPage.draggableLabelsPreviewTab()
354
+ .eq(index)
355
+ .find('[role="math"]')
356
+ .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
357
+ .contains(constants.CKEditorInputFieldEnteredEquationText);
358
+ },
359
+
360
+ /**
361
+ * This function verifies the text content of label
362
+ * @param {number} index of the draggable label
363
+ * @param {string} textContent of the label
364
+ */
365
+ verifyLabelTextContentPreviewTab: (index, textContent) => {
366
+ utilities.verifyInnerText(utilities.getNthElement(numberLineLabelPage.draggableLabelsPreviewTab(), index), textContent)
367
+ },
368
+
369
+ /**
370
+ * Verifies draggable options in the Specify Correct Answer section of the options container.
371
+ * @param {Array[]} draggableOptionsArray - An array of expected text content for draggable options.
372
+ */
373
+ verifyDraggableLabelInContainerSpecifyCorrectAnswerSection: (draggableOptionsArray) => {
374
+ draggableOptionsArray.forEach((optionText, optionIndex) => {
375
+ utilities.verifyElementCount(numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer(), draggableOptionsArray.length);
376
+ utilities.verifyTextContent(utilities.getNthElement(numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer(), optionIndex), optionText);
377
+ });
378
+ },
379
+
380
+ /**
381
+ * @description Verifies that the image in the Preview tab has the correct source and alt text.
382
+ * @param {number} index - The index of the option in the Preview tab.
383
+ */
384
+ verifyImageInLabelSpecifyCorrectAnswerSection: (index) => {
385
+ numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
386
+ .eq(index)
387
+ .find('img')
388
+ .should('have.attr', 'src', constants.foxImageLink)
389
+ .and('have.attr', 'alt', constants.foxImageAltText);
390
+ },
391
+
392
+ /**
393
+ * @description Verifies that the bold text in the Preview tab is correct.
394
+ * @param {number} index - The index of the option in the Preview tab.
395
+ */
396
+ verifyBoldTextInLabelSpecifyCorrectAnswerSection: (index) => {
397
+ numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
398
+ .eq(index)
399
+ .find('strong')
400
+ .should('have.text', 'This is a bold option');
401
+ },
402
+
403
+ /**
404
+ * @description Verifies that the equation text in the Preview tab is correct.
405
+ * @param {number} index - The index of the option in the Preview tab.
406
+ */
407
+ verifyEquationTextInLabelSpecifyCorrectAnswerSection: (index) => {
408
+ numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
409
+ .eq(index)
410
+ .find('[role="math"]')
411
+ .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
412
+ .contains(constants.CKEditorInputFieldEnteredEquationText);
413
+ },
414
+
415
+
416
+ //Preview tab
417
+ /**
418
+ * This function clicks and drops label on the specify correct answer section line
419
+ * @param {string} label to be dropped on the number line
420
+ * @param {(horizontal|vertical)} orientation of the number line
421
+ * @param {number} range of the number line
422
+ * @param {number} coordinate of the number line to drop the label
423
+ */
424
+ clickAndDropLabelOnNumberLinePreviewTab: (label, orientation, range, coordinate) => {
425
+ numberLineLabelPage.draggableLabelsPreviewTab()
426
+ .contains(label)
427
+ .click();
428
+ numberLineLabelPage.numberLinePreviewTab()
429
+ .then(($graphElement) => {
430
+ if (orientation === 'horizontal') {
431
+ const graphWidth = $graphElement[0].clientWidth;
432
+ const graphHeight = 180;
433
+ const originX = graphWidth / 2;
434
+ const originY = graphHeight / 2;
435
+ const xPixel = originX + coordinate * (graphWidth / range);
436
+ numberLineLabelPage.numberLinePreviewTab()
437
+ .click(xPixel, originY, { force: true });
438
+ } else {
439
+ numberLineLabelPage.labelContainerPreviewTab()
440
+ .then(($element) => {
441
+ const graphWidth = 642;
442
+ let graphHeight = $graphElement[0].clientHeight;
443
+ let containerHeight = $element[0].clientHeight;
444
+ graphHeight = graphHeight - containerHeight - 32;
445
+ const originX = graphWidth / 2;
446
+ const originY = graphHeight / 2;
447
+ const yPixel = originY - coordinate * (graphHeight / range);
448
+ numberLineLabelPage.numberLinePreviewTab()
449
+ .click(originX, yPixel, { force: true });
450
+ });
451
+ }
452
+ });
453
+ },
454
+
455
+ /**
456
+ * This function verifies plotted points on the number line on the preview tab.
457
+ * @param {number} range - The range of x coordinates.
458
+ * @param {number[]} coordinates - An array containing x coordinates to be plotted on the graph.
459
+ */
460
+ verifyPointsPlottedOnNumberLinePreviewTab: (range, coordinates) => {
461
+ coordinates.forEach(x => {
462
+ numberLineLabelPage.numberLinePreviewTab()
463
+ .then(($graphElement) => {
464
+ const graphWidth = $graphElement[0].clientWidth;
465
+ const originX = graphWidth / 2;
466
+ const xPixel = originX + x * (graphWidth / range);
467
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cx*="${Math.floor(xPixel)}"]`)
468
+ .should('exist');
469
+ });
470
+ });
471
+ },
472
+
473
+ /**
474
+ * This function verifies plotted points on the number line on the preview tab.
475
+ * @param {number} range - The range of x coordinates.
476
+ * @param {number[]} coordinates - An array containing x coordinates to be plotted on the graph.
477
+ */
478
+ verifyIncorrectResponseOnNumberLinePreviewTab: (label, range, coordinate) => {
479
+ numberLineLabelPage.numberLinePreviewTab()
480
+ .then(($graphElement) => {
481
+ const graphWidth = $graphElement[0].clientWidth;
482
+ const originX = graphWidth / 2;
483
+ const xPixel = originX + coordinate * (graphWidth / range);
484
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cx*="${Math.floor(xPixel)}"]`)
485
+ .should('have.css', 'stroke', css.color.incorrectAnswer);
486
+ });
487
+ numberLineLabelPage.numberLinePreviewTab()
488
+ .parents('.ngie-jxgbox')
489
+ .within(() => {
490
+ numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
491
+ .contains(label)
492
+ .should('have.class', 'icon-incorrect-cross')
493
+ //Failing due to https://redmine.zeuslearning.com/issues/571510
494
+ // .should('have.css', 'border', `1px solid ${css.color.incorrectAnswer}`)
495
+ .verifyPseudoClassBeforeProperty('color', css.color.incorrectAnswer);
496
+ });
497
+ },
498
+
499
+ /**
500
+ * This function verifies plotted points on the number line on the preview tab.
501
+ * @param {number} range - The range of x coordinates.
502
+ * @param {number[]} coordinates - An array containing x coordinates to be plotted on the graph.
503
+ */
504
+ verifyCorrectResponseOnNumberLinePreviewTab: (label, range, coordinate) => {
505
+ numberLineLabelPage.numberLinePreviewTab()
506
+ .then(($graphElement) => {
507
+ const graphWidth = $graphElement[0].clientWidth;
508
+ const originX = graphWidth / 2;
509
+ const xPixel = originX + coordinate * (graphWidth / range);
510
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cx*="${Math.floor(xPixel)}"]`)
511
+ .should('have.css', 'stroke', css.color.correctAnswer);
512
+ });
513
+ numberLineLabelPage.numberLinePreviewTab()
514
+ .parents('.ngie-jxgbox')
515
+ .within(() => {
516
+ numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
517
+ .contains(label)
518
+ .should('have.class', 'icon-correct-tick')
519
+ //Failing due to https://redmine.zeuslearning.com/issues/571510
520
+ //.should('have.css', 'border', `1px solid ${css.color.correctAnswer}`)
521
+ .verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
522
+ });
523
+ },
524
+
525
+ /**
526
+ * This function verifies plotted points on the number line do not exist on the preview tab.
527
+ * @param {number} range - The range of x coordinates.
528
+ * @param {number[]} coordinates - An array containing x coordinates to be plotted on the graph.
529
+ */
530
+ verifyPointsNotExistOnNumberLinePreviewTab: (range, coordinates) => {
531
+ coordinates.forEach(x => {
532
+ numberLineLabelPage.numberLinePreviewTab()
533
+ .then(($graphElement) => {
534
+ const graphWidth = $graphElement[0].clientWidth;
535
+ const originX = graphWidth / 2;
536
+ const xPixel = originX + x * (graphWidth / range);
537
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cx*="${Math.floor(xPixel)}"]`)
538
+ .should('not.exist');
539
+ });
540
+ });
541
+ },
542
+
543
+ /**
544
+ * Verifies draggable options in the preview tab of the options container.
545
+ * @param {Array<string>} draggableOptionsArray - An array of expected text content for draggable options.
546
+ */
547
+ verifyDraggableLabelInContainerPreviewTab: (draggableOptionsArray) => {
548
+ draggableOptionsArray.forEach((optionText, optionIndex) => {
549
+ utilities.verifyElementCount(numberLineLabelPage.draggableLabelsPreviewTab(), draggableOptionsArray.length);
550
+ utilities.verifyTextContent(utilities.getNthElement(numberLineLabelPage.draggableLabelsPreviewTab(), optionIndex), optionText);
551
+ });
552
+ },
553
+
554
+ /**
555
+ * @param {number[]} optionArray Array of options set in set correct answer section
556
+ * @param {string} questionType Name of the question type
557
+ * @description Verify that options are randomized in preview tab
558
+ */
559
+ verifyRandomizeOptionOrder: (optionArray) => {
560
+ let currentOptions = [...optionArray]
561
+ for (let index = 0; index < currentOptions.length; index++) {
562
+ numberLineLabelPage.draggableLabelsPreviewTab()
563
+ .eq(index)
564
+ .then(($element) => {
565
+ expect($element.text()).to.be.oneOf(currentOptions);
566
+ currentOptions = currentOptions.filter((value) => value !== $element.text())
567
+ });
568
+ };
569
+ numberLineLabelPage.steps.verifyOptionsAreRerandomized(optionArray);
570
+ },
571
+
572
+ /**
573
+ * Verifies that options in the preview tab have been re-randomized compared to the previous order.
574
+ * @param {Array<string>} previousOrderOfOptions - An array representing the previous order of options.
575
+ */
576
+ verifyOptionsAreRerandomized: (previousOrderOfOptions) => {
577
+ numberLineLabelPage.draggableLabelsPreviewTab()
578
+ .should('not.have.text', '')
579
+ .and('not.have.text', previousOrderOfOptions.join(''));
580
+ },
581
+
582
+ getOptionsArray: () => {
583
+ const optionsArray = []
584
+ numberLineLabelPage.draggableLabelsPreviewTab()
585
+ .each(($el) => {
586
+ cy.wrap($el)
587
+ .invoke('text')
588
+ .then((text) => {
589
+ optionsArray.push(text);
590
+ });
591
+ });
592
+ return optionsArray;
593
+ },
594
+
595
+ //Correct answer section
596
+ /**
597
+ * This function verifies correct plotted points on the number line on c tab
598
+ * @param {Object[]} coordinates - An array containing x and y coordinates along with their ranges
599
+ * @param {number} range - range of x coordinate
600
+ */
601
+ verifyCorrectResponseOnNumberLineCorrectAnswerSection: (label, range, coordinate) => {
602
+ numberLineLabelPage.numberLineCorrectAnswerSection()
603
+ .then(($graphElement) => {
604
+ const graphWidth = $graphElement[0].clientWidth;
605
+ const originX = graphWidth / 2;
606
+ const xPixel = originX + coordinate * (graphWidth / range);
607
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(1).find(`svg ellipse[cx*="${Math.floor(xPixel)}"][display="inline"]`)
608
+ .should('have.css', 'stroke', css.color.correctAnswer);
609
+ });
610
+ numberLineLabelPage.numberLineCorrectAnswerSection()
611
+ .parents('.ngie-jxgbox')
612
+ .within(() => {
613
+ numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
614
+ .contains(label)
615
+ .should('have.class', 'icon-correct-tick')
616
+ //Failing due to https://redmine.zeuslearning.com/issues/571510
617
+ //.should('have.css', 'border', `1px solid ${css.color.correctAnswer}`)
618
+ .verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
619
+ });
620
+ },
621
+
622
+ /**
623
+ * This function verifies the label in container and is disabled
624
+ * @param {string} label in the container
625
+ */
626
+ verifyLabelIsDisabledForGradingView: (label) => {
627
+ numberLineLabelPage.draggableLabelsPreviewTab()
628
+ .contains(label)
629
+ .should('have.class', 'disable-label-tool');
630
+ },
631
+
632
+ verifyCorrectAnswerSectionNotExist: () => {
633
+ utilities.verifyElementVisibilityState(numberLineLabelPage.numberLineCorrectAnswerSection(), 'notExist');
634
+ },
635
+
636
+ /**
637
+ * @param {number} points - The points to be allotted.
638
+ * @description - Allots points in the scoring section.
639
+ */
640
+ allotPartialDifferentWeightsPoints: (pointsArray) => {
641
+ pointsArray.forEach((points, index) => {
642
+ scoringSectionBaseEditTab.pointsInputField()
643
+ .eq(index)
644
+ .clear()
645
+ .type(`${points}`)
646
+ .should('have.value', points)
647
+ .blur();
648
+ });
649
+ },
650
+
651
+ //Layout
652
+ /**
653
+ * Verifies the orientation and size of the specify correct answer section.
654
+ * @param {number} height - The value representing the width or height of the specify correct answer section.
655
+ */
656
+ verifyVerticalNumberLineOrientationAndSizeSpecifyCorrectAnswerSection: (height) => {
657
+ numberLineLabelPage.labelContainerSpecifyCorrectAnswer()
658
+ .then(($element) => {
659
+ let containerHeight = $element[0].clientHeight;
660
+ let graphHeight = parseInt(height, 10) + parseInt(containerHeight, 10) + 32;
661
+ numberLineCommonComponent.numberLineSpecifyCorrectAnswer()
662
+ .should('have.attr', 'height', graphHeight.toString());
663
+ });
664
+ },
665
+
666
+ /**
667
+ * Verifies the orientation and size of the preview tab
668
+ * @param {number} height - The value representing the width or height of the preview tab.
669
+ */
670
+ verifyVerticalNumberLineOrientationAndSizePreviewTab: (height) => {
671
+ numberLineLabelPage.labelContainerPreviewTab()
672
+ .then(($element) => {
673
+ let containerHeight = $element[0].clientHeight;
674
+ let graphHeight = parseInt(height, 10) + parseInt(containerHeight, 10) + 32;
675
+ numberLineCommonComponent.numberLinePreviewTab()
676
+ .should('have.attr', 'height', graphHeight.toString());
677
+ });
678
+ },
679
+
680
+ /**
681
+ * Verifies the display numbers orientation in the specify correct answer section of the number line.
682
+ * @param {string} numberLineOrientation - The orientation of the number line ('Horizontal' or 'Vertical').
683
+ * @param {string} numberOrientation - The orientation of the numbers ('Below' or 'Left').
684
+ * @throws {Error} Thrown if the number line orientation is invalid.
685
+ */
686
+ verifyDisplayNumbersOrientationSpecifyCorrectAnswerSection: (numberLineOrientation, numberOrientation) => {
687
+ let property, value;
688
+ switch (numberLineOrientation) {
689
+ case 'Horizontal':
690
+ if (numberOrientation === 'Below') {
691
+ property = 'top';
692
+ value = '113px';
693
+ } else if (numberOrientation === 'Above') {
694
+ property = 'bottom';
695
+ value = '207px';
696
+ }
697
+ break;
698
+ case 'Vertical':
699
+ property = numberOrientation === 'Left of' ? 'right' : 'left';
700
+ value = '346px';
701
+ break;
702
+ default:
703
+ throw new Error('Invalid Number line orientation');
704
+ }
705
+ numberLineCommonComponent.numberLineSpecifyCorrectAnswer()
706
+ .parents('.ngie-jxgbox')
707
+ .find('.number-line-tick-font')
708
+ .eq(0)
709
+ .should('have.css', property, value);
710
+ },
711
+
712
+ /**
713
+ * Verifies the display numbers orientation in the number line section.
714
+ * @param {string} numberLineOrientation - The orientation of the number line ('Horizontal' or 'Vertical').
715
+ * @param {string} numberOrientation - The orientation of the numbers ('Below' or 'Left').
716
+ * @throws {Error} Thrown if the number line orientation is invalid.
717
+ */
718
+ verifyDisplayNumbersOrientationPreviewTab: (numberLineOrientation, numberOrientation) => {
719
+ let property, value;
720
+ switch (numberLineOrientation) {
721
+ case 'Horizontal':
722
+ if (numberOrientation === 'Below') {
723
+ property = 'top';
724
+ value = '113px';
725
+ } else if (numberOrientation === 'Above') {
726
+ property = 'bottom';
727
+ value = '207px';
728
+ }
729
+ break;
730
+ case 'Vertical':
731
+ property = numberOrientation === 'Left of' ? 'right' : 'left';
732
+ value = '346px';
733
+ break;
734
+ default:
735
+ throw new Error('Invalid Number line orientation');
736
+ }
737
+
738
+ numberLineCommonComponent.numberLinePreviewTab()
739
+ .parents('.ngie-jxgbox')
740
+ .find('.number-line-tick-font')
741
+ .eq(0)
742
+ .should('have.css', property, value);
743
+ },
744
+
745
+ /**
746
+ * Verifies the display numbers orientation in the number line section.
747
+ * @param {string} numberLineOrientation - The orientation of the number line ('Horizontal' or 'Vertical').
748
+ * @param {string} numberOrientation - The orientation of the numbers ('Below' or 'Left').
749
+ * @throws {Error} Thrown if the number line orientation is invalid.
750
+ */
751
+ verifyDisplayNumbersOrientationNumberLineSection: (numberLineOrientation, numberOrientation) => {
752
+ let property, value;
753
+ switch (numberLineOrientation) {
754
+ case 'Horizontal':
755
+ property = numberOrientation === 'Below' ? 'top' : 'bottom';
756
+ value = '83px';
757
+ break;
758
+ case 'Vertical':
759
+ property = numberOrientation === 'Left of' ? 'right' : 'left';
760
+ value = '346px';
761
+ break;
762
+ default:
763
+ throw new Error('Invalid Number line orientation');
764
+ }
765
+ layoutSectionComponent.numberLineNumberLineSection()
766
+ .parents('.ngie-jxgbox')
767
+ .find('.number-line-tick-font')
768
+ .eq(0)
769
+ .should('have.css', property, value);
770
+ },
771
+
772
+ //Vertical
773
+ /**
774
+ * This function verifies plotted points on the number line on the Edit tab.
775
+ * @param {number} range - The range of x coordinates.
776
+ * @param {number[]} coordinates - An array containing x coordinates to be plotted on the graph.
777
+ */
778
+ verifyVerticalPointsPlottedOnNumberLineSpecifyCorrectAnswer: (range, coordinates) => {
779
+ coordinates.forEach(y => {
780
+ numberLineLabelPage.numberLineSpecifyCorrectAnswer()
781
+ .then(($graphElement) => {
782
+ numberLineLabelPage.labelContainerSpecifyCorrectAnswer()
783
+ .then(($element) => {
784
+ let graphHeight = $graphElement[0].clientHeight;
785
+ let containerHeight = $element[0].clientHeight;
786
+ graphHeight = graphHeight - containerHeight - 32;
787
+ const originY = graphHeight / 2;
788
+ const yPixel = originY - y * (graphHeight / range);
789
+ cy.get(`.ngie-accordion .ngie-jxgbox svg ellipse[cy*="${Math.floor(yPixel)}"]`)
790
+ .should('exist');
791
+ });
792
+ });
793
+ });
794
+ },
795
+
796
+ /**
797
+ * This function verifies plotted points on the number line on the Edit tab.
798
+ * @param {number} range - The range of x coordinates.
799
+ * @param {number[]} coordinates - An array containing y coordinates that do not exist on the graph.
800
+ */
801
+ verifyVerticalPointsNotExistOnNumberLineSpecifyCorrectAnswer: (range, coordinates) => {
802
+ coordinates.forEach(y => {
803
+ numberLineLabelPage.numberLineSpecifyCorrectAnswer()
804
+ .then(($graphElement) => {
805
+ numberLineLabelPage.labelContainerSpecifyCorrectAnswer()
806
+ .then(($element) => {
807
+ let graphHeight = $graphElement[0].clientHeight;
808
+ let containerHeight = $element[0].clientHeight;
809
+ graphHeight = graphHeight - containerHeight - 32;
810
+ const originY = graphHeight / 2;
811
+ const yPixel = originY - y * (graphHeight / range);
812
+ cy.get(`.ngie-accordion .ngie-jxgbox svg ellipse[cy*="${Math.floor(yPixel)}"]`)
813
+ .should('not.exist');
814
+ });
815
+ });
816
+ });
817
+ },
818
+
819
+ /**
820
+ * This function verifies plotted points on the number line do not exist on the preview tab.
821
+ * @param {number} range - The range of x coordinates.
822
+ * @param {number[]} coordinates - An array containing x coordinates to be plotted on the graph.
823
+ */
824
+ verifyVerticalPointsNotExistOnNumberLinePreviewTab: (range, coordinates) => {
825
+ coordinates.forEach(y => {
826
+ numberLineLabelPage.numberLinePreviewTab()
827
+ .then(($graphElement) => {
828
+ numberLineLabelPage.labelContainerPreviewTab()
829
+ .then(($element) => {
830
+ let graphHeight = $graphElement[0].clientHeight;
831
+ let containerHeight = $element[0].clientHeight;
832
+ graphHeight = graphHeight - containerHeight - 32;
833
+ const originY = graphHeight / 2;
834
+ const yPixel = originY - y * (graphHeight / range);
835
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cy*="${Math.floor(yPixel)}"]`)
836
+ .should('not.exist');
837
+ });
838
+ });
839
+ });
840
+ },
841
+
842
+ /**
843
+ * This function verifies plotted points on the number line on the preview tab.
844
+ * @param {number} range - The range of x coordinates.
845
+ * @param {number[]} coordinates - An array containing x coordinates to be plotted on the graph.
846
+ */
847
+ verifyVerticalPointsPlottedOnNumberLinePreviewTab: (range, coordinates) => {
848
+ coordinates.forEach(y => {
849
+ numberLineLabelPage.numberLinePreviewTab()
850
+ .then(($graphElement) => {
851
+ numberLineLabelPage.labelContainerPreviewTab()
852
+ .then(($element) => {
853
+ let graphHeight = $graphElement[0].clientHeight;
854
+ let containerHeight = $element[0].clientHeight;
855
+ graphHeight = graphHeight - containerHeight - 32;
856
+ const originY = graphHeight / 2;
857
+ const yPixel = originY - y * (graphHeight / range);
858
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cy*="${Math.floor(yPixel)}"]`)
859
+ .should('exist');
860
+ });
861
+ });
862
+ });
863
+ },
864
+
865
+ /**
866
+ * This function verifies plotted points on the number line on the preview tab.
867
+ * @param {number} range - The range of x coordinates.
868
+ * @param {number[]} coordinates - An array containing x coordinates to be plotted on the graph.
869
+ */
870
+ verifyVerticalIncorrectResponseOnNumberLinePreviewTab: (label, range, coordinate) => {
871
+ numberLineLabelPage.numberLinePreviewTab()
872
+ .then(($graphElement) => {
873
+ numberLineLabelPage.labelContainerPreviewTab()
874
+ .then(($element) => {
875
+ let graphHeight = $graphElement[0].clientHeight;
876
+ let containerHeight = $element[0].clientHeight;
877
+ graphHeight = graphHeight - containerHeight - 32;
878
+ const originY = graphHeight / 2;
879
+ const yPixel = originY - coordinate * (graphHeight / range);
880
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cy*="${Math.floor(yPixel)}"]`)
881
+ .should('have.css', 'stroke', css.color.incorrectAnswer);
882
+ });
883
+ });
884
+ numberLineLabelPage.numberLinePreviewTab()
885
+ .parents('.ngie-jxgbox')
886
+ .within(() => {
887
+ numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
888
+ .contains(label)
889
+ .should('have.class', 'icon-incorrect-cross')
890
+ //Failing due to https://redmine.zeuslearning.com/issues/571510
891
+ //.should('have.css', 'border', `1px solid ${css.color.incorrectAnswer}`)
892
+ .verifyPseudoClassBeforeProperty('color', css.color.incorrectAnswer);
893
+ });
894
+ },
895
+
896
+ /**
897
+ * This function verifies plotted points on the number line on the preview tab.
898
+ * @param {number} range - The range of x coordinates.
899
+ * @param {number[]} coordinates - An array containing x coordinates to be plotted on the graph.
900
+ */
901
+ verifyVerticalCorrectResponseOnNumberLinePreviewTab: (label, range, coordinate) => {
902
+ numberLineLabelPage.numberLinePreviewTab()
903
+ .then(($graphElement) => {
904
+ numberLineLabelPage.labelContainerPreviewTab()
905
+ .then(($element) => {
906
+ let graphHeight = $graphElement[0].clientHeight;
907
+ let containerHeight = $element[0].clientHeight;
908
+ graphHeight = graphHeight - containerHeight - 32;
909
+ const originY = graphHeight / 2;
910
+ const yPixel = originY - coordinate * (graphHeight / range);
911
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cy*="${Math.floor(yPixel)}"]`)
912
+ .should('have.css', 'stroke', css.color.correctAnswer);
913
+ });
914
+ });
915
+ numberLineLabelPage.numberLinePreviewTab()
916
+ .parents('.ngie-jxgbox')
917
+ .within(() => {
918
+ numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
919
+ .contains(label)
920
+ .should('have.class', 'icon-correct-tick')
921
+ //Failing due to https://redmine.zeuslearning.com/issues/571510
922
+ //.should('have.css', 'border', `1px solid ${css.color.correctAnswer}`)
923
+ .verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
924
+ });
925
+ },
926
+
927
+ /**
928
+ * This function verifies correct plotted points on the number line on c tab
929
+ * @param {Object[]} coordinates - An array containing x and y coordinates along with their ranges
930
+ * @param {number} range - range of x coordinate
931
+ */
932
+ verifyVerticalCorrectResponseOnNumberLineCorrectAnswerSection: (label, range, coordinate) => {
933
+ numberLineLabelPage.numberLineCorrectAnswerSection()
934
+ .then(($graphElement) => {
935
+ let graphHeight = $graphElement[0].clientHeight;
936
+ const originY = graphHeight / 2;
937
+ const yPixel = originY - coordinate * (graphHeight / range);
938
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(1).find(`svg ellipse[cy*="${Math.floor(yPixel)}"][display="inline"]`)
939
+ .should('have.css', 'stroke', css.color.correctAnswer);
940
+ });
941
+ numberLineLabelPage.numberLineCorrectAnswerSection()
942
+ .parents('.ngie-jxgbox')
943
+ .within(() => {
944
+ numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
945
+ .contains(label)
946
+ .should('have.class', 'icon-correct-tick')
947
+ //Failing due to https://redmine.zeuslearning.com/issues/571510
948
+ //.should('have.css', 'border', `1px solid ${css.color.correctAnswer}`)
949
+ .verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
950
+ });
951
+ },
952
+
953
+ //Correct answer view
954
+ /**
955
+ * This function verifies plotted points on the number line on the preview tab.
956
+ * @param {number} label - The label to drag and drop
957
+ * @param {number} yPixel - x coordinates to be verified on the graph.
958
+ */
959
+ verifyVerticalCorrectResponseOnNumberLineCorrectAnswerView: (label, yPixel) => {
960
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cy*="${Math.floor(yPixel)}"]`)
961
+ .should('have.css', 'stroke', css.color.correctAnswer);
962
+ numberLineLabelPage.numberLinePreviewTab()
963
+ .parents('.ngie-jxgbox')
964
+ .within(() => {
965
+ numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
966
+ .contains(label)
967
+ .should('have.class', 'icon-correct-tick')
968
+ //Failing due to https://redmine.zeuslearning.com/issues/571510
969
+ //.should('have.css', 'border', `1px solid ${css.color.correctAnswer}`)
970
+ .verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
971
+ });
972
+ },
973
+ }
974
+
975
+ const tests = {
976
+ ...autoScoredScoringPreviewTab.tests,
977
+ ...scoringSectionBaseEditTab.tests,
978
+ ...autoScoredScoringSectionMultiResponseType.tests,
979
+ ...studentViewSettingsLabelComponent.tests,
980
+ ...autoScoredStudentViewSettings.tests,
981
+ ...randomizeOptionsComponent.tests,
982
+ ...additionalSettingsPanel.tests,
983
+ ...additionalSettingsAccessibilitySectionComponent.tests,
984
+ ...createQuestionBasePage.tests,
985
+ ...commonComponents.tests,
986
+ ...autoScoredSpecifyCorrectAnswerSection.tests,
987
+ ...toolSettingsComponent.tests,
988
+ ...questionInstructionsComponent.tests,
989
+ ...layoutSectionComponent.tests,
990
+ ...numberLineCommonComponent.tests,
991
+ verifyContentsOfSpecifyCorrectAnswerSection: () => {
992
+ it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
993
+ utilities.verifyElementVisibilityState(numberLineCommonComponent.numberLineTitleCorrectAnswerSection(), 'exist');
994
+ utilities.verifyInnerText(numberLineCommonComponent.numberLineTitleCorrectAnswerSection(), 'Number line title');
995
+ utilities.verifyElementCount(numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer(), 4);
996
+ utilities.verifyElementVisibilityState(numberLineLabelPage.numberLineSpecifyCorrectAnswer(), 'visible');
997
+ utilities.verifyElementVisibilityState(numberLineLabelPage.labelContainerSpecifyCorrectAnswer(), 'visible');
998
+ });
999
+ },
1000
+
1001
+ /**
1002
+ * Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
1003
+ * @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
1004
+ * @example - verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
1005
+ */
1006
+ verifySpecifyCorrectAnswerAccordionContentsAndFunctionality: (accordionName) => {
1007
+ const range = 20.75;
1008
+ it(`The user should be able to plot points on number line in the specify correct answer section ${accordionName} accordion`, () => {
1009
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Label 2', 'horizontal', range, 9);
1010
+ numberLineLabelPage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [9]);
1011
+ });
1012
+
1013
+ it(`When the user resets the number line in the ${accordionName} accordion, \'Error: Please set a correct answer.\' error message should be thrown along with an error icon on the \'${accordionName}\' accordion`, () => {
1014
+ numberLineLabelPage.steps.clickAndDropLabelInContainerSpecifyCorrectAnswer('Label 2');
1015
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
1016
+ utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.');
1017
+ if (accordionName == 'Correct') {
1018
+ autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
1019
+ .within(() => {
1020
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1021
+ });
1022
+ } else {
1023
+ autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
1024
+ .within(() => {
1025
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1026
+ });
1027
+ };
1028
+ });
1029
+
1030
+ autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredCorrectAnswerErrorMessageCSSAndA11y();
1031
+
1032
+ it('When the user plots on the number line then the error message should disappear', () => {
1033
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Label 2', 'horizontal', range, 9);
1034
+ numberLineLabelPage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [9]);
1035
+ });
1036
+
1037
+ autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
1038
+
1039
+ it('Accessibility of \'Correct\' accordion contents', { tags: 'a11y' }, () => {
1040
+ cy.checkAccessibility(numberLineLabelPage.numberLineSpecifyCorrectAnswer());
1041
+ });
1042
+ },
1043
+
1044
+ /**
1045
+ * Verifies the functionality of the number line section in the edit tab.
1046
+ * @param {string} orientation - The orientation of the number line ('Horizontal' or 'Vertical').
1047
+ */
1048
+ verifyDisplayNumberSettingsFunctionalitySpecifyCorrectAnswerSection: (orientation) => {
1049
+ const displayNumbersOptions = (orientation === "Horizontal") ? ["Below line", "Above line"] : ["Left of line", "Right of line"];
1050
+ const direction = (orientation === "Horizontal") ? "Below" : "Left of";
1051
+ it(`When "${displayNumbersOptions[0]}" is selected, labels should be displayed ${direction} number line in both the number line section and the specify correct answer section.`, () => {
1052
+ numberLineCommonComponent.steps.verifyDisplayNumbersToggleButtonSelected(displayNumbersOptions[0]);
1053
+ numberLineLabelPage.steps.verifyDisplayNumbersOrientationNumberLineSection(orientation, direction);
1054
+ numberLineLabelPage.steps.verifyDisplayNumbersOrientationSpecifyCorrectAnswerSection(orientation, direction);
1055
+ });
1056
+
1057
+ const oppositeDirection = (orientation === "Horizontal") ? "Above" : "Right of";
1058
+ it(`When "${displayNumbersOptions[1]}" is selected, labels should be displayed ${oppositeDirection} number line in both the number line section and the specify correct answer section.`, () => {
1059
+ numberLineCommonComponent.steps.selectDisplayNumbersToggleButton(displayNumbersOptions[1]);
1060
+ numberLineLabelPage.steps.verifyDisplayNumbersOrientationNumberLineSection(orientation, oppositeDirection);
1061
+ numberLineLabelPage.steps.verifyDisplayNumbersOrientationSpecifyCorrectAnswerSection(orientation, oppositeDirection);
1062
+ });
1063
+ },
1064
+
1065
+ /**
1066
+ * Verifies the functionality of the number line section in the preview tab.
1067
+ * @param {string} orientation - The orientation of the number line ('Horizontal' or 'Vertical').
1068
+ */
1069
+ verifyDisplayNumberSettingsFunctionalityPreviewTab: (orientation) => {
1070
+ const displayNumbersOptions = (orientation === "Horizontal") ? ["Below line", "Above line"] : ["Left of line", "Right of line"];
1071
+ const direction = (orientation === "Horizontal") ? "Below" : "Left of";
1072
+ it(`When ${displayNumbersOptions[0]} is selected then labels should be displayed ${direction} number line in the preview tab.`, () => {
1073
+ numberLineCommonComponent.steps.switchToEditTab();
1074
+ numberLineCommonComponent.steps.verifyDisplayNumbersToggleButtonSelected(displayNumbersOptions[0]);
1075
+ numberLineCommonComponent.steps.switchToPreviewTab();
1076
+ numberLineLabelPage.steps.verifyDisplayNumbersOrientationPreviewTab(orientation, direction);
1077
+ });
1078
+
1079
+ const oppositeDirection = (orientation === "Horizontal") ? "Above" : "Right of";
1080
+ it(`When user selects ${displayNumbersOptions[1]} then labels should be displayed ${oppositeDirection} number line in the preview tab.`, () => {
1081
+ numberLineCommonComponent.steps.switchToEditTab();
1082
+ numberLineCommonComponent.steps.selectDisplayNumbersToggleButton(displayNumbersOptions[1]);
1083
+ numberLineCommonComponent.steps.switchToPreviewTab();
1084
+ numberLineLabelPage.steps.verifyDisplayNumbersOrientationPreviewTab(orientation, oppositeDirection);
1085
+ });
1086
+ }
1087
+ }
1088
+
1089
+ export const numberLineLabelPage = {
1090
+ ...selectors,
1091
+ steps,
1092
+ tests
1093
+ }