| Current Path : /home/rtorresani/www/vendor/magento/module-tax/Test/Mftf/Test/ |
| Current File : //home/rtorresani/www/vendor/magento/module-tax/Test/Mftf/Test/Update1299TaxRateEntityTest.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="Update1299TaxRateEntityTest">
<annotations>
<stories value="Update Tax Rate"/>
<title value="Update tax rate, 12.99 rate"/>
<description value="Test log in to Tax Rate and Update 12.99 Rate"/>
<testCaseId value="MC-5332"/>
<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 identifier on tax grid page -->
<actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex1"/>
<actionGroup ref="AdminClearGridFiltersActionGroup" stepKey="clickClearFilters1"/>
<actionGroup ref="AdminFillTaxIdentifierFilterOnTaxRateGridActionGroup" stepKey="fillCode1">
<argument name="taxRateCode" value="$$initialTaxRate.code$$"/>
</actionGroup>
<click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch1"/>
<click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow1"/>
<!-- Update 12.99 tax rate on the tax rate form page -->
<fillField selector="{{AdminTaxRateFormSection.taxIdentifier}}" userInput="{{taxRateCustomRateUK.code}}" stepKey="fillTaxIdentifierField1"/>
<selectOption selector="{{AdminTaxRateFormSection.country}}" userInput="{{taxRateCustomRateUK.tax_country_id}}" stepKey="selectCountry1"/>
<checkOption selector="{{AdminTaxRateFormSection.zipRange}}" stepKey="checkZipRange"/>
<fillField selector="{{AdminTaxRateFormSection.rangeFrom}}" userInput="{{taxRateCustomRateUK.zip_from}}" stepKey="fillZipFrom"/>
<fillField selector="{{AdminTaxRateFormSection.rangeTo}}" userInput="{{taxRateCustomRateUK.zip_to}}" stepKey="fillZipTo"/>
<fillField selector="{{AdminTaxRateFormSection.rate}}" userInput="{{taxRateCustomRateUK.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 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="fillTaxIdentifierField2">
<argument name="taxRateCode" value="{{taxRateCustomRateUK.code}}"/>
</actionGroup>
<click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch2"/>
<click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow2"/>
<!-- Verify we see updated tax rate on the tax rate form page -->
<seeInField selector="{{AdminTaxRateFormSection.taxIdentifier}}" userInput="{{taxRateCustomRateUK.code}}" stepKey="seeRTaxIdentifier"/>
<seeOptionIsSelected selector="{{AdminTaxRateFormSection.country}}" userInput="{{taxRateCustomRateUK.tax_country}}" stepKey="seeCountry2"/>
<seeCheckboxIsChecked selector="{{AdminTaxRateFormSection.zipRange}}" stepKey="seeZipRange"/>
<seeInField selector="{{AdminTaxRateFormSection.rangeFrom}}" userInput="{{taxRateCustomRateUK.zip_from}}" stepKey="seeZipFrom"/>
<seeInField selector="{{AdminTaxRateFormSection.rangeTo}}" userInput="{{taxRateCustomRateUK.zip_to}}" stepKey="seeZipTo"/>
<seeInField selector="{{AdminTaxRateFormSection.rate}}" userInput="{{taxRateCustomRateUK.rate}}" stepKey="seeRate"/>
</test>
</tests>