|
| 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="AdminDeleteTaxRuleTest"> |
| 12 | + <annotations> |
| 13 | + <stories value="Delete tax rule"/> |
| 14 | + <title value="Delete tax rule"/> |
| 15 | + <description value="Test log in to tax rule and Delete tax rule"/> |
| 16 | + <testCaseId value="MC-5823"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <group value="tax"/> |
| 19 | + <group value="mtf_migrated"/> |
| 20 | + </annotations> |
| 21 | + |
| 22 | + <before> |
| 23 | + <createData entity="defaultTaxRule" stepKey="initialTaxRule"/> |
| 24 | + <createData entity="ApiSimplePrice100Qty100v2" stepKey="simpleProduct"/> |
| 25 | + <createData entity="Simple_US_Utah_Customer" stepKey="customer" /> |
| 26 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 27 | + </before> |
| 28 | + <after> |
| 29 | + <deleteData stepKey="deleteSimpleProduct" createDataKey="simpleProduct" /> |
| 30 | + <deleteData stepKey="deleteCustomer" createDataKey="customer" /> |
| 31 | + </after> |
| 32 | + |
| 33 | + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRuleIndex1"/> |
| 34 | + <waitForPageLoad stepKey="waitForTaxRuleIndex1"/> |
| 35 | + <click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters1"/> |
| 36 | + <fillField selector="{{AdminTaxRuleGridSection.code}}" userInput="$$initialTaxRule.code$$" stepKey="fillTaxCodeSearch"/> |
| 37 | + <click selector="{{AdminTaxRuleGridSection.search}}" stepKey="clickSearch1"/> |
| 38 | + <click selector="{{AdminTaxRuleGridSection.nthRow('1')}}" stepKey="clickFirstRow1"/> |
| 39 | + |
| 40 | + <!-- Delete values on the tax rule form page --> |
| 41 | + <click selector="{{AdminTaxRuleFormSection.deleteRule}}" stepKey="clickDeleteRule"/> |
| 42 | + <click selector="{{AdminTaxRuleFormSection.ok}}" stepKey="clickOk"/> |
| 43 | + <waitForPageLoad stepKey="waitForTaxRuleDeleted" /> |
| 44 | + |
| 45 | + <!-- Verify we see success message --> |
| 46 | + <see selector="{{AdminMessagesSection.success}}" userInput="The tax rule has been deleted." stepKey="seeAssertTaxRuleDeleteMessage"/> |
| 47 | + |
| 48 | + <!-- Confirm Deleted Tax Rule(from the above step) on the tax rule grid page --> |
| 49 | + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRuleIndex2"/> |
| 50 | + <waitForPageLoad stepKey="waitForTaxRuleIndex2"/> |
| 51 | + <click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters2"/> |
| 52 | + <fillField selector="{{AdminTaxRuleGridSection.code}}" userInput="$$initialTaxRule.code$$" stepKey="fillTaxCodeSearch2"/> |
| 53 | + <click selector="{{AdminTaxRuleGridSection.search}}" stepKey="clickSearch2"/> |
| 54 | + <see selector="{{AdminTaxRuleGridSection.emptyText}}" userInput="We couldn't find any records." stepKey="seeAssertTaxRuleNotFound"/> |
| 55 | + |
| 56 | + <!-- Verify customer don't tax on the store front product page --> |
| 57 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> |
| 58 | + <argument name="Customer" value="$$customer$$" /> |
| 59 | + </actionGroup> |
| 60 | + <amOnPage url="{{StorefrontProductPage.url($$simpleProduct.custom_attributes[url_key]$$)}}" stepKey="goToProductPageOnStorefront"/> |
| 61 | + <waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/> |
| 62 | + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart"> |
| 63 | + <argument name="product" value="$$simpleProduct$$" /> |
| 64 | + <argument name="productCount" value="1" /> |
| 65 | + </actionGroup> |
| 66 | + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openShoppingCart" /> |
| 67 | + <actionGroup ref="FillShippingZipForm" stepKey="fillShippingZipForm"> |
| 68 | + <argument name="address" value="US_Address_Utah" /> |
| 69 | + </actionGroup> |
| 70 | + <scrollTo selector="{{StorefrontProductPageSection.orderTotal}}" x="0" y="-80" stepKey="scrollToOrderTotal"/> |
| 71 | + <see selector="{{StorefrontProductPageSection.subTotal}}" userInput="$100.00" stepKey="seeSubTotal"/> |
| 72 | + <see selector="{{StorefrontProductPageSection.shipping}}" userInput="$5.00" stepKey="seeShipping"/> |
| 73 | + <dontSee selector="{{StorefrontProductPageSection.tax}}" stepKey="dontSeeAssertTaxAmount" /> |
| 74 | + <see selector="{{StorefrontProductPageSection.orderTotal}}" userInput="$105.00" stepKey="seeAssertOrderTotal"/> |
| 75 | + </test> |
| 76 | +</tests> |
0 commit comments