Skip to content

Commit ab8f47d

Browse files
committed
Merge remote-tracking branch 'origin/MC-5330' into mtf-eol
2 parents c25ff06 + 8e8aa0d commit ab8f47d

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,12 @@
3939
<data key="zip_to">96162</data>
4040
<data key="rate">15.05</data>
4141
</entity>
42+
<entity name="defaultTaxRateWithLargeRate" type="taxRate">
43+
<data key="code" unique="suffix">TaxRate</data>
44+
<data key="tax_country_id">GB</data>
45+
<data key="tax_country">United Kingdom</data>
46+
<data key="tax_postcode">*</data>
47+
<data key="zip_is_range">0</data>
48+
<data key="rate">777</data>
49+
</entity>
4250
</entities>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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="UpdateLargeTaxRateEntityTest">
12+
<annotations>
13+
<stories value="Update Tax Rate"/>
14+
<title value="Update tax rate, large rate"/>
15+
<description value="Test log in to Tax Rate and Update Large Rate"/>
16+
<testCaseId value="MC-5330"/>
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 large tax rate on the tax rate form page -->
38+
<fillField selector="{{AdminTaxRateFormSection.taxIdentifier}}" userInput="{{defaultTaxRateWithLargeRate.code}}" stepKey="fillTaxIdentifierField2"/>
39+
<selectOption selector="{{AdminTaxRateFormSection.country}}" userInput="{{defaultTaxRateWithLargeRate.tax_country_id}}" stepKey="selectCountry1"/>
40+
<fillField selector="{{AdminTaxRateFormSection.zipCode}}" userInput="{{defaultTaxRateWithLargeRate.tax_postcode}}" stepKey="fillPostCode"/>
41+
<fillField selector="{{AdminTaxRateFormSection.rate}}" userInput="{{defaultTaxRateWithLargeRate.rate}}" stepKey="fillRate1"/>
42+
<click selector="{{AdminTaxRateFormSection.save}}" stepKey="clickSave"/>
43+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the tax rate." stepKey="seeSuccess"/>
44+
45+
<!-- Verify we see updated large tax rate(from the above step) on the tax rate grid page -->
46+
<amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRateIndex4"/>
47+
<waitForPageLoad stepKey="waitForTaxRateIndex2"/>
48+
<click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters2"/>
49+
<fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="{{defaultTaxRateWithLargeRate.code}}" stepKey="fillTaxIdentifierField3"/>
50+
<click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch2"/>
51+
<click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow2"/>
52+
<!-- Verify we see updated large tax rate on the tax rate form page -->
53+
<seeInField selector="{{AdminTaxRateFormSection.taxIdentifier}}" userInput="{{defaultTaxRateWithLargeRate.code}}" stepKey="seeRTaxIdentifier"/>
54+
<seeOptionIsSelected selector="{{AdminTaxRateFormSection.country}}" userInput="{{defaultTaxRateWithLargeRate.tax_country}}" stepKey="seeCountry2"/>
55+
<seeInField selector="{{AdminTaxRateFormSection.zipCode}}" userInput="{{defaultTaxRateWithLargeRate.tax_postcode}}" stepKey="seeZipCode"/>
56+
<seeInField selector="{{AdminTaxRateFormSection.rate}}" userInput="{{defaultTaxRateWithLargeRate.rate}}" stepKey="seeRate2"/>
57+
</test>
58+
</tests>

0 commit comments

Comments
 (0)