|
| 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="AdminInvoiceCheckingWithMultishipmentWithMultipleTaxTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Multishipment"/> |
| 14 | + <stories value="Checking that multiple taxes in invoice after multishipping are shown preperly"/> |
| 15 | + <title value="Checking multiple taxes in invoice after multishipping are shown preperly"/> |
| 16 | + <description value="Multiple taxes are shown accurately on Invoice page after multishipping"/> |
| 17 | + <severity value="AVERAGE"/> |
| 18 | + <testCaseId value="AC-6692"/> |
| 19 | + <useCaseId value="ACP2E-1080"/> |
| 20 | + <group value="Multishipment"/> |
| 21 | + </annotations> |
| 22 | + |
| 23 | + <before> |
| 24 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 25 | + <!-- Create Tax Rates & Rules --> |
| 26 | + <createData entity="USFullTaxRate" stepKey="initialTaxRate"/> |
| 27 | + <createData entity="USFullTaxRate" stepKey="initialTaxRate2"/> |
| 28 | + |
| 29 | + <actionGroup ref="AdminCreateTaxRuleActionGroup" stepKey="createTaxRule"> |
| 30 | + <argument name="taxRate" value="$$initialTaxRate$$"/> |
| 31 | + <argument name="taxRule" value="SimpleTaxRule"/> |
| 32 | + </actionGroup> |
| 33 | + <actionGroup ref="AdminCreateTaxRuleActionGroup" stepKey="createSecondTaxRule"> |
| 34 | + <argument name="taxRate" value="$$initialTaxRate2$$"/> |
| 35 | + <argument name="taxRule" value="SimpleTaxRule2"/> |
| 36 | + </actionGroup> |
| 37 | + |
| 38 | + <!-- Create Category and Products --> |
| 39 | + <createData stepKey="category" entity="SimpleSubCategory"/> |
| 40 | + <createData stepKey="product1" entity="SimpleProduct"/> |
| 41 | + <createData stepKey="product2" entity="SimpleProduct"/> |
| 42 | + |
| 43 | + <!-- Create Customer --> |
| 44 | + <createData entity="Simple_US_Customer_Two_Addresses" stepKey="customer"/> |
| 45 | + |
| 46 | + <!-- Enable Payment and Shipping Methods --> |
| 47 | + <createData entity="FreeShippinMethodConfig" stepKey="enableFreeShipping"/> |
| 48 | + <createData entity="FlatRateShippingMethodConfig" stepKey="enableFlatRateShipping"/> |
| 49 | + <actionGroup ref="CliEnableCheckMoneyOrderPaymentMethodActionGroup" stepKey="enableCheckMoneyOrderPaymentMethod"/> |
| 50 | + |
| 51 | + <!-- Enable Full Tax Summary for Orders, Invoices, Credit Memos --> |
| 52 | + <magentoCLI command="config:set {{EnableDisplayFullTaxSummarySales.path}} {{EnableDisplayFullTaxSummarySales.value}}" stepKey="enableFullTaxSummary"/> |
| 53 | + </before> |
| 54 | + |
| 55 | + <after> |
| 56 | + <!-- Delete created Tax Rate & Rule --> |
| 57 | + <actionGroup ref="AdminDeleteTaxRule" stepKey="deleteTaxRule"> |
| 58 | + <argument name="taxRuleCode" value="{{SimpleTaxRule.code}}"/> |
| 59 | + </actionGroup> |
| 60 | + <actionGroup ref="AdminDeleteTaxRule" stepKey="deleteTaxRule2"> |
| 61 | + <argument name="taxRuleCode" value="{{SimpleTaxRule2.code}}"/> |
| 62 | + </actionGroup> |
| 63 | + <deleteData createDataKey="initialTaxRate" stepKey="deleteInitialTaxRate"/> |
| 64 | + <deleteData createDataKey="initialTaxRate2" stepKey="deleteInitialTaxRate2"/> |
| 65 | + |
| 66 | + <!-- Delete created Category, Products, Customer --> |
| 67 | + <deleteData stepKey="deleteCategory" createDataKey="category"/> |
| 68 | + <deleteData stepKey="deleteProduct1" createDataKey="product1"/> |
| 69 | + <deleteData stepKey="deleteProduct2" createDataKey="product2"/> |
| 70 | + <deleteData stepKey="deleteCustomer" createDataKey="customer"/> |
| 71 | + |
| 72 | + <!-- Disable extra Shipment and Payment Methods enabled --> |
| 73 | + <createData entity="FreeShippinMethodDefault" stepKey="disableFreeShipping"/> |
| 74 | + <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrderFilters"/> |
| 75 | + |
| 76 | + <!-- Disable Full Tax Summary for Orders, Invoices, Credit Memos --> |
| 77 | + <magentoCLI command="config:set {{DisableDisplayFullTaxSummarySales.path}} {{DisableDisplayFullTaxSummarySales.value}}" stepKey="disableFullTaxSummary"/> |
| 78 | + |
| 79 | + <!-- Logout Admin --> |
| 80 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 81 | + </after> |
| 82 | + |
| 83 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> |
| 84 | + <argument name="Customer" value="$$customer$$"/> |
| 85 | + </actionGroup> |
| 86 | + |
| 87 | + <!-- Creating Order using multishipping and get Order ID --> |
| 88 | + <amOnPage url="$$product1.custom_attributes[url_key]$$.html" stepKey="goToProduct1"/> |
| 89 | + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProduct1"> |
| 90 | + <argument name="productName" value="$$product1.name$$"/> |
| 91 | + </actionGroup> |
| 92 | + <amOnPage url="$$product2.custom_attributes[url_key]$$.html" stepKey="goToProduct2"/> |
| 93 | + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProduct2"> |
| 94 | + <argument name="productName" value="$$product2.name$$"/> |
| 95 | + </actionGroup> |
| 96 | + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openCart"/> |
| 97 | + <actionGroup ref="CheckingWithMultipleAddressesActionGroup" stepKey="checkoutWithMultipleAddresses"/> |
| 98 | + <actionGroup ref="SelectMultiShippingInfoActionGroup" stepKey="checkoutWithMultipleShipping"/> |
| 99 | + <actionGroup ref="SelectBillingInfoActionGroup" stepKey="checkoutWithPaymentMethod"/> |
| 100 | + <actionGroup ref="ReviewOrderForMultiShipmentActionGroup" stepKey="reviewOrderForMultiShipment"/> |
| 101 | + <actionGroup ref="PlaceOrderActionGroup" stepKey="placeOrder"/> |
| 102 | + <see selector="{{StorefrontMultipleShippingMethodSection.successMessage}}" userInput="Successfully ordered" stepKey="seeSuccessMessage"/> |
| 103 | + <grabTextFrom selector="{{StorefrontMultipleShippingMethodSection.orderId('1')}}" stepKey="grabOrderNumber"/> |
| 104 | + |
| 105 | + <!-- Creating Invoice --> |
| 106 | + <actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderGridById"> |
| 107 | + <argument name="orderId" value="$grabOrderNumber"/> |
| 108 | + </actionGroup> |
| 109 | + <actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/> |
| 110 | + <actionGroup ref="GoToInvoiceIntoOrderActionGroup" stepKey="goToInvoiceIntoOrderPage"/> |
| 111 | + <actionGroup ref="SubmitInvoiceActionGroup" stepKey="submitInvoice"/> |
| 112 | + |
| 113 | + <!-- Open Invoice --> |
| 114 | + <actionGroup ref="AdminOpenInvoiceFromOrderPageActionGroup" stepKey="openInvoiceFromOrder"/> |
| 115 | + |
| 116 | + <!-- Expand detailed Taxes description --> |
| 117 | + <scrollTo selector="{{AdminInvoiceTaxSection.sectionHeader}}" stepKey="scrollToTaxSection"/> |
| 118 | + <click selector="{{AdminInvoiceTaxSection.sectionHeader}}" stepKey="expandSection"/> |
| 119 | + |
| 120 | + <!-- Check that Total Tax is shown correctly --> |
| 121 | + <actionGroup ref="AssertAdminInvoiceTotalTaxActionGroup" stepKey="assertTotalTax"> |
| 122 | + <argument name="expectedTotalTax" value="$24.60"/> |
| 123 | + </actionGroup> |
| 124 | + |
| 125 | + <!-- Check that correct value is shown for detailed tax --> |
| 126 | + <actionGroup ref="AdminAssertInvoiceSingleTaxActionGroup" stepKey="assertSingleTax"/> |
| 127 | + </test> |
| 128 | +</tests> |
0 commit comments