|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | +/** |
| 4 | + * Copyright 2024 Adobe |
| 5 | + * All Rights Reserved. |
| 6 | + */ |
| 7 | +--> |
| 8 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="ImageAddToImageBannerSliderAndReplaceTest"> |
| 11 | + <annotations> |
| 12 | + <features value="PageBuilder"/> |
| 13 | + <stories value="Image"/> |
| 14 | + <title value="Add Missing Image Upload functionality to all media components that support image upload in PageBuilder"/> |
| 15 | + <description value="Add Missing Upload Image button for new Media Image, Banner and Slider and allow replacement of image in PageBuilder."/> |
| 16 | + <severity value="AVERAGE"/> |
| 17 | + <useCaseId value="ACP2E-3122"/> |
| 18 | + <testCaseId value="AC-12646"/> |
| 19 | + <group value="pagebuilder"/> |
| 20 | + <group value="pagebuilder-image"/> |
| 21 | + <group value="cloud"/> |
| 22 | + </annotations> |
| 23 | + <before> |
| 24 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 25 | + <actionGroup ref="CliMediaGalleryEnhancedEnableActionGroup" stepKey="enableOldMediaGallery"> |
| 26 | + <argument name="enabled" value="0"/> |
| 27 | + </actionGroup> |
| 28 | + <createData entity="_defaultCmsPage" stepKey="createCMSPage"/> |
| 29 | + </before> |
| 30 | + <after> |
| 31 | + <actionGroup ref="CliMediaGalleryEnhancedEnableActionGroup" stepKey="disableOldMediaGallery"> |
| 32 | + <argument name="enabled" value="0"/> |
| 33 | + </actionGroup> |
| 34 | + <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage" /> |
| 35 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 36 | + </after> |
| 37 | + |
| 38 | + <!-- Go to CMS Page in Admin --> |
| 39 | + <actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage1"> |
| 40 | + <argument name="CMSPage" value="$$createCMSPage$$"/> |
| 41 | + </actionGroup> |
| 42 | + |
| 43 | + <!-- Switch to PageBuilder stage --> |
| 44 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> |
| 45 | + |
| 46 | + <!-- Add a row to PageBuilder stage with image --> |
| 47 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragRowToRootContainer"> |
| 48 | + <argument name="contentType" value="PageBuilderRowContentType"/> |
| 49 | + <argument name="containerTargetType" value="PageBuilderRootContainerContentType"/> |
| 50 | + </actionGroup> |
| 51 | + <actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSection"> |
| 52 | + <argument name="contentType" value="PageBuilderImageContentType"/> |
| 53 | + </actionGroup> |
| 54 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragImageIntoStage"> |
| 55 | + <argument name="contentType" value="PageBuilderImageContentType"/> |
| 56 | + </actionGroup> |
| 57 | + |
| 58 | + <!-- Attach image to PageBuilder stage --> |
| 59 | + <comment userInput="Upload image from stage" stepKey="uploadImageFromStage"/> |
| 60 | + <actionGroup ref="uploadImageToContentTypeFromStage" stepKey="addImageToStage"> |
| 61 | + <argument name="property" value="PageBuilderBackgroundImage_JPG"/> |
| 62 | + <argument name="section" value="ImageOnStageWithoutImageUploaded"/> |
| 63 | + </actionGroup> |
| 64 | + |
| 65 | + <!-- Reattach image to PageBuilder stage --> |
| 66 | + <comment userInput="Reattach image from stage" stepKey="uploadImageFromStage2"/> |
| 67 | + <actionGroup ref="UploadNewImageToContentTypeFromStageActionGroup" stepKey="addImageToStage2"> |
| 68 | + <argument name="property" value="PageBuilderBackgroundImage_JPG"/> |
| 69 | + <argument name="section" value="ImageOnStageWithoutImageUploaded"/> |
| 70 | + </actionGroup> |
| 71 | + |
| 72 | + <!-- Remove Image Content --> |
| 73 | + <comment userInput="Remove Image Content" stepKey="commentRemoveImageContent"/> |
| 74 | + <actionGroup ref="removeContentTypeFromStage" stepKey="removeImageContentTypeFromStage"> |
| 75 | + <argument name="contentType" value="PageBuilderImageContentType"/> |
| 76 | + </actionGroup> |
| 77 | + |
| 78 | + <!-- Add Banner --> |
| 79 | + <comment userInput="Add Banner" stepKey="commentAddBanner"/> |
| 80 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragBannerIntoStage"> |
| 81 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 82 | + </actionGroup> |
| 83 | + |
| 84 | + <!-- Verify On Hover Upload Button Work--> |
| 85 | + <comment userInput="Verify On Hover Upload Buttons Work" stepKey="commentVerifyButtonsOnBanner"/> |
| 86 | + <actionGroup ref="unFocusOptionMenu" stepKey="unFocusOptionMenuOnBanner"> |
| 87 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 88 | + </actionGroup> |
| 89 | + |
| 90 | + <!-- Attach image to Banner in PageBuilder stage --> |
| 91 | + <comment userInput="Attach image to Banner in PageBuilder stage" stepKey="commentAttachImageToBanner"/> |
| 92 | + <actionGroup ref="UploadNewBackgroundImageToContentTypeFromStageActionGroup" stepKey="addImageToBannerFromStage"> |
| 93 | + <argument name="backgroundImage" value="PageBuilderBackgroundImage_JPG"/> |
| 94 | + <argument name="section" value="BannerOnBackend"/> |
| 95 | + </actionGroup> |
| 96 | + |
| 97 | + <!-- Reattach image to Banner in PageBuilder stage --> |
| 98 | + <comment userInput="Reattach image to Banner in PageBuilder stage" stepKey="commentReattachImageToBanner"/> |
| 99 | + <actionGroup ref="UploadNewBackgroundImageToContentTypeFromStageActionGroup" stepKey="addNewImageToBannerFromStage"> |
| 100 | + <argument name="backgroundImage" value="PageBuilderBackgroundImage_JPG"/> |
| 101 | + <argument name="section" value="BannerOnBackend"/> |
| 102 | + </actionGroup> |
| 103 | + |
| 104 | + <!-- Remove Banner Content --> |
| 105 | + <comment userInput="Remove Banner Content" stepKey="commentRemoveBannerContent"/> |
| 106 | + <actionGroup ref="removeContentTypeFromStage" stepKey="removeBannerContentTypeFromStage"> |
| 107 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 108 | + </actionGroup> |
| 109 | + |
| 110 | + <!-- Add Slider --> |
| 111 | + <actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle"> |
| 112 | + <argument name="contentType" value="PageBuilderSliderContentType"/> |
| 113 | + </actionGroup> |
| 114 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragSliderIntoStage"> |
| 115 | + <argument name="contentType" value="PageBuilderSliderContentType"/> |
| 116 | + </actionGroup> |
| 117 | + |
| 118 | + <!-- Verify On Hover Upload Button Work--> |
| 119 | + <comment userInput="Verify On Hover Upload Buttons Work" stepKey="commentVerifyButtonsOnSlider"/> |
| 120 | + <click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unFocusSlider"/> |
| 121 | + <actionGroup ref="verifyUploadImageButtons" stepKey="verifyUploadImageButtons"> |
| 122 | + <argument name="contentType" value="PageBuilderSliderContentType"/> |
| 123 | + </actionGroup> |
| 124 | + |
| 125 | + <!-- Attach image to Slider in PageBuilder stage --> |
| 126 | + <actionGroup ref="UploadNewBackgroundImageToContentTypeFromStageActionGroup" stepKey="addNewImageToSliderFromStage"> |
| 127 | + <argument name="backgroundImage" value="PageBuilderBackgroundImage_JPG"/> |
| 128 | + <argument name="section" value="SlideOnBackend"/> |
| 129 | + </actionGroup> |
| 130 | + |
| 131 | + <!-- Remove Slider Content --> |
| 132 | + <comment userInput="Remove Slider Content" stepKey="commentRemoveSliderContent"/> |
| 133 | + <actionGroup ref="removeContentTypeFromStage" stepKey="removeSliderContentTypeFromStage"> |
| 134 | + <argument name="contentType" value="PageBuilderSliderContentType"/> |
| 135 | + </actionGroup> |
| 136 | + </test> |
| 137 | +</tests> |
0 commit comments