itemengine-cypress-automation 1.0.189-e2e-execution-crash-83cdbd4.0 → 1.0.190-repoUpdate3May-f180558.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (244) hide show
  1. package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +79 -0
  2. package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +647 -0
  3. package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +429 -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 +1 -1
  11. package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +1 -1
  12. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
  13. package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +2 -11
  14. package/cypress/e2e/ILC/ChartsBar/previewContentsForAllViews.smoke.js +359 -0
  15. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
  16. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +6 -8
  17. package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +417 -28
  18. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
  19. package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +29 -1
  20. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
  21. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -0
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
  30. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
  31. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +3 -4
  32. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  33. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +1 -0
  34. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
  35. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
  36. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
  37. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
  38. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
  39. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
  40. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +3 -2
  41. package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +11 -3
  42. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
  43. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +2 -2
  44. package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountAllOrNothingCorrectPointsGreaterThanAlternativePoints.js +143 -0
  45. package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountPartialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +132 -0
  46. package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountPartialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +143 -0
  47. package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountPartialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +144 -0
  48. package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountallOrNothingCorrectPointsEqualToAlternativePoints.js +143 -0
  49. package/cypress/e2e/ILC/GridFill/scoring/cellshadeCountAllOrNothingAlternativePointsGreaterThanCorrectPoints.js +131 -0
  50. package/cypress/e2e/ILC/GridFill/scoring/matchExactAndCellShadeCountCombinedScoring.js +87 -0
  51. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsCellShadeCountBasics.js +446 -0
  52. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
  53. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +194 -0
  54. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +195 -0
  55. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +274 -0
  56. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingPenaltyScoring.js +48 -0
  57. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/manuallyAndNonScored.js +144 -0
  58. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +252 -0
  59. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsBasic.js +102 -0
  60. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +256 -0
  61. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +253 -0
  62. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +308 -0
  63. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +225 -0
  64. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsBasic.js +151 -0
  65. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +196 -0
  66. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +227 -0
  67. package/cypress/e2e/ILC/ListOrderingDropdown/additionalSettings.js +91 -0
  68. package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +230 -0
  69. package/cypress/e2e/ILC/ListOrderingDropdown/checkAnswerFunctionalityForAllViews.smoke.js +124 -0
  70. package/cypress/e2e/ILC/ListOrderingDropdown/editTabBasicSection.js +221 -0
  71. package/cypress/e2e/ILC/ListOrderingDropdown/editTabScoring.js +203 -0
  72. package/cypress/e2e/ILC/ListOrderingDropdown/manuallyAndNonScoredEditTab.js +71 -0
  73. package/cypress/e2e/ILC/ListOrderingDropdown/minimumScoringPenaltyPointsAndRoundingDropdown.js +197 -0
  74. package/cypress/e2e/ILC/ListOrderingDropdown/previewContentsForAllViews.smoke.js +201 -0
  75. package/cypress/e2e/ILC/ListOrderingDropdown/specifyCorrectAnswerSection.js +115 -0
  76. package/cypress/e2e/ILC/ListOrderingDropdown/studentViewSettings.js +183 -0
  77. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +216 -0
  78. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +214 -0
  79. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +273 -0
  80. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
  81. package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +128 -0
  82. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +279 -0
  83. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +109 -0
  84. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +278 -0
  85. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +278 -0
  86. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +335 -0
  87. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +250 -0
  88. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +161 -0
  89. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +216 -0
  90. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +252 -0
  91. package/cypress/e2e/ILC/ListOrderingNew/additionalSettings.js +118 -0
  92. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +243 -0
  93. package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
  94. package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +155 -0
  95. package/cypress/e2e/ILC/ListOrderingNew/editTabScoring.js +195 -0
  96. package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +78 -0
  97. package/cypress/e2e/ILC/ListOrderingNew/manuallyAndNonScoredEditTab.js +69 -0
  98. package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  99. package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +176 -0
  100. package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +112 -0
  101. package/cypress/e2e/ILC/ListOrderingNew/studentViewSettings.js +244 -0
  102. package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
  103. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +1 -0
  104. package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
  105. package/cypress/e2e/ILC/NumberLine/LayoutSection.js +209 -0
  106. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +1 -1
  107. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +1 -1
  108. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +4 -4
  109. package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +1 -1
  110. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +1 -1
  111. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +1 -1
  112. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +1 -1
  113. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +1 -1
  114. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +58 -2
  115. package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
  116. package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +1 -1
  117. package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +2 -2
  118. package/cypress/e2e/ILC/NumberLine/headerSection.js +1 -1
  119. package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +33 -0
  120. package/cypress/e2e/ILC/NumberLine/numberLineSection.js +50 -0
  121. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +2 -2
  122. package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +1 -1
  123. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +2 -2
  124. package/cypress/e2e/ILC/NumberLine/toolSettings.js +2 -1
  125. package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +1 -1
  126. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +696 -0
  127. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +173 -0
  128. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/layoutSection.js +211 -0
  129. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +75 -0
  130. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +204 -0
  131. package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +229 -0
  132. package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +229 -0
  133. package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +229 -0
  134. package/cypress/e2e/ILC/NumberLineLabel/Scoring/manualAndNonScoredScoring.js +169 -0
  135. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +274 -0
  136. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsBasic.js +433 -0
  137. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +274 -0
  138. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +274 -0
  139. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +249 -0
  140. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsBasic.js +135 -0
  141. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +210 -0
  142. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +248 -0
  143. package/cypress/e2e/ILC/NumberLineLabel/additionalSettingsBasic.js +115 -0
  144. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +288 -0
  145. package/cypress/e2e/ILC/NumberLineLabel/checkAnswerFunctionalityForAllViews.smoke.js +153 -0
  146. package/cypress/e2e/ILC/NumberLineLabel/editTabBasicSection.js +326 -0
  147. package/cypress/e2e/ILC/NumberLineLabel/editTabScoring.js +234 -0
  148. package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +164 -0
  149. package/cypress/e2e/ILC/NumberLineLabel/headerSection.js +80 -0
  150. package/cypress/e2e/ILC/NumberLineLabel/layoutSection.js +204 -0
  151. package/cypress/e2e/ILC/NumberLineLabel/manuallyAndNonScoredEditTab.js +79 -0
  152. package/cypress/e2e/ILC/NumberLineLabel/minimumScoringPenaltyPointsAndRoundingDropdown.js +85 -0
  153. package/cypress/e2e/ILC/NumberLineLabel/numberLineSection.js +51 -0
  154. package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +120 -0
  155. package/cypress/e2e/ILC/NumberLineLabel/specifyCorrectAnswerSection.js +74 -0
  156. package/cypress/e2e/ILC/NumberLineLabel/studentViewSettings.js +183 -0
  157. package/cypress/e2e/ILC/NumberLineLabel/toolSettings.js +76 -0
  158. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/allOrNothingForAllViews.smoke.js +292 -0
  159. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/checkAnswerFunctionalityForAllViews.smoke.js +155 -0
  160. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +166 -0
  161. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/layoutSection.js +360 -0
  162. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/numberLineSection.js +80 -0
  163. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/previewContentsForAllViews.smoke.js +111 -0
  164. package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
  165. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +49 -1
  166. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
  167. package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
  168. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
  169. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -1
  170. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -1
  171. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -1
  172. package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +0 -1
  173. package/cypress/e2e/ILC/TextSelection/additionalSettings.js +125 -0
  174. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -1
  175. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +2 -2
  176. package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +5 -4
  177. package/cypress/e2e/ILC/TextSelection/headerSection.js +73 -0
  178. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +6 -7
  179. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +179 -0
  180. package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +89 -0
  181. package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +436 -0
  182. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +277 -0
  183. package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +222 -0
  184. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +260 -0
  185. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +380 -0
  186. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
  187. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
  188. package/cypress/e2e/ILC/VideoResponseNew/additionalSettingsBasic.js +77 -0
  189. package/cypress/e2e/ILC/VideoResponseNew/customizePlaybackControls.js +313 -0
  190. package/cypress/e2e/ILC/VideoResponseNew/editAndPreviewTabScoringSection.js +99 -0
  191. package/cypress/e2e/ILC/VideoResponseNew/editTabBasicSection.js +171 -0
  192. package/cypress/e2e/ILC/VideoResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +179 -0
  193. package/cypress/e2e/ILC/VideoResponseNew/headerSection.js +79 -0
  194. package/cypress/e2e/ILC/VideoResponseNew/previewContentsForAllViews.smoke.js +201 -0
  195. package/cypress/e2e/ILC/VideoResponseNew/standardRecorderStyle.js +567 -0
  196. package/cypress/e2e/ILC/VideoResponseNew/studentViewSettings.js +194 -0
  197. package/cypress/fixtures/constants.js +1 -1
  198. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +1 -1
  199. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
  200. package/cypress/fixtures/theme/ilc.json +22 -18
  201. package/cypress/pages/audioPlayerPage.js +668 -446
  202. package/cypress/pages/audioResponsePage.js +8 -80
  203. package/cypress/pages/brainingCampManipulativePage.js +1 -1
  204. package/cypress/pages/chartsBarPage.js +231 -0
  205. package/cypress/pages/chartsDotPlotPage.js +8 -0
  206. package/cypress/pages/chartsLinePage.js +42 -0
  207. package/cypress/pages/components/allowTeachersToDownloadStudentResponseComponent.js +58 -0
  208. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +13 -23
  209. package/cypress/pages/components/autoScoredStudentViewSettings.js +6 -6
  210. package/cypress/pages/components/barAndLineChartComponent.js +120 -0
  211. package/cypress/pages/components/chartsCommonComponent.js +105 -0
  212. package/cypress/pages/components/commonComponents.js +1 -0
  213. package/cypress/pages/components/draggableOptionContainer.js +2 -1
  214. package/cypress/pages/components/equationEditorFlyout.js +3 -2
  215. package/cypress/pages/components/essayResponseCommonComponents.js +8 -2
  216. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -0
  217. package/cypress/pages/components/imageCanvasComponent.js +2 -1
  218. package/cypress/pages/components/index.js +7 -0
  219. package/cypress/pages/components/layoutSectionComponent.js +1156 -0
  220. package/cypress/pages/components/limitNumberOfRetakeComponent.js +90 -0
  221. package/cypress/pages/components/numberLineCommonComponent.js +685 -0
  222. package/cypress/pages/components/optionsWrapperComponent.js +13 -2
  223. package/cypress/pages/components/playbackControlsBaseComponent.js +20 -13
  224. package/cypress/pages/components/questionInstructionsComponent.js +3 -19
  225. package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +46 -0
  226. package/cypress/pages/components/toolSettingsComponent.js +6 -0
  227. package/cypress/pages/contentBlocksPage.js +18 -2
  228. package/cypress/pages/createItemPage.js +75 -8
  229. package/cypress/pages/dialogBoxBase.js +2 -2
  230. package/cypress/pages/drawingResponsePage.js +24 -4
  231. package/cypress/pages/feedbackScalePage.js +3 -0
  232. package/cypress/pages/graphingPage.js +19 -1
  233. package/cypress/pages/gridFillPage.js +47 -59
  234. package/cypress/pages/index.js +5 -1
  235. package/cypress/pages/itemPreviewSettingsPage.js +4 -0
  236. package/cypress/pages/listOrderingPage.js +561 -555
  237. package/cypress/pages/matchingPage.js +1 -1
  238. package/cypress/pages/multipleSelectionPage.js +23 -1
  239. package/cypress/pages/numberLineLabelPage.js +1086 -0
  240. package/cypress/pages/numberLinePage.js +696 -78
  241. package/cypress/pages/rulerPage.js +6 -2
  242. package/cypress/pages/textSelectionPage.js +461 -23
  243. package/cypress/pages/videoResponsePage.js +393 -81
  244. package/package.json +1 -1
