|
| 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 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="AdminCreateOrderForCustomerWithTwoAddressesTaxableAndNonTaxableTest"> |
| 11 | + <annotations> |
| 12 | + <title value="Tax should not be displayed for non taxable address"/> |
| 13 | + <stories value="MC-21699: Tax does not change when changing the billing address from Admin Panel"/> |
| 14 | + <description value="Tax should not be displayed for non taxable address when switching from taxable address"/> |
| 15 | + <testCaseId value="MC-21721"/> |
| 16 | + <features value="Sales"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <group value="Sales"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <!--Enable flat rate shipping--> |
| 22 | + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> |
| 23 | + <!--Enable free shipping method --> |
| 24 | + <magentoCLI command="config:set {{EnableFreeShippingConfigData.path}} {{EnableFreeShippingConfigData.value}}" stepKey="enableFreeShipping"/> |
| 25 | + <!--Create customer--> |
| 26 | + <createData entity="Customer_With_Different_Default_Billing_Shipping_Addresses" stepKey="simpleCustomer"/> |
| 27 | + <!--Create category--> |
| 28 | + <createData entity="_defaultCategory" stepKey="category1"/> |
| 29 | + <!--Create product1--> |
| 30 | + <createData entity="_defaultProduct" stepKey="product1"> |
| 31 | + <requiredEntity createDataKey="category1"/> |
| 32 | + </createData> |
| 33 | + <!--Create tax rule for US-CA--> |
| 34 | + <createData entity="defaultTaxRule" stepKey="createTaxRule"/> |
| 35 | + <!--Login as admin--> |
| 36 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 37 | + </before> |
| 38 | + <!--Step 1: Create new order for customer--> |
| 39 | + <actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="navigateToNewOrderWithExistingCustomer"> |
| 40 | + <argument name="customer" value="$$simpleCustomer$$"/> |
| 41 | + </actionGroup> |
| 42 | + <!--Step 2: Add product1 to the order--> |
| 43 | + <actionGroup ref="addSimpleProductToOrder" stepKey="addSimpleProductToOrder"> |
| 44 | + <argument name="product" value="$$product1$$"/> |
| 45 | + </actionGroup> |
| 46 | + <!--Step 2: Select taxable address as billing address--> |
| 47 | + <selectOption selector="{{AdminOrderFormBillingAddressSection.selectAddress}}" userInput="{{US_Address_CA.state}}" stepKey="selectTaxableAddress" /> |
| 48 | + <!--Step 3: Select FlatRate shipping method--> |
| 49 | + <actionGroup ref="orderSelectFlatRateShipping" stepKey="selectFlatRateShippingMethod"/> |
| 50 | + <!--Step 4: Verify that tax is applied to the order--> |
| 51 | + <seeElement selector="{{AdminOrderFormTotalSection.total('Tax')}}" stepKey="seeTax" /> |
| 52 | + <!--Step 5: Select non taxable address as billing address--> |
| 53 | + <selectOption selector="{{AdminOrderFormBillingAddressSection.selectAddress}}" userInput="{{US_Address_TX.state}}" stepKey="selectNonTaxableAddress" /> |
| 54 | + <!--Step 6: Change shipping method to Free--> |
| 55 | + <actionGroup ref="changeShippingMethod" stepKey="changeShippingMethod"> |
| 56 | + <argument name="shippingMethod" value="freeshipping_freeshipping"/> |
| 57 | + </actionGroup> |
| 58 | + <!--Step 7: Verify that tax is not applied to the order--> |
| 59 | + <dontSeeElement selector="{{AdminOrderFormTotalSection.total('Tax')}}" stepKey="dontSeeTax" /> |
| 60 | + <after> |
| 61 | + <!--Delete product1--> |
| 62 | + <deleteData createDataKey="product1" stepKey="deleteProduct1"/> |
| 63 | + <!--Delete category--> |
| 64 | + <deleteData createDataKey="category1" stepKey="deleteCategory1"/> |
| 65 | + <!--Delete customer--> |
| 66 | + <deleteData createDataKey="simpleCustomer" stepKey="deleteSimpleCustomer"/> |
| 67 | + <!--Delete tax rule--> |
| 68 | + <deleteData createDataKey="createTaxRule" stepKey="deleteTaxRule"/> |
| 69 | + <!--Logout--> |
| 70 | + <actionGroup ref="logout" stepKey="logout"/> |
| 71 | + <!--Disable free shipping method --> |
| 72 | + <magentoCLI command="config:set {{DisableFreeShippingConfigData.path}} {{DisableFreeShippingConfigData.value}}" stepKey="disableFreeShipping"/> |
| 73 | + </after> |
| 74 | + </test> |
| 75 | +</tests> |
0 commit comments