Skip to content

Commit 51ae9f1

Browse files
committed
ACP2E-2957: added mftf
1 parent 2326325 commit 51ae9f1

File tree

1 file changed

+127
-0
lines changed

1 file changed

+127
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/************************************************************************
4+
*
5+
* Copyright 2024 Adobe
6+
* All Rights Reserved.
7+
*
8+
* NOTICE: All information contained herein is, and remains
9+
* the property of Adobe and its suppliers, if any. The intellectual
10+
* and technical concepts contained herein are proprietary to Adobe
11+
* and its suppliers and are protected by all applicable intellectual
12+
* property laws, including trade secret and copyright laws.
13+
* Dissemination of this information or reproduction of this material
14+
* is strictly forbidden unless prior written permission is obtained
15+
* from Adobe.
16+
* ************************************************************************
17+
*/
18+
-->
19+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
21+
<test name="ImageAddSameNameImageIntoPageBuilderStageTest">
22+
<annotations>
23+
<features value="PageBuilder"/>
24+
<stories value="Image"/>
25+
<title value="Add Image with same name in PageBuilder for new CMS page and view on Storefront"/>
26+
<description value="Upload and select an image to/from Magento Media Gallery from the Image content type in the Page Builder Stage and then delete it and re-upload a different image with same name."/>
27+
<severity value="AVERAGE"/>
28+
<useCaseId value="ACP2E-2957"/>
29+
<testCaseId value="AC-11732"/>
30+
<group value="pagebuilder"/>
31+
<group value="pagebuilder-image"/>
32+
<group value="cloud"/>
33+
</annotations>
34+
<before>
35+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
36+
<actionGroup ref="CliMediaGalleryEnhancedEnableActionGroup" stepKey="enableOldMediaGallery">
37+
<argument name="enabled" value="0"/>
38+
</actionGroup>
39+
<createData entity="_defaultCmsPage" stepKey="createCMSPage"/>
40+
</before>
41+
<after>
42+
<actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage2">
43+
<argument name="CMSPage" value="$$createCMSPage$$"/>
44+
</actionGroup>
45+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage2"/>
46+
<actionGroup ref="goToMediaStorageFromStage" stepKey="goToMediaStorageFromStage2">
47+
<argument name="contentType" value="PageBuilderImageContentType"/>
48+
<argument name="x" value="0"/>
49+
<argument name="y" value="0"/>
50+
</actionGroup>
51+
<comment stepKey="deleteImageB" userInput="Delete image B"/>
52+
<actionGroup ref="DeleteImageFromStorageActionGroup" stepKey="DeleteImageFromStorage2">
53+
<argument name="Image" value="PageBuilderImagePropertyJpgCopyOtherFolder"/>
54+
</actionGroup>
55+
<actionGroup ref="CliMediaGalleryEnhancedEnableActionGroup" stepKey="disableOldMediaGallery">
56+
<argument name="enabled" value="0"/>
57+
</actionGroup>
58+
<deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage" />
59+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
60+
</after>
61+
62+
<!-- Go to CMS Page in Admin -->
63+
<actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage1">
64+
<argument name="CMSPage" value="$$createCMSPage$$"/>
65+
</actionGroup>
66+
67+
<!-- Switch to PageBuilder stage -->
68+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
69+
70+
<!-- Add a row to PageBuilder stage with image -->
71+
<actionGroup ref="dragContentTypeToStage" stepKey="dragRowToRootContainer">
72+
<argument name="contentType" value="PageBuilderRowContentType"/>
73+
<argument name="containerTargetType" value="PageBuilderRootContainerContentType"/>
74+
</actionGroup>
75+
<actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle">
76+
<argument name="contentType" value="PageBuilderImageContentType"/>
77+
</actionGroup>
78+
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSection">
79+
<argument name="contentType" value="PageBuilderImageContentType"/>
80+
</actionGroup>
81+
<actionGroup ref="dragContentTypeToStage" stepKey="dragBannerIntoStage">
82+
<argument name="contentType" value="PageBuilderImageContentType"/>
83+
</actionGroup>
84+
85+
<!-- Attach image A to PageBuilder stage -->
86+
<comment userInput="Attach image A to PageBuilder stage" stepKey="commentAttachImage"/>
87+
<comment userInput="Upload image from stage" stepKey="uploadImageFromStage"/>
88+
<actionGroup ref="uploadImageToContentTypeFromStage" stepKey="addImageToStage">
89+
<argument name="property" value="PageBuilderBackgroundImage_JPG"/>
90+
<argument name="section" value="ImageOnStageWithoutImageUploaded"/>
91+
</actionGroup>
92+
93+
<!-- Go to Media Storage from stage -->
94+
<comment userInput="Go to Media Storage from stage" stepKey="commentGoToMediaStorageFromStage1"/>
95+
<actionGroup ref="goToMediaStorageFromStage" stepKey="goToMediaStorageFromStage1">
96+
<argument name="contentType" value="PageBuilderImageContentType"/>
97+
<argument name="x" value="0"/>
98+
<argument name="y" value="0"/>
99+
</actionGroup>
100+
101+
<!-- Delete image A -->
102+
<comment stepKey="deleteImageA" userInput="Delete image A"/>
103+
<actionGroup ref="DeleteImageFromStorageActionGroup" stepKey="DeleteImageFromStorage1">
104+
<argument name="Image" value="PageBuilderBackgroundImage_JPG"/>
105+
</actionGroup>
106+
107+
<!-- Select image B from Media Gallery -->
108+
<comment userInput="Attach image B from Media Gallery" stepKey="attachImageToSlideOut"/>
109+
<actionGroup ref="InsertImageFromMediaGalleryFromCmsActionGroup" stepKey="insertImageFromMediaGallery">
110+
<argument name="imageFileName" value="{{PageBuilderImagePropertyJpgCopyOtherFolder.fileName}}"/>
111+
<argument name="imageFilePath" value="{{PageBuilderImagePropertyJpgCopyOtherFolder.file}}"/>
112+
</actionGroup>
113+
114+
<!-- Save Cms Page -->
115+
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen"/>
116+
<actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage"/>
117+
118+
<!-- Go to Storefront -->
119+
<actionGroup ref="StorefrontGoToCMSPageActionGroup" stepKey="goToCMSPageOnStorefrontAsGuest">
120+
<argument name="identifier" value="$createCMSPage.identifier$"/>
121+
</actionGroup>
122+
123+
<!-- Validate Storefront -->
124+
<comment userInput="Validate Storefront" stepKey="commentValidateStorefront"/>
125+
<waitForElementVisible selector="{{ImageOnStorefront.imageSourceByIndex('1', PageBuilderImagePropertyJpgCopyOtherFolder.fileName)}}" stepKey="seeImage2SourceOnStorefront"/>
126+
</test>
127+
</tests>

0 commit comments

Comments
 (0)