|
| 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="StorefrontEstimateShippingTaxTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Checkout"/> |
| 13 | + <stories value="Estimate Shipping Tax"/> |
| 14 | + <title value="Tax and Shipping Estimator in the Cart not reflecting default destination configuration."/> |
| 15 | + <description value="Tax and Shipping Estimator in the Cart not reflecting default destination configuration."/> |
| 16 | + <severity value="CRITICAL"/> |
| 17 | + <testCaseId value="AC-7922"/> |
| 18 | + <useCaseId value="ACP2E-1580"/> |
| 19 | + <group value="checkout"/> |
| 20 | + </annotations> |
| 21 | + |
| 22 | + <before> |
| 23 | + <!--Change default tax destination calculation settings--> |
| 24 | + <magentoCLI command="config:set {{DefaultTaxDestinationCountry.path}} {{US_Address_NY.country_id}}" stepKey="selectDefaultCountry"/> |
| 25 | + <magentoCLI command="config:set {{DefaultTaxDestinationRegion.path}} {{RegionNY.region_id}}" stepKey="selectDefaultState"/> |
| 26 | + <magentoCLI command="config:set {{DefaultTaxDestinationPostcode.path}} {{US_Address_NY.postcode}}" stepKey="fillDefaultPostCode"/> |
| 27 | + |
| 28 | + <!-- Create simple product --> |
| 29 | + <createData entity="SimpleProduct2" stepKey="createProduct"/> |
| 30 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 31 | + </before> |
| 32 | + |
| 33 | + <after> |
| 34 | + <!--Reset default tax destination calculation settings--> |
| 35 | + <magentoCLI command="config:set {{DefaultTaxDestinationCountry.path}} {{DefaultTaxDestinationCountry.value}}" stepKey="resetDefaultCountry"/> |
| 36 | + <magentoCLI command="config:set {{DefaultTaxDestinationRegion.path}} {{DefaultTaxDestinationRegion.value}}" stepKey="resetDefaultState"/> |
| 37 | + <magentoCLI command="config:set {{DefaultTaxDestinationPostcode.path}} {{DefaultTaxDestinationPostcode.value}}" stepKey="resetDefaultPostCode"/> |
| 38 | + |
| 39 | + <!-- Delete simple product --> |
| 40 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 41 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> |
| 42 | + </after> |
| 43 | + |
| 44 | + <!--Verify the admin setting for default tac and destination calculation--> |
| 45 | + <actionGroup ref="AdminAssertDefaultTaxDestinationActionGroup" stepKey="sssertDefaultTaxDestination"> |
| 46 | + <argument name="country" value="{{US_Address_NY.country}}"/> |
| 47 | + <argument name="state" value="{{RegionNY.region}}"/> |
| 48 | + <argument name="postcode" value="{{US_Address_NY.postcode}}"/> |
| 49 | + </actionGroup> |
| 50 | + |
| 51 | + <!-- Add simple product to cart as Guest --> |
| 52 | + <amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="goToProductPage"/> |
| 53 | + <waitForPageLoad stepKey="waitForPageLoad"/> |
| 54 | + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddSimpleProductToCart"> |
| 55 | + <argument name="product" value="$$createProduct$$"/> |
| 56 | + <argument name="productCount" value="1"/> |
| 57 | + </actionGroup> |
| 58 | + |
| 59 | + <!-- Go to Checkout page --> |
| 60 | + <actionGroup ref="ClickViewAndEditCartFromMiniCartActionGroup" stepKey="goToShoppingCartFromMinicart"/> |
| 61 | + <actionGroup ref="AssertStorefrontCheckoutCartEstimateShippingAndTaxAddressActionGroup" stepKey="checkAddress"> |
| 62 | + <argument name="country" value="{{US_Address_NY.country}}"/> |
| 63 | + <argument name="state" value="{{US_Address_NY.state}}"/> |
| 64 | + <argument name="postcode" value="{{US_Address_NY.postcode}}"/> |
| 65 | + </actionGroup> |
| 66 | + </test> |
| 67 | +</tests> |
0 commit comments