Skip to content

Commit cdfe946

Browse files
committed
Merge remote-tracking branch 'origin/MC-5301' into 2.3-develop-mftf-pr16
2 parents 580765f + 5ebef1e commit cdfe946

11 files changed

+274
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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="AdminAssertCustomerGroupOnCatalogPriceRuleForm">
11+
<arguments>
12+
<argument name="customerGroupName" type="string"/>
13+
</arguments>
14+
<amOnPage url="{{AdminNewCatalogRulePage.url}}" stepKey="amOnCatalogPriceRuleCreatePage"/>
15+
<waitForElementVisible selector="{{AdminNewCatalogPriceRule.customerGroups}}" stepKey="waitForElementVisible"/>
16+
<see selector="{{AdminNewCatalogPriceRule.customerGroups}}" userInput="{{customerGroupName}}" stepKey="assertCustomerGroupPresentOnCatalogPriceRuleForm"/>
17+
</actionGroup>
18+
</actionGroups>

app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AdminOpenNewCatalogPriceRuleFormPageActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1010
<actionGroup name="AdminOpenNewCatalogPriceRuleFormPageActionGroup">
11-
<amOnPage url="{{CatalogRuleNewPage.url}}" stepKey="openNewCatalogPriceRulePage" />
11+
<amOnPage url="{{AdminNewCatalogRulePage.url}}" stepKey="openNewCatalogPriceRulePage" />
1212
<waitForPageLoad stepKey="waitForPageLoad" />
1313
</actionGroup>
1414
</actionGroups>

app/code/Magento/CatalogRule/Test/Mftf/Page/CatalogRuleNewPage.xml renamed to app/code/Magento/CatalogRule/Test/Mftf/Page/AdminNewCatalogRulePage.xml

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

