itemengine-cypress-automation 1.0.189-e2e-execution-crash-83cdbd4.0 → 1.0.189
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +79 -0
- package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +647 -0
- package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +429 -0
- package/cypress/e2e/ILC/AudioPlayerNew/customizePlayerLayoutSettings.js +596 -0
- package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +162 -0
- package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +792 -0
- package/cypress/e2e/ILC/AudioPlayerNew/studentViewSettings.js +253 -0
- package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +313 -0
- package/cypress/e2e/ILC/AudioResponseNew/additionalSettingsBasic.js +1 -22
- package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +2 -11
- package/cypress/e2e/ILC/ChartsBar/previewContentsForAllViews.smoke.js +359 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +6 -8
- package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +417 -28
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
- package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +29 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +3 -4
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
- package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +3 -2
- package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +11 -3
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +2 -2
- package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountAllOrNothingCorrectPointsGreaterThanAlternativePoints.js +143 -0
- package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountPartialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +132 -0
- package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountPartialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +143 -0
- package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountPartialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +144 -0
- package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountallOrNothingCorrectPointsEqualToAlternativePoints.js +143 -0
- package/cypress/e2e/ILC/GridFill/scoring/cellshadeCountAllOrNothingAlternativePointsGreaterThanCorrectPoints.js +131 -0
- package/cypress/e2e/ILC/GridFill/scoring/matchExactAndCellShadeCountCombinedScoring.js +87 -0
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsCellShadeCountBasics.js +446 -0
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +194 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +195 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +274 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingPenaltyScoring.js +48 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/manuallyAndNonScored.js +144 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +252 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsBasic.js +102 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +256 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +253 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +308 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +225 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsBasic.js +151 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +196 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +227 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/additionalSettings.js +91 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +230 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/checkAnswerFunctionalityForAllViews.smoke.js +124 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/editTabBasicSection.js +221 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/editTabScoring.js +203 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/manuallyAndNonScoredEditTab.js +71 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/minimumScoringPenaltyPointsAndRoundingDropdown.js +197 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/previewContentsForAllViews.smoke.js +201 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/specifyCorrectAnswerSection.js +115 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/studentViewSettings.js +183 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +216 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +214 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +273 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +128 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +279 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +109 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +278 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +278 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +335 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +250 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +161 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +216 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +252 -0
- package/cypress/e2e/ILC/ListOrderingNew/additionalSettings.js +118 -0
- package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +243 -0
- package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
- package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +155 -0
- package/cypress/e2e/ILC/ListOrderingNew/editTabScoring.js +195 -0
- package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +78 -0
- package/cypress/e2e/ILC/ListOrderingNew/manuallyAndNonScoredEditTab.js +69 -0
- package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +176 -0
- package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +112 -0
- package/cypress/e2e/ILC/ListOrderingNew/studentViewSettings.js +244 -0
- package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +1 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/LayoutSection.js +209 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +1 -1
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +4 -4
- package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +1 -1
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +1 -1
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +1 -1
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +58 -2
- package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +1 -1
- package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +2 -2
- package/cypress/e2e/ILC/NumberLine/headerSection.js +1 -1
- package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +33 -0
- package/cypress/e2e/ILC/NumberLine/numberLineSection.js +50 -0
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +2 -2
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +2 -1
- package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +1 -1
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +696 -0
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +173 -0
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/layoutSection.js +211 -0
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +75 -0
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +204 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +229 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +229 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +229 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/manualAndNonScoredScoring.js +169 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +274 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsBasic.js +433 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +274 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +274 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +249 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsBasic.js +135 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +210 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +248 -0
- package/cypress/e2e/ILC/NumberLineLabel/additionalSettingsBasic.js +115 -0
- package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +288 -0
- package/cypress/e2e/ILC/NumberLineLabel/checkAnswerFunctionalityForAllViews.smoke.js +153 -0
- package/cypress/e2e/ILC/NumberLineLabel/editTabBasicSection.js +326 -0
- package/cypress/e2e/ILC/NumberLineLabel/editTabScoring.js +234 -0
- package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +164 -0
- package/cypress/e2e/ILC/NumberLineLabel/headerSection.js +80 -0
- package/cypress/e2e/ILC/NumberLineLabel/layoutSection.js +204 -0
- package/cypress/e2e/ILC/NumberLineLabel/manuallyAndNonScoredEditTab.js +79 -0
- package/cypress/e2e/ILC/NumberLineLabel/minimumScoringPenaltyPointsAndRoundingDropdown.js +85 -0
- package/cypress/e2e/ILC/NumberLineLabel/numberLineSection.js +51 -0
- package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +120 -0
- package/cypress/e2e/ILC/NumberLineLabel/specifyCorrectAnswerSection.js +74 -0
- package/cypress/e2e/ILC/NumberLineLabel/studentViewSettings.js +183 -0
- package/cypress/e2e/ILC/NumberLineLabel/toolSettings.js +76 -0
- package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/allOrNothingForAllViews.smoke.js +292 -0
- package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/checkAnswerFunctionalityForAllViews.smoke.js +155 -0
- package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +166 -0
- package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/layoutSection.js +360 -0
- package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/numberLineSection.js +80 -0
- package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/previewContentsForAllViews.smoke.js +111 -0
- package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +49 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +0 -1
- package/cypress/e2e/ILC/TextSelection/additionalSettings.js +125 -0
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +5 -4
- package/cypress/e2e/ILC/TextSelection/headerSection.js +73 -0
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +6 -7
- package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +179 -0
- package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +89 -0
- package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +436 -0
- package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +277 -0
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +222 -0
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +260 -0
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +380 -0
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
- package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
- package/cypress/e2e/ILC/VideoResponseNew/additionalSettingsBasic.js +77 -0
- package/cypress/e2e/ILC/VideoResponseNew/customizePlaybackControls.js +313 -0
- package/cypress/e2e/ILC/VideoResponseNew/editAndPreviewTabScoringSection.js +99 -0
- package/cypress/e2e/ILC/VideoResponseNew/editTabBasicSection.js +171 -0
- package/cypress/e2e/ILC/VideoResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +179 -0
- package/cypress/e2e/ILC/VideoResponseNew/headerSection.js +79 -0
- package/cypress/e2e/ILC/VideoResponseNew/previewContentsForAllViews.smoke.js +201 -0
- package/cypress/e2e/ILC/VideoResponseNew/standardRecorderStyle.js +567 -0
- package/cypress/e2e/ILC/VideoResponseNew/studentViewSettings.js +194 -0
- package/cypress/fixtures/constants.js +1 -1
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +1 -1
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
- package/cypress/fixtures/theme/ilc.json +22 -18
- package/cypress/pages/audioPlayerPage.js +668 -446
- package/cypress/pages/audioResponsePage.js +8 -80
- package/cypress/pages/brainingCampManipulativePage.js +1 -1
- package/cypress/pages/chartsBarPage.js +231 -0
- package/cypress/pages/chartsDotPlotPage.js +8 -0
- package/cypress/pages/chartsLinePage.js +42 -0
- package/cypress/pages/components/allowTeachersToDownloadStudentResponseComponent.js +58 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +13 -23
- package/cypress/pages/components/autoScoredStudentViewSettings.js +6 -6
- package/cypress/pages/components/barAndLineChartComponent.js +120 -0
- package/cypress/pages/components/chartsCommonComponent.js +105 -0
- package/cypress/pages/components/commonComponents.js +1 -0
- package/cypress/pages/components/draggableOptionContainer.js +2 -1
- package/cypress/pages/components/equationEditorFlyout.js +3 -2
- package/cypress/pages/components/essayResponseCommonComponents.js +8 -2
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -0
- package/cypress/pages/components/imageCanvasComponent.js +2 -1
- package/cypress/pages/components/index.js +7 -0
- package/cypress/pages/components/layoutSectionComponent.js +1156 -0
- package/cypress/pages/components/limitNumberOfRetakeComponent.js +90 -0
- package/cypress/pages/components/numberLineCommonComponent.js +685 -0
- package/cypress/pages/components/optionsWrapperComponent.js +13 -2
- package/cypress/pages/components/playbackControlsBaseComponent.js +20 -13
- package/cypress/pages/components/questionInstructionsComponent.js +3 -19
- package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +46 -0
- package/cypress/pages/components/toolSettingsComponent.js +6 -0
- package/cypress/pages/contentBlocksPage.js +18 -2
- package/cypress/pages/createItemPage.js +75 -8
- package/cypress/pages/dialogBoxBase.js +2 -2
- package/cypress/pages/drawingResponsePage.js +24 -4
- package/cypress/pages/feedbackScalePage.js +3 -0
- package/cypress/pages/graphingPage.js +19 -1
- package/cypress/pages/gridFillPage.js +47 -59
- package/cypress/pages/index.js +5 -1
- package/cypress/pages/itemPreviewSettingsPage.js +4 -0
- package/cypress/pages/listOrderingPage.js +561 -555
- package/cypress/pages/matchingPage.js +1 -1
- package/cypress/pages/multipleSelectionPage.js +23 -1
- package/cypress/pages/numberLineLabelPage.js +1086 -0
- package/cypress/pages/numberLinePage.js +696 -78
- package/cypress/pages/rulerPage.js +6 -2
- package/cypress/pages/textSelectionPage.js +461 -23
- package/cypress/pages/videoResponsePage.js +393 -81
- package/package.json +1 -1
@@ -1,7 +1,8 @@
|
|
1
1
|
import utilities from '../support/helpers/utilities';
|
2
|
-
import { createQuestionBasePage, toolsAndControlsComponent, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, autoScoredSpecifyCorrectAnswerSection, commonComponents, autoScoredScoringSectionMultiResponseType, toolSettingsComponent, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, autoScoredStudentViewSettings, randomizeOptionsComponent, studentViewSettingsLabelComponent, defaultToolDropdown } from './components';
|
2
|
+
import { createQuestionBasePage, toolsAndControlsComponent, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, autoScoredSpecifyCorrectAnswerSection, commonComponents, autoScoredScoringSectionMultiResponseType, toolSettingsComponent, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, autoScoredStudentViewSettings, randomizeOptionsComponent, studentViewSettingsLabelComponent, defaultToolDropdown, layoutSectionComponent, numberLineCommonComponent } from './components';
|
3
|
+
import { dialogBoxBase } from './dialogBoxBase';
|
3
4
|
const css = Cypress.env('css');
|
4
|
-
const range = 20.
|
5
|
+
const range = 20.75;
|
5
6
|
|
6
7
|
const selectors = {
|
7
8
|
...toolsAndControlsComponent,
|
@@ -14,11 +15,11 @@ const selectors = {
|
|
14
15
|
...commonComponents,
|
15
16
|
...defaultToolDropdown,
|
16
17
|
...autoScoredScoringSectionMultiResponseType,
|
17
|
-
|
18
|
-
|
19
|
-
|
18
|
+
...dialogBoxBase,
|
19
|
+
...numberLineCommonComponent,
|
20
|
+
...layoutSectionComponent,
|
21
|
+
|
20
22
|
//Specify correct answer
|
21
|
-
numberLineSpecifyCorrectAnswer: () => cy.get('.ngie-accordion .ngie-jxgbox svg'),
|
22
23
|
numberLineToolOptionSpecifyCorrectAnswer: (toolOptionAriaLabel = null) => {
|
23
24
|
if (toolOptionAriaLabel) {
|
24
25
|
return cy.get(`.graph-tools-wrapper .single-select-toggle-group-double button[aria-label*="${toolOptionAriaLabel}"]`).eq(0)
|
@@ -33,13 +34,10 @@ const selectors = {
|
|
33
34
|
return cy.get('[class*="GraphingToolsstyles__ControlsWrapper"] button')
|
34
35
|
}
|
35
36
|
},
|
36
|
-
numberLineTitleSpecifyCorrectAnswerSection: () => cy.get('.correct-answer-accordion [class*="LineGraphstyles__TitleText"]'),
|
37
37
|
plotNumberLineToggleButton: () => cy.get('[data-ngie-testid="plot-number-line-tab"]'),
|
38
38
|
partialEqualWeightsPointsPerResponseScore: () => cy.get('.alternate-points-points-per-value-span'),
|
39
39
|
|
40
40
|
//Preview Tab
|
41
|
-
numberLinePreviewTab: () => cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox svg').eq(0),
|
42
|
-
numberLinePointPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find('svg ellipse[display="inline"]'),
|
43
41
|
numberLineSegmentPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find('[stroke-linecap="butt"]'),
|
44
42
|
numberLineToolOptionPreviewTab: (toolOptionAriaLabel = null) => {
|
45
43
|
if (toolOptionAriaLabel) {
|
@@ -55,16 +53,10 @@ const selectors = {
|
|
55
53
|
return cy.get('[class*="question-preview-wrapper"] [class*="ControlsWrapper"] button')
|
56
54
|
}
|
57
55
|
},
|
58
|
-
numberLineTitlePreviewTab: () => cy.get('.edit-question-preview-wrapper [class*="LineGraphstyles__TitleText"]'),
|
59
56
|
|
60
57
|
//Correct answer section
|
61
|
-
correctAnswersLabel: () => cy.get('[class*="AnswerLabel"]'),
|
62
|
-
correctIcon: () => cy.get('[data-icon="CorrectAnswer"]'),
|
63
|
-
incorrectIcon: () => cy.get('[data-icon="Incorrect"]'),
|
64
58
|
numberLineCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox svg:visible').eq(1),
|
65
59
|
numberLinePointCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(1).find('svg ellipse[display="inline"]'),
|
66
|
-
correctIncorrectAnswerTextWrapper: () => cy.get('[class*="CorrectIncorrectWrapper"]'),
|
67
|
-
numberLineTitleCorrectAnswerSection: () => cy.get('[class*="LineGraphstyles__TitleText"]').last()
|
68
60
|
}
|
69
61
|
|
70
62
|
const steps = {
|
@@ -80,6 +72,8 @@ const steps = {
|
|
80
72
|
...commonComponents.steps,
|
81
73
|
...autoScoredScoringSectionMultiResponseType.steps,
|
82
74
|
...defaultToolDropdown.steps,
|
75
|
+
...numberLineCommonComponent.steps,
|
76
|
+
...layoutSectionComponent.steps,
|
83
77
|
|
84
78
|
/**
|
85
79
|
* @description This function selects the tool option from graph
|
@@ -117,7 +111,7 @@ const steps = {
|
|
117
111
|
numberLinePage.numberLineSpecifyCorrectAnswer()
|
118
112
|
.click(xPixel, originY, { force: true });
|
119
113
|
} else {
|
120
|
-
const yPixel = originY - coordinate * (
|
114
|
+
const yPixel = originY - coordinate * (graphHeight / range);
|
121
115
|
numberLinePage.numberLineSpecifyCorrectAnswer()
|
122
116
|
.click(originX, yPixel, { force: true });
|
123
117
|
}
|
@@ -173,18 +167,18 @@ const steps = {
|
|
173
167
|
* @param {number} startingPoint - It representing the starting point of the ray.
|
174
168
|
*/
|
175
169
|
verifyRayOnNumberLineSpecifyCorrectAnswer: (direction, range, startingPoint) => {
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
170
|
+
numberLinePage.numberLineSpecifyCorrectAnswer()
|
171
|
+
.then(($graphElement) => {
|
172
|
+
const graphWidth = $graphElement[0].clientWidth;
|
173
|
+
const graphHeight = $graphElement[0].clientHeight;
|
174
|
+
const originX = graphWidth / 2;
|
175
|
+
const originY = graphHeight / 2;
|
176
|
+
const x1Pixel = originX + startingPoint * (graphWidth / range);
|
177
|
+
const rayArrowWidth = 42;
|
178
|
+
const x2Pixel = direction === "left" ? rayArrowWidth : graphWidth - rayArrowWidth;
|
179
|
+
cy.get(`.ngie-accordion .ngie-jxgbox svg [stroke-linecap="butt"][x1*="${Math.floor(x1Pixel)}"][y1*="${Math.floor(originY)}"][x2*="${Math.floor(x2Pixel)}"][y2*="${Math.floor(originY)}"]`)
|
180
|
+
.should('be.visible');
|
181
|
+
});
|
188
182
|
},
|
189
183
|
|
190
184
|
/**
|
@@ -240,7 +234,7 @@ const steps = {
|
|
240
234
|
numberLinePage.numberLinePreviewTab()
|
241
235
|
.click(xPixel, originY, { force: true });
|
242
236
|
} else {
|
243
|
-
const yPixel = originY
|
237
|
+
const yPixel = originY - coordinate * (graphHeight / range);
|
244
238
|
numberLinePage.numberLinePreviewTab()
|
245
239
|
.click(originX, yPixel, { force: true });
|
246
240
|
}
|
@@ -356,18 +350,18 @@ const steps = {
|
|
356
350
|
* @param {number} startingPoint - It representing the starting point of the ray.
|
357
351
|
*/
|
358
352
|
verifyRayOnNumberLinePreviewTab: (direction, range, startingPoint) => {
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
353
|
+
numberLinePage.numberLinePreviewTab()
|
354
|
+
.then(($graphElement) => {
|
355
|
+
const graphWidth = $graphElement[0].clientWidth;
|
356
|
+
const graphHeight = $graphElement[0].clientHeight;
|
357
|
+
const originX = graphWidth / 2;
|
358
|
+
const originY = graphHeight / 2;
|
359
|
+
const x1Pixel = originX + startingPoint * (graphWidth / range);
|
360
|
+
const rayArrowWidth = 42;
|
361
|
+
const x2Pixel = direction === "left" ? rayArrowWidth : graphWidth - rayArrowWidth;
|
362
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`[stroke-linecap="butt"][x1*="${Math.floor(x1Pixel)}"][y1*="${Math.floor(originY)}"][x2*="${Math.floor(x2Pixel)}"][y2*="${Math.floor(originY)}"]`)
|
363
|
+
.should('be.visible');
|
364
|
+
});
|
371
365
|
},
|
372
366
|
|
373
367
|
/**
|
@@ -398,18 +392,18 @@ const steps = {
|
|
398
392
|
* @param {number} startingPoint -It representing the starting point of the ray.
|
399
393
|
*/
|
400
394
|
verifyCorrectRayOnNumberLinePreviewTab: (direction, range, startingPoint) => {
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
395
|
+
numberLinePage.numberLinePreviewTab()
|
396
|
+
.then(($graphElement) => {
|
397
|
+
const graphWidth = $graphElement[0].clientWidth;
|
398
|
+
const graphHeight = $graphElement[0].clientHeight;
|
399
|
+
const originX = graphWidth / 2;
|
400
|
+
const originY = graphHeight / 2;
|
401
|
+
const x1Pixel = originX + startingPoint * (graphWidth / range);
|
402
|
+
const rayArrowWidth = 42;
|
403
|
+
const x2Pixel = direction === "left" ? rayArrowWidth : graphWidth - rayArrowWidth;
|
404
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`[stroke-linecap="butt"][x1*="${Math.floor(x1Pixel)}"][y1*="${Math.floor(originY)}"][x2*="${Math.floor(x2Pixel)}"][y2*="${Math.floor(originY)}"]`)
|
405
|
+
.should('have.css', 'stroke', css.color.correctAnswer);
|
406
|
+
});
|
413
407
|
},
|
414
408
|
|
415
409
|
/**
|
@@ -440,18 +434,18 @@ const steps = {
|
|
440
434
|
* @param {number} startingPoint- It representing the starting point of the ray.
|
441
435
|
*/
|
442
436
|
verifyIncorrectRayOnNumberLinePreviewTab: (direction, range, startingPoint) => {
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
437
|
+
numberLinePage.numberLinePreviewTab()
|
438
|
+
.then(($graphElement) => {
|
439
|
+
const graphWidth = $graphElement[0].clientWidth;
|
440
|
+
const graphHeight = $graphElement[0].clientHeight;
|
441
|
+
const originX = graphWidth / 2;
|
442
|
+
const originY = graphHeight / 2;
|
443
|
+
const x1Pixel = originX + startingPoint * (graphWidth / range);
|
444
|
+
const rayArrowWidth = 42;
|
445
|
+
const x2Pixel = direction === "left" ? rayArrowWidth : graphWidth - rayArrowWidth;
|
446
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`[stroke-linecap="butt"][x1*="${Math.floor(x1Pixel)}"][y1*="${Math.floor(originY)}"][x2*="${Math.floor(x2Pixel)}"][y2*="${Math.floor(originY)}"]`)
|
447
|
+
.should('have.css', 'stroke', css.color.incorrectAnswer);
|
448
|
+
});
|
455
449
|
},
|
456
450
|
|
457
451
|
/**
|
@@ -754,24 +748,603 @@ const steps = {
|
|
754
748
|
});
|
755
749
|
},
|
756
750
|
|
751
|
+
//Layout
|
752
|
+
|
753
|
+
clickOnToolOptionsSpecifyCorrectAnswer: () => {
|
754
|
+
cy.log('Clicking on control options to remove error message');
|
755
|
+
numberLinePage.numberLineToolOptionSpecifyCorrectAnswer()
|
756
|
+
.parents('.graph-tools-wrapper')
|
757
|
+
.click();
|
758
|
+
},
|
759
|
+
|
760
|
+
clickOnToolOptionsPreviewTab: () => {
|
761
|
+
cy.log('Clicking on control options to remove error message');
|
762
|
+
numberLinePage.numberLineToolOptionPreviewTab()
|
763
|
+
.parents('.graph-tools-wrapper')
|
764
|
+
.click();
|
765
|
+
},
|
766
|
+
|
767
|
+
//Vertical orientation
|
768
|
+
/**
|
769
|
+
* This function verifies plotted points on the vertical number line on the specify correct answer section.
|
770
|
+
* @param {number} range - The range of y coordinates.
|
771
|
+
* @param {number[]} coordinates - An array containing y coordinates to be plotted on the graph.
|
772
|
+
*/
|
773
|
+
verifyPointsPlottedOnVerticalNumberLineSpecifyCorrectAnswer: (range, coordinates) => {
|
774
|
+
coordinates.forEach(y => {
|
775
|
+
numberLinePage.numberLineSpecifyCorrectAnswer()
|
776
|
+
.then(($graphElement) => {
|
777
|
+
const graphWidth = $graphElement[0].clientWidth;
|
778
|
+
const graphHeight = $graphElement[0].clientHeight;
|
779
|
+
const originX = graphWidth / 2;
|
780
|
+
const originY = graphHeight / 2;
|
781
|
+
const yPixel = originY - y * (graphHeight / range);
|
782
|
+
cy.get(`.ngie-accordion .ngie-jxgbox svg ellipse[cx*="${Math.floor(originX)}"][cy*="${Math.floor(yPixel)}"][tabindex="0"]`)
|
783
|
+
.should('exist');
|
784
|
+
});
|
785
|
+
});
|
786
|
+
},
|
787
|
+
|
757
788
|
/**
|
758
|
-
|
759
|
-
|
760
|
-
|
789
|
+
* This function verifies plotted points on the vertical number line do not exist on the Edit tab.
|
790
|
+
* @param {number} range - The range of y coordinates.
|
791
|
+
* @param {number[]} coordinates - An array containing y coordinates to be plotted on the graph.
|
792
|
+
*/
|
793
|
+
verifyPointsPlottedOnVerticalNumberLineNotExistSpecifyCorrectAnswer: (range, coordinates) => {
|
794
|
+
coordinates.forEach(y => {
|
795
|
+
numberLinePage.numberLineSpecifyCorrectAnswer()
|
796
|
+
.then(($graphElement) => {
|
797
|
+
const graphWidth = $graphElement[0].clientWidth;
|
798
|
+
const graphHeight = $graphElement[0].clientHeight;
|
799
|
+
const originX = graphWidth / 2;
|
800
|
+
const originY = graphHeight / 2;
|
801
|
+
const yPixel = originY + y * (graphHeight / range);
|
802
|
+
cy.get(`.ngie-accordion .ngie-jxgbox svg ellipse[cx*="${Math.floor(originX)}"][cy*="${Math.floor(yPixel)}"][tabindex="0"]`)
|
803
|
+
.should('not.exist');
|
804
|
+
});
|
805
|
+
});
|
806
|
+
},
|
807
|
+
|
808
|
+
/**
|
809
|
+
* This function verifies plotted points on the vertical number line on the preview tab.
|
810
|
+
* @param {number} range - The range of y coordinates.
|
811
|
+
* @param {number[]} coordinates - An array containing y coordinates to be plotted on the graph.
|
812
|
+
*/
|
813
|
+
verifyPointsPlottedOnVerticalNumberLinePreviewTab: (range, coordinates) => {
|
814
|
+
coordinates.forEach(y => {
|
815
|
+
numberLinePage.numberLinePreviewTab()
|
816
|
+
.then(($graphElement) => {
|
817
|
+
const graphWidth = $graphElement[0].clientWidth;
|
818
|
+
const graphHeight = $graphElement[0].clientHeight;
|
819
|
+
const originX = graphWidth / 2;
|
820
|
+
const originY = graphHeight / 2;
|
821
|
+
const yPixel = originY - y * (graphHeight / range);
|
822
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cx*="${Math.floor(originX)}"][cy*="${Math.floor(yPixel)}"][tabindex="0"]`)
|
823
|
+
.should('exist');
|
824
|
+
});
|
825
|
+
});
|
826
|
+
},
|
827
|
+
|
828
|
+
verifyCorrectPointsOnVerticalNumberLinePreviewTab: (range, coordinates) => {
|
829
|
+
coordinates.forEach(y => {
|
830
|
+
numberLinePage.numberLinePreviewTab()
|
831
|
+
.then(($graphElement) => {
|
832
|
+
const graphWidth = $graphElement[0].clientWidth;
|
833
|
+
const graphHeight = $graphElement[0].clientHeight;
|
834
|
+
const originX = graphWidth / 2;
|
835
|
+
const originY = graphHeight / 2;
|
836
|
+
const yPixel = originY - y * (graphHeight / range);
|
837
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cx*="${Math.floor(originX)}"][cy*="${Math.floor(yPixel)}"][display="inline"]`)
|
838
|
+
.should('have.css', 'stroke', css.color.correctAnswer);
|
839
|
+
});
|
840
|
+
});
|
841
|
+
},
|
842
|
+
|
843
|
+
verifyIncorrectPointsOnVerticalNumberLinePreviewTab: (range, coordinates) => {
|
844
|
+
coordinates.forEach(y => {
|
845
|
+
numberLinePage.numberLinePreviewTab()
|
846
|
+
.then(($graphElement) => {
|
847
|
+
const graphWidth = $graphElement[0].clientWidth;
|
848
|
+
const graphHeight = $graphElement[0].clientHeight;
|
849
|
+
const originX = graphWidth / 2;
|
850
|
+
const originY = graphHeight / 2;
|
851
|
+
const yPixel = originY - y * (graphHeight / range);
|
852
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cx*="${Math.floor(originX)}"][cy*="${Math.floor(yPixel)}"][display="inline"]`)
|
853
|
+
.should('have.css', 'stroke', css.color.incorrectAnswer);
|
854
|
+
});
|
855
|
+
});
|
856
|
+
},
|
857
|
+
|
858
|
+
/**
|
859
|
+
* Verifies that the points do not exist on the vertical number line in the preview tab.
|
860
|
+
* @param {number} range - The range of the number line.
|
861
|
+
* @param {number[]} coordinates - The y-coordinates of the points.
|
761
862
|
*/
|
762
|
-
|
763
|
-
|
764
|
-
.
|
765
|
-
|
766
|
-
|
863
|
+
verifyPointsNotExistOnVerticalNumberLinePreviewTab: (range, coordinates) => {
|
864
|
+
coordinates.forEach(y => {
|
865
|
+
numberLinePage.numberLinePreviewTab()
|
866
|
+
.then(($graphElement) => {
|
867
|
+
const graphWidth = $graphElement[0].clientWidth;
|
868
|
+
const graphHeight = $graphElement[0].clientHeight;
|
869
|
+
const originX = graphWidth / 2;
|
870
|
+
const originY = graphHeight / 2;
|
871
|
+
const yPixel = originY - y * (graphHeight / range);
|
872
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`svg ellipse[cx*="${Math.floor(originX)}"][cy*="${Math.floor(yPixel)}"][tabindex="0"]`)
|
873
|
+
.should('not.exist');
|
874
|
+
});
|
875
|
+
});
|
767
876
|
},
|
768
877
|
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
}
|
878
|
+
/**
|
879
|
+
* This function verifies plotted points on the vertical number line on c tab
|
880
|
+
* @param {Object[]} coordinates - An array containing x and y coordinates along with their ranges
|
881
|
+
* @param {number} coordinates[].x - x coordinate to be plotted on the graph
|
882
|
+
* @param {number} coordinates[].xRange - range of x coordinate
|
883
|
+
*/
|
884
|
+
verifyPointsPlottedOnVerticalNumberLineCorrectAnswerSection: (range, coordinates) => {
|
885
|
+
coordinates.forEach(y => {
|
886
|
+
numberLinePage.numberLineCorrectAnswerSection()
|
887
|
+
.then(($graphElement) => {
|
888
|
+
const graphWidth = $graphElement[0].clientWidth;
|
889
|
+
const graphHeight = $graphElement[0].clientHeight;
|
890
|
+
const originX = graphWidth / 2;
|
891
|
+
const originY = graphHeight / 2;
|
892
|
+
const yPixel = originY - y * (graphHeight / range);
|
893
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(1).find(`svg ellipse[cx*="${Math.floor(originX)}"][cy*="${Math.floor(yPixel)}"][pointer-events="visiblePainted"]`)
|
894
|
+
.should('exist');
|
895
|
+
});
|
896
|
+
});
|
897
|
+
},
|
898
|
+
|
899
|
+
/**
|
900
|
+
* Verifies that the correct points exist on the vertical number line in the correct answer section.
|
901
|
+
* @param {number} range - The range of the number line.
|
902
|
+
* @param {number[]} coordinates - The y-coordinates of the points.
|
903
|
+
*/
|
904
|
+
verifyCorrectPointsOnVerticalNumberLineCorrectAnswerSection: (range, coordinates) => {
|
905
|
+
coordinates.forEach(y => {
|
906
|
+
numberLinePage.numberLineCorrectAnswerSection()
|
907
|
+
.then(($graphElement) => {
|
908
|
+
const graphWidth = $graphElement[0].clientWidth;
|
909
|
+
const graphHeight = $graphElement[0].clientHeight;
|
910
|
+
const originX = graphWidth / 2;
|
911
|
+
const originY = graphHeight / 2;
|
912
|
+
const yPixel = originY - y * (graphHeight / range);
|
913
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(1).find(`svg ellipse[cx*="${Math.floor(originX)}"][cy*="${Math.floor(yPixel)}"][display="inline"]`)
|
914
|
+
.should('have.css', 'stroke', css.color.correctAnswer);
|
915
|
+
});
|
916
|
+
});
|
917
|
+
},
|
918
|
+
|
919
|
+
/**
|
920
|
+
* Verifies the line segment on the vertical number line in the specify correct answer section.
|
921
|
+
* @param {number} range - The range of the number line.
|
922
|
+
* @param {Object[]} coordinates - The coordinates of the line segment.
|
923
|
+
* @param {number} coordinates[].y1 - The y-coordinate of the starting point.
|
924
|
+
* @param {number} coordinates[].y2 - The y-coordinate of the ending point.
|
925
|
+
*/
|
926
|
+
verifyLineSegmentOnVerticalNumberLineSpecifyCorrectAnswer: (range, coordinates) => {
|
927
|
+
coordinates.forEach(({ y1, y2 }) => {
|
928
|
+
numberLinePage.numberLineSpecifyCorrectAnswer()
|
929
|
+
.then(($graphElement) => {
|
930
|
+
const graphWidth = $graphElement[0].clientWidth;
|
931
|
+
const graphHeight = $graphElement[0].clientHeight;
|
932
|
+
const originX = graphWidth / 2;
|
933
|
+
const originY = graphHeight / 2;
|
934
|
+
const y1Pixel = originY - y1 * (graphHeight / range);
|
935
|
+
const y2Pixel = originY - y2 * (graphHeight / range);
|
936
|
+
cy.get(`.ngie-accordion .ngie-jxgbox svg [stroke-linecap="butt"][x1*="${Math.floor(originX)}"][y1*="${Math.floor(y1Pixel)}"][x2*="${Math.floor(originX)}"][y2*="${Math.floor(y2Pixel)}"]`)
|
937
|
+
.should('be.visible');
|
938
|
+
});
|
939
|
+
});
|
940
|
+
},
|
941
|
+
|
942
|
+
/**
|
943
|
+
* Verifies the line segment on the vertical number line preview tab.
|
944
|
+
* @param {number} range - The range of the number line.
|
945
|
+
* @param {Object[]} coordinates - The coordinates of the line segment.
|
946
|
+
* @param {number} coordinates[].y1 - The y-coordinate of the starting point.
|
947
|
+
* @param {number} coordinates[].y2 - The y-coordinate of the ending point.
|
948
|
+
*/
|
949
|
+
verifyLineSegmentOnVerticalNumberLinePreviewTab: (range, coordinates) => {
|
950
|
+
coordinates.forEach(({ y1, y2 }) => {
|
951
|
+
numberLinePage.numberLinePreviewTab()
|
952
|
+
.then(($graphElement) => {
|
953
|
+
const graphWidth = $graphElement[0].clientWidth;
|
954
|
+
const graphHeight = $graphElement[0].clientHeight;
|
955
|
+
const originX = graphWidth / 2;
|
956
|
+
const originY = graphHeight / 2;
|
957
|
+
const y1Pixel = originY - y1 * (graphHeight / range);
|
958
|
+
const y2Pixel = originY - y2 * (graphHeight / range);
|
959
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`[stroke-linecap="butt"][x1*="${Math.floor(originX)}"][y1*="${Math.floor(y1Pixel)}"][x2*="${Math.floor(originX)}"][y2*="${Math.floor(y2Pixel)}"]`)
|
960
|
+
.should('be.visible');
|
961
|
+
});
|
962
|
+
});
|
963
|
+
},
|
964
|
+
|
965
|
+
/**
|
966
|
+
* Verifies the correct line segment on the vertical number line preview tab.
|
967
|
+
* @param {number} range - The range of the number line.
|
968
|
+
* @param {Object[]} coordinates - The coordinates of the line segment.
|
969
|
+
* @param {number} coordinates[].y1 - The y-coordinate of the starting point.
|
970
|
+
* @param {number} coordinates[].y2 - The y-coordinate of the ending point.
|
971
|
+
*/
|
972
|
+
verifyCorrectLineSegmentOnVerticalNumberLinePreviewTab: (range, coordinates) => {
|
973
|
+
coordinates.forEach(({ y1, y2 }) => {
|
974
|
+
numberLinePage.numberLinePreviewTab()
|
975
|
+
.then(($graphElement) => {
|
976
|
+
const graphWidth = $graphElement[0].clientWidth;
|
977
|
+
const graphHeight = $graphElement[0].clientHeight;
|
978
|
+
const originX = graphWidth / 2;
|
979
|
+
const originY = graphHeight / 2;
|
980
|
+
const y1Pixel = originY - y1 * (graphHeight / range);
|
981
|
+
const y2Pixel = originY - y2 * (graphHeight / range);
|
982
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`[stroke-linecap="butt"][x1*="${Math.floor(originX)}"][y1*="${Math.floor(y1Pixel)}"][x2*="${Math.floor(originX)}"][y2*="${Math.floor(y2Pixel)}"]`)
|
983
|
+
.should('have.css', 'stroke', css.color.correctAnswer);
|
984
|
+
});
|
985
|
+
});
|
986
|
+
},
|
987
|
+
|
988
|
+
/**
|
989
|
+
* Verifies the incorrect line segment on the vertical number line in the preview tab.
|
990
|
+
* @param {number} range - The range of the number line.
|
991
|
+
* @param {Object[]} coordinates - The coordinates of the line segment.
|
992
|
+
* @param {number} coordinates[].y1 - The y-coordinate of the starting point.
|
993
|
+
* @param {number} coordinates[].y2 - The y-coordinate of the ending point.
|
994
|
+
*/
|
995
|
+
verifyIncorrectLineSegmentOnVerticalNumberLinePreviewTab: (range, coordinates) => {
|
996
|
+
coordinates.forEach(({ y1, y2 }) => {
|
997
|
+
numberLinePage.numberLinePreviewTab()
|
998
|
+
.then(($graphElement) => {
|
999
|
+
const graphWidth = $graphElement[0].clientWidth;
|
1000
|
+
const graphHeight = $graphElement[0].clientHeight;
|
1001
|
+
const originX = graphWidth / 2;
|
1002
|
+
const originY = graphHeight / 2;
|
1003
|
+
const y1Pixel = originY - y1 * (graphHeight / range);
|
1004
|
+
const y2Pixel = originY - y2 * (graphHeight / range);
|
1005
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`[stroke-linecap="butt"][x1*="${Math.floor(originX)}"][y1*="${Math.floor(y1Pixel)}"][x2*="${Math.floor(originX)}"][y2*="${Math.floor(y2Pixel)}"]`)
|
1006
|
+
.should('have.css', 'stroke', css.color.incorrectAnswer);
|
1007
|
+
});
|
1008
|
+
});
|
1009
|
+
},
|
1010
|
+
|
1011
|
+
/**
|
1012
|
+
* Verifies that the line segment on the vertical number line does not exist in the preview tab.
|
1013
|
+
* @param {number} range - The range of the number line.
|
1014
|
+
* @param {Object[]} coordinates - The coordinates of the line segment.
|
1015
|
+
* @param {number} coordinates[].y1 - The y-coordinate of the starting point.
|
1016
|
+
* @param {number} coordinates[].y2 - The y-coordinate of the ending point.
|
1017
|
+
*/
|
1018
|
+
verifyLineSegmentOnVerticalNumberLineNotExistPreviewTab: (range, coordinates) => {
|
1019
|
+
coordinates.forEach(({ y1, y2 }) => {
|
1020
|
+
numberLinePage.numberLinePreviewTab()
|
1021
|
+
.then(($graphElement) => {
|
1022
|
+
const graphWidth = $graphElement[0].clientWidth;
|
1023
|
+
const graphHeight = $graphElement[0].clientHeight;
|
1024
|
+
const originX = graphWidth / 2;
|
1025
|
+
const originY = graphHeight / 2;
|
1026
|
+
const y1Pixel = originY - y1 * (graphHeight / range);
|
1027
|
+
const y2Pixel = originY - y2 * (graphHeight / range);
|
1028
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`[stroke-linecap="butt"][x1*="${Math.floor(originX)}"][y1*="${Math.floor(y1Pixel)}"][x2*="${Math.floor(originX)}"][y2*="${Math.floor(y2Pixel)}"]`)
|
1029
|
+
.should('not.exist');
|
1030
|
+
});
|
1031
|
+
});
|
1032
|
+
},
|
1033
|
+
|
1034
|
+
/**
|
1035
|
+
* Verifies that the line segment on the vertical number line exists in the correct answer section.
|
1036
|
+
* @param {number} range - The range of the number line.
|
1037
|
+
* @param {Object[]} coordinates - The coordinates of the line segment.
|
1038
|
+
* @param {number} coordinates[].y1 - The y-coordinate of the starting point.
|
1039
|
+
* @param {number} coordinates[].y2 - The y-coordinate of the ending point.
|
1040
|
+
*/
|
1041
|
+
verifyLineSegmentOnVerticalNumberLineCorrectAnswerSection: (range, coordinates) => {
|
1042
|
+
coordinates.forEach(({ y1, y2 }) => {
|
1043
|
+
numberLinePage.numberLineCorrectAnswerSection()
|
1044
|
+
.then(($graphElement) => {
|
1045
|
+
const graphWidth = $graphElement[0].clientWidth;
|
1046
|
+
const graphHeight = $graphElement[0].clientHeight;
|
1047
|
+
const originX = graphWidth / 2;
|
1048
|
+
const originY = graphHeight / 2;
|
1049
|
+
const y1Pixel = originY - y1 * (graphHeight / range);
|
1050
|
+
const y2Pixel = originY - y2 * (graphHeight / range);
|
1051
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(1).find(`[stroke-linecap="butt"][x1*="${Math.floor(originX)}"][y1*="${Math.floor(y1Pixel)}"][x2*="${Math.floor(originX)}"][y2*="${Math.floor(y2Pixel)}"]`)
|
1052
|
+
.should('be.visible');
|
1053
|
+
});
|
1054
|
+
});
|
1055
|
+
},
|
1056
|
+
|
1057
|
+
/**
|
1058
|
+
* Verifies that the line segment on the vertical number line in the correct answer section has the correct appearance.
|
1059
|
+
* @param {number} range - The range of the number line.
|
1060
|
+
* @param {Object[]} coordinates - The coordinates of the line segment.
|
1061
|
+
* @param {number} coordinates[].y1 - The y-coordinate of the starting point.
|
1062
|
+
* @param {number} coordinates[].y2 - The y-coordinate of the ending point.
|
1063
|
+
*/
|
1064
|
+
verifyCorrectLineSegmentOnVerticalNumberLineCorrectAnswerSection: (range, coordinates) => {
|
1065
|
+
coordinates.forEach(({ y1, y2 }) => {
|
1066
|
+
numberLinePage.numberLineCorrectAnswerSection()
|
1067
|
+
.then(($graphElement) => {
|
1068
|
+
const graphWidth = $graphElement[0].clientWidth;
|
1069
|
+
const graphHeight = $graphElement[0].clientHeight;
|
1070
|
+
const originX = graphWidth / 2;
|
1071
|
+
const originY = graphHeight / 2;
|
1072
|
+
const y1Pixel = originY - y1 * (graphHeight / range);
|
1073
|
+
const y2Pixel = originY - y2 * (graphHeight / range);
|
1074
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(1).find(`[stroke-linecap="butt"][x1*="${Math.floor(originX)}"][y1*="${Math.floor(y1Pixel)}"][x2*="${Math.floor(originX)}"][y2*="${Math.floor(y2Pixel)}"]`)
|
1075
|
+
.should('have.css', 'stroke', css.color.correctAnswer);
|
1076
|
+
});
|
1077
|
+
});
|
1078
|
+
},
|
1079
|
+
|
1080
|
+
/**
|
1081
|
+
* Verifies that the line segment on the vertical number line does not exist in the correct answer section.
|
1082
|
+
* @param {number} range - The range of the number line.
|
1083
|
+
* @param {Object[]} coordinates - The coordinates of the line segment.
|
1084
|
+
* @param {number} coordinates[].y1 - The y-coordinate of the starting point.
|
1085
|
+
* @param {number} coordinates[].y2 - The y-coordinate of the ending point.
|
1086
|
+
*/
|
1087
|
+
verifyLineSegmentOnVerticalNumberLineNotExistCorrectAnswerSection: (range, coordinates) => {
|
1088
|
+
coordinates.forEach(({ y1, y2 }) => {
|
1089
|
+
numberLinePage.numberLineCorrectAnswerSection()
|
1090
|
+
.then(($graphElement) => {
|
1091
|
+
const graphWidth = $graphElement[0].clientWidth;
|
1092
|
+
const graphHeight = $graphElement[0].clientHeight;
|
1093
|
+
const originX = graphWidth / 2;
|
1094
|
+
const originY = graphHeight / 2;
|
1095
|
+
const y1Pixel = originY - y1 * (graphHeight / range);
|
1096
|
+
const y2Pixel = originY - y2 * (graphHeight / range);
|
1097
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(1).find(`svg [stroke-linecap="butt"][x1*="${Math.floor(originX)}"][y1*="${Math.floor(y1Pixel)}"][x2*="${Math.floor(originX)}"][y2*="${Math.floor(y2Pixel)}"]`)
|
1098
|
+
.should('not.exist');
|
1099
|
+
});
|
1100
|
+
});
|
1101
|
+
},
|
1102
|
+
|
1103
|
+
/**
|
1104
|
+
* Verifies the ray on the vertical number line in the specify correct answer section.
|
1105
|
+
* @param {string} direction - The direction of the ray ('left' or 'right').
|
1106
|
+
* @param {number} range - The range of the number line.
|
1107
|
+
* @param {number} startingPoint - The starting point of the ray.
|
1108
|
+
*/
|
1109
|
+
verifyRayOnVerticalNumberLineSpecifyCorrectAnswer: (direction, range, startingPoint) => {
|
1110
|
+
numberLinePage.numberLineSpecifyCorrectAnswer().then(($graphElement) => {
|
1111
|
+
const graphWidth = $graphElement[0].clientWidth;
|
1112
|
+
const graphHeight = $graphElement[0].clientHeight;
|
1113
|
+
const originX = graphWidth / 2;
|
1114
|
+
const originY = graphHeight / 2;
|
1115
|
+
const y1Pixel = originY - startingPoint * (graphHeight / range);
|
1116
|
+
const rayArrowHeight = 42;
|
1117
|
+
const y2Pixel = direction === 'up' ? rayArrowHeight : graphHeight - rayArrowHeight;
|
1118
|
+
cy.get(`.ngie-accordion .ngie-jxgbox svg [stroke-linecap="butt"][x1*="${Math.floor(originX)}"][y1*="${Math.floor(y1Pixel)}"][x2*="${Math.floor(originX)}"][y2*="${Math.floor(y2Pixel)}"]`)
|
1119
|
+
.should('be.visible');
|
1120
|
+
});
|
1121
|
+
},
|
1122
|
+
|
1123
|
+
/**
|
1124
|
+
* Verifies the ray on the vertical number line preview tab.
|
1125
|
+
* @param {string} direction - The direction of the ray ('up' or 'down').
|
1126
|
+
* @param {number} range - The range of the number line.
|
1127
|
+
* @param {number} startingPoint - The starting point of the ray.
|
1128
|
+
*/
|
1129
|
+
verifyRayOnVerticalNumberLinePreviewTab: (direction, range, startingPoint) => {
|
1130
|
+
numberLinePage.numberLinePreviewTab().then(($graphElement) => {
|
1131
|
+
const graphWidth = $graphElement[0].clientWidth;
|
1132
|
+
const graphHeight = $graphElement[0].clientHeight;
|
1133
|
+
const originX = graphWidth / 2;
|
1134
|
+
const originY = graphHeight / 2;
|
1135
|
+
const y1Pixel = originY - startingPoint * (graphHeight / range);
|
1136
|
+
const rayArrowHeight = 42;
|
1137
|
+
const y2Pixel = direction === 'up' ? rayArrowHeight : graphHeight - rayArrowHeight;
|
1138
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`[stroke-linecap="butt"][x1*="${Math.floor(originX)}"][y1*="${Math.floor(y1Pixel)}"][x2*="${Math.floor(originX)}"][y2*="${Math.floor(y2Pixel)}"]`)
|
1139
|
+
.should('be.visible');
|
1140
|
+
});
|
1141
|
+
},
|
1142
|
+
|
1143
|
+
/**
|
1144
|
+
* Verifies the correct ray on the vertical number line preview tab.
|
1145
|
+
* @param {string} direction - The direction of the ray ('up' or 'down').
|
1146
|
+
* @param {number} range - The range of the number line.
|
1147
|
+
* @param {number} startingPoint - The starting point of the ray.
|
1148
|
+
*/
|
1149
|
+
verifyCorrectRayOnVerticalNumberLinePreviewTab: (direction, range, startingPoint) => {
|
1150
|
+
numberLinePage.numberLinePreviewTab()
|
1151
|
+
.then(($graphElement) => {
|
1152
|
+
const graphWidth = $graphElement[0].clientWidth;
|
1153
|
+
const graphHeight = $graphElement[0].clientHeight;
|
1154
|
+
const originX = graphWidth / 2;
|
1155
|
+
const originY = graphHeight / 2;
|
1156
|
+
const y1Pixel = originY - startingPoint * (graphHeight / range);
|
1157
|
+
const rayArrowHeight = 42;
|
1158
|
+
const y2Pixel = direction === "up" ? rayArrowHeight : graphHeight - rayArrowHeight;
|
1159
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`[stroke-linecap="butt"][x1*="${Math.floor(originX)}"][y1*="${Math.floor(y1Pixel)}"][x2*="${Math.floor(originX)}"][y2*="${Math.floor(y2Pixel)}"]`)
|
1160
|
+
.should('have.css', 'stroke', css.color.correctAnswer);
|
1161
|
+
});
|
1162
|
+
},
|
1163
|
+
|
1164
|
+
/**
|
1165
|
+
* Verifies the incorrect ray on the vertical number line preview tab.
|
1166
|
+
* @param {string} direction - The direction of the ray ('up' or 'down').
|
1167
|
+
* @param {number} range - The range of the number line.
|
1168
|
+
* @param {number} startingPoint - The starting point of the ray.
|
1169
|
+
*/
|
1170
|
+
verifyIncorrectRayOnVerticalNumberLinePreviewTab: (direction, range, startingPoint) => {
|
1171
|
+
numberLinePage.numberLinePreviewTab().then(($graphElement) => {
|
1172
|
+
const graphWidth = $graphElement[0].clientWidth;
|
1173
|
+
const graphHeight = $graphElement[0].clientHeight;
|
1174
|
+
const originX = graphWidth / 2;
|
1175
|
+
const originY = graphHeight / 2;
|
1176
|
+
const y1Pixel = originY - startingPoint * (graphHeight / range);
|
1177
|
+
const rayArrowHeight = 42;
|
1178
|
+
const y2Pixel = direction === "up" ? rayArrowHeight : graphHeight - rayArrowHeight;
|
1179
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`[stroke-linecap="butt"][x1*="${Math.floor(originX)}"][y1*="${Math.floor(y1Pixel)}"][x2*="${Math.floor(originX)}"][y2*="${Math.floor(y2Pixel)}"]`)
|
1180
|
+
.should('have.css', 'stroke', css.color.incorrectAnswer);
|
1181
|
+
});
|
1182
|
+
},
|
1183
|
+
|
1184
|
+
/**
|
1185
|
+
* Verifies the ray on the vertical number line does not exist on the preview tab.
|
1186
|
+
* @param {string} direction - The direction of the ray ('up' or 'down').
|
1187
|
+
* @param {number} range - The range of the number line.
|
1188
|
+
* @param {number} startingPoint - The starting point of the ray.
|
1189
|
+
*/
|
1190
|
+
verifyRayOnVerticalNumberLineNotExistPreviewTab: (direction, range, startingPoint) => {
|
1191
|
+
numberLinePage.numberLinePreviewTab().then(($graphElement) => {
|
1192
|
+
const graphWidth = $graphElement[0].clientWidth;
|
1193
|
+
const graphHeight = $graphElement[0].clientHeight;
|
1194
|
+
const originX = graphWidth / 2;
|
1195
|
+
const originY = graphHeight / 2;
|
1196
|
+
const y1Pixel = originY - startingPoint * (graphHeight / range);
|
1197
|
+
const rayArrowHeight = 42;
|
1198
|
+
const y2Pixel = direction === "up" ? rayArrowHeight : graphHeight - rayArrowHeight;
|
1199
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find(`[stroke-linecap="butt"][x1*="${Math.floor(originX)}"][y1*="${Math.floor(y1Pixel)}"][x2*="${Math.floor(originX)}"][y2*="${Math.floor(y2Pixel)}"]`)
|
1200
|
+
.should('not.exist');
|
1201
|
+
});
|
1202
|
+
},
|
1203
|
+
|
1204
|
+
/**
|
1205
|
+
* Verifies the ray on the vertical number line in the correct answer section.
|
1206
|
+
* @param {string} direction - The direction of the ray ('up' or 'down').
|
1207
|
+
* @param {number} range - The range of the number line.
|
1208
|
+
* @param {number} startingPoint - The starting point of the ray.
|
1209
|
+
*/
|
1210
|
+
verifyRayOnVerticalNumberLineCorrectAnswerSection: (direction, range, startingPoint) => {
|
1211
|
+
numberLinePage.numberLineCorrectAnswerSection().then(($graphElement) => {
|
1212
|
+
const graphWidth = $graphElement[0].clientWidth;
|
1213
|
+
const graphHeight = $graphElement[0].clientHeight;
|
1214
|
+
const originX = graphWidth / 2;
|
1215
|
+
const originY = graphHeight / 2;
|
1216
|
+
const y1Pixel = originY - startingPoint * (graphHeight / range);
|
1217
|
+
const rayArrowHeight = 42;
|
1218
|
+
const y2Pixel = direction === "up" ? rayArrowHeight : graphHeight - rayArrowHeight;
|
1219
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(1).find(`[stroke-linecap="butt"][x1*="${Math.floor(originX)}"][y1*="${Math.floor(y1Pixel)}"][x2*="${Math.floor(originX)}"][y2*="${Math.floor(y2Pixel)}"]`)
|
1220
|
+
.should('be.visible');
|
1221
|
+
});
|
1222
|
+
},
|
1223
|
+
|
1224
|
+
/**
|
1225
|
+
* Verifies the correct ray on the vertical number line in the correct answer section.
|
1226
|
+
* @param {string} direction - The direction of the ray ('up' or 'down').
|
1227
|
+
* @param {number} range - The range of the number line.
|
1228
|
+
* @param {number} startingPoint - The starting point of the ray.
|
1229
|
+
*/
|
1230
|
+
verifyCorrectRayOnVerticalNumberLineCorrectAnswerSection: (direction, range, startingPoint) => {
|
1231
|
+
numberLinePage.numberLineCorrectAnswerSection().then(($graphElement) => {
|
1232
|
+
const graphWidth = $graphElement[0].clientWidth;
|
1233
|
+
const graphHeight = $graphElement[0].clientHeight;
|
1234
|
+
const originX = graphWidth / 2;
|
1235
|
+
const originY = graphHeight / 2;
|
1236
|
+
const y1Pixel = originY - startingPoint * (graphHeight / range);
|
1237
|
+
const rayArrowHeight = 42;
|
1238
|
+
const y2Pixel = direction === "up" ? rayArrowHeight : graphHeight - rayArrowHeight;
|
1239
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(1).find(`[stroke-linecap="butt"][x1*="${Math.floor(originX)}"][y1*="${Math.floor(y1Pixel)}"][x2*="${Math.floor(originX)}"][y2*="${Math.floor(y2Pixel)}"]`)
|
1240
|
+
.should('have.css', 'stroke', css.color.correctAnswer);
|
1241
|
+
});
|
1242
|
+
},
|
1243
|
+
|
1244
|
+
/**
|
1245
|
+
* Verifies that the ray does not exist on the vertical number line in the correct answer section.
|
1246
|
+
* @param {string} direction - The direction of the ray ('up' or 'down').
|
1247
|
+
* @param {number} range - The range of the number line.
|
1248
|
+
* @param {number} startingPoint - The starting point of the ray.
|
1249
|
+
*/
|
1250
|
+
verifyRayOnVerticalNumberLineNotExistCorrectAnswerSection: (direction, range, startingPoint) => {
|
1251
|
+
numberLinePage.numberLineCorrectAnswerSection().then(($graphElement) => {
|
1252
|
+
const graphWidth = $graphElement[0].clientWidth;
|
1253
|
+
const graphHeight = $graphElement[0].clientHeight;
|
1254
|
+
const originX = graphWidth / 2;
|
1255
|
+
const originY = graphHeight / 2;
|
1256
|
+
const y1Pixel = originY - startingPoint * (graphHeight / range);
|
1257
|
+
const rayArrowHeight = 42;
|
1258
|
+
const y2Pixel = direction === "up" ? rayArrowHeight : graphHeight - rayArrowHeight;
|
1259
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(1).find(`svg [stroke-linecap="butt"][x1*="${Math.floor(originX)}"][y1*="${Math.floor(y1Pixel)}"][x2*="${Math.floor(originX)}"][y2*="${Math.floor(y2Pixel)}"]`)
|
1260
|
+
.should('not.exist');
|
1261
|
+
});
|
1262
|
+
},
|
1263
|
+
|
1264
|
+
/**
|
1265
|
+
* Verifies the display numbers orientation in the specify correct answer section of the number line.
|
1266
|
+
* @param {string} numberLineOrientation - The orientation of the number line ('Horizontal' or 'Vertical').
|
1267
|
+
* @param {string} numberOrientation - The orientation of the numbers ('Below' or 'Left').
|
1268
|
+
* @throws {Error} Thrown if the number line orientation is invalid.
|
1269
|
+
*/
|
1270
|
+
verifyDisplayNumbersOrientationSpecifyCorrectAnswerSection: (numberLineOrientation, numberOrientation) => {
|
1271
|
+
let property, value;
|
1272
|
+
switch (numberLineOrientation) {
|
1273
|
+
case 'Horizontal':
|
1274
|
+
property = numberOrientation === 'Below' ? 'top' : 'bottom';
|
1275
|
+
value = '83px';
|
1276
|
+
break;
|
1277
|
+
case 'Vertical':
|
1278
|
+
property = numberOrientation === 'Left of' ? 'right' : 'left';
|
1279
|
+
value = '85px';
|
1280
|
+
break;
|
1281
|
+
default:
|
1282
|
+
throw new Error('Invalid Number line orientation');
|
1283
|
+
}
|
1284
|
+
numberLineCommonComponent.numberLineSpecifyCorrectAnswer()
|
1285
|
+
.parents('.ngie-jxgbox')
|
1286
|
+
.find('.number-line-tick-font')
|
1287
|
+
.eq(0)
|
1288
|
+
.should('have.css', property, value);
|
1289
|
+
},
|
1290
|
+
|
1291
|
+
/**
|
1292
|
+
* Verifies the display numbers orientation in the number line section.
|
1293
|
+
* @param {string} numberLineOrientation - The orientation of the number line ('Horizontal' or 'Vertical').
|
1294
|
+
* @param {string} numberOrientation - The orientation of the numbers ('Below' or 'Left').
|
1295
|
+
* @throws {Error} Thrown if the number line orientation is invalid.
|
1296
|
+
*/
|
1297
|
+
verifyDisplayNumbersOrientationPreviewTab: (numberLineOrientation, numberOrientation) => {
|
1298
|
+
let property, value;
|
1299
|
+
switch (numberLineOrientation) {
|
1300
|
+
case 'Horizontal':
|
1301
|
+
property = numberOrientation === 'Below' ? 'top' : 'bottom';
|
1302
|
+
value = '83px';
|
1303
|
+
break;
|
1304
|
+
case 'Vertical':
|
1305
|
+
property = numberOrientation === 'Left of' ? 'right' : 'left';
|
1306
|
+
value = '85px';
|
1307
|
+
break;
|
1308
|
+
default:
|
1309
|
+
throw new Error('Invalid Number line orientation');
|
1310
|
+
}
|
1311
|
+
|
1312
|
+
numberLineCommonComponent.numberLinePreviewTab()
|
1313
|
+
.parents('.ngie-jxgbox')
|
1314
|
+
.find('.number-line-tick-font')
|
1315
|
+
.eq(0)
|
1316
|
+
.should('have.css', property, value);
|
1317
|
+
},
|
1318
|
+
|
1319
|
+
/**
|
1320
|
+
* Verifies the display numbers orientation in the number line section.
|
1321
|
+
* @param {string} numberLineOrientation - The orientation of the number line ('Horizontal' or 'Vertical').
|
1322
|
+
* @param {string} numberOrientation - The orientation of the numbers ('Below' or 'Left').
|
1323
|
+
* @throws {Error} Thrown if the number line orientation is invalid.
|
1324
|
+
*/
|
1325
|
+
verifyDisplayNumbersOrientationNumberLineSection: (numberLineOrientation, numberOrientation) => {
|
1326
|
+
let property, value;
|
1327
|
+
switch (numberLineOrientation) {
|
1328
|
+
case 'Horizontal':
|
1329
|
+
property = numberOrientation === 'Below' ? 'top' : 'bottom';
|
1330
|
+
value = '83px';
|
1331
|
+
break;
|
1332
|
+
case 'Vertical':
|
1333
|
+
property = numberOrientation === 'Left of' ? 'right' : 'left';
|
1334
|
+
value = '85px';
|
1335
|
+
break;
|
1336
|
+
default:
|
1337
|
+
throw new Error('Invalid Number line orientation');
|
1338
|
+
}
|
1339
|
+
layoutSectionComponent.numberLineNumberLineSection()
|
1340
|
+
.parents('.ngie-jxgbox')
|
1341
|
+
.find('.number-line-tick-font')
|
1342
|
+
.eq(0)
|
1343
|
+
.should('have.css', property, value);
|
1344
|
+
},
|
773
1345
|
}
|
774
1346
|
|
1347
|
+
|
775
1348
|
const tests = {
|
776
1349
|
...resetPopupComponent.tests,
|
777
1350
|
...toolSettingsComponent.tests,
|
@@ -786,6 +1359,8 @@ const tests = {
|
|
786
1359
|
...defaultToolDropdown.tests,
|
787
1360
|
...scoringSectionBaseEditTab.tests,
|
788
1361
|
...autoScoredScoringSectionMultiResponseType.tests,
|
1362
|
+
...layoutSectionComponent.tests,
|
1363
|
+
...numberLineCommonComponent.tests,
|
789
1364
|
|
790
1365
|
verifyContentsOfSpecifyCorrectAnswerSection: () => {
|
791
1366
|
it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
|
@@ -839,8 +1414,51 @@ const tests = {
|
|
839
1414
|
it('Accessibility of \'Correct\' accordion contents', { tags: 'a11y' }, () => {
|
840
1415
|
cy.checkAccessibility(numberLinePage.numberLineSpecifyCorrectAnswer());
|
841
1416
|
});
|
842
|
-
}
|
1417
|
+
},
|
1418
|
+
|
1419
|
+
/**
|
1420
|
+
* Verifies the functionality of the number line section in the edit tab.
|
1421
|
+
* @param {string} orientation - The orientation of the number line ('Horizontal' or 'Vertical').
|
1422
|
+
*/
|
1423
|
+
verifyDisplayNumberSettingsFunctionalitySpecifyCorrectAnswerSection: (orientation) => {
|
1424
|
+
const displayNumbersOptions = (orientation === "Horizontal") ? ["Below line", "Above line"] : ["Left of line", "Right of line"];
|
1425
|
+
const direction = (orientation === "Horizontal") ? "Below" : "Left of";
|
1426
|
+
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.`, () => {
|
1427
|
+
numberLineCommonComponent.steps.verifyDisplayNumbersToggleButtonSelected(displayNumbersOptions[0]);
|
1428
|
+
numberLinePage.steps.verifyDisplayNumbersOrientationNumberLineSection(orientation, direction);
|
1429
|
+
numberLinePage.steps.verifyDisplayNumbersOrientationSpecifyCorrectAnswerSection(orientation, direction);
|
1430
|
+
});
|
1431
|
+
|
1432
|
+
const oppositeDirection = (orientation === "Horizontal") ? "Above" : "Right of";
|
1433
|
+
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.`, () => {
|
1434
|
+
numberLineCommonComponent.steps.selectDisplayNumbersToggleButton(displayNumbersOptions[1]);
|
1435
|
+
numberLinePage.steps.verifyDisplayNumbersOrientationNumberLineSection(orientation, oppositeDirection);
|
1436
|
+
numberLinePage.steps.verifyDisplayNumbersOrientationSpecifyCorrectAnswerSection(orientation, oppositeDirection);
|
1437
|
+
});
|
1438
|
+
},
|
1439
|
+
|
1440
|
+
/**
|
1441
|
+
* Verifies the functionality of the number line section in the preview tab.
|
1442
|
+
* @param {string} orientation - The orientation of the number line ('Horizontal' or 'Vertical').
|
1443
|
+
*/
|
1444
|
+
verifyDisplayNumberSettingsFunctionalityPreviewTab: (orientation) => {
|
1445
|
+
const displayNumbersOptions = (orientation === "Horizontal") ? ["Below line", "Above line"] : ["Left of line", "Right of line"];
|
1446
|
+
const direction = (orientation === "Horizontal") ? "Below" : "Left of";
|
1447
|
+
it(`When ${displayNumbersOptions[0]} is selected then labels should be displayed ${direction} number line in the preview tab.`, () => {
|
1448
|
+
numberLineCommonComponent.steps.switchToEditTab();
|
1449
|
+
numberLineCommonComponent.steps.verifyDisplayNumbersToggleButtonSelected(displayNumbersOptions[0]);
|
1450
|
+
numberLineCommonComponent.steps.switchToPreviewTab();
|
1451
|
+
numberLinePage.steps.verifyDisplayNumbersOrientationPreviewTab(orientation, direction);
|
1452
|
+
});
|
843
1453
|
|
1454
|
+
const oppositeDirection = (orientation === "Horizontal") ? "Above" : "Right of";
|
1455
|
+
it(`When user selects ${displayNumbersOptions[1]} then labels should be displayed ${oppositeDirection} number line in the preview tab.`, () => {
|
1456
|
+
numberLineCommonComponent.steps.switchToEditTab();
|
1457
|
+
numberLineCommonComponent.steps.selectDisplayNumbersToggleButton(displayNumbersOptions[1]);
|
1458
|
+
numberLineCommonComponent.steps.switchToPreviewTab();
|
1459
|
+
numberLinePage.steps.verifyDisplayNumbersOrientationPreviewTab(orientation, oppositeDirection);
|
1460
|
+
});
|
1461
|
+
}
|
844
1462
|
}
|
845
1463
|
|
846
1464
|
export const numberLinePage = {
|