Skip to content

Commit 60f8516

Browse files
MAGETWO-91974: [Testing] Create/Update Automated Tests
- add switching between appearances test
1 parent 271467f commit 60f8516

File tree

1 file changed

+123
-0
lines changed

1 file changed

+123
-0
lines changed

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageBuilder/Test/AdminPageBuilderButtonGroupTests.xml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,4 +1264,127 @@
12641264
<argument name="secondButtonIndex" value="3"/>
12651265
</actionGroup>
12661266
</test>
1267+
<test name="ButtonGroupValidateSwitchingAppearances">
1268+
<annotations>
1269+
<features value="PageBuilder"/>
1270+
<stories value="Buttons"/>
1271+
<title value="Button Group - Validate Switching Appearances"/>
1272+
<description value="Validate switching between appearances in the Configuration form, on Stage and Storefront for a Button group."/>
1273+
<severity value="CRITICAL"/>
1274+
<testCaseId value="MAGETWO-92374"/>
1275+
<useCaseId value="MAGETWO-66361"/>
1276+
<group value="pagebuilder"/>
1277+
<group value="pagebuilder-buttons"/>
1278+
<group value="pagebuilder-buttonGroup"/>
1279+
</annotations>
1280+
<before>
1281+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
1282+
<actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/>
1283+
<createData entity="_defaultCmsPage" stepKey="createPreReqCMSPage" />
1284+
</before>
1285+
<after>
1286+
<deleteData createDataKey="createPreReqCMSPage" stepKey="deletePreReqCMSPage" />
1287+
<actionGroup ref="logout" stepKey="logout"/>
1288+
</after>
1289+
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToContentCreatedCMSPage">
1290+
<argument name="CMSPage" value="$$createPreReqCMSPage$$"/>
1291+
</actionGroup>
1292+
<actionGroup ref="dragContentBlockToStage" stepKey="dragContentBlockToStage">
1293+
<argument name="contentBlockType" value="PageBuilderButtonsContentBlock"/>
1294+
</actionGroup>
1295+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage1">
1296+
<argument name="contentBlockType" value="PageBuilderButtonsContentBlock"/>
1297+
</actionGroup>
1298+
<!-- Select Inline Appearance -->
1299+
<comment userInput="Select Inline Appearance" stepKey="CommentSelectInlineAppearance"/>
1300+
<actionGroup ref="chooseVisualSelectOption" stepKey="enterStackedAlignment">
1301+
<argument name="property" value="PageBuilderAppearancePropertyInline"/>
1302+
</actionGroup>
1303+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings1"/>
1304+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton1">
1305+
<argument name="text" value="PageBuilderButtonItemText_First"/>
1306+
<argument name="index" value="1"/>
1307+
</actionGroup>
1308+
<actionGroup ref="addButton" stepKey="addButton2"/>
1309+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton2">
1310+
<argument name="text" value="PageBuilderButtonItemText_Second"/>
1311+
<argument name="index" value="2"/>
1312+
</actionGroup>
1313+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage2">
1314+
<argument name="contentBlockType" value="PageBuilderButtonsContentBlock"/>
1315+
</actionGroup>
1316+
<!-- Select Stacked Appearance -->
1317+
<comment userInput="Select Stacked Appearance" stepKey="CommentSelectStackedAppearance"/>
1318+
<actionGroup ref="chooseVisualSelectOption" stepKey="enterAppearance">
1319+
<argument name="property" value="PageBuilderAppearancePropertyStacked"/>
1320+
</actionGroup>
1321+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings2"/>
1322+
<!-- Validate Stage -->
1323+
<comment userInput="Validate Stage" stepKey="commentValidateStage"/>
1324+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('1', PageBuilderButtonItemText_First.value)}}" stepKey="waitForButton1Stage"/>
1325+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('2', PageBuilderButtonItemText_Second.value)}}" stepKey="waitForButton2Stage"/>
1326+
<actionGroup ref="validateButtonGroupStackedAppearance" stepKey="seeAppearanceOnStage">
1327+
<argument name="buttonGroupPage" value="ButtonGroupOnStage"/>
1328+
<argument name="buttonItemPage" value="ButtonItemOnStage"/>
1329+
</actionGroup>
1330+
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
1331+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
1332+
<!-- Validate Stage After Save -->
1333+
<comment userInput="Validate Stage After Save" stepKey="commentValidateStage2"/>
1334+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('1', PageBuilderButtonItemText_First.value)}}" stepKey="waitForButton1Stage2"/>
1335+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('2', PageBuilderButtonItemText_Second.value)}}" stepKey="waitForButton2Stage2"/>
1336+
<actionGroup ref="validateButtonGroupStackedAppearance" stepKey="seeAppearanceOnStage2">
1337+
<argument name="buttonGroupPage" value="ButtonGroupOnStage"/>
1338+
<argument name="buttonItemPage" value="ButtonItemOnStage"/>
1339+
</actionGroup>
1340+
<amOnPage url="$$createPreReqCMSPage.identifier$$" stepKey="amOnPageTestPage"/>
1341+
<!-- Validate Storefront -->
1342+
<comment userInput="Validate Storefront" stepKey="commentValidateStorefront"/>
1343+
<waitForElementVisible selector="{{ButtonItemOnStorefront.buttonItemText('1', PageBuilderButtonItemText_First.value)}}" stepKey="waitForButton1Storefront"/>
1344+
<waitForElementVisible selector="{{ButtonItemOnStorefront.buttonItemText('2', PageBuilderButtonItemText_Second.value)}}" stepKey="waitForButton2Storefront"/>
1345+
<actionGroup ref="validateButtonGroupStackedAppearance" stepKey="seeAppearanceOnStorefront">
1346+
<argument name="buttonGroupPage" value="ButtonGroupOnStorefront"/>
1347+
<argument name="buttonItemPage" value="ButtonItemOnStorefront"/>
1348+
</actionGroup>
1349+
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToContentCreatedCMSPage2">
1350+
<argument name="CMSPage" value="$$createPreReqCMSPage$$"/>
1351+
</actionGroup>
1352+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage2"/>
1353+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage3">
1354+
<argument name="contentBlockType" value="PageBuilderButtonsContentBlock"/>
1355+
</actionGroup>
1356+
<!-- Select Inline Appearance -->
1357+
<comment userInput="Select Inline Appearance" stepKey="CommentSelectInlineAppearance2"/>
1358+
<actionGroup ref="chooseVisualSelectOption" stepKey="enterInlineAppearance">
1359+
<argument name="property" value="PageBuilderAppearancePropertyInline"/>
1360+
</actionGroup>
1361+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings3"/>
1362+
<!-- Validate Stage -->
1363+
<comment userInput="Validate Stage" stepKey="commentValidateStage3"/>
1364+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('1', PageBuilderButtonItemText_First.value)}}" stepKey="waitForButton1Stage3"/>
1365+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('2', PageBuilderButtonItemText_Second.value)}}" stepKey="waitForButton2Stage3"/>
1366+
<actionGroup ref="validateButtonGroupInlineAppearance" stepKey="seeAppearanceOnStage3">
1367+
<argument name="buttonGroupPage" value="ButtonGroupOnStage"/>
1368+
<argument name="buttonItemPage" value="ButtonItemOnStage"/>
1369+
</actionGroup>
1370+
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage2"/>
1371+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage3"/>
1372+
<!-- Validate Stage After Save -->
1373+
<comment userInput="Validate Stage After Save" stepKey="commentValidateStage4"/>
1374+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('1', PageBuilderButtonItemText_First.value)}}" stepKey="waitForButton1Stage4"/>
1375+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('2', PageBuilderButtonItemText_Second.value)}}" stepKey="waitForButton2Stage4"/>
1376+
<actionGroup ref="validateButtonGroupInlineAppearance" stepKey="seeAppearanceOnStage4">
1377+
<argument name="buttonGroupPage" value="ButtonGroupOnStage"/>
1378+
<argument name="buttonItemPage" value="ButtonItemOnStage"/>
1379+
</actionGroup>
1380+
<amOnPage url="$$createPreReqCMSPage.identifier$$" stepKey="amOnPageTestPage2"/>
1381+
<!-- Validate Storefront -->
1382+
<comment userInput="Validate Storefront" stepKey="commentValidateStorefront2"/>
1383+
<waitForElementVisible selector="{{ButtonItemOnStorefront.buttonItemText('1', PageBuilderButtonItemText_First.value)}}" stepKey="waitForButton1Storefront2"/>
1384+
<waitForElementVisible selector="{{ButtonItemOnStorefront.buttonItemText('2', PageBuilderButtonItemText_Second.value)}}" stepKey="waitForButton2Storefront2"/>
1385+
<actionGroup ref="validateButtonGroupInlineAppearance" stepKey="seeAppearanceOnStorefront2">
1386+
<argument name="buttonGroupPage" value="ButtonGroupOnStorefront"/>
1387+
<argument name="buttonItemPage" value="ButtonItemOnStorefront"/>
1388+
</actionGroup>
1389+
</test>
12671390
</tests>

0 commit comments

Comments
 (0)