Skip to content

Commit d69de9e

Browse files
committed
MC-4305: Duplicating Column that Contains Image Content Type Breaks Stage
- added automated test
1 parent 0e580da commit d69de9e

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderImageTest.xml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,4 +1110,69 @@
11101110
<waitForElementNotVisible selector="{{ImageOnStage.uploadImageInput('1')}}" stepKey="waitForUploadInputNotVisible"/>
11111111
<dontSeeElement selector="{{ImageOnStage.uploadImageInput('1')}}" stepKey="dontSeeUploadImageInput"/>
11121112
</test>
1113+
<test name="DuplicateContainerWithImage">
1114+
<annotations>
1115+
<features value="PageBuilder"/>
1116+
<stories value="Image"/>
1117+
<title value="Duplicate Container with an Image"/>
1118+
<description value="A user should be able to duplicate a container containing an Image content type. Verify on Stage and Storefront."/>
1119+
<severity value="CRITICAL"/>
1120+
<useCaseId value="MC-509"/>
1121+
<testCaseId value="MC-5013"/>
1122+
<group value="pagebuilder"/>
1123+
<group value="pagebuilder-image"/>
1124+
</annotations>
1125+
<before>
1126+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
1127+
<actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/>
1128+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
1129+
</before>
1130+
<after>
1131+
<actionGroup ref="logout" stepKey="logout"/>
1132+
</after>
1133+
<actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle">
1134+
<argument name="contentType" value="PageBuilderImageContentType"/>
1135+
</actionGroup>
1136+
<!-- Add Image to Stage -->
1137+
<comment userInput="Add Image to Stage" stepKey="commentAddImageToStage"/>
1138+
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup">
1139+
<argument name="group" value="PageBuilderImageContentType"/>
1140+
</actionGroup>
1141+
<actionGroup ref="dragContentTypeToStage" stepKey="dragContentTypeToStage">
1142+
<argument name="contentType" value="PageBuilderImageContentType"/>
1143+
</actionGroup>
1144+
<actionGroup ref="addImageToStage" stepKey="addImageToStage">
1145+
<argument name="property" value="PageBuilderImageProperty_StageJPG"/>
1146+
</actionGroup>
1147+
<!-- Duplicate Row -->
1148+
<comment userInput="Duplicate Row" stepKey="commentDuplicate"/>
1149+
<actionGroup ref="duplicateContentType" stepKey="duplicateContentType">
1150+
<argument name="contentType" value="PageBuilderRowContentType"/>
1151+
<argument name="contentTypeXCoordinate" value="5"/>
1152+
<argument name="contentTypeYCoordinate" value="5"/>
1153+
</actionGroup>
1154+
<!-- Validate content type is duplicated -->
1155+
<comment userInput="Validate content type is duplicated" stepKey="commentValidateDuplicateOnStage"/>
1156+
<waitForElementVisible selector="{{ImageOnStage.base('1')}}" stepKey="waitForContentTypeImage1"/>
1157+
<waitForElementVisible selector="{{RowOnStage.base('1')}}" stepKey="waitForContentTypeRow1"/>
1158+
<waitForElementVisible selector="{{ImageOnStage.base('2')}}" stepKey="waitForContentTypeImage2"/>
1159+
<waitForElementVisible selector="{{RowOnStage.base('2')}}" stepKey="waitForContentTypeRow2"/>
1160+
<!-- Stage: Validate After Save -->
1161+
<comment userInput="Stage: Validate After Save" stepKey="CommentValidateOnStageAfterSave"/>
1162+
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
1163+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
1164+
<waitForElementVisible selector="{{ImageOnStage.base('1')}}" stepKey="waitForContentTypeImage1AfterSave"/>
1165+
<waitForElementVisible selector="{{RowOnStage.base('1')}}" stepKey="waitForContentTypeRow1AfterSave"/>
1166+
<waitForElementVisible selector="{{ImageOnStage.base('2')}}" stepKey="waitForContentTypeImage2AfterSave"/>
1167+
<waitForElementVisible selector="{{RowOnStage.base('2')}}" stepKey="waitForContentTypeRow2AfterSave"/>
1168+
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront">
1169+
<argument name="contentType" value="PageBuilderImageContentType"/>
1170+
</actionGroup>
1171+
<!-- Validate content type is duplicated in Storefront -->
1172+
<comment userInput="Validate content type is duplicated in Storefront" stepKey="commentValidateDuplicatedStorefront"/>
1173+
<waitForElementVisible selector="{{ImageOnStorefront.base('1')}}" stepKey="waitForContentTypeImageStorefront1"/>
1174+
<waitForElementVisible selector="{{RowOnStorefront.base('1')}}" stepKey="waitForContentTypeRowStorefront1"/>
1175+
<waitForElementVisible selector="{{ImageOnStorefront.base('2')}}" stepKey="waitForContentTypeImage2Storefront"/>
1176+
<waitForElementVisible selector="{{RowOnStorefront.base('2')}}" stepKey="waitForContentTypeRowStorefront2"/>
1177+
</test>
11131178
</tests>

0 commit comments

Comments
 (0)