Skip to content

Commit aa4fb0b

Browse files
committed
MC-5320: Create tax rate, specific postcode
1 parent 67f86d4 commit aa4fb0b

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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="AdminCreateTaxRateSpecificPostcode">
12+
<annotations>
13+
<stories value="Create tax rate"/>
14+
<title value="Create tax rate,specific postcode"/>
15+
<description value="Test log in to Create Tax Rate and Create specific Postcode"/>
16+
<testCaseId value="MC-5320"/>
17+
<severity value="CRITICAL"/>
18+
<group value="tax"/>
19+
<group value="mtf_migrated"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
23+
</before>
24+
<after>
25+
<amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRateIndex"/>
26+
<click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters2"/>
27+
<fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="{{SimpleTaxRate.code}}" stepKey="fillNameFilter"/>
28+
<click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch"/>
29+
<click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow"/>
30+
<click selector="{{AdminTaxRateFormSection.deleteRate}}" stepKey="clickDeleteRate"/>
31+
<click selector="{{AdminTaxRateFormSection.ok}}" stepKey="clickOk"/>
32+
</after>
33+
34+
<amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRateIndex1"/>
35+
<click selector="{{AdminTaxRateGridSection.add}}" stepKey="clickAddNewTaxRateButton"/>
36+
<waitForPageLoad stepKey="waitForTaxRateIndex1"/>
37+
<!-- Create a tax rate with specific postcode -->
38+
<fillField selector="{{AdminTaxRateFormSection.taxIdentifier}}" userInput="{{SimpleTaxRate.code}}" stepKey="fillTaxIdentifierField1"/>
39+
<fillField selector="{{AdminTaxRateFormSection.zipCode}}" userInput="180" stepKey="fillTaxPostCode"/>
40+
<selectOption selector="{{AdminTaxRateFormSection.country}}" userInput="Canada" stepKey="selectCountry" />
41+
<selectOption selector="{{AdminTaxRateFormSection.state}}" userInput="*" stepKey="selectState" />
42+
<fillField selector="{{AdminTaxRateFormSection.rate}}" userInput='25' stepKey="seeRate"/>
43+
<click selector="{{AdminTaxRateFormSection.save}}" stepKey="clickSave"/>
44+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the tax rate." stepKey="seeSuccess"/>
45+
46+
<amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRateIndex2"/>
47+
<waitForPageLoad stepKey="waitForTaxRateIndex2"/>
48+
<!-- Verify the tax rate grid page shows the specific postcode we just created -->
49+
<click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters1"/>
50+
<fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="{{SimpleTaxRate.code}}" stepKey="fillTaxIdentifierField2"/>
51+
<selectOption selector="{{AdminTaxRateGridSection.filterByCountry}}" userInput="Canada" stepKey="fillCountryFilter"/>
52+
<fillField selector="{{AdminTaxRateGridSection.filterByPostCode}}" userInput="180" stepKey="fillPostCodeFilter"/>
53+
<click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch"/>
54+
<click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow1"/>
55+
<!-- Verify we see expected values on the tax rate form page -->
56+
<seeInField selector="{{AdminTaxRateFormSection.taxIdentifier}}" userInput="{{SimpleTaxRate.code}}" stepKey="seeTaxIdentifierField2"/>
57+
<seeInField selector="{{AdminTaxRateFormSection.zipCode}}" userInput="180" stepKey="seePostCode"/>
58+
<seeInField selector="{{AdminTaxRateFormSection.country}}" userInput="Canada" stepKey="seeCountry2"/>
59+
60+
<!-- Verify we see expected values on the tax rule form page -->
61+
<amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRuleIndex1"/>
62+
<waitForPageLoad stepKey="waitForTaxRateIndex4"/>
63+
<click selector="{{AdminTaxRuleGridSection.add}}" stepKey="clickAdd"/>
64+
<see selector="{{AdminTaxRulesSection.taxRateMultiSelectItems}}" userInput="{{SimpleTaxRate.code}}" stepKey="seeTaxRateOnNewTaxRulePage"/>
65+
</test>
66+
</tests>

0 commit comments

Comments
 (0)