Skip to content

Commit

Permalink
Adding delete customer group test case magento#581
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisSaltanahmedov committed Mar 20, 2019
1 parent 6cc68c6 commit 791b47c
Showing 1 changed file with 72 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="DeleteCustomerGroup">
<annotations>
<title value="Delete customer group group"/>
<description value="Delete a customer group"/>
<stories value="Delete Customer Group"/>
<group value="customers"/>
<group value="mtf_migrated"/>
</annotations>

<before>
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>

<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
</before>
<after>
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
<actionGroup ref="logout" stepKey="logout"/>
</after>

<actionGroup ref="AdminCreateCustomerGroupActionGroup" stepKey="createCustomerGroup">
<argument name="groupName" value="{{CustomerGroupChange.code}}"/>
<argument name="taxClass" value="{{CustomerGroupChange.tax_class_name}}"/>
</actionGroup>
<actionGroup ref="NavigateToAllCustomerPage" stepKey="navToCustomersCreate"/>
<actionGroup ref="AdminFilterCustomerByName" stepKey="filterCustomer">
<argument name="customerName" value="{{Simple_US_Customer.fullname}}"/>
</actionGroup>
<actionGroup ref="AdminSelectCustomerByEmail" stepKey="selectCustomer">
<argument name="customerEmail" value="$$createCustomer.email$$"/>
</actionGroup>
<actionGroup ref="SetCustomerGroupForSelectedCustomersViaGrid" stepKey="setCustomerGroup">
<argument name="groupName" value="{{CustomerGroupChange.code}}"/>
</actionGroup>
<actionGroup ref="AdminFilterCustomerByName" stepKey="filterCustomerAfterGroupChange">
<argument name="customerName" value="{{Simple_US_Customer.fullname}}"/>
</actionGroup>
<actionGroup ref="VerifyCustomerGroupForCustomer" stepKey="verifyCustomerGroupSet">
<argument name="customerEmail" value="$$createCustomer.email$$"/>
<argument name="groupName" value="{{CustomerGroupChange.code}}"/>
</actionGroup>
<!--Customer Group success delete message-->
<actionGroup ref="AdminDeleteCustomerGroupActionGroup" stepKey="deleteCustomerGroup">
<argument name="customerGroupName" value="{{CustomerGroupChange.code}}"/>
</actionGroup>

<!--Customer Group is not in grid-->
<actionGroup ref="NavigateToCustomerGroupPage" stepKey="navToCustomerGroupPage"/>

<!--Customer Group changed to "General" on customer form-->
<actionGroup ref="NavigateToAllCustomerPage" stepKey="navToCustomers"/>
<actionGroup ref="AdminFilterCustomerByName" stepKey="filterCustomerAfterGroupDelete">
<argument name="customerName" value="{{Simple_US_Customer.fullname}}"/>
</actionGroup>
<actionGroup ref="AdminSelectCustomerByEmail" stepKey="selectCustomerAfterGroupDelete">
<argument name="customerEmail" value="$$createCustomer.email$$"/>
</actionGroup>
<actionGroup ref="VerifyCustomerGroupForCustomer" stepKey="verifyGeneralGroupSet">
<argument name="customerEmail" value="$$createCustomer.email$$"/>
<argument name="groupName" value="{{GeneralCustomerGroup.code}}"/>
</actionGroup>
</test>
</tests>

0 comments on commit 791b47c

Please sign in to comment.