itemengine-cypress-automation 1.0.342-regressionFixes18thMarch-b97f3ea.0 → 1.0.342
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +4 -16
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/BrowseItems/browseReviewItems.js +398 -0
- package/cypress/e2e/ILC/BrowseItems/browseReviewItemsMobileView.js +329 -0
- package/cypress/e2e/ILC/BrowseItems/browseThinkSphereItems.js +260 -0
- package/cypress/e2e/ILC/BrowseItems/browseThinkSphereItemsMobileView.js +368 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +33 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightBasic.js +2 -2
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +1 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +1 -0
- package/cypress/e2e/ILC/ChartsBar/editTabBasicSection.js +37 -0
- package/cypress/e2e/ILC/ChartsBar/headerSection.js +50 -2
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightBasic.js +1 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +1 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +1 -0
- package/cypress/e2e/ILC/ChartsLine/headerSection.js +18 -1
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerEditTabAddFeatureRadioButton.js +2 -3
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerEditTabAddTranscriptRadioButton .js +0 -2
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerEditTabStudentViewSettings.js +3 -3
- package/cypress/e2e/ILC/CkEditorEquationEditor/equationEditorBasicFile.js +4 -4
- package/cypress/e2e/ILC/CkEditorInsertImage/imageInfo.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/headerSection.js +2 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/manuallyAndNonScoredScoringEditTab.js +4 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +3 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationLayoutProperties.js +3 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +1 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +2 -8
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +1 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabBasicSection.js +3 -3
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +3 -4
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +1 -1
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +0 -1
- package/cypress/e2e/ILC/EssayResponse/editTabBasicSections.js +23 -37
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/blankResponseScoring.js +29 -25
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +210 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/dropzoneStyleAndLayoutCustomization.js +6 -3
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/headerSection.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +201 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAndDropdownMenuSection.js +4 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/blankResponseScoring.js +18 -20
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/allOrNothingForAllViews.smoke.js +216 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/headerSection.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +5 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCustomization.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/blankResponseScoring.js +21 -30
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +211 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownAndDropdownMenuSection.js +4 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/blankResponseScoring.js +23 -30
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +213 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +2 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +2 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/blankResponseScoring.js +25 -30
- package/cypress/e2e/ILC/FillInTheGapsTextNew/allOrNothingForAllViews.smoke.js +207 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +2 -10
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +2 -0
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +72 -0
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +38 -0
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +38 -0
- package/cypress/e2e/ILC/Graphing/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +86 -0
- package/cypress/e2e/ILC/Graphing/checkAddAlternativeButton.js +35 -0
- package/cypress/e2e/ILC/Graphing/editQuestion.smoke.js +28 -0
- package/cypress/e2e/ILC/Graphing/editTabBasicSection.js +38 -0
- package/cypress/e2e/ILC/Graphing/headerSection.js +36 -4
- package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +6 -3
- package/cypress/e2e/ILC/GridFill/addAlternateButton.js +40 -0
- package/cypress/e2e/ILC/GridFill/customizeLayoutFillImageBackgroundImage.js +5 -6
- package/cypress/e2e/ILC/GridFill/customizeLayoutSectionShadeCellsGridBorders.js +2 -0
- package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +3 -0
- package/cypress/e2e/ILC/GridFill/headerSection.js +1 -3
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +39 -0
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +39 -0
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +39 -0
- package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountAllOrNothingCorrectPointsGreaterThanAlternativePoints.js +37 -0
- package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountallOrNothingCorrectPointsEqualToAlternativePoints.js +39 -0
- package/cypress/e2e/ILC/GridFill/scoring/cellshadeCountAllOrNothingAlternativePointsGreaterThanCorrectPoints.js +36 -0
- package/cypress/e2e/ILC/GridFill/scoring/checkLabelSaveAsYouGo.js +75 -0
- package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +2 -4
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsScoring.js +2 -1
- package/cypress/e2e/ILC/ImageHighlight/headerSection.js +2 -1
- package/cypress/e2e/ILC/ImageHighlight/studentViewSettings.js +2 -2
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +24 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +24 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +24 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +86 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/checkAddAlternativeButton.js +35 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/editTabBasicSection.js +24 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/headerSection.js +108 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/specifyCorrectAnswerSection.js +6 -10
- package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/specifyCorrectAnswerSection.js +2 -1
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +52 -0
- package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +23 -0
- package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +35 -9
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +41 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +30 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +50 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +101 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/checkAddAlternativeButton.js +38 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabBasicSection.js +24 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabScoring.js +4 -1
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/headerSection.js +35 -1
- package/cypress/e2e/ILC/Matching/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +98 -0
- package/cypress/e2e/ILC/Matching/checkAlternativeButton.js +38 -0
- package/cypress/e2e/ILC/Matching/clickAndDrop.js +3 -5
- package/cypress/e2e/ILC/Matching/draggableOptions.js +4 -0
- package/cypress/e2e/ILC/Matching/editTabBasicSection.js +41 -0
- package/cypress/e2e/ILC/Matching/headerSection.js +36 -11
- package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +2 -15
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingBasicForAllViews.smoke.js +226 -0
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +6 -3
- package/cypress/e2e/ILC/MultipleSelection/checkScoringLabelBannerAndCorrectAnswer.js +3 -1
- package/cypress/e2e/ILC/MultipleSelection/editTabScoringSection.js +6 -3
- package/cypress/e2e/ILC/MultipleSelection/headerSection.js +1 -0
- package/cypress/e2e/ILC/MultipleSelection/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsWithAlternativeAnswer.js +69 -64
- package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsWithAlternativeAnswer.js +6 -4
- package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +220 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabScoringSection.js +11 -5
- package/cypress/e2e/ILC/MultipleSelectionGridNew/styleAndLayoutCustomizationLayoutProperties.js +4 -2
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +79 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +42 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +42 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +73 -0
- package/cypress/e2e/ILC/NumberLine/checkAddAlternativeButton.js +32 -0
- package/cypress/e2e/ILC/NumberLine/editTabSection.js +38 -0
- package/cypress/e2e/ILC/NumberLine/headerSection.js +33 -4
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +81 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +43 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +43 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +76 -0
- package/cypress/e2e/ILC/NumberLineLabel/additionalSettingsBasic.js +1 -1
- package/cypress/e2e/ILC/NumberLineLabel/checkAddAlternativeButton.js +34 -0
- package/cypress/e2e/ILC/NumberLineLabel/editTabSection.js +38 -0
- package/cypress/e2e/ILC/NumberLineLabel/headerSection.js +37 -5
- package/cypress/e2e/ILC/NumberLineLabel/manuallyAndNonScoredEditTab.js +2 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +31 -48
- package/cypress/e2e/ILC/ShortTextResponseNew/headerSection.js +2 -4
- package/cypress/e2e/ILC/SingleSelection/allOrNothingBasicForAllViews.smoke.js +192 -0
- package/cypress/e2e/ILC/SingleSelection/checkScoringLabelBannerAndCorrectAnswer.js +3 -1
- package/cypress/e2e/ILC/SingleSelection/headerSection.js +1 -0
- package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +94 -88
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +3 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +209 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabScoringSection.js +5 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/styleAndLayoutCustomizationLayoutProperties.js +8 -2
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +84 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +84 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +63 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +62 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +62 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +63 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/blankResponseScoring.js +2 -8
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +0 -8
- package/cypress/e2e/ILC/TextEntryMath/customSettings.js +4 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +27 -3
- package/cypress/e2e/ILC/TextEntryMath/equationEditor.smoke.js +8 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.smoke.js +86 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.smoke.js +97 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.smoke.js +97 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.smoke.js +167 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.smoke.js +167 -2
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.smoke.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/headerSection.js +43 -0
- package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +10 -7
- package/cypress/e2e/ILC/TextEntryMathWithImage/styleAndLayoutCustomization.js +1 -1
- package/cypress/e2e/ILC/TextSelection/ScoringParagraph/checkScoringLabelBannerAndCorrectAnswerSection.js +0 -1
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +7 -12
- package/cypress/e2e/ILC/ThinkSphere/additionalSettings.js +52 -0
- package/cypress/e2e/ILC/ThinkSphere/createReviewItem.js +112 -0
- package/cypress/e2e/ILC/ThinkSphere/editTabBasicSection.js +561 -0
- package/cypress/e2e/ILC/ThinkSphere/editThinkSphereQuestion.smoke.js +185 -0
- package/cypress/e2e/ILC/ThinkSphere/equationEditorCreateCustomCategory.smoke.js +417 -0
- package/cypress/e2e/ILC/ThinkSphere/equationEditorEditCategoryFlyOut.js +289 -0
- package/cypress/e2e/ILC/ThinkSphere/headerSection.js +53 -0
- package/cypress/e2e/ILC/ThinkSphere/planPhase.js +581 -0
- package/cypress/e2e/ILC/ThinkSphere/previewTabPlanSection.js +541 -0
- package/cypress/e2e/ILC/ThinkSphere/solvePhase.js +296 -0
- package/cypress/e2e/ILC/ToolAudioPlayerNew/headerSection.js +1 -1
- package/cypress/e2e/ILC/UploadResponse/editTabBasicSection.js +34 -0
- package/cypress/e2e/ILC/UploadResponse/headerSection.js +38 -1
- package/cypress/e2e/ILC/VideoResponseNew/editTabBasicSection.js +14 -29
- package/cypress/e2e/ILC/chartsDotsPlot/headerSection.js +16 -1
- package/cypress/e2e/Sessions/fetchResponses.js +3 -3
- package/cypress/e2e/Sessions/scores.js +9 -5
- package/cypress/e2e/applitools.config.js +3 -3
- package/cypress/fixtures/theme/ilc.json +14 -1
- package/cypress/fixtures/uploads/sample.webm +0 -0
- package/cypress/fixtures/uploads/sample.wmv +0 -0
- package/cypress/fixtures/uploads/sample20MB.mp4 +0 -0
- package/cypress/fixtures/uploads/sample2MB.mp4 +0 -0
- package/cypress/fixtures/uploads/sample2MB_2.mp4 +0 -0
- package/cypress/fixtures/uploads/sample30MB.mp4 +0 -0
- package/cypress/pages/audioPlayerPage.js +22 -22
- package/cypress/pages/chartsBarPage.js +20 -0
- package/cypress/pages/components/additionalSettingsPanel.js +3 -2
- package/cypress/pages/components/autoScoredScoringPreviewTab.js +7 -1
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +2 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +16 -28
- package/cypress/pages/components/backgroundImageUploadComponent.js +32 -25
- package/cypress/pages/components/browseItemsPage.js +998 -7
- package/cypress/pages/components/ckEditorAudioPlayerComponent.js +1 -1
- package/cypress/pages/components/ckEditorEquationEditorComponent.js +4 -4
- package/cypress/pages/components/ckEditorInsertImageComponent.js +3 -3
- package/cypress/pages/components/ckEditorLinkComponent.js +3 -3
- package/cypress/pages/components/commonComponents.js +8 -1
- package/cypress/pages/components/createQuestionBasePage.js +8 -1
- package/cypress/pages/components/defaultToolDropdown.js +7 -6
- package/cypress/pages/components/editCategoryFlyout.js +2 -2
- package/cypress/pages/components/equationEditorSectionCommonComponent.js +13 -26
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +3 -3
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +29 -35
- package/cypress/pages/components/gridQuestionCommonComponent.js +8 -37
- package/cypress/pages/components/imageCanvasComponent.js +7 -6
- package/cypress/pages/components/mcqAdditionalSettingsBase.js +4 -0
- package/cypress/pages/components/questionInstructionsComponent.js +7 -0
- package/cypress/pages/components/scoringSectionBaseEditTab.js +14 -12
- package/cypress/pages/desmos3DGraphingPage.js +149 -4
- package/cypress/pages/desmosGeometryPage.js +184 -4
- package/cypress/pages/dialogBoxBase.js +2 -1
- package/cypress/pages/drawingResponsePage.js +16 -15
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +1 -1
- package/cypress/pages/gradingViewPage.js +8 -0
- package/cypress/pages/graphingPage.js +27 -8
- package/cypress/pages/gridFillPage.js +15 -6
- package/cypress/pages/index.js +2 -1
- package/cypress/pages/listOrderingPage.js +32 -1
- package/cypress/pages/matchingPage.js +26 -7
- package/cypress/pages/multipleSelectionPage.js +10 -39
- package/cypress/pages/numberLineLabelPage.js +31 -8
- package/cypress/pages/numberLinePage.js +19 -7
- package/cypress/pages/selectQuestionResourceToolPage.js +8 -2
- package/cypress/pages/singleSelectionPage.js +0 -37
- package/cypress/pages/textEntryMathPage.js +21 -0
- package/cypress/pages/thinkSpherePage.js +1874 -0
- package/cypress/pages/uploadResponsePage.js +2 -1
- package/cypress/pages/videoResponsePage.js +3 -0
- package/cypress/support/commands.js +7 -4
- package/cypress/support/e2e.js +1 -0
- package/cypress/support/helpers/createItem.js +1181 -1
- package/cypress/support/helpers/utilities.js +75 -1
- package/deploy/smoke/deploy.yaml +2 -2
- package/package.json +4 -4
- package/scripts/dataApi.mjs +3 -0
- package/scripts/sorry-cypress.mjs +13 -0
@@ -0,0 +1,1874 @@
|
|
1
|
+
import utilities from "../support/helpers/utilities";
|
2
|
+
import { browseItemsPage } from "../pages/components/browseItemsPage";
|
3
|
+
import { editCategoryFlyout } from "../pages/components/editCategoryFlyout";
|
4
|
+
import { dialogBoxBase } from "../pages/dialogBoxBase";
|
5
|
+
import { backgroundImageUploadComponent, createQuestionBasePage, scoringSectionBaseEditTab, commonComponents, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, toolSettingsComponent, questionInstructionsComponent, studentViewSettingsLabelComponent, defaultToolDropdown, essayResponseCommonComponents, equationEditorSectionCommonComponent, equationEditorFlyout, createCustomCategoryFlyout } from "./components"
|
6
|
+
import { drawingResponsePage } from "./drawingResponsePage";
|
7
|
+
import { optionsWrapperComponent } from "../pages/components/optionsWrapperComponent";
|
8
|
+
import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
|
9
|
+
import { videoResponsePage } from "./videoResponsePage";
|
10
|
+
import { singleSelectionPage } from "./singleSelectionPage";
|
11
|
+
import { essayResponsePage } from "./essayResponsePage";
|
12
|
+
import { equationEditorCategoriesAndSymbols } from "../fixtures/equationEditorCategoriesAndSymbols ";
|
13
|
+
const css = Cypress.env('css');
|
14
|
+
|
15
|
+
const selectors = {
|
16
|
+
...essayResponsePage,
|
17
|
+
...backgroundImageUploadComponent,
|
18
|
+
...questionInstructionsComponent,
|
19
|
+
...commonComponents,
|
20
|
+
...scoringSectionBaseEditTab,
|
21
|
+
...additionalSettingsPanel,
|
22
|
+
...drawingResponsePage,
|
23
|
+
...defaultToolDropdown,
|
24
|
+
...optionsWrapperComponent,
|
25
|
+
...essayResponseCommonComponents,
|
26
|
+
...equationEditorSectionCommonComponent,
|
27
|
+
...selectQuestionResourceToolPage,
|
28
|
+
...browseItemsPage,
|
29
|
+
...videoResponsePage,
|
30
|
+
...dialogBoxBase,
|
31
|
+
...editCategoryFlyout,
|
32
|
+
...createCustomCategoryFlyout,
|
33
|
+
...createQuestionBasePage,
|
34
|
+
|
35
|
+
editQuestionPencil: () => cy.get('[class*="Widgetstyles__HeaderContainer"] button.icon-pencil'),
|
36
|
+
widgetHeaderQuestionTitle: () => cy.get('[class*="Widgetstyles__HeaderContainer"] [class*="Widgetstyles__QuestionTypeText"]'),
|
37
|
+
imageUploadSection: () => cy.get('[class*="TabsComponentstyles__ImageUploadComponentWrapper"]'),
|
38
|
+
addThinkSphereQuestionButton: () => cy.get('.ngie-btn-contained').contains('add ThinkSphere question'),
|
39
|
+
whiteBoardCanvasAndControls: () => cy.get('[class*="WhiteboardPagesstyles__WhiteboardPagesWrapper"]'),
|
40
|
+
whiteBoardImageProperties: () => cy.get('[class*="WhiteBoardImagePropertiesstyles__ImagePropertiesWrapper"]'),
|
41
|
+
whiteBoardImagePropertiesInputTypeFile: () => cy.get('[class*="WhiteBoardImagePropertiesstyles__ImagePropertiesWrapper"] input[type="file"]'),
|
42
|
+
topLeftButton: () => utilities.getNthElement(cy.get('button[class*="WhiteBoardImagePropertiesstyles__StyledButton"]'), 0),
|
43
|
+
centerButton: () => utilities.getNthElement(cy.get('button[class*="WhiteBoardImagePropertiesstyles__StyledButton"]'), 1),
|
44
|
+
topRightButton: () => utilities.getNthElement(cy.get('button[class*="WhiteBoardImagePropertiesstyles__StyledButton"]'), 2),
|
45
|
+
opacityLabel: () => utilities.getNthElement(cy.get('h2[class*="WhiteBoardImagePropertiesstyles__LayoutLabel"]'), 1),
|
46
|
+
imageAlternativeTextLabel: () => cy.get('div[class*="InlineTextFieldWithDebouncestyles__PropertyLabel"]'),
|
47
|
+
imageAlternativeTextInputField: () => cy.get('input.text-field'),
|
48
|
+
imageRadioButton: () => cy.get('div[data-value="image"]'),
|
49
|
+
manageWhiteBoardTitle: () => cy.get('[class*="WhiteboardPagesstyles__HeadingLabel"]'),
|
50
|
+
whiteBoardPreviousButton: () => cy.get('[class*="whiteboard-pagination-prev-button"]'),
|
51
|
+
whiteBoardPageLabel: () => cy.get('[class*="WhiteboardPagesstyles__PageLabel"]'),
|
52
|
+
whiteBoardPageCounter: () => cy.get('[class*="WhiteboardPagesstyles__PageCounter"]'),
|
53
|
+
whiteBoardNextButton: () => cy.get('[class*="whiteboard-pagination-next-button"]'),
|
54
|
+
whiteBoardDeleteButton: () => cy.get('[class*="whiteboard-delete-page-button"]'),
|
55
|
+
whiteBoardAddNewPageButton: () => cy.get('[class*="whiteboard-add-new-page-button"]'),
|
56
|
+
imageRadioInput: () => cy.get('div[data-value="image"] input[type="radio"]'),
|
57
|
+
pageImageTitle: () => cy.get('div[class*="WhiteBoardImagePropertiesstyles__PageImageTitle"]'),
|
58
|
+
radioGroupWrapper: () => cy.get('div[class*="ngie-radio-group-wrapper"]'),
|
59
|
+
blankCanvasRadioInput: () => cy.get('div[data-value="blankCanvas"] input[type="radio"]'),
|
60
|
+
imageUploadSectionWrapper: () => cy.get('div[class*="UploadImagestyles__BackgroundImageWrapper"]'),
|
61
|
+
pageImagePropertiesTitle: () => cy.get('div[class*="WhiteBoardImagePropertiesstyles__PageImagePropertiesTitle"]'),
|
62
|
+
layoutLabel: () => cy.get('h2[class*="WhiteBoardImagePropertiesstyles__LayoutLabel"]'),
|
63
|
+
alignmentOptions: () => cy.get('ul[class*="WhiteBoardImagePropertiesstyles__AlignmentOptions"]'),
|
64
|
+
solvePhaseAccordion: () => utilities.getNthElement(cy.get('[class*="Solvestyles__SolvePhaseAccordionWrapper"] .ngie-accordion-summary'), 0),
|
65
|
+
solvePhaseAccordionLabel: () => utilities.getNthElement(cy.get('.thinksphere-author-phases-accordion [class*="Solvestyles__HeadingLabel"]'), 0),
|
66
|
+
solvePhaseAccordionExpandIcon: () => utilities.getNthElement(cy.get('.thinksphere-author-phases-accordion [class*="expandIconWrapper"]'), 0),
|
67
|
+
solveToolsAndControlsOptionsTiles: (formattingOption) => cy.get(`.icon-button-custom-format[aria-label*="${formattingOption}"]`),
|
68
|
+
solvePhaseAccordionContentWrapper: () => cy.get('.thinksphere-author-phases-accordion [class*="Solvestyles__ContentWrapper"]'),
|
69
|
+
customizeToolsAndControls: () => cy.get('.thinksphere-author-phases-accordion .customize-tools-and-controls-wrapper .ngie-accordion-summary'),
|
70
|
+
customizeToolsAndControlsIcon: () => cy.get('.thinksphere-author-phases-accordion .customize-tools-and-controls-wrapper [class*="expandIconWrapper"]'),
|
71
|
+
customizeToolsAndControlsLabel: () => cy.get('.thinksphere-author-phases-accordion .customize-tools-and-controls-wrapper [class*="Solvestyles__HeadingLabel"]'),
|
72
|
+
phasesSection: () => cy.get('[class*="Phasesstyles__PhasesWrapper"]'),
|
73
|
+
phasesSectionTitle: () => cy.get('[class*="Phasesstyles__PhasesTextWrapper"]'),
|
74
|
+
planPhaseSection: () => cy.get('[class*="Planstyles__PlanAccordianWrapper"]'),
|
75
|
+
planPhaseAccordian: () => cy.get('[class*="Planstyles__PlanAccordianWrapper"] [class~="MuiAccordionSummary-root"]'),
|
76
|
+
planPhaseAccordianLabel: () => cy.get('[class*="Planstyles__AccordionLabel"]'),
|
77
|
+
planPhaseSectionDescription: () => cy.get('[class*="Planstyles__PlanAccordianWrapper"] [class*="Planstyles__PlanDescriptionTextWrapper"]'),
|
78
|
+
planStrategySection: () => cy.get('[class*="Planstyles__StrategiesWrapper"]'),
|
79
|
+
planStrategyListHeader: () => cy.get('[class*="Planstyles__StrategiesWrapper"] [class*="Planstyles__HeadingTextWrapper"]'),
|
80
|
+
planStrategyListResetToDefault: () => cy.get('[class*="Planstyles__StrategiesWrapper"] [class*="Planstyles__DefaultResetWrapper"]'),
|
81
|
+
planStrategyAddItemButton: () => cy.get('[class*="Planstyles__StrategiesWrapper"] [class*="ListOptionsComponentstyles__AddItemWrapper"] [role="button"]'),
|
82
|
+
planStrategyCheckbox: () => cy.get('[class*="Planstyles__StrategiesWrapper"] .thinksphere-option-text-field-wrapper [data-ngie-testid*="-checkbox"]'),
|
83
|
+
videoLinkComponent: () => utilities.getNthElement(cy.get('[class*="ListOptionsComponentstyles__UploadVideoWrapper"]'), 0),
|
84
|
+
uploadVideoLinkButton: () => cy.get('[class*="ListOptionsComponentstyles__UploadVideoTextWrapper"]'),
|
85
|
+
planSentenceStarterSection: () => cy.get('[class*="Planstyles__SentenceFramesWrapper"]'),
|
86
|
+
planSentenceStarterListHeader: () => cy.get('[class*="Planstyles__SentenceFramesWrapper"] [class*="Planstyles__HeadingTextWrapper"]'),
|
87
|
+
planSentenceStarterListResetToDefault: () => cy.get('[class*="Planstyles__SentenceFramesWrapper"] [class*="Planstyles__DefaultResetWrapper"]'),
|
88
|
+
planSentenceStarterAddItemButton: () => cy.get('[class*="Planstyles__SentenceFramesWrapper"] [class*="ListOptionsComponentstyles__AddItemWrapper"] [role="button"]'),
|
89
|
+
planSentenceStarterCheckbox : () => cy.get('[class*="Planstyles__SentenceFramesWrapper"] .thinksphere-option-text-field-wrapper [data-ngie-testid*="-checkbox"]'),
|
90
|
+
solvePhaseAccordian: () => cy.get('[class*="Planstyles__SolveAccordianWrapper"] [class~="MuiAccordionSummary-root"] [role="button"]'),
|
91
|
+
solvePhaseAccordianLabel: () => cy.get('[class*="Solvestyles__AccordionLabel"]'),
|
92
|
+
inputTypeVideoFile: () => cy.get('[class*="Planstyles__StrategiesWrapper"] input[type="file"]'),
|
93
|
+
inputTypeFile: () => cy.get('[class*="TabsComponentstyles__ImageUploadComponentWrapper"] input[type="file"]'),
|
94
|
+
whiteBoardInputTypeFile: () => cy.get('[class*="UploadImagestyles__UploadWrapper"] input[type="file"]'),
|
95
|
+
warningPopupTitle: () => cy.get('.dialog-title-wrapper'),
|
96
|
+
warningPopupContentText: () => cy.get('.upload-question-preview-popup-error-msg'),
|
97
|
+
warningPopupOkButton: () => cy.get('.upload-question-preview-popup-ok-btn'),
|
98
|
+
editVideoButton: () => cy.get('[aria-label*="Change video"]'),
|
99
|
+
deleteVideoButton: () => cy.get('[aria-label*="Delete video"]'),
|
100
|
+
listInputField: () => cy.get('.option-component textarea[placeholder]'),
|
101
|
+
deleteButton: () => cy.get('button[aria-label*="Delete"]'),
|
102
|
+
optionNumeration: () => cy.get('[class*="MuiInputAdornment-positionStart"]'),
|
103
|
+
iconPencil: () => cy.get('div[class*="icon-pencil"]'),
|
104
|
+
iconXCircle: () => cy.get('div[class*="icon-x-circle"]'),
|
105
|
+
dragIcon: () => cy.get('[class*="drag-icon-edit"]'),
|
106
|
+
moreOptionsIcon: () => cy.get('[class*="more-options-icon"]'),
|
107
|
+
ThinkSphereQuestionHeaderPencilIcon: () => utilities.getNthElement(cy.get('[class*="Widgetstyles__HeaderContainer"] [class*="icon-pencil"]'), 0),
|
108
|
+
ThinkSphereMathQuestionHeaderSwapIcon: () => cy.get('[class*="Widgetstyles__HeaderContainer"] [class*="icon-swap"]'),
|
109
|
+
ThinkSphereMathQuestionHeaderPencilIcon: () => utilities.getNthElement(cy.get('[class*="Widgetstyles__HeaderContainer"] [class*="icon-pencil"]'), 1),
|
110
|
+
thinkSphereMathQuestionHeaderDeleteIcon: () => cy.get('[class*="Widgetstyles__HeaderContainer"] [class*="icon-Delete"]'),
|
111
|
+
addCheckMathQuestionButton: () => cy.get('.ngie-btn-typography').contains(`Add 'Check your math' question`),
|
112
|
+
firstAvailableItemLink: () => utilities.getNthElement(cy.get('.browse-item-styled-link'), 0),
|
113
|
+
saveButton: () => cy.get('.ngie-btn-typography').contains('save',{matchCase: false}),
|
114
|
+
cancelButton: () => cy.get('.ngie-btn-typography').contains('cancel',{matchCase: false}),
|
115
|
+
AddCheckMathQuestionHeader: () => cy.get('.browse-title-wrapper').contains(`Add 'Check your math' question`),
|
116
|
+
singleOptionTextFieldWrapper: () => cy.get('[class*="SingleOptionstyle__TextFieldWrapper"]'),
|
117
|
+
customizeStampComponent: () => cy.get('[class*="CustomizeStampstyles__CustomizeStampWrapper"]'),
|
118
|
+
customizeStampHeading: () => cy.get('[class*="CustomizeStampstyles__CustomizeStampHeading"]'),
|
119
|
+
customizeStampCard: (ariaLabel, checked) => cy.get(`[class*="CustomizeStampstyles__StampCard"]${ariaLabel ? ('[aria-label="' + ariaLabel + '"]') : ''}${checked ? ('[aria-checked="' + checked + '"]') : ''}`),
|
120
|
+
customizeStampCardImg: (ariaLabel) => cy.get('[class*="CustomizeStampstyles__QuestionImage"]'),
|
121
|
+
questionImage: () => cy.get('img[class*="QuestionImageComponentstyle__QuestionImage"]'),
|
122
|
+
stampsToolButton: () => cy.get('#stamps button[aria-label*="Stamps"]'),
|
123
|
+
imageUploadSectionImageLabel: () => thinkSpherePage.imageUploadSection().find('div[class*="edit-question-image-label"]'),
|
124
|
+
imageUploadSectionUploadFileContent: () => thinkSpherePage.imageUploadSection().find('div[class*="upload-file-content"]'),
|
125
|
+
imageUploadSectionUploadCloudIconWrapper: () => thinkSpherePage.imageUploadSection().find('div[class*="upload-question-upload-cloud-icon-wrapper"]'),
|
126
|
+
imageUploadSectionDragDropFileText: () => thinkSpherePage.imageUploadSection().find('span[class*="drag-and-drop-file-text"]'),
|
127
|
+
imageUploadSectionFileInputLabel: () => thinkSpherePage.imageUploadSection().find('div[class*="file-input-label"]'),
|
128
|
+
imageUploadSectionDeviceIcon: () => thinkSpherePage.imageUploadSection().find('span[class*="icon-Device"]'),
|
129
|
+
imageUploadSectionSupportedFileText: () => thinkSpherePage.imageUploadSection().find('span[class*="supported-file-text"]'),
|
130
|
+
imageUploadSectionSupportedFileIconWrapper: () => thinkSpherePage.imageUploadSection().find('div[class*="supported-file-icon-wrapper"]'),
|
131
|
+
imageUploadSectionMaximumFileSize: () => thinkSpherePage.imageUploadSection().find('div[class*="maximum-file-size"]'),
|
132
|
+
imageUploadSectionFileUploaderWrapper: () => thinkSpherePage.imageUploadSection().find('div[class*="QuestionImageComponentstyle__FileUploaderWrapper"]'),
|
133
|
+
imageUploadSectionQuestionImage: () => thinkSpherePage.imageUploadSection().find('div[class*="QuestionImageComponentstyle__QuestionImage"]'),
|
134
|
+
imageUploadSectionQuestionImageContainer: () => thinkSpherePage.imageUploadSection().find('div[class*="QuestionImageComponentstyle__QuestionImageContainer"]'),
|
135
|
+
imageUploadSectionQuestionImageEditIcon: () => thinkSpherePage.imageUploadSection().find('div[class*="QuestionImageComponentstyle__EditIcon"]'),
|
136
|
+
imageUploadSectionQuestionImageCrossIcon: () => thinkSpherePage.imageUploadSection().find('div[class*="QuestionImageComponentstyle__CrossIcon"]'),
|
137
|
+
imageRadioButtonParentSvg: () => thinkSpherePage.imageRadioButton().parent().find('svg'),
|
138
|
+
solvePhaseAccordionSvg: () => thinkSpherePage.solvePhaseAccordion().find('svg'),
|
139
|
+
customizeToolsAndControlsPath: () => thinkSpherePage.customizeToolsAndControls().find('path'),
|
140
|
+
solvePhaseToolsAndControlsOptionsTilesFeatherCheckIcon: () => thinkSpherePage.solveToolsAndControlsOptionsTiles('Text').find('[data-name="Icon feather-check"]'),
|
141
|
+
solvePhaseToolsAndControlsOptionsTilesRectangle: () => thinkSpherePage.solveToolsAndControlsOptionsTiles('Text').find('[data-name*="Rectangle"]'),
|
142
|
+
solvePhaseToolsAndControlsOptionsTilesDragItemFlexWrapperSvg: () => thinkSpherePage.solveToolsAndControlsOptionsTiles('Text').find('.drag-item-flex-wrapper svg'),
|
143
|
+
solvePhaseToolsAndControlsOptionsTilesTextDragIconSvgPath: () => thinkSpherePage.solveToolsAndControlsOptionsTiles('Text').find('.drag-icon-button-custom-format svg path'),
|
144
|
+
solvePhaseToolsAndControlsOptionsTilesArrayDragIconSvgPath: () => thinkSpherePage.solveToolsAndControlsOptionsTiles('Array').find('.drag-icon-button-custom-format svg path'),
|
145
|
+
playerTimer: () => cy.get('[class*="VideoPlayerstyles__PlayerTimerWrapper"]'),
|
146
|
+
strategiesPreviewHeader: () => cy.get('[class*="StrategiesPreviewstyles__HeadingWrapper"]'),
|
147
|
+
addNewStrategyButton: () => cy.get('[class*="StrategiesPreviewstyles__AddStrategyButton"]'),
|
148
|
+
strategiesInputBoxEditTab: () => cy.get('.video-upload-support-wrapper .edit-mcq-option-wrapper'),
|
149
|
+
strategiesBoxPreviewTab: () => cy.get('[class*="StrategiesPreviewstyles__ListWrapper"]'),
|
150
|
+
popupTitle: () => cy.get('[class*="dialog-title-wrapper"]'),
|
151
|
+
strategyNameLabel: () => cy.get('[class*="ThinkSpherePreviewstyles__StrategyNameTextWrapper"]'),
|
152
|
+
strategyNameInputField: () => cy.get('[class*="new-strategy-name-field"]'),
|
153
|
+
addStrategyPopupCancelButton: () =>
|
154
|
+
cy.get('.dialog-content').contains('Cancel'),
|
155
|
+
addStrategyPopupSaveButton: () =>
|
156
|
+
cy.get('.dialog-content').contains('Save'),
|
157
|
+
// preview tab plan section selection
|
158
|
+
questionInstructionPreviewTexWrapper: () => cy.get('.question-instruction.question-text-wrapper'),
|
159
|
+
questionInstructionPreviewImageWrapper: () => cy.get('[class*="ThinkSpherePreviewstyles__ImageWrapper"]'),
|
160
|
+
questionInstructionPreviewImageExpandButton: () => cy.get('[class*="ThinkSpherePreviewstyles__ExpandImageIconWrapper"]'),
|
161
|
+
questionInstructionImagePopup: () => cy.get('[class*="QuestionTextstyle__ImagePopupDiv"]'),
|
162
|
+
closeExpandImagePopupButton: () => cy.get('.close-popup-btn'),
|
163
|
+
PlanningPreviewWrapper : () => cy.get('[class*="PlanningPreviewstyles__PlanningPreviewWrapper"]'),
|
164
|
+
planningPreviewHeading: () => cy.get('[class*="PlanningPreviewstyles__HeadingWrapper"]'),
|
165
|
+
planningWriteWrapper : () => cy.get('[class*="PlanningPreviewstyles__WriteWrapper"]'),
|
166
|
+
problemAskingWrapper: () => cy.get('[class*="PlanningPreviewstyles__ProblemAskingWrapper"]'),
|
167
|
+
contentEditableDiv: () => cy.get('[class*="PlanningPreviewstyles__ContentEditableDiv"]'),
|
168
|
+
micIconWrapper: () => cy.get('[class*="PlanningPreviewstyles__MicIconWrapper"]'),
|
169
|
+
strategiesToPlanWrapper: () => cy.get('[class*="PlanningPreviewstyles__StrategiesToPlanWrapper"]'),
|
170
|
+
subheadingWrapper: () => cy.get('[class*="PlanningPreviewstyles__SubHeadingWrapper"]'),
|
171
|
+
writePlanWrapper: () => cy.get('[class*="PlanningPreviewstyles__WritePlanWrapper"]'),
|
172
|
+
strategyChipWrapper: () => cy.get('[class*="PlanningPreviewstyles__StrategyChipWrapper"]'),
|
173
|
+
strategyChip: () => cy.get('[class*="PlanningPreviewstyles__StrategyChip-"]'),
|
174
|
+
strategiesPreviewListLI: () => cy.get('[class*="StrategiesPreviewstyles__ListLI"]'),
|
175
|
+
chooseStarterLabel: () => cy.get('[class*="ThinkSpherePreviewstyles__DropDownLabel"]'),
|
176
|
+
chooseStarterDropdown: () => cy.get('[class*="drop-down-parent"]'),
|
177
|
+
chooseStarterTextIconWrapper: () => cy.get('[class*="DropDownstyles__StarterTextIconWrapper"]'),
|
178
|
+
chooseStartersListOptions: () => cy.get('.ngie-popover-container.dropdown-list-container li[role="option"]'),
|
179
|
+
chooseStartersListOptionLabels: () => cy.get('.ngie-popover-container.dropdown-list-container li[role="option"] .dropdown-label-text'),
|
180
|
+
starterTextWrapper: () => cy.get('.starter-text-wrapper'),
|
181
|
+
starterIocn: () => cy.get('[class*="DropDownstyles__StarterIconWrapper"]'),
|
182
|
+
addNewStrategyTextWrapper: () => cy.get('[class*="StrategiesPreviewstyles__AddStrategyTextWrapper"]'),
|
183
|
+
strategyTextWrapper: () => cy.get('[class*="StrategiesPreviewstyles__StrategyTextWrapper"]'),
|
184
|
+
videoIconWrapper: () => cy.get('[class*="StrategiesPreviewstyles__VideoIconWrapper"]'),
|
185
|
+
whiteBoardCanvas: () => cy.get('[class*="WhiteboardPagesstyles__Canvas"]'),
|
186
|
+
whiteBoardImage: () => cy.get('[class*="WhiteboardPagesstyles__BackgroundImage"]'),
|
187
|
+
videoPopupTitle: () => cy.get('[class*="dialog-title-wrapper"]'),
|
188
|
+
videoPopupCloseButton: () => cy.get('[class*="dialog-close-button"]'),
|
189
|
+
videoPreviewPopup: () => cy.get('[class*="video-preview-popup"]'),
|
190
|
+
gridItemsWrapper: (number) => cy.get('[class*="DragAndDropGridstyles__GridItemsWrapper"]').eq(number),
|
191
|
+
dragButton: (number) => cy.get('[type="button"]').eq(number),
|
192
|
+
customizeStampsButton: (customizeStampPosition) => cy.get(`button[aria-label="Stamp ${customizeStampPosition}"]`),
|
193
|
+
buttonSave: () => cy.get('.action-btn-wrapper button').eq(1),
|
194
|
+
buttonCancel: () => cy.get('.action-btn-wrapper button').eq(0),
|
195
|
+
nextGenThinkSphereCreateItemWrapper: () => cy.get('#nextgen-thinkshpere-create-item'),
|
196
|
+
equationEditorSectionTitle: () => cy.get('.equation-editor-text-title'),
|
197
|
+
referenceIdWrapper: () => cy.get('.edit-item-reference-id-wrapper'),
|
198
|
+
editBoxWrapper: () => cy.get('.edit-box-wrapper'),
|
199
|
+
editBoxText: () => cy.get('.edit-box-text'),
|
200
|
+
editBoxTextInput: () => thinkSpherePage.editBoxWrapper().find('input'),
|
201
|
+
editIconPencil: () => cy.get('.icon-pencil'),
|
202
|
+
thinkSphereQuestionHeader: () => cy.get('.edit-question-header-title'),
|
203
|
+
filterSectionQuestionTypesAccordion: () => cy.get('.filter-section-expansion-panel-summary-root'),
|
204
|
+
filterSectionQuestionAccordion: () => cy.get('.expansion-item-expansion-panel-summary-content'),
|
205
|
+
checkBox: () => cy.get('.MuiCheckbox-root'),
|
206
|
+
browseItemQuestionItem: () => cy.get('.browse-item-question-item'),
|
207
|
+
ErrorMessageContainer: () => cy.get('.ErrorMessageContainer'),
|
208
|
+
categoriesDropDown: () => cy.get('.dropdown-form-control[label="Categories"]'),
|
209
|
+
categoriesDropDownLabelText: () => cy.get('.dropdown-label-text'),
|
210
|
+
categoriesDropDownMenuItem: () => cy.get('.dropdown-menu-item .dropdown-label-text'),
|
211
|
+
categoriesDropDownParent: () => cy.get('.drop-down-parent'),
|
212
|
+
cardWrapper: () => cy.get('.card-wrapper'),
|
213
|
+
cardLabel: () => cy.get('.widget-card-label'),
|
214
|
+
thinkSphereQuestionInstructionCKEditor: () => cy.get('div.cke_editable[contenteditable="true"]'),
|
215
|
+
};
|
216
|
+
|
217
|
+
const steps = {
|
218
|
+
...essayResponsePage.steps,
|
219
|
+
...backgroundImageUploadComponent.steps,
|
220
|
+
...questionInstructionsComponent.steps,
|
221
|
+
...scoringSectionBaseEditTab.steps,
|
222
|
+
...commonComponents.steps,
|
223
|
+
...additionalSettingsPanel.steps,
|
224
|
+
...toolSettingsComponent.steps,
|
225
|
+
...studentViewSettingsLabelComponent.tests,
|
226
|
+
...defaultToolDropdown.steps,
|
227
|
+
...optionsWrapperComponent.steps,
|
228
|
+
...essayResponseCommonComponents.steps,
|
229
|
+
...equationEditorFlyout.steps,
|
230
|
+
...equationEditorSectionCommonComponent.steps,
|
231
|
+
...selectQuestionResourceToolPage.steps,
|
232
|
+
...browseItemsPage.steps,
|
233
|
+
...videoResponsePage.steps,
|
234
|
+
...createQuestionBasePage.steps,
|
235
|
+
...createCustomCategoryFlyout.steps,
|
236
|
+
|
237
|
+
/**
|
238
|
+
* Navigates to the ThinkSphere create question page.
|
239
|
+
* @param {string} questionType - The type of question to create.
|
240
|
+
*/
|
241
|
+
navigateToThinkSphereCreateQuestion: (questionType) => {
|
242
|
+
cy.visit('/item-engine/thinksphere/create-item');
|
243
|
+
thinkSpherePage.steps.addThinkSphereQuestion();
|
244
|
+
},
|
245
|
+
|
246
|
+
addThinkSphereQuestion: () => {
|
247
|
+
thinkSpherePage.addThinkSphereQuestionButton()
|
248
|
+
.click();
|
249
|
+
},
|
250
|
+
|
251
|
+
/**
|
252
|
+
* Verifies if the accordion is collapsed.
|
253
|
+
* @param {string} accordian - The accordion to verify ('plan' or 'solve').
|
254
|
+
* @param {boolean} isCollapsed - Whether the accordion should be collapsed.
|
255
|
+
*/
|
256
|
+
verifyAccordianCollapsed: (accordian, isCollapsed) => {
|
257
|
+
if (accordian === 'plan') {
|
258
|
+
thinkSpherePage.planPhaseAccordian()
|
259
|
+
.should('have.attr', 'aria-expanded', isCollapsed ? 'false' : 'true');
|
260
|
+
} else if (accordian === 'solve') {
|
261
|
+
thinkSpherePage.solvePhaseAccordian()
|
262
|
+
.should('have.attr', 'aria-expanded', isCollapsed ? 'false' : 'true');
|
263
|
+
}
|
264
|
+
},
|
265
|
+
|
266
|
+
/**
|
267
|
+
* Clicks on the specified accordion.
|
268
|
+
* @param {string} accordian - The accordion to click ('plan' or 'solve').
|
269
|
+
*/
|
270
|
+
clickOnAccordian: (accordian) => {
|
271
|
+
if (accordian === 'plan') {
|
272
|
+
thinkSpherePage.planPhaseAccordian()
|
273
|
+
.click();
|
274
|
+
} else if (accordian === 'solve') {
|
275
|
+
thinkSpherePage.solvePhaseAccordian()
|
276
|
+
.click();
|
277
|
+
}
|
278
|
+
cy.wait(500);
|
279
|
+
},
|
280
|
+
|
281
|
+
clickOnEditThinkSphereItem: () => {
|
282
|
+
browseItemsPage.steps.clickOnItemReferenceId('~zzz item name');
|
283
|
+
utilities.getNthElement(thinkSpherePage.editQuestionPencil(), 0)
|
284
|
+
.click();
|
285
|
+
cy.barsPreLoaderWait();
|
286
|
+
},
|
287
|
+
|
288
|
+
clickOnAddCheckMathQuestionButton: () => {
|
289
|
+
thinkSpherePage.addCheckMathQuestionButton()
|
290
|
+
.click();
|
291
|
+
cy.interceptGraphql('getItems');
|
292
|
+
},
|
293
|
+
|
294
|
+
clickOnFirstAvailableItemLink: () => {
|
295
|
+
thinkSpherePage.firstAvailableItemLink()
|
296
|
+
.click();
|
297
|
+
cy.interceptGraphql('getItems');
|
298
|
+
},
|
299
|
+
|
300
|
+
clickOnSaveButton: () => {
|
301
|
+
cy.interceptGraphql('setItem');
|
302
|
+
thinkSpherePage.saveButton()
|
303
|
+
.click();
|
304
|
+
cy.wait('@setItem');
|
305
|
+
},
|
306
|
+
|
307
|
+
clickOnCancelButton: () => {
|
308
|
+
cy.interceptGraphql('setItem');
|
309
|
+
thinkSpherePage.cancelButton()
|
310
|
+
.click();
|
311
|
+
},
|
312
|
+
|
313
|
+
clickOnSwapButton: () => {
|
314
|
+
thinkSpherePage.ThinkSphereMathQuestionHeaderSwapIcon()
|
315
|
+
.click();
|
316
|
+
cy.wait(2000);
|
317
|
+
},
|
318
|
+
|
319
|
+
clickOnEditButton: () => {
|
320
|
+
thinkSpherePage.ThinkSphereMathQuestionHeaderPencilIcon()
|
321
|
+
.click();
|
322
|
+
cy.wait(2000);
|
323
|
+
},
|
324
|
+
|
325
|
+
clickOnDeleteButton: () => {
|
326
|
+
thinkSpherePage.thinkSphereMathQuestionHeaderDeleteIcon()
|
327
|
+
.click();
|
328
|
+
cy.wait(2000);
|
329
|
+
},
|
330
|
+
|
331
|
+
/**
|
332
|
+
* Verifies the question title.
|
333
|
+
* @param {string} questionType - The type of question to verify.
|
334
|
+
*/
|
335
|
+
verifyQuestionTitle: (questionType) => {
|
336
|
+
utilities.verifyInnerText(utilities.getNthElement(thinkSpherePage.widgetHeaderQuestionTitle(), 0), questionType);
|
337
|
+
},
|
338
|
+
|
339
|
+
verifyPlanSectionAccessibility: () => {
|
340
|
+
thinkSpherePage.planPhaseSection().find('div[class~="MuiAccordionSummary-root"]')
|
341
|
+
.should('have.attr', 'aria-expanded', 'true')
|
342
|
+
.should('have.attr', 'role', 'button')
|
343
|
+
.should('have.attr', 'tabindex', '0');
|
344
|
+
},
|
345
|
+
|
346
|
+
/**
|
347
|
+
* Uploads a file.
|
348
|
+
* @param {string} file - The file to upload.
|
349
|
+
*/
|
350
|
+
uploadFile: (file) => {
|
351
|
+
thinkSpherePage.inputTypeFile()
|
352
|
+
.attachFile(file);
|
353
|
+
cy.wait(4000);
|
354
|
+
},
|
355
|
+
|
356
|
+
uploadWhiteBoardImage: (file) => {
|
357
|
+
thinkSpherePage.whiteBoardInputTypeFile()
|
358
|
+
.attachFile(file);
|
359
|
+
cy.wait(4000);
|
360
|
+
},
|
361
|
+
|
362
|
+
/**
|
363
|
+
* Uploads a video file.
|
364
|
+
* @param {string} file - The file to upload.
|
365
|
+
*/
|
366
|
+
uploadVideoFile: (file) => {
|
367
|
+
const fileName = file.split('/').pop(); // Extracts only 'sample.mp4'
|
368
|
+
|
369
|
+
cy.fixture(file, 'binary') // Read the file as binary
|
370
|
+
.then(Cypress.Blob.binaryStringToBlob)
|
371
|
+
.then((blob) => {
|
372
|
+
const fileObj = new File([blob], fileName, { type: 'video/mp4' });
|
373
|
+
const dataTransfer = new DataTransfer();
|
374
|
+
dataTransfer.items.add(fileObj);
|
375
|
+
|
376
|
+
thinkSpherePage.inputTypeVideoFile().then(($input) => {
|
377
|
+
$input[0].files = dataTransfer.files;
|
378
|
+
cy.wrap($input).trigger('change', { force: true });
|
379
|
+
});
|
380
|
+
});
|
381
|
+
|
382
|
+
cy.wait(4000);
|
383
|
+
},
|
384
|
+
|
385
|
+
/**
|
386
|
+
* Uploads a file to the whiteboard.
|
387
|
+
* @param {string} file - The file to upload.
|
388
|
+
*/
|
389
|
+
WhiteBoardUploadFile: (file) => {
|
390
|
+
thinkSpherePage.whiteBoardImagePropertiesInputTypeFile()
|
391
|
+
.attachFile(file);
|
392
|
+
cy.wait(4000);
|
393
|
+
},
|
394
|
+
|
395
|
+
navigateToThinkSphereCreateItem: () => {
|
396
|
+
cy.visit('/item-engine/thinksphere/create-item');
|
397
|
+
},
|
398
|
+
|
399
|
+
navigateToReviewItemBank: () => {
|
400
|
+
thinkSpherePage.addReviewQuestionButton().click();
|
401
|
+
},
|
402
|
+
|
403
|
+
clickOnAddThinkSphereQuestion: () => {
|
404
|
+
thinkSpherePage.addThinkSphereQuestionButton()
|
405
|
+
.click();
|
406
|
+
},
|
407
|
+
|
408
|
+
verifyCenterOptionAlignmentIsSelected: () => {
|
409
|
+
thinkSpherePage.centerButton()
|
410
|
+
.should('have.attr', 'aria-pressed', 'true');
|
411
|
+
},
|
412
|
+
|
413
|
+
/**
|
414
|
+
* Verifies the opacity slider value.
|
415
|
+
* @param {string} opacityValue - The expected opacity value.
|
416
|
+
*/
|
417
|
+
verifyOpacitySliderValue: (opacityValue) => {
|
418
|
+
thinkSpherePage.opacitySlider()
|
419
|
+
.find('input')
|
420
|
+
.should('have.value', opacityValue)
|
421
|
+
},
|
422
|
+
|
423
|
+
/**
|
424
|
+
* Verifies the opacity input field value.
|
425
|
+
* @param {string} opacityValue - The expected opacity value.
|
426
|
+
*/
|
427
|
+
verifyOpacityInputFieldValue: (opacityValue) => {
|
428
|
+
thinkSpherePage.opacityInputField()
|
429
|
+
.should('have.value', opacityValue)
|
430
|
+
},
|
431
|
+
|
432
|
+
clickOnOpacitySlider: () => {
|
433
|
+
thinkSpherePage.opacitySlider()
|
434
|
+
.click();
|
435
|
+
},
|
436
|
+
|
437
|
+
/**
|
438
|
+
* Adds input to the opacity input field.
|
439
|
+
* @param {string} value - The value to input.
|
440
|
+
*/
|
441
|
+
addInputToOpacityInputField: (value) => {
|
442
|
+
thinkSpherePage.opacityInputField()
|
443
|
+
.clear()
|
444
|
+
.type(value, { delay: 0 })
|
445
|
+
},
|
446
|
+
|
447
|
+
/**
|
448
|
+
* Verifies the image alternative text input field.
|
449
|
+
* @param {string} imageAlternativeText - The expected alternative text.
|
450
|
+
*/
|
451
|
+
verifyImageAlternativeTextInputField: (imageAlternativeText) => {
|
452
|
+
thinkSpherePage.imageAlternativeTextInputField()
|
453
|
+
.should('have.value', imageAlternativeText);
|
454
|
+
},
|
455
|
+
expandSolvePhaseAccordion: () => {
|
456
|
+
thinkSpherePage.solvePhaseAccordion()
|
457
|
+
.click()
|
458
|
+
.should('have.attr', 'aria-expanded', 'true');
|
459
|
+
},
|
460
|
+
expandCustomizeToolsAndControls: () => {
|
461
|
+
thinkSpherePage.customizeToolsAndControls()
|
462
|
+
.click()
|
463
|
+
.should('have.attr', 'aria-expanded', 'true');
|
464
|
+
},
|
465
|
+
/**
|
466
|
+
* Verifies the tools and controls options.
|
467
|
+
* @param {Array<string>} options - The options to verify.
|
468
|
+
*/
|
469
|
+
verifyToolsAndControlsOptions: (options) => {
|
470
|
+
options.forEach(option => {
|
471
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.solveToolsAndControlsOptionsTiles(option), 'visible');
|
472
|
+
});
|
473
|
+
},
|
474
|
+
/**
|
475
|
+
* Selects an option from tools and controls.
|
476
|
+
* @param {string} option - The option to select.
|
477
|
+
*/
|
478
|
+
selectOptionFromToolsAndControls: (option) => {
|
479
|
+
thinkSpherePage.solveToolsAndControlsOptionsTiles(option)
|
480
|
+
.click();
|
481
|
+
thinkSpherePage.solveToolsAndControlsOptionsTiles(option)
|
482
|
+
.should('have.attr', 'data-aria-pressed', 'true');
|
483
|
+
},
|
484
|
+
/**
|
485
|
+
* Deselects an option from tools and controls.
|
486
|
+
* @param {string} option - The option to deselect.
|
487
|
+
*/
|
488
|
+
deselectOptionFromToolsAndControls: (option) => {
|
489
|
+
thinkSpherePage.solveToolsAndControlsOptionsTiles(option)
|
490
|
+
.click();
|
491
|
+
thinkSpherePage.solveToolsAndControlsOptionsTiles(option)
|
492
|
+
.should('have.attr', 'data-aria-pressed', 'false');
|
493
|
+
},
|
494
|
+
/**
|
495
|
+
* Verifies if an option is selected.
|
496
|
+
* @param {string} option - The option to verify.
|
497
|
+
*/
|
498
|
+
verifyOptionIsSelected: (option) => {
|
499
|
+
thinkSpherePage.solveToolsAndControlsOptionsTiles(option)
|
500
|
+
.should('have.attr', 'data-aria-pressed', 'true');
|
501
|
+
},
|
502
|
+
/**
|
503
|
+
* Verifies if an option is not selected.
|
504
|
+
* @param {string} option - The option to verify.
|
505
|
+
*/
|
506
|
+
verifyOptionIsNotSelected: (option) => {
|
507
|
+
thinkSpherePage.solveToolsAndControlsOptionsTiles(option)
|
508
|
+
.should('have.attr', 'data-aria-pressed', 'false');
|
509
|
+
},
|
510
|
+
|
511
|
+
/**
|
512
|
+
* Verifies the options contents.
|
513
|
+
* @param {number} index - The index of the option.
|
514
|
+
* @param {string} text - The text to verify.
|
515
|
+
* @param {string} placeholder - The placeholder text to verify.
|
516
|
+
*/
|
517
|
+
verifyOptionsContents: (index, text, placeholder) => {
|
518
|
+
utilities.getNthElement(thinkSpherePage.optionWrapper(), index)
|
519
|
+
.within(() => {
|
520
|
+
utilities.getNthElement(thinkSpherePage.listInputField(), 0)
|
521
|
+
.should('have.attr', 'placeholder', placeholder);
|
522
|
+
utilities.getNthElement(thinkSpherePage.listInputField(), 0)
|
523
|
+
.should('have.value', text);
|
524
|
+
thinkSpherePage.dragHandleButton()
|
525
|
+
.should('exist');
|
526
|
+
thinkSpherePage.deleteButton()
|
527
|
+
.should('be.visible');
|
528
|
+
thinkSpherePage.optionNumeration()
|
529
|
+
.should('have.text', index + 1);
|
530
|
+
});
|
531
|
+
},
|
532
|
+
|
533
|
+
/**
|
534
|
+
* Deletes an option.
|
535
|
+
* @param {number} index - The index of the option to delete.
|
536
|
+
*/
|
537
|
+
deleteOption: (index) => {
|
538
|
+
utilities.getNthElement(thinkSpherePage.deleteButton(), index)
|
539
|
+
.click();
|
540
|
+
},
|
541
|
+
|
542
|
+
/**
|
543
|
+
* Verifies the delete option button disabled state.
|
544
|
+
* @param {string} list - The list to verify ('strategy' or other).
|
545
|
+
*/
|
546
|
+
verifyDeleteOptionButtonDisabledState: (list) => {
|
547
|
+
if (list === "strategy") {
|
548
|
+
utilities.getNthElement(thinkSpherePage.optionsSectionWrapper(), 0)
|
549
|
+
.within(() => {
|
550
|
+
thinkSpherePage.deleteButton()
|
551
|
+
.each(($element) => {
|
552
|
+
utilities.verifyElementDisabled(cy.wrap($element))
|
553
|
+
});
|
554
|
+
});
|
555
|
+
} else {
|
556
|
+
utilities.getNthElement(thinkSpherePage.optionsSectionWrapper(), 1)
|
557
|
+
.within(() => {
|
558
|
+
thinkSpherePage.deleteButton()
|
559
|
+
.each(($element) => {
|
560
|
+
utilities.verifyElementDisabled(cy.wrap($element))
|
561
|
+
});
|
562
|
+
});
|
563
|
+
}
|
564
|
+
},
|
565
|
+
|
566
|
+
/**
|
567
|
+
* Verifies the checkbox button disabled state.
|
568
|
+
* @param {string} list - The list to verify ('strategy' or other).
|
569
|
+
* @param {number} optionCount - The number of options to verify.
|
570
|
+
*/
|
571
|
+
verifyCheckboxButtonDisabledState: (list, optionCount) => {
|
572
|
+
if (list === 'strategy') {
|
573
|
+
utilities.getNthElement(utilities.getNthElement(thinkSpherePage.planStrategyCheckbox().find('span'), 0), optionCount)
|
574
|
+
.should('have.attr', 'aria-disabled', 'true');
|
575
|
+
} else {
|
576
|
+
utilities.getNthElement(utilities.getNthElement(thinkSpherePage.planSentenceStarterCheckbox().find('span'), 0), optionCount)
|
577
|
+
.should('have.attr', 'aria-disabled', 'true');
|
578
|
+
}
|
579
|
+
},
|
580
|
+
|
581
|
+
/**
|
582
|
+
* Add the option in the list.
|
583
|
+
* @param {string} list - The list to verify ('strategy' or other).
|
584
|
+
*/
|
585
|
+
addOption: (list) => {
|
586
|
+
if (list === 'strategy') {
|
587
|
+
thinkSpherePage.planStrategyAddItemButton()
|
588
|
+
.click();
|
589
|
+
} else {
|
590
|
+
thinkSpherePage.planSentenceStarterAddItemButton()
|
591
|
+
.click()
|
592
|
+
.trigger('mouseout', { force: true });
|
593
|
+
}
|
594
|
+
},
|
595
|
+
|
596
|
+
/**
|
597
|
+
* Selects an option.
|
598
|
+
* @param {string} list - The list to select from ('strategy' or other).
|
599
|
+
* @param {number} optionCount - The number of options to select.
|
600
|
+
*/
|
601
|
+
selectOption: (list, optionCount) => {
|
602
|
+
if (list === 'strategy') {
|
603
|
+
utilities.getNthElement(thinkSpherePage.planStrategyCheckbox(), optionCount)
|
604
|
+
.click();
|
605
|
+
} else {
|
606
|
+
utilities.getNthElement(thinkSpherePage.planSentenceStarterCheckbox(), optionCount)
|
607
|
+
.click();
|
608
|
+
}
|
609
|
+
},
|
610
|
+
|
611
|
+
/**
|
612
|
+
* Adds text to an option.
|
613
|
+
* @param {string} list - The list to add text to ('strategy' or other).
|
614
|
+
* @param {number} optionCount - The number of options to add text to.
|
615
|
+
* @param {string} text - The text to add.
|
616
|
+
*/
|
617
|
+
addOptionText: (list, optionCount, text) => {
|
618
|
+
if (list === 'strategy') {
|
619
|
+
thinkSpherePage.planStrategySection()
|
620
|
+
.within(() => {
|
621
|
+
utilities.getNthElement(thinkSpherePage.listInputField(), optionCount)
|
622
|
+
.clear()
|
623
|
+
.type(text);
|
624
|
+
});
|
625
|
+
} else {
|
626
|
+
thinkSpherePage.planSentenceStarterSection()
|
627
|
+
.within(() => {
|
628
|
+
utilities.getNthElement(thinkSpherePage.listInputField(), optionCount)
|
629
|
+
.clear()
|
630
|
+
.type(text);
|
631
|
+
});
|
632
|
+
}
|
633
|
+
},
|
634
|
+
|
635
|
+
/**
|
636
|
+
* Verifies the warning popup.
|
637
|
+
* @param {string} heading - The heading of the warning popup.
|
638
|
+
* @param {string} content - The content of the warning popup.
|
639
|
+
*/
|
640
|
+
verifyWarningPopup: (heading, content) => {
|
641
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
642
|
+
dialogBoxBase.dialogBoxTitle().within(() => {
|
643
|
+
utilities.verifyInnerText(thinkSpherePage.warningPopupTitle(), heading);
|
644
|
+
});
|
645
|
+
dialogBoxBase.dialogBoxContent().within(() => {
|
646
|
+
utilities.verifyInnerText(thinkSpherePage.warningPopupContentText(), content);
|
647
|
+
utilities.verifyInnerText(thinkSpherePage.warningPopupOkButton(), 'OK');
|
648
|
+
});
|
649
|
+
},
|
650
|
+
|
651
|
+
verifyCustomizeStampsComponent: () => {
|
652
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.customizeStampComponent(), 'visible');
|
653
|
+
},
|
654
|
+
|
655
|
+
/**
|
656
|
+
* Verifies the default stamps.
|
657
|
+
* @param {Array<string>} defaultStamps - The default stamps to verify.
|
658
|
+
*/
|
659
|
+
verifyDefaultStamps: (defaultStamps = []) => {
|
660
|
+
thinkSpherePage.customizeStampComponent()
|
661
|
+
.within(() => {
|
662
|
+
thinkSpherePage.customizeStampCard()
|
663
|
+
.should('have.length', defaultStamps.length);
|
664
|
+
defaultStamps.forEach((ele) => {
|
665
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.customizeStampCard(ele, 'true'), 'visible');
|
666
|
+
});
|
667
|
+
});
|
668
|
+
},
|
669
|
+
|
670
|
+
/**
|
671
|
+
* Clicks on a customize card.
|
672
|
+
* @param {number} index - The index of the card to click.
|
673
|
+
* @param {string} ariaLabel - The aria-label of the card to click.
|
674
|
+
*/
|
675
|
+
clickOnCustomizeCard: (index, ariaLabel) => {
|
676
|
+
if (ariaLabel) {
|
677
|
+
thinkSpherePage.customizeStampCard(ariaLabel)
|
678
|
+
.click();
|
679
|
+
|
680
|
+
} else {
|
681
|
+
utilities.getNthElement(thinkSpherePage.customizeStampCard(), index)
|
682
|
+
.click();
|
683
|
+
}
|
684
|
+
},
|
685
|
+
|
686
|
+
verifySelectAndUnselectStamps: () => {
|
687
|
+
thinkSpherePage.customizeStampComponent()
|
688
|
+
.within(() => {
|
689
|
+
thinkSpherePage.steps.clickOnCustomizeCard(0);
|
690
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.customizeStampCard('Stamp 1', 'false'), 'visible');
|
691
|
+
thinkSpherePage.steps.clickOnCustomizeCard(0);
|
692
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.customizeStampCard('Stamp 1', 'true'), 'visible');
|
693
|
+
});
|
694
|
+
},
|
695
|
+
|
696
|
+
clickOnStampsTool: () => {
|
697
|
+
thinkSpherePage.stampsToolButton()
|
698
|
+
.click();
|
699
|
+
},
|
700
|
+
|
701
|
+
verifyQuestionImageCustomStamp: () => {
|
702
|
+
let imgSrc = '';
|
703
|
+
thinkSpherePage.questionImage()
|
704
|
+
.invoke('attr', 'src') // Get the value of the 'src' attribute
|
705
|
+
.then((src) => {
|
706
|
+
imgSrc = src; // Store the value in the imgSrc variable
|
707
|
+
cy.log(imgSrc); // Optional: Log the value to the Cypress console
|
708
|
+
});
|
709
|
+
utilities.verifyCSS(
|
710
|
+
utilities.getNthElement(thinkSpherePage.customizeStampCard(), 0),
|
711
|
+
{
|
712
|
+
border: `1px solid ${css.color.secondaryBtnDisabled}`,
|
713
|
+
},
|
714
|
+
);
|
715
|
+
utilities.getNthElement(thinkSpherePage.customizeStampCard(), 0)
|
716
|
+
.within(() => {
|
717
|
+
thinkSpherePage.customizeStampCardImg()
|
718
|
+
.invoke('attr', 'src') // Get the value of the 'src' attribute
|
719
|
+
.then((src) => {
|
720
|
+
expect(src).to.equal(imgSrc);
|
721
|
+
});
|
722
|
+
});
|
723
|
+
},
|
724
|
+
createReviewQuestion: () => {
|
725
|
+
const questionType = 'single selection'
|
726
|
+
const options = ['Animal', 'Vehicle', 'Birds', 'Insects'];
|
727
|
+
thinkSpherePage.steps.clickOnCreateItemButton();
|
728
|
+
thinkSpherePage.steps.selectQuestionType(questionType);
|
729
|
+
singleSelectionPage.steps.addQuestionInstructions();
|
730
|
+
singleSelectionPage.steps.addInputToOptionsInputField(options);
|
731
|
+
singleSelectionPage.steps.allotPoints(20);
|
732
|
+
singleSelectionPage.steps.checkOptionInSpecifyCorrectAnswerSection(1);
|
733
|
+
thinkSpherePage.steps.clickOnSaveButton();
|
734
|
+
},
|
735
|
+
|
736
|
+
clickOnVideoLink: () => {
|
737
|
+
thinkSpherePage.videoLinkComponent()
|
738
|
+
.click();
|
739
|
+
},
|
740
|
+
|
741
|
+
verifyVideoPlaybackTimer: (elapsedTime, totalTime) => {
|
742
|
+
thinkSpherePage.playerTimer()
|
743
|
+
.should('have.text', `${elapsedTime}/${totalTime}`);
|
744
|
+
},
|
745
|
+
|
746
|
+
waitForPlaybackToBegin: () => {
|
747
|
+
thinkSpherePage.playerTimer()
|
748
|
+
.should('contain', '0:01/');
|
749
|
+
},
|
750
|
+
|
751
|
+
expandChooseStarterDropdown: () => {
|
752
|
+
thinkSpherePage.chooseStarterDropdown()
|
753
|
+
.click();
|
754
|
+
},
|
755
|
+
|
756
|
+
verifyOptionAlignmentIsSelected: (direction) => {
|
757
|
+
if(direction === 'topLeft') {
|
758
|
+
thinkSpherePage.whiteBoardCanvas()
|
759
|
+
.should('not.have.css', 'justify-content', 'start');
|
760
|
+
} else {
|
761
|
+
thinkSpherePage.whiteBoardCanvas()
|
762
|
+
.should('have.css', 'justify-content', (direction === 'center' || direction === 'flex-end') ? 'normal' : direction);
|
763
|
+
if (direction === 'center') {
|
764
|
+
thinkSpherePage.whiteBoardCanvas()
|
765
|
+
.should('have.css', 'align-items', 'normal');
|
766
|
+
}
|
767
|
+
}
|
768
|
+
},
|
769
|
+
|
770
|
+
clickOnImageRadioButton: () => {
|
771
|
+
thinkSpherePage.imageRadioButton()
|
772
|
+
.click();
|
773
|
+
},
|
774
|
+
|
775
|
+
clickOnEditQuestionIcon: () => {
|
776
|
+
utilities.getNthElement(thinkSpherePage.editQuestionPencil(), 0)
|
777
|
+
.click();
|
778
|
+
},
|
779
|
+
|
780
|
+
clickOnQuestionInstructionExpandImageButton: () => {
|
781
|
+
thinkSpherePage.questionInstructionPreviewImageExpandButton()
|
782
|
+
.click();
|
783
|
+
},
|
784
|
+
|
785
|
+
clickOnCloseExpandImagePopupButton: () => {
|
786
|
+
thinkSpherePage.dialogBoxRoot()
|
787
|
+
.within(() => {
|
788
|
+
thinkSpherePage.closeExpandImagePopupButton()
|
789
|
+
.click();
|
790
|
+
});
|
791
|
+
},
|
792
|
+
|
793
|
+
clickOnStrategiesPreviewListLI: () => {
|
794
|
+
utilities.getNthElement(thinkSpherePage.strategiesPreviewListLI(), 1)
|
795
|
+
.click();
|
796
|
+
},
|
797
|
+
|
798
|
+
clickOnVideoIcon: () => {
|
799
|
+
utilities.getNthElement(thinkSpherePage.videoIconWrapper(), 0)
|
800
|
+
.click();
|
801
|
+
},
|
802
|
+
|
803
|
+
closeVideoPopup: () => {
|
804
|
+
thinkSpherePage.dialogBoxRoot()
|
805
|
+
.within(() => {
|
806
|
+
thinkSpherePage.buttonClose()
|
807
|
+
.click();
|
808
|
+
});
|
809
|
+
},
|
810
|
+
|
811
|
+
hoverOnVolumeControlButton: () => {
|
812
|
+
thinkSpherePage.volumeControlButton()
|
813
|
+
.realHover({ position: 'bottom' });
|
814
|
+
},
|
815
|
+
|
816
|
+
verifyPlaybackElapsedTime: (time) => {
|
817
|
+
const playbackTimeElement = thinkSpherePage.playerTimer();
|
818
|
+
playbackTimeElement
|
819
|
+
.invoke('text')
|
820
|
+
.then((text) => {
|
821
|
+
let elapsedTime = text.split('/')[0];
|
822
|
+
let currentElapsedTimerMinutes = Number(elapsedTime.split(':')[0]);
|
823
|
+
let currentElapsedTimerSeconds = Number(elapsedTime.split(':')[1]);
|
824
|
+
let currentTotalElapsedTimerSeconds = currentElapsedTimerMinutes * 60 + currentElapsedTimerSeconds;
|
825
|
+
expect(currentTotalElapsedTimerSeconds).to.eq(time);
|
826
|
+
});
|
827
|
+
},
|
828
|
+
|
829
|
+
getToolbarOptionCount: (number) => {
|
830
|
+
return thinkSpherePage.gridItemsWrapper(number).find('button').its('length');
|
831
|
+
},
|
832
|
+
|
833
|
+
selectTools: (array, number) => {
|
834
|
+
thinkSpherePage.steps.getToolbarOptionCount(number).then((count) => {
|
835
|
+
thinkSpherePage.gridItemsWrapper(number).within(() => {
|
836
|
+
for (let i = 0; i < count; i++) {
|
837
|
+
thinkSpherePage.dragButton(i)
|
838
|
+
.invoke('attr', 'aria-label')
|
839
|
+
.then((attr) => {
|
840
|
+
if (attr.includes('not-selected')) {
|
841
|
+
const toolName = attr.split(' ').slice(0, -1).join(' ');
|
842
|
+
if (array.includes(toolName)) {
|
843
|
+
thinkSpherePage.dragButton(i)
|
844
|
+
.click();
|
845
|
+
}
|
846
|
+
} else {
|
847
|
+
const toolName = attr.split(' ').slice(0, -1).join(' ');
|
848
|
+
if (!array.includes(toolName)) {
|
849
|
+
thinkSpherePage.dragButton(i)
|
850
|
+
.click();
|
851
|
+
}
|
852
|
+
}
|
853
|
+
})
|
854
|
+
}
|
855
|
+
});
|
856
|
+
});
|
857
|
+
},
|
858
|
+
|
859
|
+
verifySelectTools: (array, number) => {
|
860
|
+
thinkSpherePage.steps.getToolbarOptionCount(number).then((count) => {
|
861
|
+
thinkSpherePage.gridItemsWrapper(number).within(() => {
|
862
|
+
for (let i = 0; i < count; i++) {
|
863
|
+
thinkSpherePage.dragButton(i)
|
864
|
+
.invoke('attr', 'aria-label')
|
865
|
+
.then((attr) => {
|
866
|
+
const toolName = attr.split(' ').slice(0, -1).join(' ');
|
867
|
+
if (array.includes(toolName)) {
|
868
|
+
thinkSpherePage.dragButton(i)
|
869
|
+
.invoke('attr', 'aria-label')
|
870
|
+
.should('contain', ' selected');
|
871
|
+
} else {
|
872
|
+
thinkSpherePage.dragButton(i)
|
873
|
+
.invoke('attr', 'aria-label')
|
874
|
+
.should('contain', ' not-selected');
|
875
|
+
}
|
876
|
+
})
|
877
|
+
}
|
878
|
+
});
|
879
|
+
});
|
880
|
+
},
|
881
|
+
|
882
|
+
verifyUploadedImage: () => {
|
883
|
+
thinkSpherePage.whiteBoardImage()
|
884
|
+
.should('exist')
|
885
|
+
.and('have.attr', 'src')
|
886
|
+
.and('not.be.empty');
|
887
|
+
},
|
888
|
+
|
889
|
+
visitThinksphereBrowseItemsPage: () => {
|
890
|
+
cy.visit('/item-engine/thinksphere/browse-items');
|
891
|
+
cy.interceptGraphql('getItems');
|
892
|
+
cy.wait('@getItems');
|
893
|
+
},
|
894
|
+
|
895
|
+
clickOnCustomizeStamp: (customizeStampPosition) => {
|
896
|
+
thinkSpherePage.customizeStampsButton(customizeStampPosition)
|
897
|
+
.click();
|
898
|
+
cy.wait(1000);
|
899
|
+
},
|
900
|
+
|
901
|
+
verifyCustomizeStampSelectedUnselected: (selected, customizeStampPosition) => {
|
902
|
+
utilities.verifyElementAttribute(thinkSpherePage.customizeStampsButton(customizeStampPosition), 'aria-checked', selected ? 'true' : 'false');
|
903
|
+
},
|
904
|
+
|
905
|
+
saveCustomCategory: () => {
|
906
|
+
thinkSpherePage.buttonSave()
|
907
|
+
.click();
|
908
|
+
},
|
909
|
+
|
910
|
+
cancelCustomCategory: () => {
|
911
|
+
thinkSpherePage.buttonCancel()
|
912
|
+
.click();
|
913
|
+
},
|
914
|
+
|
915
|
+
createCustomCategoryWithMultipleCategoryCharacters: () => {
|
916
|
+
cy.log('Creating a custom category by selecting \'Keypad\' category, partially selecting \'Basic\' and \'Greek\' categories')
|
917
|
+
createCustomCategoryFlyout.steps.openCreateCustomCategoryFlyout();
|
918
|
+
createCustomCategoryFlyout.steps.checkCategoryAccordionCheckbox(`${equationEditorCategoriesAndSymbols['primary'].displayName}`);
|
919
|
+
cy.wait(2000);
|
920
|
+
createCustomCategoryFlyout.steps.verifyPartiallyCheckedStateOfCategoryAccordionCheckbox(`${equationEditorCategoriesAndSymbols['matrices'].displayName}`);
|
921
|
+
createCustomCategoryFlyout.steps.expandCategoryAccordion(`Greek Symbols`);
|
922
|
+
createCustomCategoryFlyout.steps.selectASymbolInCreateCustomCategoryFlyout(`${equationEditorCategoriesAndSymbols['greek'].displayName}`, `${equationEditorCategoriesAndSymbols.greek.symbols.gamma.ariaLabel}`);
|
923
|
+
createCustomCategoryFlyout.steps.selectASymbolInCreateCustomCategoryFlyout(`${equationEditorCategoriesAndSymbols['greek'].displayName}`, `${equationEditorCategoriesAndSymbols.greek.symbols.delta.ariaLabel}`);
|
924
|
+
createCustomCategoryFlyout.steps.addInputToCustomCategoryNameInputField('Custom category with name.');
|
925
|
+
thinkSpherePage.steps.saveCustomCategory();
|
926
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
927
|
+
},
|
928
|
+
|
929
|
+
createCustomCategoryWithNameAndIcon: () => {
|
930
|
+
cy.log('Creating a category by selecting \'Arrows\' category')
|
931
|
+
createCustomCategoryFlyout.steps.openCreateCustomCategoryFlyout();
|
932
|
+
createCustomCategoryFlyout.steps.checkCategoryAccordionCheckbox(`${equationEditorCategoriesAndSymbols['geo'].displayName}`);
|
933
|
+
createCustomCategoryFlyout.steps.addInputToCustomCategoryNameInputField('Custom category with name and icon.');
|
934
|
+
createCustomCategoryFlyout.steps.addInputToCategoryIconInputField('#');
|
935
|
+
thinkSpherePage.steps.saveCustomCategory();
|
936
|
+
},
|
937
|
+
|
938
|
+
verifyCategoryCharactersAndUnSelectedState: (arrayOfSymbolsAriaLabel) => {
|
939
|
+
thinkSpherePage.categoryCharacters()
|
940
|
+
.then(($symbols) => {
|
941
|
+
for (let index = 10; index < $symbols.length - 1; index++) {
|
942
|
+
editCategoryFlyout.categoryCharacters()
|
943
|
+
.eq(index)
|
944
|
+
.should('not.have.class', 'Mui-selected')
|
945
|
+
.invoke('attr', 'aria-label')
|
946
|
+
.then((ariaLabel) => {
|
947
|
+
const tooltipText = ariaLabel.split(' ').slice(0, -1).join(' ');
|
948
|
+
editCategoryFlyout.categoryCharacters()
|
949
|
+
.eq(index)
|
950
|
+
.verifyTooltip(tooltipText);
|
951
|
+
});
|
952
|
+
}
|
953
|
+
});
|
954
|
+
},
|
955
|
+
|
956
|
+
verifyCategoryCharactersAndSelectedState: (arrayOfSymbolsAriaLabel) => {
|
957
|
+
editCategoryFlyout.categoryCharacters()
|
958
|
+
.then(($symbols) => {
|
959
|
+
for (let index = 0; index < arrayOfSymbolsAriaLabel.length - 1; index++) {
|
960
|
+
editCategoryFlyout.categoryCharacters()
|
961
|
+
.eq(index)
|
962
|
+
.should('have.class', 'Mui-selected')
|
963
|
+
.invoke('attr', 'aria-label')
|
964
|
+
.then((ariaLabel) => {
|
965
|
+
const tooltipText = ariaLabel.split(' ').slice(0, -1).join(' ');
|
966
|
+
editCategoryFlyout.categoryCharacters()
|
967
|
+
.eq(index)
|
968
|
+
.verifyTooltip(tooltipText);
|
969
|
+
});
|
970
|
+
}
|
971
|
+
});
|
972
|
+
},
|
973
|
+
|
974
|
+
expandDropdown: () => {
|
975
|
+
thinkSpherePage.categoriesDropDownParent()
|
976
|
+
.click();
|
977
|
+
},
|
978
|
+
|
979
|
+
verifyDropdownOptions: (dropDownListArray) => {
|
980
|
+
thinkSpherePage.categoriesDropDownMenuItem().should('have.length', dropDownListArray.length).each(($item) => {
|
981
|
+
cy.wrap($item)
|
982
|
+
.invoke('text')
|
983
|
+
.then((text) => {
|
984
|
+
const trimmedText = text.trim();
|
985
|
+
expect(dropDownListArray).to.include(trimmedText);
|
986
|
+
});
|
987
|
+
});
|
988
|
+
},
|
989
|
+
|
990
|
+
clickOnDropDownCategory: (index) => {
|
991
|
+
thinkSpherePage.categoriesDropDownMenuItem().eq(index).click();
|
992
|
+
},
|
993
|
+
|
994
|
+
clickOnQuestionTypesAccordion: () => {
|
995
|
+
thinkSpherePage.filterSectionQuestionTypesAccordion()
|
996
|
+
.click()
|
997
|
+
},
|
998
|
+
|
999
|
+
typeInSearchBar: (input) => {
|
1000
|
+
thinkSpherePage.searchBar()
|
1001
|
+
.clear()
|
1002
|
+
.type(input)
|
1003
|
+
.should('have.value', input);
|
1004
|
+
},
|
1005
|
+
|
1006
|
+
searchInSearchBar: (input) => {
|
1007
|
+
thinkSpherePage.searchBar()
|
1008
|
+
.clear()
|
1009
|
+
.type(input)
|
1010
|
+
.should('have.value', input)
|
1011
|
+
.type('{enter}');
|
1012
|
+
},
|
1013
|
+
|
1014
|
+
clickOnSolvePhaseAccordionIcon: (element) => {
|
1015
|
+
thinkSpherePage.solvePhaseAccordionExpandIcon()
|
1016
|
+
.click();
|
1017
|
+
},
|
1018
|
+
|
1019
|
+
verifyElementDoesNotHaveExpandedClass: (element) => {
|
1020
|
+
element.should('not.have.class', 'Mui-expanded');
|
1021
|
+
},
|
1022
|
+
|
1023
|
+
verifyElementDoesNotHaveCheckedClass: (element) => {
|
1024
|
+
element.should('not.have.class', 'Mui-checked');
|
1025
|
+
},
|
1026
|
+
|
1027
|
+
verifyThinkSphereSearchBarPlaceholder: () => {
|
1028
|
+
thinkSpherePage.searchBar().should('have.attr', 'placeholder', 'Search by title, tags and content');
|
1029
|
+
},
|
1030
|
+
|
1031
|
+
verifyReviewItemSearchBarPlaceholder: () => {
|
1032
|
+
thinkSpherePage.searchBar().should('have.attr', 'placeholder', 'Search by question type');
|
1033
|
+
},
|
1034
|
+
|
1035
|
+
verifyEquationEditorSectionCategoryNotPressed: () => {
|
1036
|
+
thinkSpherePage.equationEditorSectionCategories().eq(1).should('have.attr', 'data-aria-pressed', 'false');
|
1037
|
+
},
|
1038
|
+
|
1039
|
+
verifyEquationEditorSectionCategoryIsPressed: () => {
|
1040
|
+
thinkSpherePage.equationEditorSectionCategories().eq(10).should('have.attr', 'data-aria-pressed', 'true');
|
1041
|
+
},
|
1042
|
+
|
1043
|
+
verifyTypeCheckBoxStrategy: () => {
|
1044
|
+
utilities.getNthElement(thinkSpherePage.planStrategyCheckbox(), 5)
|
1045
|
+
.find('input').should('have.attr', 'type', 'checkbox');
|
1046
|
+
},
|
1047
|
+
|
1048
|
+
verifyTypeCheckBoxSentenceStarter: () => {
|
1049
|
+
utilities.getNthElement(thinkSpherePage.planSentenceStarterCheckbox(), 5)
|
1050
|
+
.find('input').should('have.attr', 'type', 'checkbox');
|
1051
|
+
},
|
1052
|
+
|
1053
|
+
verifyStrategyCheckBoxNotChecked: () => {
|
1054
|
+
utilities.getNthElement(thinkSpherePage.planStrategyCheckbox(), 5)
|
1055
|
+
.find('input').should('not.have.attr', 'checked');
|
1056
|
+
},
|
1057
|
+
|
1058
|
+
verifySentenceStrategyCheckBoxNotChecked: () => {
|
1059
|
+
utilities.getNthElement(thinkSpherePage.planSentenceStarterCheckbox(), 5)
|
1060
|
+
.find('input').should('not.have.attr', 'checked');
|
1061
|
+
},
|
1062
|
+
|
1063
|
+
verifyTextIsNotEmpty: (element) => {
|
1064
|
+
element.invoke('text')
|
1065
|
+
.should('not.be.empty');
|
1066
|
+
},
|
1067
|
+
|
1068
|
+
verifyLength: (element, length) => {
|
1069
|
+
element.should('have.length', length);
|
1070
|
+
},
|
1071
|
+
|
1072
|
+
verifyFilterSectionExpanded: () => {
|
1073
|
+
thinkSpherePage.filterSectionQuestionTypesAccordion().should('have.class', 'Mui-expanded');
|
1074
|
+
},
|
1075
|
+
|
1076
|
+
verifyFilterSectionCollapsed: () => {
|
1077
|
+
thinkSpherePage.filterSectionQuestionTypesAccordion().should('not.have.class', 'Mui-expanded');
|
1078
|
+
},
|
1079
|
+
|
1080
|
+
verifySolvePhaseAccordionExpanded: () => {
|
1081
|
+
thinkSpherePage.solvePhaseAccordionExpandIcon().should('have.class', 'Mui-expanded');
|
1082
|
+
},
|
1083
|
+
|
1084
|
+
verifySolvePhaseAccordionCollapsed: () => {
|
1085
|
+
thinkSpherePage.solvePhaseAccordionExpandIcon().should('not.have.class', 'Mui-expanded');
|
1086
|
+
},
|
1087
|
+
|
1088
|
+
addQuestionInstructionInnerHTML: (innerHTML) => {
|
1089
|
+
thinkSpherePage.thinkSphereQuestionInstructionCKEditor()
|
1090
|
+
.invoke('html', innerHTML);
|
1091
|
+
},
|
1092
|
+
|
1093
|
+
verifyQuestionInstructionIncreasedHeightAndScrollBar: () => {
|
1094
|
+
thinkSpherePage.thinkSphereQuestionInstructionCKEditor()
|
1095
|
+
.invoke('height') // Get the height of the element
|
1096
|
+
.should('be.gt', 198);
|
1097
|
+
|
1098
|
+
thinkSpherePage.thinkSphereQuestionInstructionCKEditor()
|
1099
|
+
.should(($el) => {
|
1100
|
+
const scrollWidth = $el[0].scrollWidth;
|
1101
|
+
const clientWidth = $el[0].clientWidth;
|
1102
|
+
|
1103
|
+
// Assert that horizontal scroll is present
|
1104
|
+
expect(scrollWidth).to.be.greaterThan(clientWidth);
|
1105
|
+
});
|
1106
|
+
},
|
1107
|
+
};
|
1108
|
+
|
1109
|
+
const tests = {
|
1110
|
+
...essayResponsePage.tests,
|
1111
|
+
...createQuestionBasePage.tests,
|
1112
|
+
...backgroundImageUploadComponent.tests,
|
1113
|
+
...questionInstructionsComponent.tests,
|
1114
|
+
...commonComponents.tests,
|
1115
|
+
...scoringSectionBaseEditTab.tests,
|
1116
|
+
...additionalSettingsPanel.tests,
|
1117
|
+
...additionalSettingsAccessibilitySectionComponent.tests,
|
1118
|
+
...toolSettingsComponent.tests,
|
1119
|
+
...studentViewSettingsLabelComponent.tests,
|
1120
|
+
...defaultToolDropdown.tests,
|
1121
|
+
...optionsWrapperComponent.tests,
|
1122
|
+
...equationEditorFlyout.tests,
|
1123
|
+
|
1124
|
+
/**
|
1125
|
+
* Verifies the ThinkSphere cancel button functionality.
|
1126
|
+
* @param {string} questionType - The type of question.
|
1127
|
+
*/
|
1128
|
+
verifyThinkSphereCancelButton: (questionType) => {
|
1129
|
+
it('When user has made no edits and clicks on cancel button, the user should be directed back to the \'Select a Question\' page', () => {
|
1130
|
+
createQuestionBasePage.cancelButton()
|
1131
|
+
.click();
|
1132
|
+
});
|
1133
|
+
|
1134
|
+
it('When user has made some edits/changes and clicks on cancel button, a popup should be displayed with message \'Are you sure you want to leave this page? Your changes have not been saved.\'', () => {
|
1135
|
+
thinkSpherePage.steps.navigateToThinkSphereCreateQuestion();
|
1136
|
+
questionInstructionsComponent.steps.addTextInQuestionInstructionsInputField('Edited');
|
1137
|
+
if (questionType !== 'feedback scale' && questionType !== 'highlight image' && questionType !== 'think sphere') {
|
1138
|
+
scoringSectionBaseEditTab.steps.allotPoints(20);
|
1139
|
+
};
|
1140
|
+
createQuestionBasePage.cancelButton()
|
1141
|
+
.click();
|
1142
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
1143
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxContentText(), 'Are you sure you want to leave this page? Your changes have not been saved.');
|
1144
|
+
utilities.verifyInnerText(dialogBoxBase.buttonAccept(), 'Yes, I want to leave this page');
|
1145
|
+
utilities.verifyInnerText(dialogBoxBase.buttonReject(), 'No, I\'d like to go back');
|
1146
|
+
});
|
1147
|
+
|
1148
|
+
it('CSS of popup', { tags: 'css' }, () => {
|
1149
|
+
utilities.verifyCSS(dialogBoxBase.dialogBox(), {
|
1150
|
+
'background-color': css.color.defaultBackground
|
1151
|
+
})
|
1152
|
+
|
1153
|
+
utilities.verifyCSS(dialogBoxBase.dialogBoxContent(), {
|
1154
|
+
'color': css.color.sectionHeading,
|
1155
|
+
'font-size': css.fontSize.default,
|
1156
|
+
'font-weight': css.fontWeight.regular
|
1157
|
+
});
|
1158
|
+
utilities.verifyCSS(dialogBoxBase.buttonAccept(), {
|
1159
|
+
'color': css.color.primaryBtn,
|
1160
|
+
'font-size': css.fontSize.default,
|
1161
|
+
'font-weight': css.fontWeight.semibold,
|
1162
|
+
'background-color': css.color.primaryBtnBg
|
1163
|
+
});
|
1164
|
+
utilities.verifyCSS(dialogBoxBase.buttonReject(), {
|
1165
|
+
'color': css.color.secondaryBtn,
|
1166
|
+
'font-size': css.fontSize.default,
|
1167
|
+
'font-weight': css.fontWeight.semibold,
|
1168
|
+
'background-color': css.color.transparent
|
1169
|
+
});
|
1170
|
+
});
|
1171
|
+
|
1172
|
+
it('Accessibility of popup', { tags: 'a11y' }, () => {
|
1173
|
+
cy.checkAccessibility(dialogBoxBase.dialogBox());
|
1174
|
+
});
|
1175
|
+
|
1176
|
+
it(`Clicking on \'No, I'd like to go back\' button should close the popup and user should remain on the edit interface of the question`, () => {
|
1177
|
+
dialogBoxBase.buttonReject()
|
1178
|
+
.click();
|
1179
|
+
createQuestionBasePage.editTab()
|
1180
|
+
.should('have.attr', 'aria-selected', 'true');
|
1181
|
+
utilities.verifyTextContent(questionInstructionsComponent.questionInstructionsInputField(), 'Edited');
|
1182
|
+
});
|
1183
|
+
|
1184
|
+
it(`Clicking on \'Yes, I want to leave this page\' button should should discard all changes and direct the user to the \'Select a question\' page.`, () => {
|
1185
|
+
createQuestionBasePage.cancelButton()
|
1186
|
+
.click();
|
1187
|
+
dialogBoxBase.buttonAccept()
|
1188
|
+
.click();
|
1189
|
+
});
|
1190
|
+
},
|
1191
|
+
|
1192
|
+
/**
|
1193
|
+
* Verifies the disabled delete button tooltip.
|
1194
|
+
* @param {number} NthElement - The index of the delete button.
|
1195
|
+
* @param {string} disableTooltipText - The tooltip text to verify.
|
1196
|
+
*/
|
1197
|
+
verifyDisabledDeleteButtonTooltip: (NthElement, disableTooltipText) => {
|
1198
|
+
it('When the user hovers over the disabled delete buttons of the options then \'Minimum one option is required\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the delete button', () => {
|
1199
|
+
utilities.getNthElement(thinkSpherePage.deleteButton(), NthElement)
|
1200
|
+
.trigger('mouseover', { force: true });
|
1201
|
+
utilities.verifyInnerText(thinkSpherePage.tooltipText(), disableTooltipText);
|
1202
|
+
utilities.getNthElement(thinkSpherePage.deleteButton(), NthElement)
|
1203
|
+
.trigger('mouseout', { force: true });
|
1204
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.tooltipText(), 'notExist');
|
1205
|
+
});
|
1206
|
+
|
1207
|
+
it('CSS of disabled delete button tooltip', { tags: 'css' }, () => {
|
1208
|
+
utilities.getNthElement(thinkSpherePage.deleteButton(), NthElement)
|
1209
|
+
.trigger('mouseover', { force: true });
|
1210
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.tooltipText(), 'visible')
|
1211
|
+
utilities.verifyCSS(thinkSpherePage.tooltipText(), {
|
1212
|
+
'color': css.color.whiteText,
|
1213
|
+
'font-size': css.fontSize.small,
|
1214
|
+
'font-weight': css.fontWeight.regular
|
1215
|
+
});
|
1216
|
+
utilities.getNthElement(thinkSpherePage.deleteButton(), NthElement)
|
1217
|
+
.trigger('mouseout', { force: true });
|
1218
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.tooltipText(), 'notExist');
|
1219
|
+
});
|
1220
|
+
},
|
1221
|
+
|
1222
|
+
/**
|
1223
|
+
* Verifies the add option functionality.
|
1224
|
+
* @param {string} list - The list to add the option to ('strategy' or other).
|
1225
|
+
* @param {Array<string>} optionList - The list of options.
|
1226
|
+
*/
|
1227
|
+
verifyAddOptionFunctionality: (list, optionList) => {
|
1228
|
+
it('When user adds an option using \'Add Option\' button then the added option input field should be displayed and option numeration should increment', () => {
|
1229
|
+
let initialOptionCount;
|
1230
|
+
if (list === 'strategy') {
|
1231
|
+
thinkSpherePage.planStrategySection()
|
1232
|
+
.within(() => {
|
1233
|
+
thinkSpherePage.steps.getOptionCount().then((count) => {
|
1234
|
+
initialOptionCount = count;
|
1235
|
+
});
|
1236
|
+
});
|
1237
|
+
|
1238
|
+
thinkSpherePage.steps.addOption(list);
|
1239
|
+
thinkSpherePage.planStrategySection()
|
1240
|
+
.within(() => {
|
1241
|
+
thinkSpherePage.steps.getOptionCount().should('eq', initialOptionCount + 1);
|
1242
|
+
thinkSpherePage.steps.verifyOptionsContents(initialOptionCount, '', 'Enter strategy name');
|
1243
|
+
});
|
1244
|
+
thinkSpherePage.steps.deleteOption(5);
|
1245
|
+
} else {
|
1246
|
+
thinkSpherePage.planSentenceStarterSection()
|
1247
|
+
.within(() => {
|
1248
|
+
thinkSpherePage.steps.getOptionCount().then((count) => {
|
1249
|
+
initialOptionCount = count;
|
1250
|
+
});
|
1251
|
+
});
|
1252
|
+
|
1253
|
+
thinkSpherePage.steps.addOption(list);
|
1254
|
+
thinkSpherePage.planSentenceStarterSection()
|
1255
|
+
.within(() => {
|
1256
|
+
thinkSpherePage.steps.getOptionCount().should('eq', initialOptionCount + 1);
|
1257
|
+
thinkSpherePage.steps.verifyOptionsContents(initialOptionCount, '', 'Enter sentence starter name');
|
1258
|
+
});
|
1259
|
+
thinkSpherePage.steps.deleteOption(10);
|
1260
|
+
}
|
1261
|
+
});
|
1262
|
+
},
|
1263
|
+
|
1264
|
+
/**
|
1265
|
+
* Verifies the contents and styling of the 'Options' section.
|
1266
|
+
* @param {Object} params - The parameters for the function.
|
1267
|
+
* @param {number} params.optionFieldsCount - The expected number of option input fields.
|
1268
|
+
* @param {Array<string>} params.optionList - The list of options.
|
1269
|
+
* @param {string} params.placeholder - The placeholder text.
|
1270
|
+
* @param {string} params.list - The list to verify ('strategy' or other).
|
1271
|
+
*/
|
1272
|
+
verifyListSectionContents: ({
|
1273
|
+
optionFieldsCount,
|
1274
|
+
optionList,
|
1275
|
+
placeholder,
|
1276
|
+
list,
|
1277
|
+
}) => {
|
1278
|
+
it(`By default ${optionFieldsCount} option input fields with placeholder text, drag handle and delete option icon buttons should be displayed`, () => {
|
1279
|
+
for (let index = 0; index < optionFieldsCount; index++) {
|
1280
|
+
if (list === 'strategy') {
|
1281
|
+
thinkSpherePage.planStrategySection()
|
1282
|
+
.within(() => {
|
1283
|
+
cy.log(optionList, optionList[index])
|
1284
|
+
thinkSpherePage.steps.verifyOptionsContents(index, optionList[index], placeholder);
|
1285
|
+
})
|
1286
|
+
} else {
|
1287
|
+
thinkSpherePage.planSentenceStarterSection()
|
1288
|
+
.within(() => {
|
1289
|
+
cy.log(optionList, optionList[index])
|
1290
|
+
thinkSpherePage.steps.verifyOptionsContents(index, optionList[index], placeholder);
|
1291
|
+
})
|
1292
|
+
}
|
1293
|
+
};
|
1294
|
+
});
|
1295
|
+
|
1296
|
+
it('\'Add Option\' button should be present', () => {
|
1297
|
+
if (list === 'strategy') {
|
1298
|
+
utilities.verifyInnerText(thinkSpherePage.planStrategyAddItemButton().find('p'), 'Add strategy');
|
1299
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.planStrategyAddItemButton(), 'visible');
|
1300
|
+
} else {
|
1301
|
+
utilities.verifyInnerText(thinkSpherePage.planSentenceStarterAddItemButton().find('p'), 'Add sentence starter');
|
1302
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.planSentenceStarterAddItemButton(), 'visible');
|
1303
|
+
}
|
1304
|
+
});
|
1305
|
+
|
1306
|
+
it('CSS of Options section', { tags: 'css' }, () => {
|
1307
|
+
const withinComponent = (list === 'strategy') ? thinkSpherePage.planStrategySection() : thinkSpherePage.planSentenceStarterSection();
|
1308
|
+
|
1309
|
+
withinComponent.within(() => {
|
1310
|
+
utilities.verifyCSS(thinkSpherePage.dragHandleButton().find('path'), {
|
1311
|
+
'fill': css.color.secondaryBtnActive
|
1312
|
+
});
|
1313
|
+
thinkSpherePage.deleteButton()
|
1314
|
+
.verifyPseudoClassBeforeProperty('color', css.color.deleteIcon);
|
1315
|
+
utilities.verifyCSS(utilities.getNthElement(thinkSpherePage.listInputField(), 0), {
|
1316
|
+
'color': css.color.text,
|
1317
|
+
'font-size': css.fontSize.default,
|
1318
|
+
'font-weight': css.fontWeight.regular
|
1319
|
+
});
|
1320
|
+
});
|
1321
|
+
|
1322
|
+
if (list === 'strategy') {
|
1323
|
+
utilities.verifyCSS(thinkSpherePage.planStrategyAddItemButton().find('p'), {
|
1324
|
+
'color': css.color.secondaryBtnActive,
|
1325
|
+
'font-size': css.fontSize.default,
|
1326
|
+
'font-weight': css.fontWeight.regular
|
1327
|
+
});
|
1328
|
+
} else {
|
1329
|
+
utilities.verifyCSS(thinkSpherePage.planSentenceStarterAddItemButton().find('p'), {
|
1330
|
+
'color': css.color.secondaryBtnActive,
|
1331
|
+
'font-size': css.fontSize.default,
|
1332
|
+
'font-weight': css.fontWeight.regular
|
1333
|
+
});
|
1334
|
+
}
|
1335
|
+
});
|
1336
|
+
},
|
1337
|
+
|
1338
|
+
/**
|
1339
|
+
* Verifies the drag handle tooltip.
|
1340
|
+
* @param {number} NthElement - The index of the drag handle.
|
1341
|
+
*/
|
1342
|
+
verifyDragHandleTooltip: (NthElement) => {
|
1343
|
+
it('On hovering over the drag handle of the options, \'Drag to reorder\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the drag handle', () => {
|
1344
|
+
utilities.triggerMouseover(utilities.getNthElement(thinkSpherePage.dragHandleButton(), NthElement));
|
1345
|
+
utilities.verifyInnerText(thinkSpherePage.tooltipText(), 'Drag to reorder');
|
1346
|
+
utilities.triggerMouseout(utilities.getNthElement(thinkSpherePage.dragHandleButton(), NthElement));
|
1347
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.tooltipText(), 'notExist');
|
1348
|
+
});
|
1349
|
+
|
1350
|
+
it('CSS of drag handle tooltip', { tags: 'css' }, () => {
|
1351
|
+
utilities.getNthElement(thinkSpherePage.optionWrapper(), NthElement)
|
1352
|
+
.within(() => {
|
1353
|
+
utilities.triggerMouseover(thinkSpherePage.dragHandleButton());
|
1354
|
+
});
|
1355
|
+
utilities.verifyCSS(thinkSpherePage.tooltipText(), {
|
1356
|
+
'color': css.color.whiteText,
|
1357
|
+
'font-size': css.fontSize.small,
|
1358
|
+
'font-weight': css.fontWeight.regular
|
1359
|
+
});
|
1360
|
+
utilities.getNthElement(thinkSpherePage.optionWrapper(), NthElement)
|
1361
|
+
.within(() => {
|
1362
|
+
utilities.triggerMouseout(thinkSpherePage.dragHandleButton())
|
1363
|
+
});
|
1364
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.tooltipText(), 'notExist');
|
1365
|
+
});
|
1366
|
+
|
1367
|
+
it('Accessibility of drag handle tooltip', { tags: 'a11y' }, () => {
|
1368
|
+
utilities.getNthElement(thinkSpherePage.optionWrapper(), NthElement)
|
1369
|
+
.within(() => {
|
1370
|
+
utilities.triggerMouseover(thinkSpherePage.dragHandleButton());
|
1371
|
+
});
|
1372
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.tooltipText(), 'visible');
|
1373
|
+
utilities.getNthElement(thinkSpherePage.optionWrapper(), NthElement)
|
1374
|
+
.within(() => {
|
1375
|
+
utilities.triggerMouseout(thinkSpherePage.dragHandleButton())
|
1376
|
+
});
|
1377
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.tooltipText(), 'notExist');
|
1378
|
+
});
|
1379
|
+
},
|
1380
|
+
|
1381
|
+
/**
|
1382
|
+
* Verifies the enabled delete button and tooltip.
|
1383
|
+
* @param {string} list - The list to verify ('strategy' or other).
|
1384
|
+
* @param {number} NthElement - The index of the delete button.
|
1385
|
+
*/
|
1386
|
+
verifyEnabledDeleteButtonAndTooltip: (list, NthElement) => {
|
1387
|
+
it('When the number of options are greater than 1 and both the options are selected then the \'Delete\' icon buttons should get enabled', () => {
|
1388
|
+
thinkSpherePage.steps.selectOption(list, 1);
|
1389
|
+
thinkSpherePage.deleteButton()
|
1390
|
+
.should('be.enabled');
|
1391
|
+
});
|
1392
|
+
|
1393
|
+
it('CSS of enabled \'Delete\' option button', { tags: 'css' }, () => {
|
1394
|
+
utilities.verifyCSS(utilities.getNthElement(thinkSpherePage.deleteButton(), NthElement), {
|
1395
|
+
'opacity': '1'
|
1396
|
+
});
|
1397
|
+
utilities.getNthElement(thinkSpherePage.deleteButton(), NthElement)
|
1398
|
+
.verifyPseudoClassBeforeProperty('color', css.color.deleteIcon)
|
1399
|
+
});
|
1400
|
+
|
1401
|
+
it('Accessibility of enabled \'Delete\' option button', { tags: 'a11y' }, () => {
|
1402
|
+
cy.checkAccessibility(thinkSpherePage.deleteButton());
|
1403
|
+
});
|
1404
|
+
|
1405
|
+
it('when the user hovers over the enabled \'Delete\' icon buttons, then \'Delete option\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the \'Delete\' icon button', () => {
|
1406
|
+
utilities.getNthElement(thinkSpherePage.deleteButton(), NthElement)
|
1407
|
+
.verifyTooltip(list === 'strategy' ? 'Delete strategy' : 'Delete sentence starter');
|
1408
|
+
});
|
1409
|
+
|
1410
|
+
it('CSS of enabled delete button tooltip', { tags: 'css' }, () => {
|
1411
|
+
utilities.triggerMouseover(utilities.getNthElement(thinkSpherePage.deleteButton(), NthElement));
|
1412
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.tooltipText(), 'visible')
|
1413
|
+
utilities.verifyCSS(thinkSpherePage.tooltipText(), {
|
1414
|
+
'color': css.color.whiteText,
|
1415
|
+
'font-size': css.fontSize.small,
|
1416
|
+
'font-weight': css.fontWeight.regular
|
1417
|
+
});
|
1418
|
+
utilities.triggerMouseout(utilities.getNthElement(thinkSpherePage.deleteButton(), NthElement));
|
1419
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.tooltipText(), 'notExist');
|
1420
|
+
});
|
1421
|
+
},
|
1422
|
+
|
1423
|
+
/**
|
1424
|
+
* Verifies the options checkbox component.
|
1425
|
+
* @param {string} list - The list to verify ('strategy' or other).
|
1426
|
+
*/
|
1427
|
+
verifyOptionsCheckboxComponent: (list) => {
|
1428
|
+
it('Option checkbox button should be present', () => {
|
1429
|
+
if (list === 'strategy') {
|
1430
|
+
utilities.getNthElement(thinkSpherePage.planStrategyCheckbox(), 0)
|
1431
|
+
.find('input')
|
1432
|
+
.should('have.attr', 'type', 'checkbox')
|
1433
|
+
.should('have.attr', 'checked');
|
1434
|
+
} else {
|
1435
|
+
utilities.getNthElement(thinkSpherePage.planSentenceStarterCheckbox(), 0)
|
1436
|
+
.find('input')
|
1437
|
+
.should('have.attr', 'type', 'checkbox')
|
1438
|
+
.should('have.attr', 'checked');
|
1439
|
+
}
|
1440
|
+
});
|
1441
|
+
|
1442
|
+
it('CSS of checked checkbox button', { tags: 'css' }, () => {
|
1443
|
+
if (list === 'strategy') {
|
1444
|
+
utilities.verifyCSS(
|
1445
|
+
utilities.getNthElement(thinkSpherePage.planStrategyCheckbox().find('svg g g'), 0), {
|
1446
|
+
'fill': css.color.primaryBtnBg,
|
1447
|
+
});
|
1448
|
+
utilities.verifyCSS(
|
1449
|
+
utilities.getNthElement(thinkSpherePage.planStrategyCheckbox().find('svg'), 0), {
|
1450
|
+
'width': '12px',
|
1451
|
+
'height': '12px',
|
1452
|
+
});
|
1453
|
+
} else {
|
1454
|
+
utilities.verifyCSS(
|
1455
|
+
utilities.getNthElement(thinkSpherePage.planSentenceStarterCheckbox().find('svg g g'), 0), {
|
1456
|
+
'fill': css.color.primaryBtnBg,
|
1457
|
+
});
|
1458
|
+
utilities.verifyCSS(
|
1459
|
+
utilities.getNthElement(thinkSpherePage.planSentenceStarterCheckbox().find('svg'), 0), {
|
1460
|
+
'width': '12px',
|
1461
|
+
'height': '12px',
|
1462
|
+
});
|
1463
|
+
}
|
1464
|
+
});
|
1465
|
+
|
1466
|
+
it('When user clicks on the checkbox button then the checkbox should get unchecked', () => {
|
1467
|
+
if (list === 'strategy') {
|
1468
|
+
thinkSpherePage.steps.selectOption(list, 0);
|
1469
|
+
utilities.getNthElement(thinkSpherePage.planStrategyCheckbox(), 0)
|
1470
|
+
.find('input')
|
1471
|
+
.should('not.be.checked');
|
1472
|
+
thinkSpherePage.steps.selectOption(list, 0);
|
1473
|
+
} else {
|
1474
|
+
thinkSpherePage.steps.selectOption(list, 0);
|
1475
|
+
utilities.getNthElement(thinkSpherePage.planSentenceStarterCheckbox(), 0)
|
1476
|
+
.find('input')
|
1477
|
+
.should('not.be.checked');
|
1478
|
+
thinkSpherePage.steps.selectOption(list, 0);
|
1479
|
+
}
|
1480
|
+
});
|
1481
|
+
|
1482
|
+
it('CSS of unchecked checkbox button', { tags: 'css' }, () => {
|
1483
|
+
if (list === 'strategy') {
|
1484
|
+
thinkSpherePage.steps.selectOption(list, 1);
|
1485
|
+
utilities.verifyCSS(
|
1486
|
+
utilities.getNthElement(thinkSpherePage.planStrategyCheckbox().find('svg'), 1), {
|
1487
|
+
'fill': css.color.uncheckedCheckbox,
|
1488
|
+
'width': '12px',
|
1489
|
+
'height': '12px',
|
1490
|
+
});
|
1491
|
+
} else {
|
1492
|
+
thinkSpherePage.steps.selectOption(list, 1);
|
1493
|
+
utilities.verifyCSS(
|
1494
|
+
utilities.getNthElement(thinkSpherePage.planSentenceStarterCheckbox().find('svg'), 1), {
|
1495
|
+
'fill': css.color.uncheckedCheckbox,
|
1496
|
+
'width': '12px',
|
1497
|
+
'height': '12px',
|
1498
|
+
});
|
1499
|
+
}
|
1500
|
+
});
|
1501
|
+
|
1502
|
+
it('Accessibility of checked \'Checkbox\' button', { tags: 'a11y' }, () => {
|
1503
|
+
if (list === 'strategy') {
|
1504
|
+
cy.checkAccessibility(thinkSpherePage.planStrategyCheckbox());
|
1505
|
+
} else {
|
1506
|
+
cy.checkAccessibility(thinkSpherePage.planSentenceStarterCheckbox());
|
1507
|
+
}
|
1508
|
+
});
|
1509
|
+
},
|
1510
|
+
|
1511
|
+
/**
|
1512
|
+
* Verifies the CSS of the 'Option' input field.
|
1513
|
+
* @param {string} list - The list type ('strategy' or other).
|
1514
|
+
*/
|
1515
|
+
verifyOptionsInput: (list) => {
|
1516
|
+
it('CSS of \'Option\' input field', () => {
|
1517
|
+
if (list === 'strategy') {
|
1518
|
+
utilities.verifyCSS(utilities.getNthElement(thinkSpherePage.listInputField().parent(), 0), {
|
1519
|
+
'border': `1px solid ${css.color.figDefaultComponentBorder}`,
|
1520
|
+
'border-radius': '8px',
|
1521
|
+
'font-size': css.fontSize.default,
|
1522
|
+
'font-weight': css.fontWeight.regular,
|
1523
|
+
});
|
1524
|
+
} else {
|
1525
|
+
utilities.verifyCSS(utilities.getNthElement(thinkSpherePage.listInputField().parent(), 5), {
|
1526
|
+
'border': `1px solid ${css.color.figDefaultComponentBorder}`,
|
1527
|
+
'border-radius': '8px',
|
1528
|
+
'font-size': css.fontSize.default,
|
1529
|
+
'font-weight': css.fontWeight.regular,
|
1530
|
+
});
|
1531
|
+
}
|
1532
|
+
});
|
1533
|
+
},
|
1534
|
+
|
1535
|
+
/**
|
1536
|
+
* Verifies that at least one option is required.
|
1537
|
+
* @param {string} list - The list type ('strategy' or other).
|
1538
|
+
* @param {Array<string>} listOptions - The list of options.
|
1539
|
+
* @param {string} disableTooltipText - The tooltip text to display when the delete button is disabled.
|
1540
|
+
*/
|
1541
|
+
verifyAtleastOneOptionIsRequired: (list, listOptions, disableTooltipText) => {
|
1542
|
+
const optionsToBeDeleted = listOptions.filter((el) => el !== listOptions[0]);
|
1543
|
+
|
1544
|
+
it('When the user deletes the last option, then the \'Delete\' icon button should get disabled', () => {
|
1545
|
+
optionsToBeDeleted.forEach(() => { thinkSpherePage.steps.deleteOption(list === 'strategy' ? 1 : 6) });
|
1546
|
+
thinkSpherePage.steps.verifyDeleteOptionButtonDisabledState(list);
|
1547
|
+
optionsToBeDeleted.forEach(() => { thinkSpherePage.steps.addOption(list) });
|
1548
|
+
listOptions.forEach((inputFieldText, optionIndex) => {
|
1549
|
+
thinkSpherePage.steps.addOptionText(list, optionIndex, inputFieldText);
|
1550
|
+
});
|
1551
|
+
});
|
1552
|
+
|
1553
|
+
it('When the user hovers over the disabled delete buttons of the options then \'Minimum one option is required\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the delete button', () => {
|
1554
|
+
utilities.getNthElement(thinkSpherePage.deleteButton(), list === 'strategy' ? 0 : 5)
|
1555
|
+
.trigger('mouseover', { force: true });
|
1556
|
+
utilities.verifyInnerText(thinkSpherePage.tooltipText(), disableTooltipText);
|
1557
|
+
utilities.getNthElement(thinkSpherePage.deleteButton(), list === 'strategy' ? 0 : 5)
|
1558
|
+
.trigger('mouseout', { force: true });
|
1559
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.tooltipText(), 'notExist');
|
1560
|
+
});
|
1561
|
+
|
1562
|
+
it('When the user uncheck the last option, then the \'Checkbox\' icon button should get disabled', () => {
|
1563
|
+
thinkSpherePage.steps.verifyCheckboxButtonDisabledState(list, 0);
|
1564
|
+
});
|
1565
|
+
},
|
1566
|
+
|
1567
|
+
verifyUploadImageSectionContentWithCSSAndA11y: () => {
|
1568
|
+
it('\'Upload\' label and \'Choose file\' button should be displayed', () => {
|
1569
|
+
utilities.verifyInnerText(backgroundImageUploadComponent.uploadLabel(), 'Upload');
|
1570
|
+
utilities.verifyElementVisibilityState(backgroundImageUploadComponent.uploadLabel(), 'visible');
|
1571
|
+
utilities.verifyInnerText(backgroundImageUploadComponent.chooseFileButton(), 'Choose file');
|
1572
|
+
utilities.verifyElementVisibilityState(backgroundImageUploadComponent.chooseFileButton(), 'visible');
|
1573
|
+
});
|
1574
|
+
|
1575
|
+
it('\'File name\' label should be displayed and by default \'No file chosen\' text should be displayed below the \'File name\' label.', () => {
|
1576
|
+
utilities.verifyInnerText(backgroundImageUploadComponent.fileNameLabel(), 'File name');
|
1577
|
+
utilities.verifyElementVisibilityState(backgroundImageUploadComponent.fileNameLabel(), 'visible');
|
1578
|
+
utilities.verifyInnerText(backgroundImageUploadComponent.noFileChosenLabel(), 'No file chosen');
|
1579
|
+
utilities.verifyElementVisibilityState(backgroundImageUploadComponent.noFileChosenLabel(), 'visible');
|
1580
|
+
});
|
1581
|
+
|
1582
|
+
backgroundImageUploadComponent.tests.verifyCSSAndA11yBeforeUpload();
|
1583
|
+
|
1584
|
+
backgroundImageUploadComponent.tests.verifyImageUploadFunctionality('thinkSphere');
|
1585
|
+
},
|
1586
|
+
|
1587
|
+
verifyQuestionInstructionsInputFieldThinkSpherePreviewTab: () => {
|
1588
|
+
it('When user has not entered any text in the Question instructions input field in the \'Edit\' tab then nothing should be displayed in the \'Preview\' tab', () => {
|
1589
|
+
createQuestionBasePage.steps.switchToPreviewTab();
|
1590
|
+
//Failing due to https://redmine.zeuslearning.com/issues/553382
|
1591
|
+
utilities.verifyElementVisibilityState(questionInstructionsComponent.questionInstructionsText(), 'notExist')
|
1592
|
+
});
|
1593
|
+
|
1594
|
+
it('When the user specifies question instructions, then the added question instructions should be displayed in the \'Preview\' tab', () => {
|
1595
|
+
createQuestionBasePage.steps.switchToEditTab();
|
1596
|
+
questionInstructionsComponent.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
1597
|
+
// UNCOMMENT BELOW CODE WHEN PREVIEW TAB IS AVAILABLE FOR THINKSPHERE
|
1598
|
+
// createQuestionBasePage.steps.switchToPreviewTab();
|
1599
|
+
// utilities.verifyTextContent(questionInstructionsComponent.questionInstructionsTextPreviewTab(), 'Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
1600
|
+
});
|
1601
|
+
},
|
1602
|
+
|
1603
|
+
verifyResetToDefaultFunctionality: (optionList, listType) => {
|
1604
|
+
if (listType === 'strategy') {
|
1605
|
+
it('When user clicks on \'Reset to default\' button then the strategy list should be reset to default', () => {
|
1606
|
+
thinkSpherePage.planStrategyListResetToDefault()
|
1607
|
+
.click();
|
1608
|
+
optionList.forEach((option, index) => {
|
1609
|
+
thinkSpherePage.steps.verifyOptionsContents(index, option, 'Enter strategy name');
|
1610
|
+
});
|
1611
|
+
});
|
1612
|
+
} else {
|
1613
|
+
it('When user clicks on \'Reset to default\' button then the sentence starter list should be reset to default', () => {
|
1614
|
+
thinkSpherePage.planSentenceStarterListResetToDefault()
|
1615
|
+
.click();
|
1616
|
+
thinkSpherePage.planSentenceStarterSection()
|
1617
|
+
.within(() => {
|
1618
|
+
optionList.forEach((option, index) => {
|
1619
|
+
thinkSpherePage.steps.verifyOptionsContents(index, option, 'Enter sentence starter name');
|
1620
|
+
});
|
1621
|
+
})
|
1622
|
+
});
|
1623
|
+
}
|
1624
|
+
},
|
1625
|
+
|
1626
|
+
verifyVideoLinkComponent: () => {
|
1627
|
+
it('Video link component should be displayed', () => {
|
1628
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.videoLinkComponent(), 'visible');
|
1629
|
+
utilities.verifyInnerText(thinkSpherePage.videoLinkComponent(), 'Upload video');
|
1630
|
+
});
|
1631
|
+
|
1632
|
+
it('CSS of video link component', { tags: 'css' }, () => {
|
1633
|
+
thinkSpherePage.videoLinkComponent()
|
1634
|
+
.within(() => {
|
1635
|
+
utilities.verifyCSS(thinkSpherePage.uploadVideoLinkButton(), {
|
1636
|
+
'color': css.color.linkText,
|
1637
|
+
'font-size': css.fontSize.default,
|
1638
|
+
'font-weight': css.fontWeight.regular,
|
1639
|
+
'font-family': '"Nunito Sans"',
|
1640
|
+
'text-decoration-line': 'underline',
|
1641
|
+
});
|
1642
|
+
|
1643
|
+
cy.log('CSS of video link component on hover state');
|
1644
|
+
utilities.hoverOverElement(thinkSpherePage.uploadVideoLinkButton());
|
1645
|
+
utilities.verifyCSS(thinkSpherePage.uploadVideoLinkButton(), {
|
1646
|
+
'text-decoration-line': 'none',
|
1647
|
+
});
|
1648
|
+
});
|
1649
|
+
});
|
1650
|
+
|
1651
|
+
it('When user upload a file whose extension is not supported then an error message should be displayed', () => {
|
1652
|
+
thinkSpherePage.videoLinkComponent()
|
1653
|
+
.within(() => {
|
1654
|
+
thinkSpherePage.uploadVideoLinkButton()
|
1655
|
+
.click();
|
1656
|
+
});
|
1657
|
+
thinkSpherePage.steps.uploadVideoFile('uploads/sample.wmv');
|
1658
|
+
thinkSpherePage.steps.verifyWarningPopup('File upload error', 'The file type is not supported. Please upload files with the following supported formats: mp4, webm.');
|
1659
|
+
});
|
1660
|
+
|
1661
|
+
it('CSS of warning popup', { tags: 'css' }, () => {
|
1662
|
+
utilities.verifyCSS(dialogBoxBase.dialogBox(), {
|
1663
|
+
'border': `1px solid ${css.color.secondaryBtnBorder}`,
|
1664
|
+
'border-radius': '8px',
|
1665
|
+
'background-color': css.color.primaryBtn,
|
1666
|
+
'box-shadow': `${css.color.dialogBoxBoxShadow} 0px 0px 10px 0px`,
|
1667
|
+
});
|
1668
|
+
|
1669
|
+
dialogBoxBase.dialogBoxTitle().within(() => {
|
1670
|
+
utilities.verifyCSS(thinkSpherePage.warningPopupTitle(), {
|
1671
|
+
'color': css.color.secondaryBtn,
|
1672
|
+
'font-size': css.fontSize.heading,
|
1673
|
+
'font-weight': css.fontWeight.bold
|
1674
|
+
});
|
1675
|
+
});
|
1676
|
+
|
1677
|
+
dialogBoxBase.dialogBoxContent().within(() => {
|
1678
|
+
utilities.verifyCSS(thinkSpherePage.warningPopupContentText(), {
|
1679
|
+
'color': css.color.sectionHeading,
|
1680
|
+
'font-size': css.fontSize.default,
|
1681
|
+
'font-weight': css.fontWeight.regular,
|
1682
|
+
'font-family': 'Inter'
|
1683
|
+
});
|
1684
|
+
|
1685
|
+
utilities.verifyCSS(thinkSpherePage.warningPopupOkButton(), {
|
1686
|
+
'background-color': css.color.primaryBtnBg,
|
1687
|
+
'border': `1px solid ${css.color.primaryBtnBorder}`,
|
1688
|
+
'color': css.color.primaryBtn,
|
1689
|
+
'border-radius': '8px',
|
1690
|
+
'font-size': css.fontSize.default,
|
1691
|
+
'font-weight': css.fontWeight.semibold,
|
1692
|
+
'font-family': '"Nunito Sans"',
|
1693
|
+
'box-shadow': `${css.color.primaryBtnBorder} 0px 5px 0px 0px`
|
1694
|
+
});
|
1695
|
+
});
|
1696
|
+
});
|
1697
|
+
|
1698
|
+
it('When user click on OK button of warning popup then the popup should be closed', () => {
|
1699
|
+
dialogBoxBase.dialogBoxContent().within(() => {
|
1700
|
+
thinkSpherePage.warningPopupOkButton()
|
1701
|
+
.click();
|
1702
|
+
});
|
1703
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
1704
|
+
});
|
1705
|
+
|
1706
|
+
it('When user upload a file whose extension is supported then no error message should be displayed', () => {
|
1707
|
+
thinkSpherePage.videoLinkComponent()
|
1708
|
+
.within(() => {
|
1709
|
+
thinkSpherePage.uploadVideoLinkButton()
|
1710
|
+
.click();
|
1711
|
+
});
|
1712
|
+
thinkSpherePage.steps.uploadVideoFile('uploads/sample.webm');
|
1713
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
1714
|
+
thinkSpherePage.videoLinkComponent()
|
1715
|
+
.within(() => {
|
1716
|
+
thinkSpherePage.deleteVideoButton()
|
1717
|
+
.click();
|
1718
|
+
});
|
1719
|
+
});
|
1720
|
+
|
1721
|
+
it('When user upload a file of size more than 25MB then an error message should be displayed', () => {
|
1722
|
+
thinkSpherePage.videoLinkComponent()
|
1723
|
+
.within(() => {
|
1724
|
+
thinkSpherePage.uploadVideoLinkButton()
|
1725
|
+
.click();
|
1726
|
+
});
|
1727
|
+
thinkSpherePage.steps.uploadVideoFile('uploads/sample30MB.mp4');
|
1728
|
+
thinkSpherePage.steps.verifyWarningPopup('File upload error', 'The file could not be uploaded. The file is 31 MB exceeding the maximum size of 25 MB.');
|
1729
|
+
});
|
1730
|
+
|
1731
|
+
it('When user click on OK button of warning popup then the popup should be closed', () => {
|
1732
|
+
dialogBoxBase.dialogBoxContent().within(() => {
|
1733
|
+
thinkSpherePage.warningPopupOkButton()
|
1734
|
+
.click();
|
1735
|
+
});
|
1736
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
1737
|
+
});
|
1738
|
+
|
1739
|
+
it('When user upload a file of size less than 25MB then no error message should be displayed and video uploaded successfully', () => {
|
1740
|
+
thinkSpherePage.videoLinkComponent()
|
1741
|
+
.within(() => {
|
1742
|
+
thinkSpherePage.uploadVideoLinkButton()
|
1743
|
+
.click();
|
1744
|
+
});
|
1745
|
+
thinkSpherePage.steps.uploadVideoFile('uploads/sample2MB.mp4');
|
1746
|
+
cy.interceptGraphql('getFileScanStatus');
|
1747
|
+
cy.wait(5000);
|
1748
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
1749
|
+
});
|
1750
|
+
|
1751
|
+
it('When user upload correct file then uploaded file name, edit video button along with delete video button should present', () => {
|
1752
|
+
thinkSpherePage.videoLinkComponent().within(() => {
|
1753
|
+
utilities.verifyInnerText(thinkSpherePage.uploadVideoLinkButton(), 'sample2MB.mp4');
|
1754
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.editVideoButton(), 'visible');
|
1755
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.deleteVideoButton(), 'visible');
|
1756
|
+
});
|
1757
|
+
});
|
1758
|
+
|
1759
|
+
it('CSS of edit video button and delete video button', { tags: 'css' }, () => {
|
1760
|
+
thinkSpherePage.videoLinkComponent().within(() => {
|
1761
|
+
utilities.verifyCSS(thinkSpherePage.editVideoButton(), {
|
1762
|
+
'width': '24px',
|
1763
|
+
'height': '24px',
|
1764
|
+
'background-color': css.color.transparent,
|
1765
|
+
});
|
1766
|
+
utilities.verifyCSS(thinkSpherePage.deleteVideoButton(), {
|
1767
|
+
'width': '24px',
|
1768
|
+
'height': '24px',
|
1769
|
+
'background-color': css.color.transparent,
|
1770
|
+
});
|
1771
|
+
});
|
1772
|
+
});
|
1773
|
+
|
1774
|
+
it('When user upload another file size less than 25MB then no error message should be displayed and video uploaded successfully', () => {
|
1775
|
+
thinkSpherePage.videoLinkComponent()
|
1776
|
+
.within(() => {
|
1777
|
+
thinkSpherePage.editVideoButton()
|
1778
|
+
.click();
|
1779
|
+
});
|
1780
|
+
thinkSpherePage.steps.uploadVideoFile('uploads/sample2MB_2.mp4');
|
1781
|
+
cy.interceptGraphql('getFileScanStatus');
|
1782
|
+
cy.wait(5000);
|
1783
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
1784
|
+
});
|
1785
|
+
|
1786
|
+
it('When user upload another correct file then uploaded file name, edit video button along with delete video button should present', () => {
|
1787
|
+
thinkSpherePage.videoLinkComponent().within(() => {
|
1788
|
+
utilities.verifyInnerText(thinkSpherePage.uploadVideoLinkButton(), 'sample2MB_2.mp4');
|
1789
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.editVideoButton(), 'visible');
|
1790
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.deleteVideoButton(), 'visible');
|
1791
|
+
});
|
1792
|
+
});
|
1793
|
+
|
1794
|
+
it('When user click on delete video button then the video should be deleted', () => {
|
1795
|
+
thinkSpherePage.videoLinkComponent()
|
1796
|
+
.within(() => {
|
1797
|
+
thinkSpherePage.deleteVideoButton()
|
1798
|
+
.click();
|
1799
|
+
});
|
1800
|
+
utilities.verifyInnerText(thinkSpherePage.videoLinkComponent(), 'Upload video');
|
1801
|
+
});
|
1802
|
+
|
1803
|
+
it('Accessibility of video link component', { tags: 'a11y' }, () => {
|
1804
|
+
cy.checkAccessibility(thinkSpherePage.singleOptionTextFieldWrapper());
|
1805
|
+
});
|
1806
|
+
},
|
1807
|
+
|
1808
|
+
verifyErrorMessageCSSAndA11y: () => {
|
1809
|
+
it('CSS of error message', { tags: 'css' }, () => {
|
1810
|
+
utilities.verifyCSS(commonComponents.errorMessage(), {
|
1811
|
+
'color': css.color.errorText,
|
1812
|
+
'font-size': css.fontSize.small,
|
1813
|
+
'font-weight': css.fontWeight.regular
|
1814
|
+
});
|
1815
|
+
});
|
1816
|
+
|
1817
|
+
it('Accessibility of error message', { tags: 'a11y' }, () => {
|
1818
|
+
cy.checkAccessibility(thinkSpherePage.nextGenThinkSphereCreateItemWrapper());
|
1819
|
+
});
|
1820
|
+
},
|
1821
|
+
|
1822
|
+
verifyQuestionAccordion: () => {
|
1823
|
+
it('Author should be able to expand and collapse the question accordion by clicking on the expand icon', () => {
|
1824
|
+
thinkSpherePage.filterSectionQuestionAccordion().each(($accordion) => {
|
1825
|
+
cy.wrap($accordion).find('.expansion-item-icon-wrapper').click();
|
1826
|
+
cy.wrap($accordion).should('have.class', 'Mui-expanded');
|
1827
|
+
});
|
1828
|
+
|
1829
|
+
thinkSpherePage.filterSectionQuestionAccordion().each(($accordion) => {
|
1830
|
+
cy.wrap($accordion).find('.expansion-item-icon-wrapper').click();
|
1831
|
+
cy.wrap($accordion).should('not.have.class', 'Mui-expanded');
|
1832
|
+
});
|
1833
|
+
});
|
1834
|
+
},
|
1835
|
+
|
1836
|
+
verifyCreateItemHeaderSection: () => {
|
1837
|
+
it('The page displays a unique Reference ID at the top left corner in the format "Ref ID:"', () => {
|
1838
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.referenceIdWrapper(), 'visible');
|
1839
|
+
utilities.verifyInnerText(thinkSpherePage.referenceIdWrapper().children('div').first(), 'Ref ID:\u00A0');
|
1840
|
+
const initialRefId = thinkSpherePage.referenceIdWrapper().children('div').eq(1).invoke('text');
|
1841
|
+
initialRefId.then((refId) => {
|
1842
|
+
expect(refId).to.be.a('string').and.not.be.empty;
|
1843
|
+
cy.reload();
|
1844
|
+
thinkSpherePage.referenceIdWrapper().children('div').eq(1).invoke('text').should((newRefId) => {
|
1845
|
+
expect(newRefId).to.be.a('string').and.not.be.empty;
|
1846
|
+
expect(newRefId).to.not.equal(refId);
|
1847
|
+
});
|
1848
|
+
});
|
1849
|
+
});
|
1850
|
+
|
1851
|
+
it('Edit text box and edit icon pencil should exist, and on clicking the edit input field with placeholder \'Enter title\ should allow the user to add title' , () => {
|
1852
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.editBoxTextInput(), 'visible');
|
1853
|
+
thinkSpherePage.editBoxTextInput().blur();
|
1854
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.editIconPencil(), 'visible');
|
1855
|
+
thinkSpherePage.editIconPencil().click();
|
1856
|
+
thinkSpherePage.editBoxTextInput().should('have.attr', 'placeholder', 'Enter title');
|
1857
|
+
thinkSpherePage.editBoxTextInput().type('Test Title');
|
1858
|
+
thinkSpherePage.editBoxTextInput().blur();
|
1859
|
+
utilities.verifyInnerText(thinkSpherePage.editBoxText(),'Test Title');
|
1860
|
+
});
|
1861
|
+
},
|
1862
|
+
|
1863
|
+
verifyDefaultTab: () => {
|
1864
|
+
it('By default edit tab should be selected', () => {
|
1865
|
+
thinkSpherePage.editTab().should('have.class', 'Mui-selected');
|
1866
|
+
});
|
1867
|
+
},
|
1868
|
+
};
|
1869
|
+
|
1870
|
+
export const thinkSpherePage = {
|
1871
|
+
...selectors,
|
1872
|
+
steps,
|
1873
|
+
tests
|
1874
|
+
};
|