/
AdminCreateTaxRateLargeRateTest.xml
68 lines (64 loc) · 4.57 KB
/
AdminCreateTaxRateLargeRateTest.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?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="AdminCreateTaxRateLargeRateTest">
<annotations>
<stories value="Create tax rate"/>
<title value="Create tax rate, large rate"/>
<description value="Test log in to Create Tax Rate and Create Large Rate"/>
<testCaseId value="MC-5322"/>
<severity value="CRITICAL"/>
<group value="tax"/>
<group value="mtf_migrated"/>
</annotations>
<before>
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
</before>
<after>
<amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRateIndex"/>
<click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters2"/>
<fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="{{SimpleTaxRate.code}}" stepKey="fillNameFilter"/>
<click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch"/>
<click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow"/>
<click selector="{{AdminTaxRateFormSection.deleteRate}}" stepKey="clickDeleteRate"/>
<click selector="{{AdminTaxRateFormSection.ok}}" stepKey="clickOk"/>
</after>
<amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRateIndex1"/>
<waitForPageLoad stepKey="waitForTaxRateIndex1"/>
<!-- Create a tax rate for large postcodes -->
<click selector="{{AdminTaxRateGridSection.add}}" stepKey="clickAddNewTaxRateButton"/>
<fillField selector="{{AdminTaxRateFormSection.taxIdentifier}}" userInput="{{SimpleTaxRate.code}}" stepKey="fillRuleName"/>
<fillField selector="{{AdminTaxRateFormSection.zipCode}}" userInput="*" stepKey="fillPostCode"/>
<selectOption selector="{{AdminTaxRateFormSection.country}}" userInput="France" stepKey="selectCountry1"/>
<selectOption selector="{{AdminTaxRateFormSection.state}}" userInput="Val-d'Oise" stepKey="selectState" />
<fillField selector="{{AdminTaxRateFormSection.rate}}" userInput="999" stepKey="fillRate"/>
<click selector="{{AdminTaxRateFormSection.save}}" stepKey="clickSave"/>
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the tax rate." stepKey="seeSuccess"/>
<amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRateIndex2"/>
<waitForPageLoad stepKey="waitForTaxRateIndex3"/>
<!-- Create a tax rate for large postcodes and verify we see expected values on the tax rate grid page -->
<click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters2"/>
<fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="{{SimpleTaxRate.code}}" stepKey="fillTaxIdentifierField2"/>
<selectOption selector="{{AdminTaxRateGridSection.filterByCountry}}" userInput="France" stepKey="selectCountry2" />
<fillField selector="{{AdminTaxRateGridSection.filterByPostCode}}" userInput="*" stepKey="seeTaxPostCode1"/>
<click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch2"/>
<click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow3"/>
<!-- Verify we see expected values on the tax rate form page -->
<seeInField selector="{{AdminTaxRateFormSection.taxIdentifier}}" userInput="{{SimpleTaxRate.code}}" stepKey="seeTaxIdentifierField2"/>
<seeInField selector="{{AdminTaxRateFormSection.zipCode}}" userInput="*" stepKey="seeZipCode"/>
<seeOptionIsSelected selector="{{AdminTaxRateFormSection.country}}" userInput="France" stepKey="seeCountry2"/>
<seeOptionIsSelected selector="{{AdminTaxRateFormSection.state}}" userInput="Val-d'Oise" stepKey="seeState"/>
<seeInField selector="{{AdminTaxRateFormSection.rate}}" userInput="999" stepKey="seeRate"/>
<!-- Verify we see expected values on the tax rule form page -->
<amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRuleIndex1"/>
<waitForPageLoad stepKey="waitForTaxRateIndex4"/>
<click selector="{{AdminTaxRuleGridSection.add}}" stepKey="clickAdd"/>
<see selector="{{AdminTaxRulesSection.taxRateMultiSelectItems}}" userInput="{{SimpleTaxRate.code}}" stepKey="seeTaxRateOnNewTaxRulePage"/>
</test>
</tests>