@@ -0,0 +1,1086 @@
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
+ .should('have.css', 'border', `1px solid ${css.color.incorrectAnswer}`)
494
+ .verifyPseudoClassBeforeProperty('color', css.color.incorrectAnswer);
495
+ });
496
+ },
497
+
498
+ /**
499
+ * This function verifies plotted points on the number line on the preview tab.
500
+ * @param {number} range - The range of x coordinates.
501
+ * @param {number[]} coordinates - An array containing x coordinates to be plotted on the graph.
502
+ */
503
+ verifyCorrectResponseOnNumberLinePreviewTab: (label, range, coordinate) => {
504
+ numberLineLabelPage.numberLinePreviewTab()
505
+ .then(($graphElement) => {
506
+ const graphWidth = $graphElement[0].clientWidth;
507
+ const originX = graphWidth / 2;
508
+ const xPixel = originX + coordinate * (graphWidth / range);
509
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cx*="${Math.floor(xPixel)}"]`)
510
+ .should('have.css', 'stroke', css.color.correctAnswer);
511
+ });
512
+ numberLineLabelPage.numberLinePreviewTab()
513
+ .parents('.ngie-jxgbox')
514
+ .within(() => {
515
+ numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
516
+ .contains(label)
517
+ .should('have.class', 'icon-correct-tick')
518
+ .should('have.css', 'border', `1px solid ${css.color.correctAnswer}`)
519
+ .verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
520
+ });
521
+ },
522
+
523
+ /**
524
+ * This function verifies plotted points on the number line do not exist on the preview tab.
525
+ * @param {number} range - The range of x coordinates.
526
+ * @param {number[]} coordinates - An array containing x coordinates to be plotted on the graph.
527
+ */
528
+ verifyPointsNotExistOnNumberLinePreviewTab: (range, coordinates) => {
529
+ coordinates.forEach(x => {
530
+ numberLineLabelPage.numberLinePreviewTab()
531
+ .then(($graphElement) => {
532
+ const graphWidth = $graphElement[0].clientWidth;
533
+ const originX = graphWidth / 2;
534
+ const xPixel = originX + x * (graphWidth / range);
535
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cx*="${Math.floor(xPixel)}"]`)
536
+ .should('not.exist');
537
+ });
538
+ });
539
+ },
540
+
541
+ /**
542
+ * Verifies draggable options in the preview tab of the options container.
543
+ * @param {Array<string>} draggableOptionsArray - An array of expected text content for draggable options.
544
+ */
545
+ verifyDraggableLabelInContainerPreviewTab: (draggableOptionsArray) => {
546
+ draggableOptionsArray.forEach((optionText, optionIndex) => {
547
+ utilities.verifyElementCount(numberLineLabelPage.draggableLabelsPreviewTab(), draggableOptionsArray.length);
548
+ utilities.verifyTextContent(utilities.getNthElement(numberLineLabelPage.draggableLabelsPreviewTab(), optionIndex), optionText);
549
+ });
550
+ },
551
+
552
+ /**
553
+ * @param {number[]} optionArray Array of options set in set correct answer section
554
+ * @param {string} questionType Name of the question type
555
+ * @description Verify that options are randomized in preview tab
556
+ */
557
+ verifyRandomizeOptionOrder: (optionArray) => {
558
+ let currentOptions = [...optionArray]
559
+ for (let index = 0; index < currentOptions.length; index++) {
560
+ numberLineLabelPage.draggableLabelsPreviewTab()
561
+ .eq(index)
562
+ .then(($element) => {
563
+ expect($element.text()).to.be.oneOf(currentOptions);
564
+ currentOptions = currentOptions.filter((value) => value !== $element.text())
565
+ });
566
+ };
567
+ numberLineLabelPage.steps.verifyOptionsAreRerandomized(optionArray);
568
+ },
569
+
570
+ /**
571
+ * Verifies that options in the preview tab have been re-randomized compared to the previous order.
572
+ * @param {Array<string>} previousOrderOfOptions - An array representing the previous order of options.
573
+ */
574
+ verifyOptionsAreRerandomized: (previousOrderOfOptions) => {
575
+ numberLineLabelPage.draggableLabelsPreviewTab()
576
+ .should('not.have.text', '')
577
+ .and('not.have.text', previousOrderOfOptions.join(''));
578
+ },
579
+
580
+ getOptionsArray: () => {
581
+ const optionsArray = []
582
+ numberLineLabelPage.draggableLabelsPreviewTab()
583
+ .each(($el) => {
584
+ cy.wrap($el)
585
+ .invoke('text')
586
+ .then((text) => {
587
+ optionsArray.push(text);
588
+ });
589
+ });
590
+ return optionsArray;
591
+ },
592
+
593
+ //Correct answer section
594
+ /**
595
+ * This function verifies correct plotted points on the number line on c tab
596
+ * @param {Object[]} coordinates - An array containing x and y coordinates along with their ranges
597
+ * @param {number} range - range of x coordinate
598
+ */
599
+ verifyCorrectResponseOnNumberLineCorrectAnswerSection: (label, range, coordinate) => {
600
+ numberLineLabelPage.numberLineCorrectAnswerSection()
601
+ .then(($graphElement) => {
602
+ const graphWidth = $graphElement[0].clientWidth;
603
+ const originX = graphWidth / 2;
604
+ const xPixel = originX + coordinate * (graphWidth / range);
605
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(1).find(`svg ellipse[cx*="${Math.floor(xPixel)}"][display="inline"]`)
606
+ .should('have.css', 'stroke', css.color.correctAnswer);
607
+ });
608
+ numberLineLabelPage.numberLineCorrectAnswerSection()
609
+ .parents('.ngie-jxgbox')
610
+ .within(() => {
611
+ numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
612
+ .contains(label)
613
+ .should('have.class', 'icon-correct-tick')
614
+ .should('have.css', 'border', `1px solid ${css.color.correctAnswer}`)
615
+ .verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
616
+ });
617
+ },
618
+
619
+ /**
620
+ * This function verifies the label in container and is disabled
621
+ * @param {string} label in the container
622
+ */
623
+ verifyLabelIsDisabledForGradingView: (label) => {
624
+ numberLineLabelPage.draggableLabelsPreviewTab()
625
+ .contains(label)
626
+ .should('have.class', 'disable-label-tool');
627
+ },
628
+
629
+ verifyCorrectAnswerSectionNotExist: () => {
630
+ utilities.verifyElementVisibilityState(numberLineLabelPage.numberLineCorrectAnswerSection(), 'notExist');
631
+ },
632
+
633
+ /**
634
+ * @param {number} points - The points to be allotted.
635
+ * @description - Allots points in the scoring section.
636
+ */
637
+ allotPartialDifferentWeightsPoints: (pointsArray) => {
638
+ pointsArray.forEach((points, index) => {
639
+ scoringSectionBaseEditTab.pointsInputField()
640
+ .eq(index)
641
+ .clear()
642
+ .type(`${points}`)
643
+ .should('have.value', points)
644
+ .blur();
645
+ });
646
+ },
647
+
648
+ //Layout
649
+ /**
650
+ * Verifies the orientation and size of the specify correct answer section.
651
+ * @param {number} height - The value representing the width or height of the specify correct answer section.
652
+ */
653
+ verifyVerticalNumberLineOrientationAndSizeSpecifyCorrectAnswerSection: (height) => {
654
+ numberLineLabelPage.labelContainerSpecifyCorrectAnswer()
655
+ .then(($element) => {
656
+ let containerHeight = $element[0].clientHeight;
657
+ let graphHeight = parseInt(height, 10) + parseInt(containerHeight, 10) + 32;
658
+ numberLineCommonComponent.numberLineSpecifyCorrectAnswer()
659
+ .should('have.attr', 'height', graphHeight.toString());
660
+ });
661
+ },
662
+
663
+ /**
664
+ * Verifies the orientation and size of the preview tab
665
+ * @param {number} height - The value representing the width or height of the preview tab.
666
+ */
667
+ verifyVerticalNumberLineOrientationAndSizePreviewTab: (height) => {
668
+ numberLineLabelPage.labelContainerPreviewTab()
669
+ .then(($element) => {
670
+ let containerHeight = $element[0].clientHeight;
671
+ let graphHeight = parseInt(height, 10) + parseInt(containerHeight, 10) + 32;
672
+ numberLineCommonComponent.numberLinePreviewTab()
673
+ .should('have.attr', 'height', graphHeight.toString());
674
+ });
675
+ },
676
+
677
+ /**
678
+ * Verifies the display numbers orientation in the specify correct answer section of the number line.
679
+ * @param {string} numberLineOrientation - The orientation of the number line ('Horizontal' or 'Vertical').
680
+ * @param {string} numberOrientation - The orientation of the numbers ('Below' or 'Left').
681
+ * @throws {Error} Thrown if the number line orientation is invalid.
682
+ */
683
+ verifyDisplayNumbersOrientationSpecifyCorrectAnswerSection: (numberLineOrientation, numberOrientation) => {
684
+ let property, value;
685
+ switch (numberLineOrientation) {
686
+ case 'Horizontal':
687
+ if (numberOrientation === 'Below') {
688
+ property = 'top';
689
+ value = '113px';
690
+ } else if (numberOrientation === 'Above') {
691
+ property = 'bottom';
692
+ value = '207px';
693
+ }
694
+ break;
695
+ case 'Vertical':
696
+ property = numberOrientation === 'Left of' ? 'right' : 'left';
697
+ value = '346px';
698
+ break;
699
+ default:
700
+ throw new Error('Invalid Number line orientation');
701
+ }
702
+ numberLineCommonComponent.numberLineSpecifyCorrectAnswer()
703
+ .parents('.ngie-jxgbox')
704
+ .find('.number-line-tick-font')
705
+ .eq(0)
706
+ .should('have.css', property, value);
707
+ },
708
+
709
+ /**
710
+ * Verifies the display numbers orientation in the number line section.
711
+ * @param {string} numberLineOrientation - The orientation of the number line ('Horizontal' or 'Vertical').
712
+ * @param {string} numberOrientation - The orientation of the numbers ('Below' or 'Left').
713
+ * @throws {Error} Thrown if the number line orientation is invalid.
714
+ */
715
+ verifyDisplayNumbersOrientationPreviewTab: (numberLineOrientation, numberOrientation) => {
716
+ let property, value;
717
+ switch (numberLineOrientation) {
718
+ case 'Horizontal':
719
+ if (numberOrientation === 'Below') {
720
+ property = 'top';
721
+ value = '113px';
722
+ } else if (numberOrientation === 'Above') {
723
+ property = 'bottom';
724
+ value = '207px';
725
+ }
726
+ break;
727
+ case 'Vertical':
728
+ property = numberOrientation === 'Left of' ? 'right' : 'left';
729
+ value = '346px';
730
+ break;
731
+ default:
732
+ throw new Error('Invalid Number line orientation');
733
+ }
734
+
735
+ numberLineCommonComponent.numberLinePreviewTab()
736
+ .parents('.ngie-jxgbox')
737
+ .find('.number-line-tick-font')
738
+ .eq(0)
739
+ .should('have.css', property, value);
740
+ },
741
+
742
+ /**
743
+ * Verifies the display numbers orientation in the number line section.
744
+ * @param {string} numberLineOrientation - The orientation of the number line ('Horizontal' or 'Vertical').
745
+ * @param {string} numberOrientation - The orientation of the numbers ('Below' or 'Left').
746
+ * @throws {Error} Thrown if the number line orientation is invalid.
747
+ */
748
+ verifyDisplayNumbersOrientationNumberLineSection: (numberLineOrientation, numberOrientation) => {
749
+ let property, value;
750
+ switch (numberLineOrientation) {
751
+ case 'Horizontal':
752
+ property = numberOrientation === 'Below' ? 'top' : 'bottom';
753
+ value = '83px';
754
+ break;
755
+ case 'Vertical':
756
+ property = numberOrientation === 'Left of' ? 'right' : 'left';
757
+ value = '346px';
758
+ break;
759
+ default:
760
+ throw new Error('Invalid Number line orientation');
761
+ }
762
+ layoutSectionComponent.numberLineNumberLineSection()
763
+ .parents('.ngie-jxgbox')
764
+ .find('.number-line-tick-font')
765
+ .eq(0)
766
+ .should('have.css', property, value);
767
+ },
768
+
769
+ //Vertical
770
+ /**
771
+ * This function verifies plotted points on the number line on the Edit tab.
772
+ * @param {number} range - The range of x coordinates.
773
+ * @param {number[]} coordinates - An array containing x coordinates to be plotted on the graph.
774
+ */
775
+ verifyVerticalPointsPlottedOnNumberLineSpecifyCorrectAnswer: (range, coordinates) => {
776
+ coordinates.forEach(y => {
777
+ numberLineLabelPage.numberLineSpecifyCorrectAnswer()
778
+ .then(($graphElement) => {
779
+ numberLineLabelPage.labelContainerSpecifyCorrectAnswer()
780
+ .then(($element) => {
781
+ let graphHeight = $graphElement[0].clientHeight;
782
+ let containerHeight = $element[0].clientHeight;
783
+ graphHeight = graphHeight - containerHeight - 32;
784
+ const originY = graphHeight / 2;
785
+ const yPixel = originY - y * (graphHeight / range);
786
+ cy.get(`.ngie-accordion .ngie-jxgbox svg ellipse[cy*="${Math.floor(yPixel)}"]`)
787
+ .should('exist');
788
+ });
789
+ });
790
+ });
791
+ },
792
+
793
+ /**
794
+ * This function verifies plotted points on the number line on the Edit tab.
795
+ * @param {number} range - The range of x coordinates.
796
+ * @param {number[]} coordinates - An array containing y coordinates that do not exist on the graph.
797
+ */
798
+ verifyVerticalPointsNotExistOnNumberLineSpecifyCorrectAnswer: (range, coordinates) => {
799
+ coordinates.forEach(y => {
800
+ numberLineLabelPage.numberLineSpecifyCorrectAnswer()
801
+ .then(($graphElement) => {
802
+ numberLineLabelPage.labelContainerSpecifyCorrectAnswer()
803
+ .then(($element) => {
804
+ let graphHeight = $graphElement[0].clientHeight;
805
+ let containerHeight = $element[0].clientHeight;
806
+ graphHeight = graphHeight - containerHeight - 32;
807
+ const originY = graphHeight / 2;
808
+ const yPixel = originY - y * (graphHeight / range);
809
+ cy.get(`.ngie-accordion .ngie-jxgbox svg ellipse[cy*="${Math.floor(yPixel)}"]`)
810
+ .should('not.exist');
811
+ });
812
+ });
813
+ });
814
+ },
815
+
816
+ /**
817
+ * This function verifies plotted points on the number line do not exist on the preview tab.
818
+ * @param {number} range - The range of x coordinates.
819
+ * @param {number[]} coordinates - An array containing x coordinates to be plotted on the graph.
820
+ */
821
+ verifyVerticalPointsNotExistOnNumberLinePreviewTab: (range, coordinates) => {
822
+ coordinates.forEach(y => {
823
+ numberLineLabelPage.numberLinePreviewTab()
824
+ .then(($graphElement) => {
825
+ numberLineLabelPage.labelContainerPreviewTab()
826
+ .then(($element) => {
827
+ let graphHeight = $graphElement[0].clientHeight;
828
+ let containerHeight = $element[0].clientHeight;
829
+ graphHeight = graphHeight - containerHeight - 32;
830
+ const originY = graphHeight / 2;
831
+ const yPixel = originY - y * (graphHeight / range);
832
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cy*="${Math.floor(yPixel)}"]`)
833
+ .should('not.exist');
834
+ });
835
+ });
836
+ });
837
+ },
838
+
839
+ /**
840
+ * This function verifies plotted points on the number line on the preview tab.
841
+ * @param {number} range - The range of x coordinates.
842
+ * @param {number[]} coordinates - An array containing x coordinates to be plotted on the graph.
843
+ */
844
+ verifyVerticalPointsPlottedOnNumberLinePreviewTab: (range, coordinates) => {
845
+ coordinates.forEach(y => {
846
+ numberLineLabelPage.numberLinePreviewTab()
847
+ .then(($graphElement) => {
848
+ numberLineLabelPage.labelContainerPreviewTab()
849
+ .then(($element) => {
850
+ let graphHeight = $graphElement[0].clientHeight;
851
+ let containerHeight = $element[0].clientHeight;
852
+ graphHeight = graphHeight - containerHeight - 32;
853
+ const originY = graphHeight / 2;
854
+ const yPixel = originY - y * (graphHeight / range);
855
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cy*="${Math.floor(yPixel)}"]`)
856
+ .should('exist');
857
+ });
858
+ });
859
+ });
860
+ },
861
+
862
+ /**
863
+ * This function verifies plotted points on the number line on the preview tab.
864
+ * @param {number} range - The range of x coordinates.
865
+ * @param {number[]} coordinates - An array containing x coordinates to be plotted on the graph.
866
+ */
867
+ verifyVerticalIncorrectResponseOnNumberLinePreviewTab: (label, range, coordinate) => {
868
+ numberLineLabelPage.numberLinePreviewTab()
869
+ .then(($graphElement) => {
870
+ numberLineLabelPage.labelContainerPreviewTab()
871
+ .then(($element) => {
872
+ let graphHeight = $graphElement[0].clientHeight;
873
+ let containerHeight = $element[0].clientHeight;
874
+ graphHeight = graphHeight - containerHeight - 32;
875
+ const originY = graphHeight / 2;
876
+ const yPixel = originY - coordinate * (graphHeight / range);
877
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cy*="${Math.floor(yPixel)}"]`)
878
+ .should('have.css', 'stroke', css.color.incorrectAnswer);
879
+ });
880
+ });
881
+ numberLineLabelPage.numberLinePreviewTab()
882
+ .parents('.ngie-jxgbox')
883
+ .within(() => {
884
+ numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
885
+ .contains(label)
886
+ .should('have.class', 'icon-incorrect-cross')
887
+ .should('have.css', 'border', `1px solid ${css.color.incorrectAnswer}`)
888
+ .verifyPseudoClassBeforeProperty('color', css.color.incorrectAnswer);
889
+ });
890
+ },
891
+
892
+ /**
893
+ * This function verifies plotted points on the number line on the preview tab.
894
+ * @param {number} range - The range of x coordinates.
895
+ * @param {number[]} coordinates - An array containing x coordinates to be plotted on the graph.
896
+ */
897
+ verifyVerticalCorrectResponseOnNumberLinePreviewTab: (label, range, coordinate) => {
898
+ numberLineLabelPage.numberLinePreviewTab()
899
+ .then(($graphElement) => {
900
+ numberLineLabelPage.labelContainerPreviewTab()
901
+ .then(($element) => {
902
+ let graphHeight = $graphElement[0].clientHeight;
903
+ let containerHeight = $element[0].clientHeight;
904
+ graphHeight = graphHeight - containerHeight - 32;
905
+ const originY = graphHeight / 2;
906
+ const yPixel = originY - coordinate * (graphHeight / range);
907
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cy*="${Math.floor(yPixel)}"]`)
908
+ .should('have.css', 'stroke', css.color.correctAnswer);
909
+ });
910
+ });
911
+ numberLineLabelPage.numberLinePreviewTab()
912
+ .parents('.ngie-jxgbox')
913
+ .within(() => {
914
+ numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
915
+ .contains(label)
916
+ .should('have.class', 'icon-correct-tick')
917
+ .should('have.css', 'border', `1px solid ${css.color.correctAnswer}`)
918
+ .verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
919
+ });
920
+ },
921
+
922
+ /**
923
+ * This function verifies correct plotted points on the number line on c tab
924
+ * @param {Object[]} coordinates - An array containing x and y coordinates along with their ranges
925
+ * @param {number} range - range of x coordinate
926
+ */
927
+ verifyVerticalCorrectResponseOnNumberLineCorrectAnswerSection: (label, range, coordinate) => {
928
+ numberLineLabelPage.numberLineCorrectAnswerSection()
929
+ .then(($graphElement) => {
930
+ let graphHeight = $graphElement[0].clientHeight;
931
+ const originY = graphHeight / 2;
932
+ const yPixel = originY - coordinate * (graphHeight / range);
933
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(1).find(`svg ellipse[cy*="${Math.floor(yPixel)}"][display="inline"]`)
934
+ .should('have.css', 'stroke', css.color.correctAnswer);
935
+ });
936
+ numberLineLabelPage.numberLineCorrectAnswerSection()
937
+ .parents('.ngie-jxgbox')
938
+ .within(() => {
939
+ numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
940
+ .contains(label)
941
+ .should('have.class', 'icon-correct-tick')
942
+ .should('have.css', 'border', `1px solid ${css.color.correctAnswer}`)
943
+ .verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
944
+ });
945
+ },
946
+
947
+ //Correct answer view
948
+ /**
949
+ * This function verifies plotted points on the number line on the preview tab.
950
+ * @param {number} label - The label to drag and drop
951
+ * @param {number} yPixel - x coordinates to be verified on the graph.
952
+ */
953
+ verifyVerticalCorrectResponseOnNumberLineCorrectAnswerView: (label, yPixel) => {
954
+ cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cy*="${Math.floor(yPixel)}"]`)
955
+ .should('have.css', 'stroke', css.color.correctAnswer);
956
+ numberLineLabelPage.numberLinePreviewTab()
957
+ .parents('.ngie-jxgbox')
958
+ .within(() => {
959
+ numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
960
+ .contains(label)
961
+ .should('have.class', 'icon-correct-tick')
962
+ .should('have.css', 'border', `1px solid ${css.color.correctAnswer}`)
963
+ .verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
964
+ });
965
+ },
966
+ }
967
+
968
+ const tests = {
969
+ ...autoScoredScoringPreviewTab.tests,
970
+ ...scoringSectionBaseEditTab.tests,
971
+ ...autoScoredScoringSectionMultiResponseType.tests,
972
+ ...studentViewSettingsLabelComponent.tests,
973
+ ...autoScoredStudentViewSettings.tests,
974
+ ...randomizeOptionsComponent.tests,
975
+ ...additionalSettingsPanel.tests,
976
+ ...additionalSettingsAccessibilitySectionComponent.tests,
977
+ ...createQuestionBasePage.tests,
978
+ ...commonComponents.tests,
979
+ ...autoScoredSpecifyCorrectAnswerSection.tests,
980
+ ...toolSettingsComponent.tests,
981
+ ...questionInstructionsComponent.tests,
982
+ ...layoutSectionComponent.tests,
983
+ ...numberLineCommonComponent.tests,
984
+ verifyContentsOfSpecifyCorrectAnswerSection: () => {
985
+ it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
986
+ utilities.verifyElementVisibilityState(numberLineCommonComponent.numberLineTitleCorrectAnswerSection(), 'exist');
987
+ utilities.verifyInnerText(numberLineCommonComponent.numberLineTitleCorrectAnswerSection(), 'Number line title');
988
+ utilities.verifyElementCount(numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer(), 4);
989
+ utilities.verifyElementVisibilityState(numberLineLabelPage.numberLineSpecifyCorrectAnswer(), 'visible');
990
+ utilities.verifyElementVisibilityState(numberLineLabelPage.labelContainerSpecifyCorrectAnswer(), 'visible');
991
+ });
992
+ },
993
+
994
+ /**
995
+ * Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
996
+ * @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
997
+ * @example - verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
998
+ */
999
+ verifySpecifyCorrectAnswerAccordionContentsAndFunctionality: (accordionName) => {
1000
+ const range = 20.75;
1001
+ it(`The user should be able to plot points on number line in the specify correct answer section ${accordionName} accordion`, () => {
1002
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Label 2', 'horizontal', range, 9);
1003
+ numberLineLabelPage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [9]);
1004
+ });
1005
+
1006
+ 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`, () => {
1007
+ numberLineLabelPage.steps.clickAndDropLabelInContainerSpecifyCorrectAnswer('Label 2');
1008
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
1009
+ utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.');
1010
+ if (accordionName == 'Correct') {
1011
+ autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
1012
+ .within(() => {
1013
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1014
+ });
1015
+ } else {
1016
+ autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
1017
+ .within(() => {
1018
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1019
+ });
1020
+ };
1021
+ });
1022
+
1023
+ autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredCorrectAnswerErrorMessageCSSAndA11y();
1024
+
1025
+ it('When the user plots on the number line then the error message should disappear', () => {
1026
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Label 2', 'horizontal', range, 9);
1027
+ numberLineLabelPage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [9]);
1028
+ });
1029
+
1030
+ autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
1031
+
1032
+ it('Accessibility of \'Correct\' accordion contents', { tags: 'a11y' }, () => {
1033
+ cy.checkAccessibility(numberLineLabelPage.numberLineSpecifyCorrectAnswer());
1034
+ });
1035
+ },
1036
+
1037
+ /**
1038
+ * Verifies the functionality of the number line section in the edit tab.
1039
+ * @param {string} orientation - The orientation of the number line ('Horizontal' or 'Vertical').
1040
+ */
1041
+ verifyDisplayNumberSettingsFunctionalitySpecifyCorrectAnswerSection: (orientation) => {
1042
+ const displayNumbersOptions = (orientation === "Horizontal") ? ["Below line", "Above line"] : ["Left of line", "Right of line"];
1043
+ const direction = (orientation === "Horizontal") ? "Below" : "Left of";
1044
+ 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.`, () => {
1045
+ numberLineCommonComponent.steps.verifyDisplayNumbersToggleButtonSelected(displayNumbersOptions[0]);
1046
+ numberLineLabelPage.steps.verifyDisplayNumbersOrientationNumberLineSection(orientation, direction);
1047
+ numberLineLabelPage.steps.verifyDisplayNumbersOrientationSpecifyCorrectAnswerSection(orientation, direction);
1048
+ });
1049
+
1050
+ const oppositeDirection = (orientation === "Horizontal") ? "Above" : "Right of";
1051
+ 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.`, () => {
1052
+ numberLineCommonComponent.steps.selectDisplayNumbersToggleButton(displayNumbersOptions[1]);
1053
+ numberLineLabelPage.steps.verifyDisplayNumbersOrientationNumberLineSection(orientation, oppositeDirection);
1054
+ numberLineLabelPage.steps.verifyDisplayNumbersOrientationSpecifyCorrectAnswerSection(orientation, oppositeDirection);
1055
+ });
1056
+ },
1057
+
1058
+ /**
1059
+ * Verifies the functionality of the number line section in the preview tab.
1060
+ * @param {string} orientation - The orientation of the number line ('Horizontal' or 'Vertical').
1061
+ */
1062
+ verifyDisplayNumberSettingsFunctionalityPreviewTab: (orientation) => {
1063
+ const displayNumbersOptions = (orientation === "Horizontal") ? ["Below line", "Above line"] : ["Left of line", "Right of line"];
1064
+ const direction = (orientation === "Horizontal") ? "Below" : "Left of";
1065
+ it(`When ${displayNumbersOptions[0]} is selected then labels should be displayed ${direction} number line in the preview tab.`, () => {
1066
+ numberLineCommonComponent.steps.switchToEditTab();
1067
+ numberLineCommonComponent.steps.verifyDisplayNumbersToggleButtonSelected(displayNumbersOptions[0]);
1068
+ numberLineCommonComponent.steps.switchToPreviewTab();
1069
+ numberLineLabelPage.steps.verifyDisplayNumbersOrientationPreviewTab(orientation, direction);
1070
+ });
1071
+
1072
+ const oppositeDirection = (orientation === "Horizontal") ? "Above" : "Right of";
1073
+ it(`When user selects ${displayNumbersOptions[1]} then labels should be displayed ${oppositeDirection} number line in the preview tab.`, () => {
1074
+ numberLineCommonComponent.steps.switchToEditTab();
1075
+ numberLineCommonComponent.steps.selectDisplayNumbersToggleButton(displayNumbersOptions[1]);
1076
+ numberLineCommonComponent.steps.switchToPreviewTab();
1077
+ numberLineLabelPage.steps.verifyDisplayNumbersOrientationPreviewTab(orientation, oppositeDirection);
1078
+ });
1079
+ }
1080
+ }
1081
+
1082
+ export const numberLineLabelPage = {
1083
+ ...selectors,
1084
+ steps,
1085
+ tests
1086
+ }