Skip to content

Commit 62fe499

Browse files
committed
Merge remote-tracking branch 'origin/MC-5331' into mtf-eol
2 parents 9cefee7 + 897ef94 commit 62fe499

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

app/code/Magento/Tax/Test/Mftf/Data/TaxRateData.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,13 @@
4747
<data key="zip_is_range">0</data>
4848
<data key="rate">777</data>
4949
</entity>
50+
<entity name="taxRateCustomRateCanada" type="taxRate">
51+
<data key="code" unique="suffix">TaxRate</data>
52+
<data key="tax_country_id">CA</data>
53+
<data key="tax_country">Canada</data>
54+
<data key="tax_region_id">*</data>
55+
<data key="tax_postcode">180</data>
56+
<data key="zip_is_range">0</data>
57+
<data key="rate">25</data>
58+
</entity>
5059
</entities>
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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="UpdateAnyRegionTaxRateEntityTest">
12+
<annotations>
13+
<stories value="Update Tax Rate"/>
14+
<title value="Update tax rate, any region"/>
15+
<description value="Test log in to Tax Rate and Update Any Region"/>
16+
<testCaseId value="MC-5331"/>
17+
<severity value="CRITICAL"/>
18+
<group value="tax"/>
19+
<group value="mtf_migrated"/>
20+
</annotations>
21+
<before>
22+
<createData entity="defaultTaxRate" stepKey="initialTaxRate"/>
23+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
24+
</before>
25+
<after>
26+
<deleteData stepKey="deleteTaxRate" createDataKey="initialTaxRate" />
27+
</after>
28+
29+
<!-- Search the tax rate on tax grid page -->
30+
<amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRateIndex1"/>
31+
<waitForPageLoad stepKey="waitForTaxRateIndex1"/>
32+
<click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters1"/>
33+
<fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="$$initialTaxRate.code$$" stepKey="fillCode"/>
34+
<click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch1"/>
35+
<click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow1"/>
36+
37+
<!-- Update any region tax rate on the tax rate form page -->
38+
<fillField selector="{{AdminTaxRateFormSection.taxIdentifier}}" userInput="{{taxRateCustomRateCanada.code}}" stepKey="fillTaxIdentifierField2"/>
39+
<selectOption selector="{{AdminTaxRateFormSection.country}}" userInput="{{taxRateCustomRateCanada.tax_country_id}}" stepKey="selectCountry1"/>
40+
<selectOption selector="{{AdminTaxRateFormSection.state}}" userInput="{{taxRateCustomRateCanada.tax_region_id}}" stepKey="selectState"/>
41+
<fillField selector="{{AdminTaxRateFormSection.zipCode}}" userInput="{{taxRateCustomRateCanada.tax_postcode}}" stepKey="fillPostCode"/>
42+
<fillField selector="{{AdminTaxRateFormSection.rate}}" userInput="{{taxRateCustomRateCanada.rate}}" stepKey="fillRate1"/>
43+
<click selector="{{AdminTaxRateFormSection.save}}" stepKey="clickSave"/>
44+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the tax rate." stepKey="seeSuccess"/>
45+
46+
<!-- Verify we see updated any region tax rate(from the above step) on the tax rate grid page -->
47+
<amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRateIndex2"/>
48+
<waitForPageLoad stepKey="waitForTaxRateIndex2"/>
49+
<click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters2"/>
50+
<fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="{{taxRateCustomRateCanada.code}}" stepKey="fillTaxIdentifierField3"/>
51+
<click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch2"/>
52+
<click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow2"/>
53+
<!-- Verify we see updated any region tax rate on the tax rate form page -->
54+
<seeInField selector="{{AdminTaxRateFormSection.taxIdentifier}}" userInput="{{taxRateCustomRateCanada.code}}" stepKey="seeRTaxIdentifier"/>
55+
<seeOptionIsSelected selector="{{AdminTaxRateFormSection.country}}" userInput="{{taxRateCustomRateCanada.tax_country}}" stepKey="seeCountry2"/>
56+
<seeOptionIsSelected selector="{{AdminTaxRateFormSection.state}}" userInput="{{taxRateCustomRateCanada.tax_region_id}}" stepKey="seeState2"/>
57+
<seeInField selector="{{AdminTaxRateFormSection.zipCode}}" userInput="{{taxRateCustomRateCanada.tax_postcode}}" stepKey="seeZipCode"/>
58+
<seeInField selector="{{AdminTaxRateFormSection.rate}}" userInput="{{taxRateCustomRateCanada.rate}}" stepKey="seeRate2"/>
59+
</test>
60+
</tests>

0 commit comments

Comments
 (0)