Skip to content

Commit 319f39b

Browse files
MAGETWO-91974: [Testing] Create/Update Automated Tests
- add test for button wrap with inline appearance
1 parent 1a0eae7 commit 319f39b

File tree

3 files changed

+122
-2
lines changed

3 files changed

+122
-2
lines changed

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageBuilder/ActionGroup/ButtonActionGroup.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@
110110
<waitForElementVisible selector="{{buttonItemPage.base(secondButtonIndex)}}" stepKey="waitForButton2"/>
111111
<executeJS function="{{buttonItemPage.xCoordinate(secondButtonIndex)}}" stepKey="xCoordinate2"/>
112112
<executeJS function="{{buttonItemPage.yCoordinate(secondButtonIndex)}}" stepKey="yCoordinate2"/>
113-
<assertGreaterThan stepKey="checkXCoordinates">
113+
<assertGreaterThanOrEqual stepKey="checkXCoordinates">
114114
<expectedResult type="variable">xCoordinate1</expectedResult>
115115
<actualResult type="variable">xCoordinate2</actualResult>
116-
</assertGreaterThan>
116+
</assertGreaterThanOrEqual>
117117
<assertGreaterThan stepKey="checkYCoordinates">
118118
<expectedResult type="variable">yCoordinate1</expectedResult>
119119
<actualResult type="variable">yCoordinate2</actualResult>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageBuilder/Data/ButtonData.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@
7575
<data key="fieldName">button_text</data>
7676
<data key="value">Last</data>
7777
</entity>
78+
<entity name="PageBuilderButtonItemText_Long" type="pagebuilder_button_item_text_property">
79+
<data key="name">Button Text</data>
80+
<data key="section">content</data>
81+
<data key="fieldName">button_text</data>
82+
<data key="value">Long button text Long button text Long button text</data>
83+
</entity>
7884
<!-- Button Type -->
7985
<entity name="PageBuilderButtonItemType_Primary" type="pagebuilder_button_item_type_property">
8086
<data key="name">Button Type</data>

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

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,4 +1375,118 @@
13751375
<argument name="buttonItemPage" value="ButtonItemOnStorefront"/>
13761376
</actionGroup>
13771377
</test>
1378+
<test name="ButtonGroupValidateInlineAppearanceLongNameWrap">
1379+
<annotations>
1380+
<features value="PageBuilder"/>
1381+
<stories value="Buttons"/>
1382+
<title value="Button Group - Validate Inline Appearance Long Name Wrap"/>
1383+
<description value="Validate that buttons wrap when one gets long name with Inline Appearance on Stage and Storefront for a Button group."/>
1384+
<severity value="CRITICAL"/>
1385+
<testCaseId value="MAGETWO-92381"/>
1386+
<useCaseId value="MAGETWO-66361"/>
1387+
<group value="pagebuilder"/>
1388+
<group value="pagebuilder-buttons"/>
1389+
<group value="pagebuilder-buttonGroup"/>
1390+
</annotations>
1391+
<before>
1392+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
1393+
<actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/>
1394+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
1395+
</before>
1396+
<after>
1397+
<actionGroup ref="logout" stepKey="logout"/>
1398+
</after>
1399+
<actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle">
1400+
<argument name="contentBlockType" value="PageBuilderButtonsContentBlock"/>
1401+
</actionGroup>
1402+
<actionGroup ref="dragContentBlockToStage" stepKey="dragContentBlockToStage">
1403+
<argument name="contentBlockType" value="PageBuilderButtonsContentBlock"/>
1404+
</actionGroup>
1405+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage1">
1406+
<argument name="contentBlockType" value="PageBuilderButtonsContentBlock"/>
1407+
</actionGroup>
1408+
<!-- Select Inline Appearance -->
1409+
<comment userInput="Select Inline Appearance" stepKey="CommentSelectInlineAppearance"/>
1410+
<actionGroup ref="chooseVisualSelectOption" stepKey="enterAppearance">
1411+
<argument name="property" value="PageBuilderAppearancePropertyInline"/>
1412+
</actionGroup>
1413+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings1"/>
1414+
<!-- Add Enough Buttons To Wrap -->
1415+
<comment userInput="Add Enough Buttons To Wrap" stepKey="commentAddEnoughButtonsToWrap"/>
1416+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton1">
1417+
<argument name="text" value="PageBuilderButtonItemText_First"/>
1418+
<argument name="index" value="1"/>
1419+
</actionGroup>
1420+
<actionGroup ref="addButton" stepKey="addButton2"/>
1421+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton2">
1422+
<argument name="text" value="PageBuilderButtonItemText_Common"/>
1423+
<argument name="index" value="2"/>
1424+
</actionGroup>
1425+
<actionGroup ref="addButton" stepKey="addButton3"/>
1426+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton3">
1427+
<argument name="text" value="PageBuilderButtonItemText_Common"/>
1428+
<argument name="index" value="3"/>
1429+
</actionGroup>
1430+
<actionGroup ref="addButton" stepKey="addButton4"/>
1431+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton4">
1432+
<argument name="text" value="PageBuilderButtonItemText_Common"/>
1433+
<argument name="index" value="4"/>
1434+
</actionGroup>
1435+
<actionGroup ref="addButton" stepKey="addButton5"/>
1436+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton5">
1437+
<argument name="text" value="PageBuilderButtonItemText_Common"/>
1438+
<argument name="index" value="5"/>
1439+
</actionGroup>
1440+
<actionGroup ref="addButton" stepKey="addButton6"/>
1441+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton6">
1442+
<argument name="text" value="PageBuilderButtonItemText_Common"/>
1443+
<argument name="index" value="6"/>
1444+
</actionGroup>
1445+
<actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditMenuOnStage2">
1446+
<argument name="contentBlockType" value="PageBuilderButtonItemContentBlock"/>
1447+
<argument name="contentBlockIndex" value="1"/>
1448+
</actionGroup>
1449+
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="fillButton1TextField">
1450+
<argument name="property" value="PageBuilderButtonItemText_Long"/>
1451+
</actionGroup>
1452+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings2"/>
1453+
<!-- Validate Stage -->
1454+
<comment userInput="Validate Stage" stepKey="commentValidateStage"/>
1455+
<actionGroup ref="validateButtonGroupInlineAppearance" stepKey="seeAppearanceOnStage">
1456+
<argument name="buttonGroupPage" value="ButtonGroupOnStage"/>
1457+
<argument name="buttonItemPage" value="ButtonItemOnStage"/>
1458+
</actionGroup>
1459+
<actionGroup ref="validateButtonGroupInlineAppearanceWraps" stepKey="seeAppearanceWrapsOnStage">
1460+
<argument name="buttonGroupPage" value="ButtonGroupOnStage"/>
1461+
<argument name="buttonItemPage" value="ButtonItemOnStage"/>
1462+
<argument name="secondButtonIndex" value="6"/>
1463+
</actionGroup>
1464+
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
1465+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
1466+
<!-- Validate Stage After Save -->
1467+
<comment userInput="Validate Stage After Save" stepKey="commentValidateStage2"/>
1468+
<actionGroup ref="validateButtonGroupInlineAppearance" stepKey="seeAppearanceOnStage2">
1469+
<argument name="buttonGroupPage" value="ButtonGroupOnStage"/>
1470+
<argument name="buttonItemPage" value="ButtonItemOnStage"/>
1471+
</actionGroup>
1472+
<actionGroup ref="validateButtonGroupInlineAppearanceWraps" stepKey="seeAppearanceWrapsOnStage2">
1473+
<argument name="buttonGroupPage" value="ButtonGroupOnStage"/>
1474+
<argument name="buttonItemPage" value="ButtonItemOnStage"/>
1475+
<argument name="secondButtonIndex" value="6"/>
1476+
</actionGroup>
1477+
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront">
1478+
<argument name="contentBlockType" value="PageBuilderButtonsContentBlock"/>
1479+
</actionGroup>
1480+
<!-- Validate Storefront -->
1481+
<comment userInput="Validate Storefront" stepKey="commentValidateStorefront"/>
1482+
<actionGroup ref="validateButtonGroupInlineAppearance" stepKey="seeAppearanceOnStorefront">
1483+
<argument name="buttonGroupPage" value="ButtonGroupOnStorefront"/>
1484+
<argument name="buttonItemPage" value="ButtonItemOnStorefront"/>
1485+
</actionGroup>
1486+
<actionGroup ref="validateButtonGroupInlineAppearanceWraps" stepKey="seeAppearanceWrapsOnStorefront">
1487+
<argument name="buttonGroupPage" value="ButtonGroupOnStorefront"/>
1488+
<argument name="buttonItemPage" value="ButtonItemOnStorefront"/>
1489+
<argument name="secondButtonIndex" value="6"/>
1490+
</actionGroup>
1491+
</test>
13781492
</tests>

0 commit comments

Comments
 (0)