Skip to content

Commit 00edaff

Browse files
authored
ENGCOM-7094: Add "Admin" prefix to Test and ActionGroup #27276
2 parents feb94f9 + 22f3a1a commit 00edaff

File tree

5 files changed

+31
-12
lines changed

5 files changed

+31
-12
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminGridCustomerGroupEditByCodeActionGroup">
11+
<arguments>
12+
<argument name="customerGroupCode" type="string"/>
13+
</arguments>
14+
15+
<click selector="{{AdminCustomerGroupMainSection.editButtonByCustomerGroupCode(customerGroupCode)}}" stepKey="clickOnEditCustomerGroup" />
16+
</actionGroup>
17+
</actionGroups>

app/code/Magento/Customer/Test/Mftf/ActionGroup/NavigateCustomerGroupActionGroup.xml renamed to app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminNavigateToCustomerGroupPageActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="NavigateToCustomerGroupPage">
11+
<actionGroup name="AdminNavigateToCustomerGroupPageActionGroup">
1212
<annotations>
1313
<description>Goes to the Admin Customer Groups page.</description>
1414
</annotations>

app/code/Magento/Customer/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ NOTICE: Action Groups in this file are DEPRECATED and SHOULD NOT BE USED anymore
1212
-->
1313
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1414
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
15+
<actionGroup name="NavigateToCustomerGroupPage" extends="AdminNavigateToCustomerGroupPageActionGroup" deprecated="Use AdminNavigateToCustomerGroupPageActionGroup"/>
1516
<actionGroup name="AdminCreateCustomerWithWebSiteAndGroup" deprecated="Use `AdminCreateCustomerWithWebSiteAndGroupActionGroup` instead">
1617
<annotations>
1718
<description>Goes to the Customer grid page. Click on 'Add New Customer'. Fills provided Customer Data. Fill provided Customer Address data. Assigns Product to Website and Store View. Clicks on Save.</description>

app/code/Magento/Customer/Test/Mftf/Test/VerifyDisabledCustomerGroupFieldTest.xml renamed to app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyDisabledCustomerGroupFieldTest.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="VerifyDisabledCustomerGroupFieldTest">
11+
<test name="AdminVerifyDisabledCustomerGroupFieldTest">
1212
<annotations>
1313
<stories value="Check that field is disabled in system Customer Group"/>
1414
<title value="Check that field is disabled in system Customer Group"/>
@@ -19,20 +19,20 @@
1919
<group value="mtf_migrated"/>
2020
</annotations>
2121

22-
<!-- Steps -->
23-
<!-- 1. Login to backend as admin user -->
24-
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
25-
<waitForPageLoad stepKey="waitForAdminPageLoad" />
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
2623

27-
<!-- 2. Navigate to Customers > Customer Groups -->
28-
<amOnPage url="{{AdminCustomerGroupPage.url}}" stepKey="amOnCustomerGroupPage" />
29-
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearFiltersIfTheySet"/>
24+
<actionGroup ref="AdminNavigateToCustomerGroupPageActionGroup" stepKey="amOnCustomerGroupPage"/>
25+
<actionGroup ref="AdminFilterCustomerGroupByNameActionGroup" stepKey="clearFiltersIfTheySet">
26+
<argument name="customerGroupName" value="{{NotLoggedInCustomerGroup.code}}"/>
27+
</actionGroup>
3028

31-
<!-- 3. Select system Customer Group specified in data set from grid -->
32-
<click selector="{{AdminCustomerGroupMainSection.editButtonByCustomerGroupCode(NotLoggedInCustomerGroup.code)}}" stepKey="clickOnEditCustomerGroup" />
29+
<actionGroup ref="AdminGridCustomerGroupEditByCodeActionGroup" stepKey="openCustomerGroup">
30+
<argument name="customerGroupCode" value="{{NotLoggedInCustomerGroup.code}}"/>
31+
</actionGroup>
3332

34-
<!-- 4. Perform all assertions -->
3533
<seeInField selector="{{AdminNewCustomerGroupSection.groupName}}" userInput="{{NotLoggedInCustomerGroup.code}}" stepKey="seeNotLoggedInTextInGroupName" />
3634
<assertElementContainsAttribute selector="{{AdminNewCustomerGroupSection.groupName}}" attribute="disabled" expectedValue="true" stepKey="checkIfGroupNameIsDisabled" />
35+
36+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
3737
</test>
3838
</tests>

app/code/Magento/Customer/Test/Mftf/Test/_Deprecated_Test.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
-->
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="VerifyDisabledCustomerGroupFieldTest" extends="AdminVerifyDisabledCustomerGroupFieldTest" deprecated="Use AdminVerifyDisabledCustomerGroupFieldTest instead"/>
1011
<test name="AddingProductWithExpiredSessionTest" extends="StorefrontAddProductToCartWithExpiredSessionTest" deprecated="Use StorefrontAddProductToCartWithExpiredSessionTest"/>
1112
<test name="StorefrontCustomerForgotPasswordTest" extends="StorefrontResetCustomerPasswordSuccessTest" deprecated="Use StorefrontResetCustomerPasswordSuccessTest"/>
1213
</tests>

0 commit comments

Comments
 (0)