Skip to content

Commit c4fbc77

Browse files
ENGCOM-8281: MFTF: Replace repetitive actions with Action Groups in AdminUpdateStoreGroupAcceptAlertAndVerifyStoreViewFormTest, AdminUpdateStoreGroupAndVerifyStoreViewFormTest and AdminUpdateStoreViewTest #30217
2 parents 1b6e3e8 + 0fc9027 commit c4fbc77

5 files changed

+38
-6
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminOpenFirstRowInStoresGridActionGroup">
12+
13+
<click selector="{{AdminStoresGridSection.firstRow}}" stepKey="clickFirstRow"/>
14+
<waitForPageLoad stepKey="AdminSystemStoreGroupPageToOpen"/>
15+
</actionGroup>
16+
</actionGroups>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminOpenStoreInFirstRowInStoresGridActionGroup">
12+
13+
<click selector="{{AdminStoresGridSection.storeNameInFirstRow}}" stepKey="clickStoreViewFirstRowInGrid"/>
14+
<waitForPageLoad stepKey="waitForAdminSystemStoreViewPageLoad"/>
15+
</actionGroup>
16+
</actionGroups>

app/code/Magento/Store/Test/Mftf/Test/AdminUpdateStoreGroupAcceptAlertAndVerifyStoreViewFormTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
<actionGroup ref="AssertStoreGroupInGridActionGroup" stepKey="openCreatedStoreGroupInGrid">
5252
<argument name="storeGroupName" value="{{staticStoreGroup.name}}"/>
5353
</actionGroup>
54-
<click selector="{{AdminStoresGridSection.firstRow}}" stepKey="clickFirstRow"/>
55-
<waitForPageLoad stepKey="AdminSystemStoreGroupPageToOpen"/>
54+
<actionGroup ref="AdminOpenFirstRowInStoresGridActionGroup" stepKey="clickFirstRow"/>
55+
5656
<!--Update created Store group as per requirement and accept alert message-->
5757
<actionGroup ref="EditCustomStoreGroupAcceptWarningMessageActionGroup" stepKey="updateCustomStoreGroup">
5858
<argument name="website" value="{{customWebsite.name}}"/>

app/code/Magento/Store/Test/Mftf/Test/AdminUpdateStoreGroupAndVerifyStoreViewFormTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
<actionGroup ref="AssertStoreGroupInGridActionGroup" stepKey="openCreatedStoreGroupInGrid">
4242
<argument name="storeGroupName" value="{{SecondStoreGroupUnique.name}}"/>
4343
</actionGroup>
44-
<click selector="{{AdminStoresGridSection.firstRow}}" stepKey="clickFirstRow"/>
45-
<waitForPageLoad stepKey="AdminSystemStoreGroupPageToOpen"/>
44+
<actionGroup ref="AdminOpenFirstRowInStoresGridActionGroup" stepKey="clickFirstRow"/>
45+
4646
<!--Update created Store group as per requirement-->
4747
<actionGroup ref="CreateCustomStoreActionGroup" stepKey="createNewCustomStoreGroup">
4848
<argument name="website" value="{{_defaultWebsite.name}}"/>

app/code/Magento/Store/Test/Mftf/Test/AdminUpdateStoreViewTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
<actionGroup ref="AssertStoreViewInGridActionGroup" stepKey="searchCreatedStoreViewInGrid">
4040
<argument name="storeViewName" value="{{storeViewData.name}}"/>
4141
</actionGroup>
42-
<click selector="{{AdminStoresGridSection.storeNameInFirstRow}}" stepKey="clickStoreViewFirstRowInGrid"/>
43-
<waitForPageLoad stepKey="waitForAdminSystemStoreViewPageLoad"/>
42+
<actionGroup ref="AdminOpenStoreInFirstRowInStoresGridActionGroup" stepKey="clickStoreViewFirstRowInGrid"/>
43+
4444
<!--Update created store view as per requirements-->
4545
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="updateStoreView">
4646
<argument name="StoreGroup" value="_defaultStoreGroup"/>

0 commit comments

Comments
 (0)