99
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11-
<page name="CatalogRuleNewPage" url="catalog_rule/promo_catalog/new/" module="Magento_CatalogRule" area="admin">
12-
<section name="AdminNewCatalogPriceRule"/>
11+
<page name="AdminNewCatalogRulePage" url="catalog_rule/promo_catalog/new/" module="Magento_CatalogRule" area="admin">
1312
</page>
1413
</pages>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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="AdminAssertCustomerGroupOnCustomerForm">
11+
<arguments>
12+
<argument name="customerGroupName" type="string"/>
13+
</arguments>
14+
<amOnPage url="{{AdminNewCustomerPage.url}}" stepKey="amOnCustomerCreatePage"/>
15+
<waitForElementVisible selector="{{AdminCustomerAccountInformationSection.group}}" stepKey="waitForElementVisible"/>
16+
<see selector="{{AdminCustomerAccountInformationSection.group}}" userInput="{{customerGroupName}}" stepKey="assertCustomerGroupPresent"/>
17+
</actionGroup>
18+
</actionGroups>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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="AdminAssertCustomerGroupOnProductForm">
11+
<arguments>
12+
<argument name="customerGroupName" type="string"/>
13+
</arguments>
14+
<amOnPage url="{{AdminProductCreatePage.url(AddToDefaultSet.attributeSetId, 'simple')}}" stepKey="amOnProductCreatePage"/>
15+
<waitForElementVisible selector="{{AdminProductFormSection.advancedPricingLink}}" stepKey="waitForAdvancedPricingLinkVisible"/>
16+
<click selector="{{AdminProductFormSection.advancedPricingLink}}" stepKey="clickOnAdvancedPricingButton"/>
17+
<waitForElementVisible selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" stepKey="waitForAddButtonVisible"/>
18+
<click selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" stepKey="clickAddButton"/>
19+
<see selector="{{AdminProductFormAdvancedPricingSection.productTierPriceCustGroupSelect('0')}}" userInput="{{customerGroupName}}" stepKey="assertCustomerGroupPresent"/>
20+
</actionGroup>
21+
</actionGroups>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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="AdminAssertCustomerGroupPresentInGrid" extends="AdminFilterCustomerGroupByNameActionGroup">
11+
<!--- Assume we are on admin customer group page. -->
12+
<see selector="{{AdminDataGridTableSection.column('Group')}}" userInput="{{customerGroupName}}" after="clickApplyFiltersButton" stepKey="seeCustomerGroupNameInGrid"/>
13+
</actionGroup>
14+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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="AdminAssertErrorMessageCustomerGroupAlreadyExists" extends="AdminCreateCustomerGroupActionGroup">
11+
<remove keyForRemoval="seeCustomerGroupSaveMessage"/>
12+
<waitForElementVisible selector="{{AdminMessagesSection.errorMessage}}" stepKey="waitForElementVisible"/>
13+
<see selector="{{AdminMessagesSection.errorMessage}}" userInput="Customer Group already exists." stepKey="seeErrorMessage"/>
14+
</actionGroup>
15+
</actionGroups>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminCreateCustomerGroupAlreadyExistsTest">
12+
<annotations>
13+
<features value="Create customer group already exists"/>
14+
<stories value="Create customer group"/>
15+
<title value="Create customer group already exists"/>
16+
<description value="Create customer group already exists"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-5302"/>
19+
<group value="customer"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<before>
23+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
24+
</before>
25+
<after>
26+
<actionGroup ref="logout" stepKey="logout"/>
27+
</after>
28+
<!-- Steps: 1. Log in to backend as admin user.
29+
2. Navigate to Stores > Other Settings > Customer Groups.
30+
3. Start to create new Customer Group.
31+
4. Fill in all data according to data set: Group Name "General", Tax Class "Retail customer"
32+
5. Click "Save Customer Group" button. -->
33+
<!-- Assert "Customer Group already exists." error message displayed -->
34+
<actionGroup ref="AdminAssertErrorMessageCustomerGroupAlreadyExists" stepKey="seeErrorMessageCustomerGroupAlreadyExists">
35+
<argument name="groupName" value="{{GeneralCustomerGroup.code}}"/>
36+
<argument name="taxClass" value="{{GeneralCustomerGroup.tax_class_name}}"/>
37+
</actionGroup>
38+
</test>
39+
</tests>
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminCreateRetailCustomerGroupTest">
12+
<annotations>
13+
<features value="Create retail customer group"/>
14+
<stories value="Create customer group"/>
15+
<title value="Create retail customer group"/>
16+
<description value="Create retail customer group"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-5301"/>
19+
<group value="customer"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<before>
23+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
24+
</before>
25+
<after>
26+
<actionGroup ref="AdminDeleteCustomerGroupActionGroup" stepKey="deleteCustomerGroup">
27+
<argument name="customerGroupName" value="{{CustomCustomerGroup.code}}"/>
28+
</actionGroup>
29+
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearFilters"/>
30+
<actionGroup ref="logout" stepKey="logout"/>
31+
</after>
32+
<!-- Steps: 1. Log in to backend as admin user.
33+
2. Navigate to Stores > Other Settings > Customer Groups.
34+
3. Start to create new Customer Group.
35+
4. Fill in all data according to data set. Tax Class - "Retail customer"
36+
5. Click "Save Customer Group" button. -->
37+
<!-- Assert "You saved the customer group." success message displayed -->
38+
<!-- Assert created Customer Group displayed In Grid -->
39+
<actionGroup ref="AdminCreateCustomerGroupActionGroup" stepKey="createCustomerGroup">
40+
<argument name="groupName" value="{{CustomCustomerGroup.code}}"/>
41+
<argument name="taxClass" value="{{CustomCustomerGroup.tax_class_name}}"/>
42+
</actionGroup>
43+
<actionGroup ref="AdminAssertCustomerGroupPresentInGrid" stepKey="assertCustomerGroupDisplayedInGrid">
44+
<argument name="customerGroupName" value="{{CustomCustomerGroup.code}}"/>
45+
</actionGroup>
46+
47+
<!-- 6. Go to Catalog -> Products -> click "Add Product" button -> click "Advanced Pricing" link -> Customer Group Price -> click "Add" button -->
48+
<!-- Assert: Customer Group Displayed On Product Form -->
49+
<actionGroup ref="AdminAssertCustomerGroupOnProductForm" stepKey="assertCustomerGroupDisplayedOnProductForm">
50+
<argument name="customerGroupName" value="{{CustomCustomerGroup.code}}"/>
51+
</actionGroup>
52+
53+
<!-- 7. Go to Customers -> All Customers -> click "Add New Customer" button -->
54+
<!-- Assert created Customer Group displayed On Customer Form -->
55+
<actionGroup ref="AdminAssertCustomerGroupOnCustomerForm" stepKey="assertCustomerGroupDisplayedOnCustomerForm">
56+
<argument name="customerGroupName" value="{{CustomCustomerGroup.code}}"/>
57+
</actionGroup>
58+
59+
<!-- 8. Go to Marketing - Catalog Price Rule - click "Add New Rule" button -->
60+
<!-- Assert created Customer Group displayed On Catalog Price Rule Form -->
61+
<actionGroup ref="AdminAssertCustomerGroupOnCatalogPriceRuleForm" stepKey="assertCustomerGroupDisplayedOnCatalogPriceRuleForm">
62+
<argument name="customerGroupName" value="{{CustomCustomerGroup.code}}"/>
63+
</actionGroup>
64+
65+
<!-- 9. Go to Marketing - Cart Price Rule - click "Add New Rule" button -->
66+
<!-- Assert created Customer Group displayed On Cart Price Rule Form -->
67+
<actionGroup ref="AdminAssertCustomerGroupOnCartPriceRuleForm" stepKey="assertCustomerGroupDisplayedOnCartPriceRuleForm">
68+
<argument name="customerGroupName" value="{{CustomCustomerGroup.code}}"/>
69+
</actionGroup>
70+
</test>
71+
</tests>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminCreateTaxClassCustomerGroupTest">
12+
<annotations>
13+
<features value="Create tax class customer group"/>
14+
<stories value="Create customer group"/>
15+
<title value="Create tax class customer group"/>
16+
<description value="Create tax class customer group"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-5303"/>
19+
<group value="customer"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<before>
23+
<!-- Create Tax Class "Customer tax class"-->
24+
<createData entity="customerTaxClass" stepKey="createCustomerTaxClass"/>
25+
<getData entity="customerTaxClass" stepKey="customerTaxClassData">
26+
<requiredEntity createDataKey="createCustomerTaxClass"/>
27+
</getData>
28+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
29+
</before>
30+
<after>
31+
<actionGroup ref="AdminDeleteCustomerGroupActionGroup" stepKey="deleteCustomerGroup">
32+
<argument name="customerGroupName" value="{{CustomCustomerGroup.code}}"/>
33+
</actionGroup>
34+
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearFilters"/>
35+
<deleteData createDataKey="createCustomerTaxClass" stepKey="deleteCustomerTaxClass"/>
36+
<actionGroup ref="logout" stepKey="logout"/>
37+
</after>
38+
<!-- Steps: 1. Log in to backend as admin user.
39+
2. Navigate to Stores > Other Settings > Customer Groups.
40+
3. Start to create new Customer Group.
41+
4. Fill in all data according to data set: Tax Class "Customer tax class"
42+
5. Click "Save Customer Group" button. -->
43+
<!-- Assert "You saved the customer group." success message displayed -->
44+
<!-- Assert created Customer Group displayed In Grid -->
45+
<actionGroup ref="AdminCreateCustomerGroupActionGroup" stepKey="createNewCustomerGroup">
46+
<argument name="groupName" value="{{CustomCustomerGroup.code}}"/>
47+
<argument name="taxClass" value="$$customerTaxClassData.class_name$$"/>
48+
</actionGroup>
49+
<actionGroup ref="AdminAssertCustomerGroupPresentInGrid" stepKey="assertCustomerGroupDisplayedInGrid">
50+
<argument name="customerGroupName" value="{{CustomCustomerGroup.code}}"/>
51+
</actionGroup>
52+
<!-- 6. Go to Customers -> All Customers -> click "Add New Customer" button -->
53+
<!-- Assert created Customer Group displayed On Customer Form -->
54+
<actionGroup ref="AdminAssertCustomerGroupOnCustomerForm" stepKey="assertCustomerGroupDisplayedOnCustomerForm">
55+
<argument name="customerGroupName" value="{{CustomCustomerGroup.code}}"/>
56+
</actionGroup>
57+
</test>
58+
</tests>

0 commit comments

Comments
 (0)