Skip to content

Commit 271467f

Browse files
MAGETWO-91974: [Testing] Create/Update Automated Tests
- add move button tests for stacked and inline appearance
1 parent 0bfa697 commit 271467f

File tree

1 file changed

+280
-0
lines changed

1 file changed

+280
-0
lines changed

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

Lines changed: 280 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -984,4 +984,284 @@
984984
<argument name="buttonItemPage" value="ButtonItemOnStorefront"/>
985985
</actionGroup>
986986
</test>
987+
<test name="ButtonGroupValidateInlineAppearanceMoveButton">
988+
<annotations>
989+
<features value="PageBuilder"/>
990+
<stories value="Buttons"/>
991+
<title value="Button Group - Validate Inline Appearance Move Button"/>
992+
<description value="Validate moving a button and Inline Appearance in the Configuration form, on Stage and Storefront for a Button group."/>
993+
<severity value="CRITICAL"/>
994+
<testCaseId value="MAGETWO-92369"/>
995+
<useCaseId value="MAGETWO-66361"/>
996+
<group value="pagebuilder"/>
997+
<group value="pagebuilder-buttons"/>
998+
<group value="pagebuilder-buttonGroup"/>
999+
</annotations>
1000+
<before>
1001+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
1002+
<actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/>
1003+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
1004+
</before>
1005+
<after>
1006+
<actionGroup ref="logout" stepKey="logout"/>
1007+
</after>
1008+
<actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle">
1009+
<argument name="contentBlockType" value="PageBuilderButtonsContentBlock"/>
1010+
</actionGroup>
1011+
<actionGroup ref="dragContentBlockToStage" stepKey="dragContentBlockToStage">
1012+
<argument name="contentBlockType" value="PageBuilderButtonsContentBlock"/>
1013+
</actionGroup>
1014+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage1">
1015+
<argument name="contentBlockType" value="PageBuilderButtonsContentBlock"/>
1016+
</actionGroup>
1017+
<!-- Select And Validate Inline Appearance -->
1018+
<comment userInput="Select And Validate Inline Appearance" stepKey="CommentSelectAndValidateInlineAppearance"/>
1019+
<actionGroup ref="chooseVisualSelectOption" stepKey="enterAlignment">
1020+
<argument name="property" value="PageBuilderAppearancePropertyInline"/>
1021+
</actionGroup>
1022+
<actionGroup ref="validateVisualSelectOptionIsSelected" stepKey="seeAppearanceIsSelected">
1023+
<argument name="property" value="PageBuilderAppearancePropertyInline"/>
1024+
</actionGroup>
1025+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings1"/>
1026+
<!-- Add Enough Buttons To Wrap -->
1027+
<comment userInput="Add Enough Buttons To Wrap" stepKey="commentAddEnoughButtonsToWrap"/>
1028+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton1">
1029+
<argument name="text" value="PageBuilderButtonItemText_First"/>
1030+
<argument name="index" value="1"/>
1031+
</actionGroup>
1032+
<actionGroup ref="addButton" stepKey="addButton2"/>
1033+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton2">
1034+
<argument name="text" value="PageBuilderButtonItemText_Common"/>
1035+
<argument name="index" value="2"/>
1036+
</actionGroup>
1037+
<actionGroup ref="addButton" stepKey="addButton3"/>
1038+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton3">
1039+
<argument name="text" value="PageBuilderButtonItemText_Common"/>
1040+
<argument name="index" value="3"/>
1041+
</actionGroup>
1042+
<actionGroup ref="addButton" stepKey="addButton4"/>
1043+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton4">
1044+
<argument name="text" value="PageBuilderButtonItemText_Common"/>
1045+
<argument name="index" value="4"/>
1046+
</actionGroup>
1047+
<actionGroup ref="addButton" stepKey="addButton5"/>
1048+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton5">
1049+
<argument name="text" value="PageBuilderButtonItemText_Common"/>
1050+
<argument name="index" value="5"/>
1051+
</actionGroup>
1052+
<actionGroup ref="addButton" stepKey="addButton6"/>
1053+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton6">
1054+
<argument name="text" value="PageBuilderButtonItemText_Common"/>
1055+
<argument name="index" value="6"/>
1056+
</actionGroup>
1057+
<actionGroup ref="addButton" stepKey="addButton7"/>
1058+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton7">
1059+
<argument name="text" value="PageBuilderButtonItemText_Common"/>
1060+
<argument name="index" value="7"/>
1061+
</actionGroup>
1062+
<actionGroup ref="addButton" stepKey="addButton8"/>
1063+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton8">
1064+
<argument name="text" value="PageBuilderButtonItemText_Common"/>
1065+
<argument name="index" value="8"/>
1066+
</actionGroup>
1067+
<actionGroup ref="addButton" stepKey="addButton9"/>
1068+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton9">
1069+
<argument name="text" value="PageBuilderButtonItemText_Common"/>
1070+
<argument name="index" value="9"/>
1071+
</actionGroup>
1072+
<actionGroup ref="addButton" stepKey="addButton10"/>
1073+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton10">
1074+
<argument name="text" value="PageBuilderButtonItemText_Last"/>
1075+
<argument name="index" value="10"/>
1076+
</actionGroup>
1077+
<!-- Get Width Of 1st Button Time 1/4 -->
1078+
<executeJS function="return Math.round(document.querySelectorAll('.pagebuilder-button-item')[9].clientWidth * (3/4))" stepKey="xCoordinateToMoveTo"/>
1079+
<comment userInput="xCoordinateToMoveTo: $xCoordinateToMoveTo" stepKey="commentXCoordinate"/>
1080+
<executeJS function="return Math.round(document.querySelectorAll('.pagebuilder-button-item')[9].clientHeight * (3/4))" stepKey="yCoordinateToMoveTo"/>
1081+
<comment userInput="yCoordinateToMoveTo: $yCoordinateToMoveTo" stepKey="commentYCoordinate"/>
1082+
<actionGroup ref="moveButton" stepKey="moveButton">
1083+
<argument name="targetSelector" value="{{ButtonItemOnStage.base('10')}}"/>
1084+
<argument name="x" value="$xCoordinateToMoveTo"/>
1085+
<argument name="y" value="$yCoordinateToMoveTo"/>
1086+
<argument name="buttonIndexToMove" value="1"/>
1087+
</actionGroup>
1088+
<!-- Validate Stage -->
1089+
<comment userInput="Validate Stage" stepKey="commentValidateStage"/>
1090+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('1', PageBuilderButtonItemText_Common.value)}}" stepKey="waitForButton1Stage"/>
1091+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('9', PageBuilderButtonItemText_Last.value)}}" stepKey="waitForButton2Stage"/>
1092+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('10', PageBuilderButtonItemText_First.value)}}" stepKey="waitForButton3Stage"/>
1093+
<actionGroup ref="validateButtonGroupInlineAppearance" stepKey="seeAppearanceOnStage">
1094+
<argument name="buttonGroupPage" value="ButtonGroupOnStage"/>
1095+
<argument name="buttonItemPage" value="ButtonItemOnStage"/>
1096+
</actionGroup>
1097+
<actionGroup ref="validateButtonGroupInlineAppearanceWraps" stepKey="seeAppearanceWrapsOnStage">
1098+
<argument name="buttonGroupPage" value="ButtonGroupOnStage"/>
1099+
<argument name="buttonItemPage" value="ButtonItemOnStage"/>
1100+
<argument name="secondButtonIndex" value="10"/>
1101+
</actionGroup>
1102+
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
1103+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
1104+
<!-- Validate Stage After Save -->
1105+
<comment userInput="Validate Stage After Save" stepKey="commentValidateStage2"/>
1106+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('1', PageBuilderButtonItemText_Common.value)}}" stepKey="waitForButton1Stage2"/>
1107+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('9', PageBuilderButtonItemText_Last.value)}}" stepKey="waitForButton2Stage2"/>
1108+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('10', PageBuilderButtonItemText_First.value)}}" stepKey="waitForButton3Stage2"/>
1109+
<actionGroup ref="validateButtonGroupInlineAppearance" stepKey="seeAppearanceOnStage2">
1110+
<argument name="buttonGroupPage" value="ButtonGroupOnStage"/>
1111+
<argument name="buttonItemPage" value="ButtonItemOnStage"/>
1112+
</actionGroup>
1113+
<actionGroup ref="validateButtonGroupInlineAppearanceWraps" stepKey="seeAppearanceWrapsOnStage2">
1114+
<argument name="buttonGroupPage" value="ButtonGroupOnStage"/>
1115+
<argument name="buttonItemPage" value="ButtonItemOnStage"/>
1116+
<argument name="secondButtonIndex" value="10"/>
1117+
</actionGroup>
1118+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage2">
1119+
<argument name="contentBlockType" value="PageBuilderButtonsContentBlock"/>
1120+
</actionGroup>
1121+
<!-- Validate Edit Panel After Save -->
1122+
<comment userInput="Validate Edit Panel After Save" stepKey="commentValidateEditPanel2"/>
1123+
<actionGroup ref="validateVisualSelectOptionIsSelected" stepKey="seeAppearanceIsSelected2">
1124+
<argument name="property" value="PageBuilderAppearancePropertyInline"/>
1125+
</actionGroup>
1126+
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront">
1127+
<argument name="contentBlockType" value="PageBuilderButtonsContentBlock"/>
1128+
</actionGroup>
1129+
<!-- Validate Storefront -->
1130+
<comment userInput="Validate Storefront" stepKey="commentValidateStorefront"/>
1131+
<waitForElementVisible selector="{{ButtonItemOnStorefront.buttonItemText('1', PageBuilderButtonItemText_Common.value)}}" stepKey="waitForButton1Storefront"/>
1132+
<waitForElementVisible selector="{{ButtonItemOnStorefront.buttonItemText('9', PageBuilderButtonItemText_Last.value)}}" stepKey="waitForButton2Storefront"/>
1133+
<waitForElementVisible selector="{{ButtonItemOnStorefront.buttonItemText('10', PageBuilderButtonItemText_First.value)}}" stepKey="waitForButton3Storefront"/>
1134+
<actionGroup ref="validateButtonGroupInlineAppearance" stepKey="seeAppearanceOnStorefront">
1135+
<argument name="buttonGroupPage" value="ButtonGroupOnStorefront"/>
1136+
<argument name="buttonItemPage" value="ButtonItemOnStorefront"/>
1137+
</actionGroup>
1138+
<actionGroup ref="validateButtonGroupInlineAppearanceWraps" stepKey="seeAppearanceWrapsOnStorefront">
1139+
<argument name="buttonGroupPage" value="ButtonGroupOnStorefront"/>
1140+
<argument name="buttonItemPage" value="ButtonItemOnStorefront"/>
1141+
<argument name="secondButtonIndex" value="10"/>
1142+
</actionGroup>
1143+
</test>
1144+
<test name="ButtonGroupValidateStackedAppearanceMoveButton">
1145+
<annotations>
1146+
<features value="PageBuilder"/>
1147+
<stories value="Buttons"/>
1148+
<title value="Button Group - Validate Stacked Appearance Move Button"/>
1149+
<description value="Validate moving a button and Stacked Appearance in the Configuration form, on Stage and Storefront for a Button group."/>
1150+
<severity value="CRITICAL"/>
1151+
<testCaseId value="MAGETWO-92370"/>
1152+
<useCaseId value="MAGETWO-66361"/>
1153+
<group value="pagebuilder"/>
1154+
<group value="pagebuilder-buttons"/>
1155+
<group value="pagebuilder-buttonGroup"/>
1156+
</annotations>
1157+
<before>
1158+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
1159+
<actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/>
1160+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
1161+
</before>
1162+
<after>
1163+
<actionGroup ref="logout" stepKey="logout"/>
1164+
</after>
1165+
<actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle">
1166+
<argument name="contentBlockType" value="PageBuilderButtonsContentBlock"/>
1167+
</actionGroup>
1168+
<actionGroup ref="dragContentBlockToStage" stepKey="dragContentBlockToStage">
1169+
<argument name="contentBlockType" value="PageBuilderButtonsContentBlock"/>
1170+
</actionGroup>
1171+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage1">
1172+
<argument name="contentBlockType" value="PageBuilderButtonsContentBlock"/>
1173+
</actionGroup>
1174+
<!-- Select And Validate Stacked Appearance -->
1175+
<comment userInput="Select And Validate Stacked Appearance" stepKey="CommentSelectAndValidateStackedAppearance"/>
1176+
<actionGroup ref="chooseVisualSelectOption" stepKey="enterAlignment">
1177+
<argument name="property" value="PageBuilderAppearancePropertyStacked"/>
1178+
</actionGroup>
1179+
<actionGroup ref="validateVisualSelectOptionIsSelected" stepKey="seeAppearanceIsSelected">
1180+
<argument name="property" value="PageBuilderAppearancePropertyStacked"/>
1181+
</actionGroup>
1182+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings1"/>
1183+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton1">
1184+
<argument name="text" value="PageBuilderButtonItemText_First"/>
1185+
<argument name="index" value="1"/>
1186+
</actionGroup>
1187+
<actionGroup ref="addButton" stepKey="addButton2"/>
1188+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton2">
1189+
<argument name="text" value="PageBuilderButtonItemText_Second"/>
1190+
<argument name="index" value="2"/>
1191+
</actionGroup>
1192+
<actionGroup ref="addButton" stepKey="addButton3"/>
1193+
<actionGroup ref="inlineEditButton" stepKey="inlineEditButton3">
1194+
<argument name="text" value="PageBuilderButtonItemText_Third"/>
1195+
<argument name="index" value="3"/>
1196+
</actionGroup>
1197+
<!-- Get Width Of 1st Button Time 1/4 -->
1198+
<executeJS function="return Math.round(document.querySelectorAll('.pagebuilder-button-item')[2].clientWidth * (3/4))" stepKey="xCoordinateToMoveTo"/>
1199+
<comment userInput="xCoordinateToMoveTo: $xCoordinateToMoveTo" stepKey="commentXCoordinate"/>
1200+
<executeJS function="return Math.round(document.querySelectorAll('.pagebuilder-button-item')[2].clientHeight * (5/6))" stepKey="yCoordinateToMoveTo"/>
1201+
<comment userInput="yCoordinateToMoveTo: $yCoordinateToMoveTo" stepKey="commentYCoordinate"/>
1202+
<actionGroup ref="moveButton" stepKey="moveButton">
1203+
<argument name="targetSelector" value="{{ButtonItemOnStage.base('3')}}"/>
1204+
<argument name="x" value="$xCoordinateToMoveTo"/>
1205+
<argument name="y" value="$yCoordinateToMoveTo"/>
1206+
<argument name="buttonIndexToMove" value="1"/>
1207+
</actionGroup>
1208+
<!-- Validate Stage -->
1209+
<comment userInput="Validate Stage" stepKey="commentValidateStage"/>
1210+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('1', PageBuilderButtonItemText_Second.value)}}" stepKey="waitForButton1Stage"/>
1211+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('2', PageBuilderButtonItemText_Third.value)}}" stepKey="waitForButton2Stage"/>
1212+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('3', PageBuilderButtonItemText_First.value)}}" stepKey="waitForButton3Stage"/>
1213+
<actionGroup ref="validateButtonGroupStackedAppearance" stepKey="seeAppearanceOnStageFirstButtons">
1214+
<argument name="buttonGroupPage" value="ButtonGroupOnStage"/>
1215+
<argument name="buttonItemPage" value="ButtonItemOnStage"/>
1216+
</actionGroup>
1217+
<actionGroup ref="validateButtonGroupStackedAppearance" stepKey="seeAppearanceOnStageSecondButtons">
1218+
<argument name="buttonGroupPage" value="ButtonGroupOnStage"/>
1219+
<argument name="buttonItemPage" value="ButtonItemOnStage"/>
1220+
<argument name="firstButtonIndex" value="2"/>
1221+
<argument name="secondButtonIndex" value="3"/>
1222+
</actionGroup>
1223+
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
1224+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
1225+
<!-- Validate Stage After Save -->
1226+
<comment userInput="Validate Stage After Save" stepKey="commentValidateStage2"/>
1227+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('1', PageBuilderButtonItemText_Second.value)}}" stepKey="waitForButton1Stage1"/>
1228+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('2', PageBuilderButtonItemText_Third.value)}}" stepKey="waitForButton2Stage2"/>
1229+
<waitForElementVisible selector="{{ButtonItemOnStage.buttonItemText('3', PageBuilderButtonItemText_First.value)}}" stepKey="waitForButton3Stage3"/>
1230+
<actionGroup ref="validateButtonGroupStackedAppearance" stepKey="seeAppearanceOnStageFirstButtons2">
1231+
<argument name="buttonGroupPage" value="ButtonGroupOnStage"/>
1232+
<argument name="buttonItemPage" value="ButtonItemOnStage"/>
1233+
</actionGroup>
1234+
<actionGroup ref="validateButtonGroupStackedAppearance" stepKey="seeAppearanceOnStageSecondButtons2">
1235+
<argument name="buttonGroupPage" value="ButtonGroupOnStage"/>
1236+
<argument name="buttonItemPage" value="ButtonItemOnStage"/>
1237+
<argument name="firstButtonIndex" value="2"/>
1238+
<argument name="secondButtonIndex" value="3"/>
1239+
</actionGroup>
1240+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage2">
1241+
<argument name="contentBlockType" value="PageBuilderButtonsContentBlock"/>
1242+
</actionGroup>
1243+
<!-- Validate Edit Panel After Save -->
1244+
<comment userInput="Validate Edit Panel After Save" stepKey="commentValidateEditPanel2"/>
1245+
<actionGroup ref="validateVisualSelectOptionIsSelected" stepKey="seeAppearanceIsSelected2">
1246+
<argument name="property" value="PageBuilderAppearancePropertyStacked"/>
1247+
</actionGroup>
1248+
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront">
1249+
<argument name="contentBlockType" value="PageBuilderButtonsContentBlock"/>
1250+
</actionGroup>
1251+
<!-- Validate Storefront -->
1252+
<comment userInput="Validate Storefront" stepKey="commentValidateStorefront"/>
1253+
<waitForElementVisible selector="{{ButtonItemOnStorefront.buttonItemText('1', PageBuilderButtonItemText_Second.value)}}" stepKey="waitForButton1Storefront"/>
1254+
<waitForElementVisible selector="{{ButtonItemOnStorefront.buttonItemText('2', PageBuilderButtonItemText_Third.value)}}" stepKey="waitForButton2Storefront"/>
1255+
<waitForElementVisible selector="{{ButtonItemOnStorefront.buttonItemText('3', PageBuilderButtonItemText_First.value)}}" stepKey="waitForButton3Storefront"/>
1256+
<actionGroup ref="validateButtonGroupStackedAppearance" stepKey="seeAppearanceOnStorefrontFirstButtons">
1257+
<argument name="buttonGroupPage" value="ButtonGroupOnStorefront"/>
1258+
<argument name="buttonItemPage" value="ButtonItemOnStorefront"/>
1259+
</actionGroup>
1260+
<actionGroup ref="validateButtonGroupStackedAppearance" stepKey="seeAppearanceOnStorefrontSecondButtons">
1261+
<argument name="buttonGroupPage" value="ButtonGroupOnStorefront"/>
1262+
<argument name="buttonItemPage" value="ButtonItemOnStorefront"/>
1263+
<argument name="firstButtonIndex" value="2"/>
1264+
<argument name="secondButtonIndex" value="3"/>
1265+
</actionGroup>
1266+
</test>
9871267
</tests>

0 commit comments

Comments
 (0)