| Current Path : /home/rtorresani/www/vendor/magento/module-tax/Test/Mftf/Test/ |
| Current File : //home/rtorresani/www/vendor/magento/module-tax/Test/Mftf/Test/AdminDeleteTaxRuleTest.xml |
<?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="AdminDeleteTaxRuleTest">
<annotations>
<stories value="Delete tax rule"/>
<title value="Delete tax rule"/>
<description value="Test log in to tax rule and Delete tax rule"/>
<testCaseId value="MC-5823"/>
<severity value="CRITICAL"/>
<group value="tax"/>
<group value="mtf_migrated"/>
</annotations>
<before>
<createData entity="defaultTaxRule" stepKey="initialTaxRule"/>
<createData entity="ApiSimplePrice100Qty100v2" stepKey="simpleProduct"/>
<createData entity="Simple_US_Utah_Customer" stepKey="customer" />
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
<deleteData stepKey="deleteSimpleProduct" createDataKey="simpleProduct" />
<deleteData stepKey="deleteCustomer" createDataKey="customer" />
</after>
<actionGroup ref="AdminTaxRuleGridOpenPageActionGroup" stepKey="goToTaxRuleIndex1"/>
<actionGroup ref="AdminClearGridFiltersActionGroup" stepKey="clickClearFilters1"/>
<fillField selector="{{AdminTaxRuleGridSection.code}}" userInput="$$initialTaxRule.code$$" stepKey="fillTaxCodeSearch"/>
<click selector="{{AdminTaxRuleGridSection.search}}" stepKey="clickSearch1"/>
<click selector="{{AdminTaxRuleGridSection.nthRow('1')}}" stepKey="clickFirstRow1"/>
<!-- Delete values on the tax rule form page -->
<click selector="{{AdminTaxRuleFormSection.deleteRule}}" stepKey="clickDeleteRule"/>
<click selector="{{AdminTaxRuleFormSection.ok}}" stepKey="clickOk"/>
<waitForPageLoad stepKey="waitForTaxRuleDeleted" />
<!-- Verify we see success message -->
<see selector="{{AdminMessagesSection.success}}" userInput="The tax rule has been deleted." stepKey="seeAssertTaxRuleDeleteMessage"/>
<!-- Confirm Deleted Tax Rule(from the above step) on the tax rule grid page -->
<actionGroup ref="AdminTaxRuleGridOpenPageActionGroup" stepKey="goToTaxRuleIndex2"/>
<actionGroup ref="AdminClearGridFiltersActionGroup" stepKey="clickClearFilters2"/>
<fillField selector="{{AdminTaxRuleGridSection.code}}" userInput="$$initialTaxRule.code$$" stepKey="fillTaxCodeSearch2"/>
<click selector="{{AdminTaxRuleGridSection.search}}" stepKey="clickSearch2"/>
<see selector="{{AdminTaxRuleGridSection.emptyText}}" userInput="We couldn't find any records." stepKey="seeAssertTaxRuleNotFound"/>
<!-- Verify customer don't tax on the store front product page -->
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer">
<argument name="Customer" value="$$customer$$" />
</actionGroup>
<amOnPage url="{{StorefrontProductPage.url($$simpleProduct.custom_attributes[url_key]$$)}}" stepKey="goToProductPageOnStorefront"/>
<waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/>
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart">
<argument name="product" value="$$simpleProduct$$" />
<argument name="productCount" value="1" />
</actionGroup>
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openShoppingCart" />
<actionGroup ref="FillShippingZipForm" stepKey="fillShippingZipForm">
<argument name="address" value="US_Address_Utah" />
</actionGroup>
<scrollTo selector="{{StorefrontProductPageSection.orderTotal}}" x="0" y="-80" stepKey="scrollToOrderTotal"/>
<waitForElementVisible selector="{{StorefrontProductPageSection.subTotal}}" time="30" stepKey="waitSubtotalAppears"/>
<see selector="{{StorefrontProductPageSection.subTotal}}" userInput="$100.00" stepKey="seeSubTotal"/>
<waitForElementVisible selector="{{StorefrontProductPageSection.shipping}}" time="30" stepKey="waitShippingAppears"/>
<see selector="{{StorefrontProductPageSection.shipping}}" userInput="$5.00" stepKey="seeShipping"/>
<dontSee selector="{{StorefrontProductPageSection.tax}}" stepKey="dontSeeAssertTaxAmount" />
<see selector="{{StorefrontProductPageSection.orderTotal}}" userInput="$105.00" stepKey="seeAssertOrderTotal"/>
</test>
</tests>