Skip to content

Commit 6b9e242

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

File tree

1 file changed

+182
-16
lines changed

1 file changed

+182
-16
lines changed

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

Lines changed: 182 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,14 +1110,14 @@
11101110
<waitForElementNotVisible selector="{{ImageOnStage.uploadImageInput('1')}}" stepKey="waitForUploadInputNotVisible"/>
11111111
<dontSeeElement selector="{{ImageOnStage.uploadImageInput('1')}}" stepKey="dontSeeUploadImageInput"/>
11121112
</test>
1113-
<test name="DuplicateContainerWithImage">
1113+
<test name="DuplicateRowWithImage">
11141114
<annotations>
11151115
<features value="PageBuilder"/>
11161116
<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."/>
1117+
<title value="Duplicate Row with an Image"/>
1118+
<description value="A user should be able to duplicate a row containing an Image content type. Verify on Stage and Storefront."/>
11191119
<severity value="CRITICAL"/>
1120-
<useCaseId value="MC-509"/>
1120+
<useCaseId value="MC-4305"/>
11211121
<testCaseId value="MC-5013"/>
11221122
<group value="pagebuilder"/>
11231123
<group value="pagebuilder-image"/>
@@ -1153,26 +1153,192 @@
11531153
</actionGroup>
11541154
<!-- Validate content type is duplicated -->
11551155
<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"/>
1156+
<seeElement selector="{{ImageOnStage.base('1')}}" stepKey="seeImage1"/>
1157+
<seeElement selector="{{RowOnStage.base('1')}}" stepKey="seeRow1"/>
1158+
<seeElement selector="{{ImageOnStage.base('2')}}" stepKey="seeImage2"/>
1159+
<seeElement selector="{{RowOnStage.base('2')}}" stepKey="seeRow2"/>
11601160
<!-- Stage: Validate After Save -->
11611161
<comment userInput="Stage: Validate After Save" stepKey="CommentValidateOnStageAfterSave"/>
11621162
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
11631163
<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"/>
1164+
<seeElement selector="{{ImageOnStage.base('1')}}" stepKey="seeImage1AfterSave"/>
1165+
<seeElement selector="{{RowOnStage.base('1')}}" stepKey="seeRow1AfterSave"/>
1166+
<seeElement selector="{{ImageOnStage.base('2')}}" stepKey="seeImage2AfterSave"/>
1167+
<seeElement selector="{{RowOnStage.base('2')}}" stepKey="seeRow2AfterSave"/>
1168+
<!-- Validate content type is duplicated in Storefront -->
1169+
<comment userInput="Validate content type is duplicated in Storefront" stepKey="commentValidateDuplicatedStorefront"/>
1170+
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront">
1171+
<argument name="contentType" value="PageBuilderImageContentType"/>
1172+
</actionGroup>
1173+
<seeElement selector="{{ImageOnStorefront.base('1')}}" stepKey="seeImage1Storefront"/>
1174+
<seeElement selector="{{RowOnStorefront.base('1')}}" stepKey="seeRow1Storefront"/>
1175+
<seeElement selector="{{ImageOnStorefront.base('2')}}" stepKey="seeImage2Storefront"/>
1176+
<seeElement selector="{{RowOnStorefront.base('2')}}" stepKey="seeRow2Storefront"/>
1177+
</test>
1178+
<test name="DuplicateColumnWithImage">
1179+
<annotations>
1180+
<features value="PageBuilder"/>
1181+
<stories value="Image"/>
1182+
<title value="Duplicate Column with an Image"/>
1183+
<description value="A user should be able to duplicate a column containing an Image content type. Verify on Stage and Storefront."/>
1184+
<severity value="CRITICAL"/>
1185+
<useCaseId value="MC-4305"/>
1186+
<testCaseId value="MC-5021"/>
1187+
<group value="pagebuilder"/>
1188+
<group value="pagebuilder-image"/>
1189+
</annotations>
1190+
<before>
1191+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
1192+
<actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/>
1193+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
1194+
</before>
1195+
<after>
1196+
<actionGroup ref="logout" stepKey="logout"/>
1197+
</after>
1198+
<actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle">
1199+
<argument name="contentType" value="PageBuilderImageContentType"/>
1200+
</actionGroup>
1201+
<!-- Add Column to Stage -->
1202+
<comment userInput="Add Column to Stage" stepKey="commentAddColumnToStage"/>
1203+
<actionGroup ref="dragContentTypeToStage" stepKey="dragContentTypeToStage">
1204+
<argument name="contentType" value="PageBuilderColumnContentType"/>
1205+
</actionGroup>
1206+
<!-- Add Image to Stage -->
1207+
<comment userInput="Add Image to Column" stepKey="commentAddImageToColumn"/>
1208+
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup">
1209+
<argument name="group" value="PageBuilderImageContentType"/>
1210+
</actionGroup>
1211+
<actionGroup ref="dragContentTypeToContainer" stepKey="dragContentTypeToContainer">
1212+
<argument name="contentType" value="PageBuilderImageContentType"/>
1213+
<argument name="containerTargetType" value="PageBuilderColumnContentType"/>
1214+
</actionGroup>
1215+
<actionGroup ref="addImageToStage" stepKey="addImageToStage">
1216+
<argument name="property" value="PageBuilderImageProperty_StageJPG"/>
1217+
</actionGroup>
1218+
<!-- Duplicate Column -->
1219+
<comment userInput="Duplicate Column" stepKey="commentDuplicate"/>
1220+
<actionGroup ref="duplicateContentType" stepKey="duplicateContentType">
1221+
<argument name="contentType" value="PageBuilderColumnContentType"/>
1222+
<argument name="contentTypeXCoordinate" value="5"/>
1223+
<argument name="contentTypeYCoordinate" value="5"/>
1224+
</actionGroup>
1225+
<!-- Validate content type is duplicated -->
1226+
<comment userInput="Validate content type is duplicated" stepKey="commentValidateDuplicateOnStage"/>
1227+
<seeElement selector="{{ImageOnStage.base('1')}}" stepKey="seeImage1"/>
1228+
<seeElement selector="{{ColumnOnBackend.base('1')}}" stepKey="seeColumn1"/>
1229+
<seeElement selector="{{ImageOnStage.base('2')}}" stepKey="seeImage2"/>
1230+
<seeElement selector="{{ColumnOnBackend.base('2')}}" stepKey="seeColumn2"/>
1231+
<!-- Stage: Validate After Save -->
1232+
<comment userInput="Stage: Validate After Save" stepKey="CommentValidateOnStageAfterSave"/>
1233+
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
1234+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
1235+
<seeElement selector="{{ImageOnStage.base('1')}}" stepKey="seeImage1AfterSave"/>
1236+
<seeElement selector="{{ColumnOnBackend.base('1')}}" stepKey="seeColumn1AfterSave"/>
1237+
<seeElement selector="{{ImageOnStage.base('2')}}" stepKey="seeImage2AfterSave"/>
1238+
<seeElement selector="{{ColumnOnBackend.base('2')}}" stepKey="seeColumn2AfterSave"/>
1239+
<!-- Validate content type is duplicated in Storefront -->
1240+
<comment userInput="Validate content type is duplicated in Storefront" stepKey="commentValidateDuplicatedStorefront"/>
11681241
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront">
11691242
<argument name="contentType" value="PageBuilderImageContentType"/>
11701243
</actionGroup>
1244+
<seeElement selector="{{ImageOnStorefront.base('1')}}" stepKey="seeImage1Storefront"/>
1245+
<seeElement selector="{{ColumnOnFrontend.base('1')}}" stepKey="seeColumn1Storefront"/>
1246+
<seeElement selector="{{ImageOnStorefront.base('2')}}" stepKey="seeImage2Storefront"/>
1247+
<seeElement selector="{{ColumnOnFrontend.base('2')}}" stepKey="seeColumn2Storefront"/>
1248+
</test>
1249+
<test name="DuplicateTabWithImage">
1250+
<annotations>
1251+
<features value="PageBuilder"/>
1252+
<stories value="Image"/>
1253+
<title value="Duplicate Tab with an Image"/>
1254+
<description value="A user should be able to duplicate a tab group and a tab iten containing an Image content type. Verify on Stage and Storefront."/>
1255+
<severity value="CRITICAL"/>
1256+
<useCaseId value="MC-4305"/>
1257+
<testCaseId value="MC-5022"/>
1258+
<group value="pagebuilder"/>
1259+
<group value="pagebuilder-image"/>
1260+
</annotations>
1261+
<before>
1262+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
1263+
<actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/>
1264+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
1265+
</before>
1266+
<after>
1267+
<actionGroup ref="logout" stepKey="logout"/>
1268+
</after>
1269+
<actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle">
1270+
<argument name="contentType" value="PageBuilderImageContentType"/>
1271+
</actionGroup>
1272+
<!-- Add Tabs to Stage -->
1273+
<comment userInput="Add Tabs to Stage" stepKey="commentAddTabsToStage"/>
1274+
<actionGroup ref="dragContentTypeToStage" stepKey="dragContentTypeToStage">
1275+
<argument name="contentType" value="PageBuilderTabsContentType"/>
1276+
</actionGroup>
1277+
<!-- Add Image to Stage -->
1278+
<comment userInput="Add Image to Tab" stepKey="commentAddImageToTab"/>
1279+
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup">
1280+
<argument name="group" value="PageBuilderImageContentType"/>
1281+
</actionGroup>
1282+
<actionGroup ref="dragContentTypeToContainer" stepKey="dragContentTypeToContainer">
1283+
<argument name="contentType" value="PageBuilderImageContentType"/>
1284+
<argument name="containerTargetType" value="PageBuilderTabContentType"/>
1285+
</actionGroup>
1286+
<actionGroup ref="addImageToStage" stepKey="addImageToStage">
1287+
<argument name="property" value="PageBuilderImageProperty_StageJPG"/>
1288+
</actionGroup>
1289+
<!-- Duplicate Tab Item -->
1290+
<comment userInput="Duplicate Tab Item" stepKey="commentDuplicateTabItem"/>
1291+
<actionGroup ref="duplicateSmallContentType" stepKey="duplicateTabItem">
1292+
<argument name="section" value="TabOnStage"/>
1293+
<argument name="targetIndex" value="1"/>
1294+
</actionGroup>
1295+
<click selector="{{TabsOnStage.tabsContainer}}" stepKey="unfocusTabsOptions"/>
1296+
<!-- Validate Tab Item is duplicated -->
1297+
<comment userInput="Validate Tab Item is duplicated" stepKey="commentValidateTabItemDuplicateOnStage"/>
1298+
<seeElement selector="{{ImageOnStage.base('2')}}" stepKey="seeImage2"/>
1299+
<seeElement selector="{{TabOnStage.base('2')}}" stepKey="seeTab2"/>
1300+
<!-- Duplicate Tab Group -->
1301+
<comment userInput="Duplicate Tab Group" stepKey="commentDuplicateTabGroup"/>
1302+
<actionGroup ref="duplicateContentType" stepKey="duplicateTabGroup">
1303+
<argument name="contentType" value="PageBuilderTabsContentType"/>
1304+
<argument name="contentTypeXCoordinate" value="5"/>
1305+
<argument name="contentTypeYCoordinate" value="5"/>
1306+
</actionGroup>
1307+
<!-- Validate Tab Group is duplicated -->
1308+
<comment userInput="Validate Tab Group is duplicated" stepKey="commentValidateTabGroupDuplicateOnStage"/>
1309+
<seeElement selector="{{TabsOnStage.base('2')}}" stepKey="seeTabGroup1"/>
1310+
<seeElement selector="{{TabOnStage.base('3')}}" stepKey="seeTab3"/>
1311+
<seeElement selector="{{ImageOnStage.base('3')}}" stepKey="seeImage3"/>
1312+
<seeElementInDOM selector="{{TabOnStage.base('4')}}" stepKey="seeTab4"/>
1313+
<seeElementInDOM selector="{{ImageOnStage.base('4')}}" stepKey="seeImage4"/>
1314+
<!-- Stage: Validate After Save -->
1315+
<comment userInput="Stage: Validate After Save" stepKey="CommentValidateOnStageAfterSave"/>
1316+
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
1317+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
1318+
<seeElement selector="{{TabsOnStage.base('1')}}" stepKey="seeTabGroup1AfterSave"/>
1319+
<seeElement selector="{{TabOnStage.base('1')}}" stepKey="seeTab1AfterSave"/>
1320+
<seeElement selector="{{ImageOnStage.base('1')}}" stepKey="seeImage1AfterSave"/>
1321+
<seeElementInDOM selector="{{TabOnStage.base('2')}}" stepKey="seeTab2AfterSave"/>
1322+
<seeElementInDOM selector="{{ImageOnStage.base('2')}}" stepKey="seeImage2AfterSave"/>
1323+
<seeElement selector="{{TabsOnStage.base('2')}}" stepKey="seeTabGroup2AfterSave"/>
1324+
<seeElement selector="{{TabOnStage.base('3')}}" stepKey="seeTab3AfterSave"/>
1325+
<seeElement selector="{{ImageOnStage.base('3')}}" stepKey="seeImage3AfterSave"/>
1326+
<seeElementInDOM selector="{{TabOnStage.base('4')}}" stepKey="seeTab4AfterSave"/>
1327+
<seeElementInDOM selector="{{ImageOnStage.base('4')}}" stepKey="seeImage4AfterSave"/>
11711328
<!-- Validate content type is duplicated in Storefront -->
11721329
<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"/>
1330+
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront">
1331+
<argument name="contentType" value="PageBuilderImageContentType"/>
1332+
</actionGroup>
1333+
<seeElement selector="{{TabsOnFrontend.base('1')}}" stepKey="seeTabGroup1Storefront"/>
1334+
<seeElement selector="{{TabOnStorefront.base('1')}}" stepKey="seeTab1Storefront"/>
1335+
<seeElement selector="{{ImageOnStorefront.base('1')}}" stepKey="seeImage1Storefront"/>
1336+
<seeElementInDOM selector="{{TabOnStorefront.base('2')}}" stepKey="seeTab2Storefront"/>
1337+
<seeElementInDOM selector="{{ImageOnStorefront.base('2')}}" stepKey="seeImage2Storefront"/>
1338+
<seeElement selector="{{TabsOnFrontend.base('2')}}" stepKey="seeTabGroup2Storefront"/>
1339+
<seeElement selector="{{TabOnStorefront.base('3')}}" stepKey="seeTab3Storefront"/>
1340+
<seeElement selector="{{ImageOnStorefront.base('3')}}" stepKey="seeImage3Storefront"/>
1341+
<seeElementInDOM selector="{{TabOnStorefront.base('4')}}" stepKey="seeTab4Storefront"/>
1342+
<seeElementInDOM selector="{{ImageOnStorefront.base('4')}}" stepKey="seeImage4Storefront"/>
11771343
</test>
11781344
</tests>

0 commit comments

Comments
 (0)