|
| 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="DeleteCustomerGroup"> |
| 12 | + <annotations> |
| 13 | + <title value="Delete customer group group"/> |
| 14 | + <description value="Delete a customer group"/> |
| 15 | + <stories value="Delete Customer Group"/> |
| 16 | + <group value="customers"/> |
| 17 | + <group value="mtf_migrated"/> |
| 18 | + </annotations> |
| 19 | + |
| 20 | + <before> |
| 21 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 22 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 23 | + </before> |
| 24 | + <after> |
| 25 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 26 | + <actionGroup ref="logout" stepKey="logout"/> |
| 27 | + </after> |
| 28 | + |
| 29 | + <actionGroup ref="AdminCreateCustomerGroupActionGroup" stepKey="createCustomerGroup"> |
| 30 | + <argument name="groupName" value="{{CustomerGroupChange.code}}"/> |
| 31 | + <argument name="taxClass" value="{{CustomerGroupChange.tax_class_name}}"/> |
| 32 | + </actionGroup> |
| 33 | + <actionGroup ref="NavigateToAllCustomerPage" stepKey="navToCustomersCreate"/> |
| 34 | + <actionGroup ref="AdminFilterCustomerByName" stepKey="filterCustomer"> |
| 35 | + <argument name="customerName" value="{{Simple_US_Customer.fullname}}"/> |
| 36 | + </actionGroup> |
| 37 | + <actionGroup ref="AdminSelectCustomerByEmail" stepKey="selectCustomer"> |
| 38 | + <argument name="customerEmail" value="$$createCustomer.email$$"/> |
| 39 | + </actionGroup> |
| 40 | + <actionGroup ref="SetCustomerGroupForSelectedCustomersViaGrid" stepKey="setCustomerGroup"> |
| 41 | + <argument name="groupName" value="{{CustomerGroupChange.code}}"/> |
| 42 | + </actionGroup> |
| 43 | + <actionGroup ref="AdminFilterCustomerByName" stepKey="filterCustomerAfterGroupChange"> |
| 44 | + <argument name="customerName" value="{{Simple_US_Customer.fullname}}"/> |
| 45 | + </actionGroup> |
| 46 | + <actionGroup ref="VerifyCustomerGroupForCustomer" stepKey="verifyCustomerGroupSet"> |
| 47 | + <argument name="customerEmail" value="$$createCustomer.email$$"/> |
| 48 | + <argument name="groupName" value="{{CustomerGroupChange.code}}"/> |
| 49 | + </actionGroup> |
| 50 | + <!--Customer Group success delete message--> |
| 51 | + <actionGroup ref="AdminDeleteCustomerGroupActionGroup" stepKey="deleteCustomerGroup"> |
| 52 | + <argument name="customerGroupName" value="{{CustomerGroupChange.code}}"/> |
| 53 | + </actionGroup> |
| 54 | + |
| 55 | + <!--Customer Group is not in grid--> |
| 56 | + <actionGroup ref="NavigateToCustomerGroupPage" stepKey="navToCustomerGroupPage"/> |
| 57 | + |
| 58 | + <!--Customer Group changed to "General" on customer form--> |
| 59 | + <actionGroup ref="NavigateToAllCustomerPage" stepKey="navToCustomers"/> |
| 60 | + <actionGroup ref="AdminFilterCustomerByName" stepKey="filterCustomerAfterGroupDelete"> |
| 61 | + <argument name="customerName" value="{{Simple_US_Customer.fullname}}"/> |
| 62 | + </actionGroup> |
| 63 | + <actionGroup ref="AdminSelectCustomerByEmail" stepKey="selectCustomerAfterGroupDelete"> |
| 64 | + <argument name="customerEmail" value="$$createCustomer.email$$"/> |
| 65 | + </actionGroup> |
| 66 | + <actionGroup ref="VerifyCustomerGroupForCustomer" stepKey="verifyGeneralGroupSet"> |
| 67 | + <argument name="customerEmail" value="$$createCustomer.email$$"/> |
| 68 | + <argument name="groupName" value="{{GeneralCustomerGroup.code}}"/> |
| 69 | + </actionGroup> |
| 70 | + |
| 71 | + <!--Go to New Product page, add check custom customer group values--> |
| 72 | + <amOnPage url="{{AdminProductCreatePage.url('4', 'simple')}}" stepKey="goToCreateSimpleProductPage"/> |
| 73 | + <click selector="{{AdminProductFormSection.advancedPricingLink}}" stepKey="clickOnAdvancedPricingButton"/> |
| 74 | + <waitForElement selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" |
| 75 | + stepKey="waitForCustomerGroupPriceAddButton"/> |
| 76 | + <click selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" |
| 77 | + stepKey="addCustomerGroupAllGroupsQty1PriceDiscountAnd10percent"/> |
| 78 | + <waitForElement selector="{{AdminProductFormAdvancedPricingSection.productTierPriceCustGroupSelect('0')}}" |
| 79 | + stepKey="waitForSelectCustomerGroupNameAttribute2"/> |
| 80 | + <dontSee selector="{{AdminProductFormAdvancedPricingSection.productTierPriceCustGroupSelect('0')}}" |
| 81 | + userInput="{{CustomerGroupChange.code}}" |
| 82 | + stepKey="seeProductTierPriceCustomerGroupInput"/> |
| 83 | + |
| 84 | + <!--Go to Catalog price rule page, add check custom customer group values--> |
| 85 | + <amOnPage stepKey="goToPriceRulePage" url="{{CatalogRulePage.url}}"/> |
| 86 | + <waitForPageLoad stepKey="waitForPriceRulePage"/> |
| 87 | + <click stepKey="addNewRule" selector="{{AdminGridMainControls.add}}"/> |
| 88 | + <dontSee selector="{{AdminNewCatalogPriceRule.customerGroups}}" |
| 89 | + userInput="{{CustomerGroupChange.code}}" |
| 90 | + stepKey="dontSeeCatalogPriceRuleCustomerGroups"/> |
| 91 | + |
| 92 | + <!--Go to Cart price rule page, add check custom customer group values--> |
| 93 | + <amOnPage url="{{AdminCartPriceRulesPage.url}}" stepKey="amOnCartPriceList"/> |
| 94 | + <waitForPageLoad stepKey="waitForRulesPage"/> |
| 95 | + <click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/> |
| 96 | + <dontSee selector="{{AdminCartPriceRulesFormSection.customerGroups}}" |
| 97 | + userInput="{{CustomerGroupChange.code}}" |
| 98 | + stepKey="dontSeeCartPriceRuleCustomerGroups"/> |
| 99 | + </test> |
| 100 | +</tests> |
0 commit comments