| Current Path : /home/rtorresani/www/vendor/magento/module-tax/Test/Mftf/Test/ |
| Current File : //home/rtorresani/www/vendor/magento/module-tax/Test/Mftf/Test/UpdateAnyRegionTaxRateEntityTest.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="UpdateAnyRegionTaxRateEntityTest">
<annotations>
<stories value="Update Tax Rate"/>
<title value="Update tax rate, any region"/>
<description value="Test log in to Tax Rate and Update Any Region"/>
<testCaseId value="MC-5331"/>
<severity value="CRITICAL"/>
<group value="tax"/>
<group value="mtf_migrated"/>
</annotations>
<before>
<createData entity="defaultTaxRate" stepKey="initialTaxRate"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
<deleteData stepKey="deleteTaxRate" createDataKey="initialTaxRate" />
</after>
<!-- Search the tax rate on tax grid page -->
<actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex1"/>
<actionGroup ref="AdminClearGridFiltersActionGroup" stepKey="clickClearFilters1"/>
<actionGroup ref="AdminFillTaxIdentifierFilterOnTaxRateGridActionGroup" stepKey="fillCode">
<argument name="taxRateCode" value="$$initialTaxRate.code$$"/>
</actionGroup>
<click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch1"/>
<click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow1"/>
<!-- Update any region tax rate on the tax rate form page -->
<fillField selector="{{AdminTaxRateFormSection.taxIdentifier}}" userInput="{{taxRateCustomRateCanada.code}}" stepKey="fillTaxIdentifierField2"/>
<selectOption selector="{{AdminTaxRateFormSection.country}}" userInput="{{taxRateCustomRateCanada.tax_country_id}}" stepKey="selectCountry1"/>
<selectOption selector="{{AdminTaxRateFormSection.state}}" userInput="{{taxRateCustomRateCanada.tax_region_id}}" stepKey="selectState"/>
<fillField selector="{{AdminTaxRateFormSection.zipCode}}" userInput="{{taxRateCustomRateCanada.tax_postcode}}" stepKey="fillPostCode"/>
<fillField selector="{{AdminTaxRateFormSection.rate}}" userInput="{{taxRateCustomRateCanada.rate}}" stepKey="fillRate1"/>
<click selector="{{AdminTaxRateFormSection.save}}" stepKey="clickSave"/>
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the tax rate." stepKey="seeSuccess"/>
<!-- Verify we see updated any region tax rate(from the above step) on the tax rate grid page -->
<actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex2"/>
<actionGroup ref="AdminClearGridFiltersActionGroup" stepKey="clickClearFilters2"/>
<actionGroup ref="AdminFillTaxIdentifierFilterOnTaxRateGridActionGroup" stepKey="fillTaxIdentifierField3">
<argument name="taxRateCode" value="{{taxRateCustomRateCanada.code}}"/>
</actionGroup>
<click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch2"/>
<click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow2"/>
<!-- Verify we see updated any region tax rate on the tax rate form page -->
<seeInField selector="{{AdminTaxRateFormSection.taxIdentifier}}" userInput="{{taxRateCustomRateCanada.code}}" stepKey="seeRTaxIdentifier"/>
<seeOptionIsSelected selector="{{AdminTaxRateFormSection.country}}" userInput="{{taxRateCustomRateCanada.tax_country}}" stepKey="seeCountry2"/>
<seeOptionIsSelected selector="{{AdminTaxRateFormSection.state}}" userInput="{{taxRateCustomRateCanada.tax_region_id}}" stepKey="seeState2"/>
<seeInField selector="{{AdminTaxRateFormSection.zipCode}}" userInput="{{taxRateCustomRateCanada.tax_postcode}}" stepKey="seeZipCode"/>
<seeInField selector="{{AdminTaxRateFormSection.rate}}" userInput="{{taxRateCustomRateCanada.rate}}" stepKey="seeRate2"/>
</test>
</tests>