itemengine-cypress-automation 1.0.349-TEMRegression4-f1b48a1.0 → 1.0.349
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/Dockerfile +1 -0
- 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/HorizontalOrientationBarChart/gradingViewAndCorrectAnswerView.smoke.js +1 -1
- 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 +2 -4
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerEditTabStudentViewSettings.js +3 -3
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerHeaderSectionAndButtons.js +2 -2
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerPreviewTab.js +1 -1
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerPreviewTabTranscript.js +2 -3
- package/cypress/e2e/ILC/CkEditorEquationEditor/equationEditorBasicFile.js +4 -4
- package/cypress/e2e/ILC/CkEditorInsertImage/imageInfo.js +4 -4
- package/cypress/e2e/ILC/CkEditorInsertTable/tableStyle.js +2 -2
- package/cypress/e2e/ILC/CkEditorLink/uploadSection.js +1 -1
- package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +62 -4
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +115 -6
- 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 +73 -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 +87 -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/editTabScoringSection.js +1 -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/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/allOrNothingScoringForAllViews.smoke.js +210 -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/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +208 -0
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingBasicForAllViews.smoke.js +227 -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/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +1 -0
- 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 +5 -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 +75 -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/NumberLineLabel/verticalNumberLine/editQuestion.smoke.js +1 -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 +86 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +86 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +65 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +3 -1
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsScoringBasic.js +10 -3
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +4 -2
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +5 -3
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsScoringBasic.js +4 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +64 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAddEvaluation.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAlternateAnswer.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +64 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +65 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +8 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasicForAlternateAnswer.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +27 -3
- 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 -1
- package/cypress/e2e/ILC/TextEntryMath/headerSection.js +43 -0
- package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +7 -5
- 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 +276 -0
- package/cypress/e2e/ILC/ThinkSphere/equationEditorCreateCustomCategory.smoke.js +417 -0
- package/cypress/e2e/ILC/ThinkSphere/equationEditorEditCategoryFlyOut.js +291 -0
- package/cypress/e2e/ILC/ThinkSphere/headerSection.js +53 -0
- package/cypress/e2e/ILC/ThinkSphere/planPhase.js +621 -0
- package/cypress/e2e/ILC/ThinkSphere/previewTabPlanSection.js +541 -0
- package/cypress/e2e/ILC/ThinkSphere/previewTabReviewSection.js +97 -0
- package/cypress/e2e/ILC/ThinkSphere/solvePhase.js +296 -0
- package/cypress/e2e/ILC/ThinkSphere/studentViewPlanTabSection.js +393 -0
- package/cypress/e2e/ILC/ThinkSphere/studentViewReviewTabSection.js +141 -0
- package/cypress/e2e/ILC/ToolAudioPlayerNew/headerSection.js +90 -2
- 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 +8 -10
- 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 +47 -22
- package/cypress/pages/brainingCampManipulativePage.js +1 -1
- 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 +5 -4
- package/cypress/pages/components/ckEditorInsertImageComponent.js +2 -2
- package/cypress/pages/components/ckEditorLinkComponent.js +8 -9
- package/cypress/pages/components/commonComponents.js +8 -1
- package/cypress/pages/components/createQuestionBasePage.js +15 -2
- package/cypress/pages/components/defaultToolDropdown.js +7 -6
- package/cypress/pages/components/editCategoryFlyout.js +2 -2
- package/cypress/pages/components/equationEditorSectionCommonComponent.js +10 -25
- 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 +5 -0
- package/cypress/pages/contentBlocksPage.js +2 -0
- 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 +6 -4
- 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 +24 -1
- package/cypress/pages/thinkSpherePage.js +2185 -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 +1200 -1
- package/cypress/support/helpers/utilities.js +88 -1
- package/package.json +3 -3
@@ -1,22 +1,143 @@
|
|
1
1
|
import utilities from "../../support/helpers/utilities";
|
2
2
|
import { commonComponents } from "./commonComponents";
|
3
|
+
import { dialogBoxBase } from '../dialogBoxBase';
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
let duplicateItemReferenceID = "";
|
3
7
|
|
4
8
|
const selectors = {
|
5
9
|
...commonComponents,
|
6
10
|
browseItemPageWrapper: () => cy.get('.browse-item-page'),
|
11
|
+
browseItemPageHeaderActionWrapper: () => cy.get('.browse-item-header-action-wrapper'),
|
12
|
+
browseItemPageHeader: () => cy.get('.browse-title-wrapper'),
|
13
|
+
browseThinksphereItemsMenuBarOption: () => cy.get('[aria-label="Navigation Drawer List"]').contains('Browse ThinkSphere Items'),
|
14
|
+
datatableWrapper: () => cy.get('.data-table-wrapper'),
|
15
|
+
allTableRow: () => cy.get('[data-testid*="MUIDataTableBodyRow"]'),
|
16
|
+
buttonCreateItem: () => cy.get('.browse-item-header-action-wrapper .ngie-btn-contained[role="button"]'),
|
17
|
+
buttonCancelCreateQuestion: () => cy.get('.browse-item-header-action-wrapper .ngie-btn-outlined'),
|
18
|
+
tableColumnHeader: (columnNumber) => utilities.getNthElement(cy.get('div[class*="TableHeaderstyles__FlexWrapper"]'), columnNumber),
|
19
|
+
tableRow: (rowNumber) => utilities.getNthElement(cy.get('tr[data-testid*="MUIDataTableBodyRow"]'), rowNumber),
|
20
|
+
itemCellItemTitle: () => utilities.getNthElement(cy.get('td[data-testid*="MuiDataTableBodyCell-0"]').find('button'), 0),
|
21
|
+
itemCellInstructionText: () => cy.get('div[class*="ItemTitleCellstyles__InstructionText"]'),
|
22
|
+
lastUpdatedValue: () => cy.get('time'),
|
23
|
+
metadataCell: () => cy.get('td[data-testid*="MuiDataTableBodyCell-3"]'),
|
24
|
+
metadataCellTagLabel: () => cy.get('div[class*="DynamicMultilineTagsListstyles__TagsWrapper"]'),
|
25
|
+
headerActionButtonWrapper: () => cy.get('.browse-item-header-action-button-wrapper'),
|
26
|
+
itemListFilterWrapper: () => cy.get('.itemlist-filter-wrapper'),
|
27
|
+
actionsMenu: () => cy.get('[class*="ngie-action-cells-ul"]'),
|
28
|
+
actionsMenuItem: (menuItemNumber) => utilities.getNthElement(cy.get('li[role="menuitem"]'), menuItemNumber),
|
29
|
+
actionMenuButton: () => cy.get('[class*="ActionMenu__ButtonWrapper"]').find('button'),
|
30
|
+
iconSortAscending: () => cy.get('svg[aria-label="ascending-sort"]'),
|
31
|
+
iconSortDescending: () => cy.get('svg[aria-label="descending-sort"]'),
|
32
|
+
paginationCountText: () => cy.get('[class*="TablePaginationstyles__CountText"]'),
|
33
|
+
paginationBlock: () => cy.get('[class*="TablePaginationstyles__PaginationBlock"]'),
|
34
|
+
buttonSkipToFirstPage: () => cy.get('[aria-label*="Skip to first page"]'),
|
35
|
+
buttonSkipToLastPage: () => cy.get('[aria-label*="Skip to last page"]'),
|
36
|
+
buttonPrevious: () => cy.get('[aria-label*="Previous page"]'),
|
37
|
+
buttonNext: () => cy.get('[aria-label*="Next page"]'),
|
7
38
|
itemLabel: () => cy.get('#reference-header'),
|
8
39
|
lastUpdatedLabel: () => cy.get('#updated-header'),
|
9
|
-
searchInputField: () => cy.get('.ngie-search input'),
|
10
40
|
sortArrow: () => cy.get('.table-header-sort-arrow'),
|
11
41
|
browseItemsLabel: () => cy.get('.browse-title-wrapper'),
|
12
42
|
browseItemsItem: () => cy.get('tr[id*="MUIDataTableBodyRow"]'),
|
13
43
|
browseItemPageReferenceId: () => cy.get('[class*="ItemTitleCellstyles__ReferenceId"]'),
|
14
|
-
|
44
|
+
addReviewQuestionButton: () => cy.get('.ngie-btn-contained').contains('Add \'Check your math\' question'),
|
45
|
+
createItemButtonTypography: () => browseItemsPage.buttonCreateItem().find('.ngie-btn-typography'),
|
46
|
+
createQuestionCancelButtonTypography: () => browseItemsPage.buttonCancelCreateQuestion().find('.ngie-btn-typography'),
|
47
|
+
tableColumnHeaderBrowseItemWrapperDiv: (count) => browseItemsPage.tableColumnHeader(count).find('div.browse-item-component-wrapper div'),
|
48
|
+
rowItemTitle: () => cy.get('.browse-item-styled-link'),
|
49
|
+
previewModeWrapper: () => cy.get('.preview-mode-wrapper'),
|
50
|
+
saveButton: () => cy.get('.ngie-btn-typography').contains('save',{matchCase: false}),
|
51
|
+
cancelButton: () => cy.get('.ngie-btn-typography').contains('cancel',{matchCase: false}),
|
52
|
+
radioGroup: () => cy.get('.ngie-radio-group'),
|
53
|
+
studentViewRadioButton: () => cy.get('[class*="RadioGroupMUI5styles__RadioOptionContainer"]').eq(0),
|
54
|
+
gradingViewRadioButton: () => cy.get('[class*="RadioGroupMUI5styles__RadioOptionContainer"]').eq(1),
|
55
|
+
browseItemQuestionItem: () => cy.get('.browse-item-question-item')
|
56
|
+
};
|
57
|
+
|
58
|
+
const searchBarSelectors = {
|
59
|
+
searchBar: () => cy.get('input[placeholder*="Search by"]'),
|
60
|
+
buttonClearSearch: () => cy.get('[data-at="clear-button"]'),
|
61
|
+
buttonSearch: () => cy.get('button[aria-label="Search"]'),
|
62
|
+
buttonSearchSVG: () => cy.get('button[aria-label="Search"]').find('svg'),
|
63
|
+
mobileViewSearchBar: () => cy.get('input[placeholder*="Search by title"]'),
|
64
|
+
searchInputField: () => cy.get('.ngie-search input'),
|
65
|
+
searchBarParent: () => cy.get('input[placeholder*="Search by"]').parent(),
|
66
|
+
};
|
67
|
+
|
68
|
+
const mobileViewBrowsePageSelectors = {
|
69
|
+
mobileViewSortByWrapper: () => cy.get('.sortby-component-wrapper'),
|
70
|
+
mobileViewSortByDropdown: () => cy.get('[id="sortby-select"]'),
|
71
|
+
mobileViewSortByDropdownLabelWrapper: () => cy.get('[class*="sort-by-dropdown-label-wrapper"]'),
|
72
|
+
mobileViewSortByDropdownLabel : () => cy.get('.sort-by-dropdown-label'),
|
73
|
+
mobileViewSortDescendingSVG: () => cy.get('[aria-label="sorted descending"]'),
|
74
|
+
mobileViewSortAscendingSVG: () => cy.get('[aria-label="sorted ascending"]'),
|
75
|
+
mobileViewSortByDropdownList: (itemNumber) => utilities.getNthElement(cy.get('[aria-labelledby="scoring-type-dropdown-label"]').find('li'), itemNumber),
|
76
|
+
mobileViewSortbyDropdownOptions: (optionNumber) => utilities.getNthElement(cy.get('li[role="option"]'), optionNumber),
|
77
|
+
mobileViewSortbyDropdownOptionsList: () => cy.get('.dropdown-list'),
|
78
|
+
mobileViewIconSorted: () => cy.get('[aria-label*="sorted"]'),
|
79
|
+
mobileViewSortByLabel: () => cy.get('span[class*="SortBystyles__SortByTextSpan"]'),
|
80
|
+
mobileViewDropdownText: () => cy.get('div[class*="SortBystyles__ItemWrapper"]'),
|
81
|
+
mobileViewSortByDropdownUL: () => cy.get('ul[aria-labelledby="sortby-dropdown-label"]'),
|
82
|
+
mobileViewMetaDataLabel: () => cy.get('div[class*="ItemTitleCellstyles__MetaDataText"]'),
|
83
|
+
mobileViewlastUpdatedLabel: () => cy.get('div[class*="ItemTitleCellstyles__LastUpdatedText"]'),
|
84
|
+
mobileViewMetadataContent: () => cy.get('div[class*="ItemTitleCellstyles__MetaData-"]'),
|
85
|
+
filterSection: () => cy.get('.filter-section-content-wrapper'),
|
86
|
+
filterButton: () => cy.get('.itemlist-filter-wrapper .ngie-button'),
|
87
|
+
filterButtonText: () => browseItemsPage.filterButton().find('.filter-text'),
|
88
|
+
filterCategories: (category = '') => {
|
89
|
+
if (!category) {
|
90
|
+
return cy.get('.expansion-item-expansion-panel-summary-content div[role="menu"]');
|
91
|
+
}
|
92
|
+
return cy.get(`.expansion-item-expansion-panel-summary-content div[role="menu"][aria-label*="${category}"]`);
|
93
|
+
},
|
94
|
+
filterCategoryCheckbox: (category) => {
|
95
|
+
if(!category) {
|
96
|
+
return cy.get('.expansion-item-checkbox-label input');
|
97
|
+
}
|
98
|
+
return cy.get(`.expansion-item-checkbox-wrapper input[aria-label*="${category}"]`);
|
99
|
+
},
|
100
|
+
filterItem: (item) => {
|
101
|
+
if (!item) {
|
102
|
+
return cy.get('.expansion-item-checkbox-label input');
|
103
|
+
}
|
104
|
+
return cy.get(`.expansion-item-checkbox-label input[aria-label*="${item}"]`);
|
105
|
+
},
|
106
|
+
filterChip: (chip) => {
|
107
|
+
if (!chip) {
|
108
|
+
return cy.get('.filter-chip');
|
109
|
+
}
|
110
|
+
return cy.get(`.filter-chip[aria-label*="${chip}"]`);
|
111
|
+
},
|
112
|
+
filterChipCancelButton: (chip) => {
|
113
|
+
if (!chip) {
|
114
|
+
return utilities.getNthElement(cy.get(`.filter-chip button[aria-label*="Remove"]`), 0);
|
115
|
+
}
|
116
|
+
return utilities.getNthElement(cy.get(`.filter-chip[aria-label*="${chip}"] button[aria-label*="Remove"]`), 0);
|
117
|
+
},
|
118
|
+
filterChipClearAll: () => cy.get('.filter-chip-clearall'),
|
119
|
+
itemTitleCell: () => cy.get('[class*=ItemTitleCellstyles__ItemCellWrapper]'),
|
120
|
+
};
|
15
121
|
|
16
122
|
const steps = {
|
17
123
|
navigateToBrowseItemsPage: () => {
|
18
124
|
cy.visit('/item-engine/demo/browse-items');
|
19
125
|
},
|
126
|
+
|
127
|
+
navigateToThinkSphereBrowseItemsPage: () => {
|
128
|
+
cy.visit('/item-engine/thinksphere/browse-items');
|
129
|
+
},
|
130
|
+
|
131
|
+
navigateToReviewItemsPage: () => {
|
132
|
+
browseItemsPage.steps.navigateToThinkSphereBrowseItemsPage();
|
133
|
+
browseItemsPage.steps.clickOnItemReferenceId();
|
134
|
+
browseItemsPage.steps.clickOnAddReviewItem();
|
135
|
+
},
|
136
|
+
|
137
|
+
clickOnAddReviewItem: () => {
|
138
|
+
browseItemsPage.addReviewQuestionButton()
|
139
|
+
.click();
|
140
|
+
},
|
20
141
|
|
21
142
|
verifyBrowseItemContainerIsVisible: () => {
|
22
143
|
browseItemsPage.browseItemPageWrapper()
|
@@ -44,8 +165,8 @@ const steps = {
|
|
44
165
|
},
|
45
166
|
|
46
167
|
/**
|
47
|
-
* @param {string} value
|
48
|
-
* @description
|
168
|
+
* @param {string} value - The text that needs to be searched.
|
169
|
+
* @description Enters value in input field and searches for the entered value.
|
49
170
|
*/
|
50
171
|
search: (value) => {
|
51
172
|
browseItemsPage.searchInputField()
|
@@ -81,9 +202,879 @@ const steps = {
|
|
81
202
|
}
|
82
203
|
});
|
83
204
|
},
|
84
|
-
|
205
|
+
|
206
|
+
clickOnBrowseThinkSphereItemsMenuBarOption: () => {
|
207
|
+
browseItemsPage.browseThinksphereItemsMenuBarOption()
|
208
|
+
.click();
|
209
|
+
cy.interceptGraphql('getItems');
|
210
|
+
cy.wait(2000);
|
211
|
+
},
|
212
|
+
|
213
|
+
verifyBrowseThinkSphereItemsMenuBarOptionSelected: () => {
|
214
|
+
browseItemsPage.browseThinksphereItemsMenuBarOption()
|
215
|
+
.parents('.MuiButtonBase-root.MuiListItemButton-root.MuiListItemButton-gutters')
|
216
|
+
.should('have.class', 'Mui-selected');
|
217
|
+
},
|
218
|
+
|
219
|
+
verifyBrowseItemsPageWrapperSection: () => {
|
220
|
+
utilities.verifyElementVisibilityState(browseItemsPage.browseItemPageWrapper(), 'visible');
|
221
|
+
},
|
222
|
+
|
223
|
+
verifyBrowseItemPageHeaderActionWrapper: () => {
|
224
|
+
utilities.verifyElementVisibilityState(browseItemsPage.browseItemPageHeaderActionWrapper(), 'visible');
|
225
|
+
},
|
226
|
+
|
227
|
+
clickOnCreateItemButton: () => {
|
228
|
+
browseItemsPage.buttonCreateItem()
|
229
|
+
.click();
|
230
|
+
cy.interceptGraphql('getQuestionTypeAndResourceTypeList');
|
231
|
+
cy.wait(2000);
|
232
|
+
},
|
233
|
+
|
234
|
+
/**
|
235
|
+
* Verifies the page URL.
|
236
|
+
* @param {string} url - The URL to verify.
|
237
|
+
*/
|
238
|
+
verifyPageUrl: (url) => { cy.url().should('contain', Cypress.config().baseUrl + url); },
|
239
|
+
|
240
|
+
clickWindowsBack: () => { cy.go('back'); },
|
241
|
+
|
242
|
+
/**
|
243
|
+
* Verifies the column headers in the listing table.
|
244
|
+
* @param {Array<string>} tableHeader - The table headers to verify.
|
245
|
+
*/
|
246
|
+
verifyColumnHeadersInListingTable: (tableHeader) => {
|
247
|
+
tableHeader.forEach((i, count) => { utilities.verifyInnerText(browseItemsPage.tableColumnHeader(count), i); });
|
248
|
+
},
|
249
|
+
|
250
|
+
/**
|
251
|
+
* Verifies the sort enable/disable state for table column headers.
|
252
|
+
* @param {Array<string>} sort - The sort states to verify.
|
253
|
+
*/
|
254
|
+
verifySortEnableDisableForTableColumnHeader: (sort) => {
|
255
|
+
sort.forEach((i, count) => {
|
256
|
+
browseItemsPage.tableColumnHeader(count).parent()
|
257
|
+
.should(i, 'sort-enabled');
|
258
|
+
});
|
259
|
+
},
|
260
|
+
|
261
|
+
verifyTableSortDescendingByDefault: () => {
|
262
|
+
browseItemsPage.tableColumnHeader(1)
|
263
|
+
.within(() => {
|
264
|
+
utilities.verifyElementVisibilityState(browseItemsPage.iconSortDescending(), 'visible');
|
265
|
+
});
|
266
|
+
},
|
267
|
+
|
268
|
+
/**
|
269
|
+
* Verifies the sort functionality on column header click.
|
270
|
+
* @param {number} count - The column index to click.
|
271
|
+
*/
|
272
|
+
verifySortFunctionalityOnColumnHeaderClick: (count) => {
|
273
|
+
browseItemsPage.tableColumnHeader(count)
|
274
|
+
.click();
|
275
|
+
cy.interceptGraphql('getItems');
|
276
|
+
browseItemsPage.tableColumnHeader(count)
|
277
|
+
.within(() => {
|
278
|
+
browseItemsPage.iconSortDescending()
|
279
|
+
.should('exist')
|
280
|
+
});
|
281
|
+
},
|
282
|
+
|
283
|
+
/**
|
284
|
+
* Adds text in the search bar.
|
285
|
+
* @param {string} text - The text to add in the search bar.
|
286
|
+
*/
|
287
|
+
addTextInSearchBar: (text) => {
|
288
|
+
browseItemsPage.searchBar()
|
289
|
+
.type(text)
|
290
|
+
.should('have.value', text);
|
291
|
+
},
|
292
|
+
|
293
|
+
clickOnSearchIcon: () => {
|
294
|
+
browseItemsPage.buttonSearch()
|
295
|
+
.click();
|
296
|
+
cy.interceptGraphql('getItems');
|
297
|
+
},
|
298
|
+
|
299
|
+
/**
|
300
|
+
* Verifies the pagination count.
|
301
|
+
* @param {string} text - The text to verify in the pagination count.
|
302
|
+
*/
|
303
|
+
verifyPaginationCount: (text) => {
|
304
|
+
utilities.getNthElement(browseItemsPage.paginationCountText(), 0)
|
305
|
+
.should('contain', text);
|
306
|
+
utilities.verifyElementVisibilityState(utilities.getNthElement(browseItemsPage.paginationCountText(), 0), 'visible');
|
307
|
+
},
|
308
|
+
|
309
|
+
clearSearchBar: () => {
|
310
|
+
browseItemsPage.buttonClearSearch()
|
311
|
+
.click();
|
312
|
+
cy.interceptGraphql('getItems');
|
313
|
+
},
|
314
|
+
|
315
|
+
clickOnItemReferenceId: () => {
|
316
|
+
browseItemsPage.tableRow(0)
|
317
|
+
.within(() => {
|
318
|
+
browseItemsPage.itemCellItemTitle()
|
319
|
+
.click();
|
320
|
+
});
|
321
|
+
cy.interceptGraphql('getItemPreview');
|
322
|
+
},
|
323
|
+
|
324
|
+
clickOnNgiePopoverContainer: () => {
|
325
|
+
browseItemsPage.popoverContainer()
|
326
|
+
.click();
|
327
|
+
},
|
328
|
+
|
329
|
+
clickOnActionButton: () => {
|
330
|
+
browseItemsPage.tableRow(0)
|
331
|
+
.within(() => {
|
332
|
+
browseItemsPage.actionMenuButton()
|
333
|
+
.click();
|
334
|
+
});
|
335
|
+
},
|
336
|
+
|
337
|
+
verifyActionMenuDisplaysCorrectOptions: () => {
|
338
|
+
const menuOptions = ['Delete', 'Duplicate/new version'];
|
339
|
+
browseItemsPage.actionsMenu()
|
340
|
+
.within(() => {
|
341
|
+
menuOptions.forEach((i, count) => {
|
342
|
+
browseItemsPage.actionsMenuItem(count)
|
343
|
+
.within(() => {
|
344
|
+
utilities.verifyInnerText(cy.get('span[class*="MuiListItemText-primary"]'), i);
|
345
|
+
});
|
346
|
+
});
|
347
|
+
});
|
348
|
+
},
|
349
|
+
|
350
|
+
verifySearchBarComponent: () => {
|
351
|
+
utilities.verifyElementVisibilityState(browseItemsPage.searchBar(), 'visible');
|
352
|
+
},
|
353
|
+
|
354
|
+
verifySearchIcon: () => {
|
355
|
+
utilities.verifyElementVisibilityState(browseItemsPage.buttonSearchSVG(), 'visible');
|
356
|
+
},
|
357
|
+
|
358
|
+
verifyCloseIcon: () => {
|
359
|
+
browseItemsPage.steps.addTextInSearchBar('~zzz');
|
360
|
+
utilities.verifyElementVisibilityState(browseItemsPage.buttonClearSearch(), 'visible');
|
361
|
+
browseItemsPage.steps.clearSearchBar();
|
362
|
+
},
|
363
|
+
|
364
|
+
hoverOnSearchBarComponent: () => {
|
365
|
+
utilities.hoverOverElement(browseItemsPage.searchBar().parent());
|
366
|
+
},
|
367
|
+
|
368
|
+
verifyPaginationSection: () => {
|
369
|
+
utilities.verifyElementVisibilityState(utilities.getNthElement(browseItemsPage.paginationBlock(), 0), 'visible');
|
370
|
+
},
|
371
|
+
|
372
|
+
/**
|
373
|
+
* Verifies the items on the page.
|
374
|
+
* @param {number} count - The number of items to verify.
|
375
|
+
*/
|
376
|
+
verifyItemsOnPage: (count) => {
|
377
|
+
utilities.verifyElementVisibilityState(browseItemsPage.tableRow(count - 1), 'visible');
|
378
|
+
utilities.verifyElementVisibilityState(browseItemsPage.tableRow(count), 'notExist');
|
379
|
+
},
|
380
|
+
|
381
|
+
clickOnNextPageButton: () => {
|
382
|
+
utilities.getNthElement(browseItemsPage.paginationBlock(), 0)
|
383
|
+
.within(() => {
|
384
|
+
browseItemsPage.buttonNext()
|
385
|
+
.click();
|
386
|
+
});
|
387
|
+
cy.interceptGraphql('getItems');
|
388
|
+
},
|
389
|
+
|
390
|
+
clickOnPreviousPageButton: () => {
|
391
|
+
utilities.getNthElement(browseItemsPage.paginationBlock(), 0)
|
392
|
+
.within(() => {
|
393
|
+
browseItemsPage.buttonPrevious()
|
394
|
+
.click();
|
395
|
+
});
|
396
|
+
cy.interceptGraphql('getItems');
|
397
|
+
},
|
398
|
+
|
399
|
+
hoverOnNextPageButton: () => {
|
400
|
+
utilities.getNthElement(browseItemsPage.paginationBlock(), 0)
|
401
|
+
.within(() => {
|
402
|
+
utilities.hoverOverElement(browseItemsPage.buttonNext());
|
403
|
+
});
|
404
|
+
},
|
405
|
+
|
406
|
+
hoverOnCreateItemButton: () => {
|
407
|
+
utilities.hoverOverElement(browseItemsPage.buttonCreateItem());
|
408
|
+
},
|
409
|
+
|
410
|
+
/**
|
411
|
+
* Hovers over a table row.
|
412
|
+
* @param {number} rowNumber - The row number to hover over.
|
413
|
+
*/
|
414
|
+
hoverOnTableRow: (rowNumber) => {
|
415
|
+
utilities.hoverOverElement(browseItemsPage.tableRow(rowNumber));
|
416
|
+
},
|
417
|
+
|
418
|
+
/**
|
419
|
+
* Hovers over the action button in a table row.
|
420
|
+
* @param {number} rowNumber - The row number containing the action button to hover over.
|
421
|
+
*/
|
422
|
+
hoverOnActionButton: (rowNumber) => {
|
423
|
+
browseItemsPage.tableRow(rowNumber)
|
424
|
+
.within(() => {
|
425
|
+
utilities.hoverOverElement(browseItemsPage.actionMenuButton());
|
426
|
+
});
|
427
|
+
},
|
428
|
+
|
429
|
+
verifyDesktopIcon: () => {
|
430
|
+
utilities.verifyElementVisibilityState(browseItemsPage.buttonDesktopViewToggle(), 'visible');
|
431
|
+
},
|
432
|
+
|
433
|
+
verifyMobileIcon: () => {
|
434
|
+
utilities.verifyElementVisibilityState(browseItemsPage.buttonMobileViewToggle(), 'visible');
|
435
|
+
},
|
436
|
+
|
437
|
+
/**
|
438
|
+
* Hovers over the view mode button.
|
439
|
+
* @param {string} viewMode - The view mode to hover over ('desktop' or 'mobile').
|
440
|
+
*/
|
441
|
+
hoverOnViewModeButton: (viewMode) => {
|
442
|
+
if (viewMode === 'desktop') {
|
443
|
+
utilities.hoverOverElement(browseItemsPage.buttonDesktopViewToggle());
|
444
|
+
} else {
|
445
|
+
utilities.hoverOverElement(browseItemsPage.buttonMobileViewToggle());
|
446
|
+
}
|
447
|
+
},
|
448
|
+
|
449
|
+
/**
|
450
|
+
* Triggers mouseover on the view mode icon.
|
451
|
+
* @param {string} viewMode - The view mode icon to trigger mouseover on ('desktop' or 'mobile').
|
452
|
+
*/
|
453
|
+
triggerMouseOverOnViewModeIcon: (viewMode) => {
|
454
|
+
if (viewMode === 'desktop') {
|
455
|
+
browseItemsPage.buttonDesktopViewToggle().trigger('mouseover');
|
456
|
+
} else {
|
457
|
+
browseItemsPage.buttonMobileViewToggle().trigger('mouseover');
|
458
|
+
}
|
459
|
+
},
|
460
|
+
|
461
|
+
/**
|
462
|
+
* Triggers mouseout on the view mode icon.
|
463
|
+
* @param {string} viewMode - The view mode icon to trigger mouseout on ('desktop' or 'mobile').
|
464
|
+
*/
|
465
|
+
triggerMouseOutOnViewModeIcon: (viewMode) => {
|
466
|
+
if (viewMode === 'desktop') {
|
467
|
+
browseItemsPage.buttonDesktopViewToggle().trigger('mouseout');
|
468
|
+
} else {
|
469
|
+
browseItemsPage.buttonMobileViewToggle().trigger('mouseout');
|
470
|
+
}
|
471
|
+
},
|
472
|
+
|
473
|
+
verifyTooltipPresent: () => {
|
474
|
+
utilities.verifyElementVisibilityState(browseItemsPage.tooltipText(), 'visible');
|
475
|
+
},
|
476
|
+
|
477
|
+
/**
|
478
|
+
* Verifies the tooltip text.
|
479
|
+
* @param {string} text - The text to verify in the tooltip.
|
480
|
+
*/
|
481
|
+
verifyTooltipText: (text) => {
|
482
|
+
utilities.verifyInnerText(browseItemsPage.tooltipText(), text);
|
483
|
+
},
|
484
|
+
|
485
|
+
/**
|
486
|
+
* Clicks on the view mode icon.
|
487
|
+
* @param {string} viewMode - The view mode icon to click ('desktop' or 'mobile').
|
488
|
+
*/
|
489
|
+
clickOnViewModeIcon: (viewMode) => {
|
490
|
+
if (viewMode === 'desktop') {
|
491
|
+
browseItemsPage.buttonDesktopViewToggle().click();
|
492
|
+
} else {
|
493
|
+
browseItemsPage.buttonMobileViewToggle().click();
|
494
|
+
}
|
495
|
+
},
|
496
|
+
|
497
|
+
/**
|
498
|
+
* Verifies the main wrapper width.
|
499
|
+
* @param {string} width - The width to verify.
|
500
|
+
*/
|
501
|
+
verifyMainWrapperWidth: (width) => {
|
502
|
+
browseItemsPage.browseItemPageWrapper()
|
503
|
+
.should('have.css', 'width', width);
|
504
|
+
},
|
505
|
+
|
506
|
+
/**
|
507
|
+
* Verifies the enable/disable state of the mobile view sort dropdown.
|
508
|
+
* @param {boolean} isEnabled - Whether the sort dropdown should be enabled.
|
509
|
+
*/
|
510
|
+
verifyMobileViewSortDropdownEnableDisableState: (isEnabled) => {
|
511
|
+
browseItemsPage.mobileViewSortByWrapper()
|
512
|
+
.should('have.css', 'opacity', isEnabled ? '1' : '0.5');
|
513
|
+
},
|
514
|
+
|
515
|
+
verifySortDropdown: () => {
|
516
|
+
utilities.verifyElementVisibilityState(browseItemsPage.mobileViewSortByDropdown(), 'visible');
|
517
|
+
},
|
518
|
+
|
519
|
+
/**
|
520
|
+
* Verifies the sort dropdown label.
|
521
|
+
* @param {string} sortText - The text to verify in the sort dropdown label.
|
522
|
+
*/
|
523
|
+
verifySortDropdownLabel: (sortText) => {
|
524
|
+
utilities.verifyInnerText(browseItemsPage.mobileViewSortByDropdownLabelWrapper(), sortText);
|
525
|
+
},
|
526
|
+
|
527
|
+
verifySortDescendingIcon: () => {
|
528
|
+
utilities.verifyElementVisibilityState(browseItemsPage.mobileViewSortDescendingSVG(), 'visible');
|
529
|
+
},
|
530
|
+
|
531
|
+
clickOnSortDropdown: () => {
|
532
|
+
browseItemsPage.mobileViewSortByDropdown()
|
533
|
+
.click();
|
534
|
+
},
|
535
|
+
|
536
|
+
/**
|
537
|
+
* Verifies the sort dropdown options.
|
538
|
+
* @param {Array<string>} options - The options to verify in the sort dropdown.
|
539
|
+
*/
|
540
|
+
verifySortDropdownOptions: (options) => {
|
541
|
+
options.forEach((i, count) => {
|
542
|
+
utilities.verifyElementVisibilityState(browseItemsPage.mobileViewSortbyDropdownOptions(count), 'visible');
|
543
|
+
utilities.verifyInnerText(browseItemsPage.mobileViewSortbyDropdownOptions(count), i);
|
544
|
+
});
|
545
|
+
},
|
546
|
+
|
547
|
+
/**
|
548
|
+
* Clicks on a sort option.
|
549
|
+
* @param {number} count - The index of the sort option to click.
|
550
|
+
*/
|
551
|
+
clickOnSortOption: (count) => {
|
552
|
+
browseItemsPage.mobileViewSortbyDropdownOptions(count)
|
553
|
+
.click();
|
554
|
+
cy.interceptGraphql('getItems');
|
555
|
+
},
|
556
|
+
|
557
|
+
/**
|
558
|
+
* Verifies that a sort dropdown option is selected.
|
559
|
+
* @param {number} count - The index of the sort option to verify.
|
560
|
+
*/
|
561
|
+
sortDropdownOptionSelected: (count) => {
|
562
|
+
browseItemsPage.mobileViewSortbyDropdownOptions(count)
|
563
|
+
.should('have.css', 'background-color', css.color.secondaryBtnBorder);
|
564
|
+
},
|
565
|
+
|
566
|
+
clickOnMobileViewSortAscendingIcon: () => {
|
567
|
+
browseItemsPage.mobileViewSortAscendingSVG()
|
568
|
+
.click();
|
569
|
+
cy.interceptGraphql('getItems');
|
570
|
+
},
|
571
|
+
|
572
|
+
hoverOnSortDropdown: () => {
|
573
|
+
utilities.hoverOverElement(browseItemsPage.mobileViewSortByDropdown());
|
574
|
+
},
|
575
|
+
|
576
|
+
/**
|
577
|
+
* Clicks on an action menu item.
|
578
|
+
* @param {number} NthActionMenuItem - The index of the action menu item to click.
|
579
|
+
*/
|
580
|
+
clickOnActionMenuItem: (NthActionMenuItem) => {
|
581
|
+
browseItemsPage.actionsMenuItem(NthActionMenuItem)
|
582
|
+
.click();
|
583
|
+
cy.interceptGraphql('getItems');
|
584
|
+
cy.wait(2000);
|
585
|
+
},
|
586
|
+
|
587
|
+
/**
|
588
|
+
* Verifies the visibility of the duplicate item dialog box.
|
589
|
+
* @param {boolean} visible - Whether the dialog box should be visible.
|
590
|
+
*/
|
591
|
+
verifyDuplicateItemDialogBoxIsVisible: (visible) => {
|
592
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBoxRoot(), visible ? 'visible' : 'notExist');
|
593
|
+
if (visible) {
|
594
|
+
dialogBoxBase.dialogBoxContent()
|
595
|
+
.should('contain', "Item saved with reference ID: ")
|
596
|
+
.and('contain', " and it's available under 'Browse Items'.");
|
597
|
+
dialogBoxBase.dialogBoxContent()
|
598
|
+
.find('strong')
|
599
|
+
.then(($text) => {
|
600
|
+
duplicateItemReferenceID = $text.text();
|
601
|
+
});
|
602
|
+
}
|
603
|
+
},
|
604
|
+
|
605
|
+
/**
|
606
|
+
* Verifies the visibility of the delete item dialog box.
|
607
|
+
* @param {boolean} visible - Whether the dialog box should be visible.
|
608
|
+
*/
|
609
|
+
verifyDeleteItemDialogBoxIsVisible: (visible) => {
|
610
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBoxRoot(), visible ? 'visible' : 'notExist');
|
611
|
+
if (visible) {
|
612
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxContent(), 'Are you sure you want to delete this item?');
|
613
|
+
}
|
614
|
+
},
|
615
|
+
|
616
|
+
/**
|
617
|
+
* Verifies that an item reference ID is not present.
|
618
|
+
* @param {string} referenceID - The reference ID to verify is not present.
|
619
|
+
*/
|
620
|
+
verifyItemReferenceIdIsNotPresent: (referenceID) => {
|
621
|
+
browseItemsPage.itemCellItemTitle()
|
622
|
+
.should('not.contain', referenceID);
|
623
|
+
},
|
624
|
+
|
625
|
+
/**
|
626
|
+
* Toggles the filter section by clicking the filter button.
|
627
|
+
*/
|
628
|
+
toggleFilterSection: () => {
|
629
|
+
browseItemsPage.filterButton().click();
|
630
|
+
},
|
631
|
+
|
632
|
+
/**
|
633
|
+
* Clicks on a filter category.
|
634
|
+
* @param {string} category - The category to click on.
|
635
|
+
*/
|
636
|
+
clickOnFilterCategory: (category) => {
|
637
|
+
browseItemsPage.filterCategories(category).click();
|
638
|
+
},
|
639
|
+
|
640
|
+
/**
|
641
|
+
* Clicks on a filter category checkbox.
|
642
|
+
* @param {string} category - The category checkbox to click on.
|
643
|
+
*/
|
644
|
+
clickOnFilterCategoryCheckbox: (category) => {
|
645
|
+
browseItemsPage.filterCategoryCheckbox(category).click();
|
646
|
+
},
|
647
|
+
|
648
|
+
/**
|
649
|
+
* Clicks on the cancel button of a filter chip.
|
650
|
+
* @param {string} category - The category of the filter chip to cancel.
|
651
|
+
*/
|
652
|
+
clickOnFilterChipCancelButton: (category) => {
|
653
|
+
browseItemsPage.filterChipCancelButton(category).click();
|
654
|
+
},
|
655
|
+
|
656
|
+
/**
|
657
|
+
* Clicks on the "Clear All" button for filter chips.
|
658
|
+
*/
|
659
|
+
clickOnFilterChipClearAll: () => {
|
660
|
+
browseItemsPage.filterChipClearAll().click();
|
661
|
+
},
|
662
|
+
};
|
663
|
+
|
664
|
+
const tests = {
|
665
|
+
verifyItemListTableRows: () => {
|
666
|
+
it('Item list table should contain rows in which it should have column data', () => {
|
667
|
+
utilities.verifyElementVisibilityState(browseItemsPage.tableRow(0), 'visible');
|
668
|
+
utilities.verifyElementVisibilityState(browseItemsPage.tableRow(1), 'visible');
|
669
|
+
});
|
670
|
+
|
671
|
+
it('CSS of \'Browse ThinkSphere Items\' list table row', { tags: 'css' }, () => {
|
672
|
+
utilities.verifyCSS(browseItemsPage.tableRow(0), { 'background-color': css.color.transparent });
|
673
|
+
utilities.verifyCSS(browseItemsPage.tableRow(1), { 'background-color': css.color.optionsBg });
|
674
|
+
});
|
675
|
+
|
676
|
+
it('CSS of \'Browse ThinkSphere Items\' list table row in hover state', { tags: 'css' }, () => {
|
677
|
+
browseItemsPage.steps.hoverOnTableRow(0);
|
678
|
+
utilities.verifyCSS(browseItemsPage.tableRow(0), { 'background-color': css.color.tableRowHoverColor });
|
679
|
+
});
|
680
|
+
},
|
681
|
+
|
682
|
+
/**
|
683
|
+
* Verifies the item reference ID.
|
684
|
+
* @param {string} referenceID - The reference ID to verify.
|
685
|
+
* @param {boolean} visible - Whether the reference ID should be visible.
|
686
|
+
*/
|
687
|
+
verifyItemReferenceId: (referenceID, visible) => {
|
688
|
+
if (visible) {
|
689
|
+
it('Item list table should contain rows in which it should have Reference ID', () => {
|
690
|
+
browseItemsPage.tableRow(0)
|
691
|
+
.within(() => {
|
692
|
+
utilities.verifyInnerText(browseItemsPage.itemCellItemTitle(), referenceID);
|
693
|
+
utilities.verifyElementVisibilityState(browseItemsPage.itemCellItemTitle(), 'visible');
|
694
|
+
});
|
695
|
+
});
|
696
|
+
|
697
|
+
it('When user click on the Reference ID, then it should navigate to respective item edit item page', () => {
|
698
|
+
cy.interceptGraphql('getItems');
|
699
|
+
browseItemsPage.steps.clickOnItemReferenceId(referenceID);
|
700
|
+
browseItemsPage.steps.verifyPageUrl('/item-engine/thinksphere/edit-item');
|
701
|
+
browseItemsPage.steps.clickWindowsBack();
|
702
|
+
cy.wait('@getItems');
|
703
|
+
});
|
704
|
+
|
705
|
+
it('CSS of list table row data reference id', { tags: 'css' }, () => {
|
706
|
+
browseItemsPage.tableRow(0)
|
707
|
+
.within(() => {
|
708
|
+
utilities.verifyCSS(browseItemsPage.itemCellItemTitle(), {
|
709
|
+
'color': css.color.primaryBtnBg,
|
710
|
+
'font-size': css.fontSize.default,
|
711
|
+
'font-weight': css.fontWeight.regular
|
712
|
+
});
|
713
|
+
});
|
714
|
+
});
|
715
|
+
} else {
|
716
|
+
it('Item list table should contain rows in which it should not have Reference ID', () => {
|
717
|
+
browseItemsPage.tableRow(0)
|
718
|
+
.within(() => {
|
719
|
+
browseItemsPage.itemCellItemTitle()
|
720
|
+
.should('not.contain', referenceID);
|
721
|
+
});
|
722
|
+
});
|
723
|
+
}
|
724
|
+
},
|
725
|
+
|
726
|
+
/**
|
727
|
+
* Verifies the question instruction.
|
728
|
+
* @param {string} questionInstruction - The question instruction to verify.
|
729
|
+
*/
|
730
|
+
verifyQuestionInstruction: (questionInstruction) => {
|
731
|
+
it('Item list table should contain rows in which it should have question instruction', () => {
|
732
|
+
browseItemsPage.tableRow(0)
|
733
|
+
.within(() => {
|
734
|
+
utilities.verifyInnerText(browseItemsPage.itemCellInstructionText(), questionInstruction);
|
735
|
+
utilities.verifyElementVisibilityState(browseItemsPage.itemCellInstructionText(), 'visible');
|
736
|
+
});
|
737
|
+
});
|
738
|
+
|
739
|
+
it('CSS of list table row data question instruction', { tags: 'css' }, () => {
|
740
|
+
browseItemsPage.tableRow(0)
|
741
|
+
.within(() => {
|
742
|
+
utilities.verifyCSS(browseItemsPage.itemCellInstructionText(), {
|
743
|
+
'color': css.color.placeholderText,
|
744
|
+
'font-size': css.fontSize.normal,
|
745
|
+
'font-weight': css.fontWeight.regular
|
746
|
+
});
|
747
|
+
});
|
748
|
+
});
|
749
|
+
},
|
750
|
+
|
751
|
+
verifyLastUpdatedTimeComponent: () => {
|
752
|
+
it('Item list table should contain rows in which it should have last updated time', () => {
|
753
|
+
browseItemsPage.tableRow(0)
|
754
|
+
.within(() => {
|
755
|
+
utilities.verifyElementVisibilityState(utilities.getNthElement(browseItemsPage.lastUpdatedValue(), 4), 'visible');
|
756
|
+
});
|
757
|
+
});
|
758
|
+
|
759
|
+
it('CSS of list table row data last updated time', { tags: 'css' }, () => {
|
760
|
+
browseItemsPage.tableRow(0)
|
761
|
+
.within(() => {
|
762
|
+
utilities.verifyCSS(utilities.getNthElement(browseItemsPage.lastUpdatedValue(), 4), {
|
763
|
+
'color': css.color.labels,
|
764
|
+
'font-size': css.fontSize.default,
|
765
|
+
'font-weight': css.fontWeight.regular
|
766
|
+
});
|
767
|
+
});
|
768
|
+
});
|
769
|
+
},
|
770
|
+
|
771
|
+
verifyCreatedOnTimeComponent: () => {
|
772
|
+
it('Item list table should contain rows in which it should have last updated time', () => {
|
773
|
+
browseItemsPage.tableRow(0)
|
774
|
+
.within(() => {
|
775
|
+
utilities.verifyElementVisibilityState(utilities.getNthElement(browseItemsPage.lastUpdatedValue(), 6), 'visible');
|
776
|
+
});
|
777
|
+
});
|
778
|
+
|
779
|
+
it('CSS of list table row data last updated time', { tags: 'css' }, () => {
|
780
|
+
browseItemsPage.tableRow(0)
|
781
|
+
.within(() => {
|
782
|
+
utilities.verifyCSS(utilities.getNthElement(browseItemsPage.lastUpdatedValue(), 6), {
|
783
|
+
'color': css.color.labels,
|
784
|
+
'font-size': css.fontSize.default,
|
785
|
+
'font-weight': css.fontWeight.regular
|
786
|
+
});
|
787
|
+
});
|
788
|
+
});
|
789
|
+
},
|
790
|
+
|
791
|
+
verifyActionButton: () => {
|
792
|
+
it('Item list table should contain rows in which it should have action button', () => {
|
793
|
+
browseItemsPage.tableRow(0)
|
794
|
+
.within(() => {
|
795
|
+
utilities.verifyElementVisibilityState(browseItemsPage.actionMenuButton(), 'visible');
|
796
|
+
});
|
797
|
+
});
|
798
|
+
|
799
|
+
it('CSS of list table row data action button', { tags: 'css' }, () => {
|
800
|
+
browseItemsPage.tableRow(0)
|
801
|
+
.within(() => {
|
802
|
+
utilities.verifyCSS(browseItemsPage.actionMenuButton(), {
|
803
|
+
'color': css.color.primaryBtnBg
|
804
|
+
});
|
805
|
+
});
|
806
|
+
});
|
807
|
+
|
808
|
+
it('When user click on action button, then it should open action menu', () => {
|
809
|
+
browseItemsPage.steps.clickOnActionButton();
|
810
|
+
utilities.verifyElementVisibilityState(browseItemsPage.actionsMenu(), 'visible');
|
811
|
+
browseItemsPage.steps.verifyActionMenuDisplaysCorrectOptions();
|
812
|
+
});
|
813
|
+
|
814
|
+
it('CSS of list table row data action menu', { tags: 'css' }, () => {
|
815
|
+
browseItemsPage.actionsMenu()
|
816
|
+
.within(() => {
|
817
|
+
browseItemsPage.actionsMenuItem(0)
|
818
|
+
.within(() => {
|
819
|
+
utilities.verifyCSS(cy.get('span[class*="MuiListItemText-primary"]'), {
|
820
|
+
'color': css.color.secondaryBtn,
|
821
|
+
'font-size': css.fontSize.default,
|
822
|
+
'font-weight': css.fontWeight.regular
|
823
|
+
})
|
824
|
+
});
|
825
|
+
});
|
826
|
+
});
|
827
|
+
|
828
|
+
it('When user click on \'ngie-popover-container\', then it should close action menu', () => {
|
829
|
+
browseItemsPage.steps.clickOnNgiePopoverContainer();
|
830
|
+
utilities.verifyElementVisibilityState(browseItemsPage.actionsMenu(), 'notExist');
|
831
|
+
});
|
832
|
+
|
833
|
+
it('CSS of list table row data action button in hover state', { tags: 'css' }, () => {
|
834
|
+
browseItemsPage.steps.hoverOnActionButton(0);
|
835
|
+
browseItemsPage.tableRow(0)
|
836
|
+
.within(() => {
|
837
|
+
utilities.verifyCSS(browseItemsPage.actionMenuButton(), {
|
838
|
+
'background-color': css.color.tableRowHoverColor
|
839
|
+
});
|
840
|
+
});
|
841
|
+
});
|
842
|
+
|
843
|
+
it('If the user clicks on the Duplicate/New Version option, a popup should be displayed. Also, a copy of the item type should get created with a different name', () => {
|
844
|
+
browseItemsPage.steps.clickOnActionButton();
|
845
|
+
browseItemsPage.steps.clickOnActionMenuItem(1);
|
846
|
+
browseItemsPage.steps.verifyDuplicateItemDialogBoxIsVisible(true);
|
847
|
+
});
|
848
|
+
|
849
|
+
it('CSS of Duplicate/New Version option, a popup', { tags: 'css' }, () => {
|
850
|
+
utilities.verifyCSS(dialogBoxBase.dialogBoxRoot(), {
|
851
|
+
'box-shadow': `${css.color.dialogBoxBoxShadow} 0px 0px 10px 0px`,
|
852
|
+
'background-color': css.color.primaryBtn,
|
853
|
+
'border': `1px solid ${css.color.secondaryBtnBorder}`,
|
854
|
+
'border-radius': '8px'
|
855
|
+
});
|
856
|
+
utilities.verifyCSS(dialogBoxBase.dialogBoxContent(), {
|
857
|
+
'color': css.color.codeBlockText,
|
858
|
+
'font-size': css.fontSize.default,
|
859
|
+
'font-weight': css.fontWeight.regular
|
860
|
+
});
|
861
|
+
utilities.verifyCSS(dialogBoxBase.buttonClose().find('svg'), {
|
862
|
+
'fill': css.color.standardTableCellText,
|
863
|
+
'width': '24px',
|
864
|
+
'height': '24px'
|
865
|
+
});
|
866
|
+
});
|
867
|
+
|
868
|
+
it('If the user clicks on the close popup button, then popup should be close', () => {
|
869
|
+
dialogBoxBase.buttonClose()
|
870
|
+
.click();
|
871
|
+
browseItemsPage.steps.verifyDuplicateItemDialogBoxIsVisible(false);
|
872
|
+
});
|
873
|
+
|
874
|
+
it('Newly created item should be displayed in the list', () => {
|
875
|
+
cy.clearCookies();
|
876
|
+
cy.reload(true);
|
877
|
+
cy.interceptGraphql('getItems');
|
878
|
+
cy.wait(2000);
|
879
|
+
browseItemsPage.tests.verifyItemReferenceId(duplicateItemReferenceID, true);
|
880
|
+
});
|
881
|
+
|
882
|
+
it('If the user clicks on the Delete Action menu item, a warning popup should be displayed', () => {
|
883
|
+
browseItemsPage.steps.clickOnActionButton();
|
884
|
+
browseItemsPage.steps.clickOnActionMenuItem(0);
|
885
|
+
browseItemsPage.steps.verifyDeleteItemDialogBoxIsVisible(true);
|
886
|
+
});
|
887
|
+
|
888
|
+
it('CSS of Delete Action menu item warning popup', { tags: 'css' }, () => {
|
889
|
+
utilities.verifyCSS(dialogBoxBase.dialogBoxRoot(), {
|
890
|
+
'box-shadow': `${css.color.dialogBoxBoxShadow} 0px 0px 10px 0px`,
|
891
|
+
'background-color': css.color.primaryBtn,
|
892
|
+
'border': `1px solid ${css.color.secondaryBtnBorder}`,
|
893
|
+
'border-radius': '8px'
|
894
|
+
});
|
895
|
+
utilities.verifyCSS(dialogBoxBase.dialogBoxContent(), {
|
896
|
+
'color': css.color.codeBlockText,
|
897
|
+
'font-size': css.fontSize.default,
|
898
|
+
'font-weight': css.fontWeight.regular
|
899
|
+
});
|
900
|
+
utilities.verifyCSS(dialogBoxBase.buttonReject(), {
|
901
|
+
'color': css.color.highlightedTableCell,
|
902
|
+
'box-shadow': `${css.color.secondaryBtnBorder} 0px 5px 0px 0px`,
|
903
|
+
'background-color': css.color.transparent,
|
904
|
+
'border': `1px solid ${css.color.secondaryBtnBorder}`,
|
905
|
+
'font-size': css.fontSize.default,
|
906
|
+
'font-weight': css.fontWeight.semibold,
|
907
|
+
'padding': '12px 16px'
|
908
|
+
});
|
909
|
+
utilities.verifyCSS(dialogBoxBase.buttonAccept(), {
|
910
|
+
'color': css.color.primaryBtn,
|
911
|
+
'box-shadow': `${css.color.primaryBtnBorder} 0px 5px 0px 0px`,
|
912
|
+
'background-color': css.color.primaryBtnBg,
|
913
|
+
'border': `1px solid ${css.color.primaryBtnBorder}`,
|
914
|
+
'font-size': css.fontSize.default,
|
915
|
+
'font-weight': css.fontWeight.semibold,
|
916
|
+
'padding': '12px 16px'
|
917
|
+
});
|
918
|
+
});
|
919
|
+
|
920
|
+
it('If the user clicks on the reject button of warning, then popup should be close', () => {
|
921
|
+
dialogBoxBase.buttonReject()
|
922
|
+
.click();
|
923
|
+
browseItemsPage.steps.verifyDeleteItemDialogBoxIsVisible(false);
|
924
|
+
});
|
925
|
+
|
926
|
+
it('If the user clicks on the accept button of warning, then popup should be close and Item should get deleted', () => {
|
927
|
+
browseItemsPage.steps.clickOnActionButton();
|
928
|
+
browseItemsPage.steps.clickOnActionMenuItem(0);
|
929
|
+
dialogBoxBase.buttonAccept()
|
930
|
+
.click();
|
931
|
+
cy.interceptGraphql('getItems');
|
932
|
+
cy.wait(2000);
|
933
|
+
browseItemsPage.steps.verifyDeleteItemDialogBoxIsVisible(false);
|
934
|
+
cy.clearCookies();
|
935
|
+
cy.reload(true);
|
936
|
+
cy.interceptGraphql('getItems');
|
937
|
+
cy.wait(2000);
|
938
|
+
browseItemsPage.steps.verifyItemReferenceIdIsNotPresent(duplicateItemReferenceID, false);
|
939
|
+
});
|
940
|
+
},
|
941
|
+
|
942
|
+
/**
|
943
|
+
* Verifies if the desktop icon is selected.
|
944
|
+
* @param {boolean} isSelected - Whether the desktop icon should be selected.
|
945
|
+
*/
|
946
|
+
verifyDesktopIconSelected: (isSelected) => {
|
947
|
+
it('Desktop icon should have pressed in the aria lable attribute', () => {
|
948
|
+
browseItemsPage.buttonDesktopViewToggle()
|
949
|
+
.should('have.attr', 'aria-label', `Desktop View toggle button${isSelected ? ' pressed' : ' not pressed'}`);
|
950
|
+
});
|
951
|
+
|
952
|
+
it('Desktop icon svg should have selected css applied', { tags: 'css' }, () => {
|
953
|
+
utilities.verifyCSS(browseItemsPage.buttonDesktopViewToggle().parent(), {
|
954
|
+
'background-color': isSelected ? css.color.desktopMobileViewtoggleButtonSelectedBg : css.color.transparent,
|
955
|
+
});
|
956
|
+
});
|
957
|
+
},
|
958
|
+
|
959
|
+
/**
|
960
|
+
* Verifies if the mobile icon is selected.
|
961
|
+
* @param {boolean} isSelected - Whether the mobile icon should be selected.
|
962
|
+
*/
|
963
|
+
verifyMobileIconSelected: (isSelected) => {
|
964
|
+
it('Mobile icon should have pressed in the aria lable attribute', () => {
|
965
|
+
browseItemsPage.buttonMobileViewToggle()
|
966
|
+
.should('have.attr', 'aria-label', `Mobile View toggle button${isSelected ? ' pressed' : ' not pressed'}`);
|
967
|
+
});
|
968
|
+
|
969
|
+
it('Mobile icon svg should have selected css applied', { tags: 'css' }, () => {
|
970
|
+
utilities.verifyCSS(browseItemsPage.buttonMobileViewToggle().parent(), {
|
971
|
+
'background-color': isSelected ? css.color.desktopMobileViewtoggleButtonSelectedBg : css.color.transparent,
|
972
|
+
});
|
973
|
+
});
|
974
|
+
},
|
975
|
+
|
976
|
+
verifyBrowseItemsRowContent: () => {
|
977
|
+
it('Browse review items list row should have title, reference id, and question type', () => {
|
978
|
+
browseItemsPage.itemTitleCell().each(($item) => {
|
979
|
+
cy.wrap($item).within(() => {
|
980
|
+
cy.get('button.browse-item-styled-link').invoke('text').should('not.be.empty');
|
981
|
+
cy.get('.browse-item-question-text-container').contains('Ref ID:').should('exist'); // safer
|
982
|
+
cy.get('[class*=ItemTitleCellstyles__ReferenceId]').invoke('text').should('not.be.empty');
|
983
|
+
cy.get('.browse-item-label-text').contains('Type:').should('exist');
|
984
|
+
cy.get('.browse-item-question-item').invoke('text').should('not.be.empty');
|
985
|
+
});
|
986
|
+
});
|
987
|
+
});
|
988
|
+
},
|
989
|
+
|
990
|
+
verifyItemOpening: () => {
|
991
|
+
it('When the author clicks on the title of the item in the \'check your math\' browse item list page then the question preview for that item should be displayed along with cancel and save button, and student and grading view radio buttons', () => {
|
992
|
+
browseItemsPage.rowItemTitle().eq(0).click();
|
993
|
+
utilities.verifyElementVisibilityState(browseItemsPage.previewModeWrapper(), 'visible');
|
994
|
+
utilities.verifyElementVisibilityState(browseItemsPage.saveButton(), 'visible');
|
995
|
+
utilities.verifyElementVisibilityState(browseItemsPage.cancelButton(), 'visible');
|
996
|
+
utilities.verifyElementVisibilityState(browseItemsPage.radioGroup(), 'visible');
|
997
|
+
})
|
998
|
+
|
999
|
+
it('student radio button should be checked by default and author should be able to toggle between student and grading view radio buttons', () => {
|
1000
|
+
utilities.verifyElementVisibilityState(browseItemsPage.studentViewRadioButton(), 'exist');
|
1001
|
+
utilities.verifyElementVisibilityState(browseItemsPage.gradingViewRadioButton(), 'exist');
|
1002
|
+
browseItemsPage.studentViewRadioButton().should('have.class', 'radio-option-checked');
|
1003
|
+
browseItemsPage.gradingViewRadioButton().should('have.class', 'radio-option-not-checked');
|
1004
|
+
browseItemsPage.gradingViewRadioButton().click();
|
1005
|
+
browseItemsPage.studentViewRadioButton().should('have.class', 'radio-option-not-checked');
|
1006
|
+
browseItemsPage.gradingViewRadioButton().should('have.class', 'radio-option-checked');
|
1007
|
+
browseItemsPage.studentViewRadioButton().click();
|
1008
|
+
browseItemsPage.studentViewRadioButton().should('have.class', 'radio-option-checked');
|
1009
|
+
browseItemsPage.gradingViewRadioButton().should('have.class', 'radio-option-not-checked');
|
1010
|
+
browseItemsPage.cancelButton().click();
|
1011
|
+
});
|
1012
|
+
},
|
1013
|
+
|
1014
|
+
verifyFilterSelectionInList: (categories) => {
|
1015
|
+
it('When the author checks the \'multiple choice selection\' checkbox then only multiple choice question (single selection and multiple selection) should be displayed on the question list.', () => {
|
1016
|
+
browseItemsPage.steps.clickOnFilterCategoryCheckbox(categories[0]);
|
1017
|
+
cy.pageLoadWait();
|
1018
|
+
const allowedTypes = ['multiple selection','single selection'];
|
1019
|
+
browseItemsPage.browseItemQuestionItem().each(($item) => {
|
1020
|
+
cy.wrap($item)
|
1021
|
+
.invoke('text')
|
1022
|
+
.then((text) => {
|
1023
|
+
const trimmedText = text.trim();
|
1024
|
+
if (trimmedText === '' || trimmedText === ',' || /^,+$/.test(trimmedText)) {
|
1025
|
+
cy.log('Skipped invalid/empty item text:', trimmedText);
|
1026
|
+
return;
|
1027
|
+
}
|
1028
|
+
expect(allowedTypes).to.include(trimmedText.toLowerCase());
|
1029
|
+
});
|
1030
|
+
});
|
1031
|
+
});
|
1032
|
+
},
|
1033
|
+
|
1034
|
+
verifySupportedQuestionsInItemsList: (allowedFilterCategories) => {
|
1035
|
+
it('The items list page should display items for only the supported question types', () => {
|
1036
|
+
const allowedTypes = Object.values(allowedFilterCategories).flat();
|
1037
|
+
browseItemsPage.browseItemQuestionItem().each(($item) => {
|
1038
|
+
cy.wrap($item)
|
1039
|
+
.invoke('text')
|
1040
|
+
.then((text) => {
|
1041
|
+
const trimmedText = text.trim();
|
1042
|
+
if (trimmedText === '' || trimmedText === ',' || /^,+$/.test(trimmedText)) {
|
1043
|
+
cy.log('Skipped invalid/empty item text:', trimmedText);
|
1044
|
+
return;
|
1045
|
+
}
|
1046
|
+
expect(allowedTypes).to.include(trimmedText.toLowerCase());
|
1047
|
+
});
|
1048
|
+
});
|
1049
|
+
});
|
1050
|
+
},
|
1051
|
+
|
1052
|
+
verifyFirstPreviousNextPageButtons: () => {
|
1053
|
+
it('When user is on first page, previous button should be disabled and when the user is in last page, the next button should be disabled,', () => {
|
1054
|
+
browseItemsPage.buttonPrevious().should('have.attr', 'disabled');
|
1055
|
+
browseItemsPage.buttonNext().should('not.have.attr', 'disabled');
|
1056
|
+
utilities.getNthElement(browseItemsPage.paginationCountText(), 0)
|
1057
|
+
.invoke('text')
|
1058
|
+
.then((text) => {
|
1059
|
+
const totalItems = parseInt(text.split(' ').pop(), 10);
|
1060
|
+
const totalPages = Math.ceil(totalItems / 20);
|
1061
|
+
|
1062
|
+
Cypress._.times(totalPages - 1, () => {
|
1063
|
+
browseItemsPage.steps.clickOnNextPageButton();
|
1064
|
+
cy.wait(500);
|
1065
|
+
});
|
1066
|
+
});
|
1067
|
+
|
1068
|
+
browseItemsPage.buttonNext().should('have.attr', 'disabled');
|
1069
|
+
browseItemsPage.buttonPrevious().should('not.have.attr', 'disabled');
|
1070
|
+
});
|
1071
|
+
}
|
1072
|
+
};
|
85
1073
|
|
86
1074
|
export const browseItemsPage = {
|
87
1075
|
...selectors,
|
88
|
-
|
89
|
-
|
1076
|
+
...searchBarSelectors,
|
1077
|
+
...mobileViewBrowsePageSelectors,
|
1078
|
+
steps,
|
1079
|
+
tests,
|
1080
|
+
};
|