Skip to content

Commit 14fc062

Browse files
committed
Merge remote-tracking branch 'origin/MC-5332' into mtf-eol
2 parents 62fe499 + 1252948 commit 14fc062

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-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
@@ -56,4 +56,13 @@
5656
<data key="zip_is_range">0</data>
5757
<data key="rate">25</data>
5858
</entity>
59+
<entity name="taxRateCustomRateUK" type="taxRate">
60+
<data key="code" unique="suffix">TaxRate</data>
61+
<data key="tax_country_id">GB</data>
62+
<data key="tax_country">United Kingdom</data>
63+
<data key="zip_is_range">1</data>
64+
<data key="zip_from">1</data>
65+
<data key="zip_to">7800935</data>
66+
<data key="rate">12.99</data>
67+
</entity>
5968
</entities>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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="Update1299TaxRateEntityTest">
12+
<annotations>
13+
<stories value="Update Tax Rate"/>
14+
<title value="Update tax rate, 12.99 rate"/>
15+
<description value="Test log in to Tax Rate and Update 12.99 Rate"/>
16+
<testCaseId value="MC-5332"/>
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 identifier 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="fillCode1"/>
34+
<click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch1"/>
35+
<click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow1"/>
36+
37+
<!-- Update 12.99 tax rate on the tax rate form page -->
38+
<fillField selector="{{AdminTaxRateFormSection.taxIdentifier}}" userInput="{{taxRateCustomRateUK.code}}" stepKey="fillTaxIdentifierField1"/>
39+
<selectOption selector="{{AdminTaxRateFormSection.country}}" userInput="{{taxRateCustomRateUK.tax_country_id}}" stepKey="selectCountry1"/>
40+
<checkOption selector="{{AdminTaxRateFormSection.zipRange}}" stepKey="checkZipRange"/>
41+
<fillField selector="{{AdminTaxRateFormSection.rangeFrom}}" userInput="{{taxRateCustomRateUK.zip_from}}" stepKey="fillZipFrom"/>
42+
<fillField selector="{{AdminTaxRateFormSection.rangeTo}}" userInput="{{taxRateCustomRateUK.zip_to}}" stepKey="fillZipTo"/>
43+
<fillField selector="{{AdminTaxRateFormSection.rate}}" userInput="{{taxRateCustomRateUK.rate}}" stepKey="fillRate1"/>
44+
<click selector="{{AdminTaxRateFormSection.save}}" stepKey="clickSave"/>
45+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the tax rate." stepKey="seeSuccess"/>
46+
47+
<!-- Verify we see updated tax rate(from the above step) on the tax rate grid page -->
48+
<amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRateIndex2"/>
49+
<waitForPageLoad stepKey="waitForTaxRateIndex2"/>
50+
<click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters2"/>
51+
<fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="{{taxRateCustomRateUK.code}}" stepKey="fillTaxIdentifierField2"/>
52+
<click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch2"/>
53+
<click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow2"/>
54+
<!-- Verify we see updated tax rate on the tax rate form page -->
55+
<seeInField selector="{{AdminTaxRateFormSection.taxIdentifier}}" userInput="{{taxRateCustomRateUK.code}}" stepKey="seeRTaxIdentifier"/>
56+
<seeOptionIsSelected selector="{{AdminTaxRateFormSection.country}}" userInput="{{taxRateCustomRateUK.tax_country}}" stepKey="seeCountry2"/>
57+
<seeCheckboxIsChecked selector="{{AdminTaxRateFormSection.zipRange}}" stepKey="seeZipRange"/>
58+
<seeInField selector="{{AdminTaxRateFormSection.rangeFrom}}" userInput="{{taxRateCustomRateUK.zip_from}}" stepKey="seeZipFrom"/>
59+
<seeInField selector="{{AdminTaxRateFormSection.rangeTo}}" userInput="{{taxRateCustomRateUK.zip_to}}" stepKey="seeZipTo"/>
60+
<seeInField selector="{{AdminTaxRateFormSection.rate}}" userInput="{{taxRateCustomRateUK.rate}}" stepKey="seeRate"/>
61+
</test>
62+
</tests>

0 commit comments

Comments
 (0)