|
| 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="AdminCreateTaxRateWiderZipCodeRange"> |
| 12 | + <annotations> |
| 13 | + <stories value="Create tax rate"/> |
| 14 | + <title value="Create Tax Rate, wider zip code range"/> |
| 15 | + <description value="Test log in to Create Tax Rate and Create Wider Zip Code Range"/> |
| 16 | + <testCaseId value="MC-5321"/> |
| 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 | + <waitForPageLoad stepKey="waitForTaxRateIndex1"/> |
| 36 | + <!-- Create a tax rate with range from 1-7800935 for zipCodes --> |
| 37 | + <click selector="{{AdminTaxRateGridSection.add}}" stepKey="clickAddNewTaxRateButton"/> |
| 38 | + <fillField selector="{{AdminTaxRateFormSection.taxIdentifier}}" userInput="{{SimpleTaxRate.code}}" stepKey="fillRuleName"/> |
| 39 | + <checkOption selector="{{AdminTaxRateFormSection.zipRange}}" stepKey="checkZipRange" /> |
| 40 | + <fillField selector="{{AdminTaxRateFormSection.rangeFrom}}" userInput="1" stepKey="fillZipFrom"/> |
| 41 | + <fillField selector="{{AdminTaxRateFormSection.rangeTo}}" userInput="7800935" stepKey="fillZipTo"/> |
| 42 | + <selectOption selector="{{AdminTaxRateFormSection.country}}" userInput="United Kingdom" stepKey="selectCountry1"/> |
| 43 | + <fillField selector="{{AdminTaxRateFormSection.rate}}" userInput="7.75" stepKey="seeRate"/> |
| 44 | + <click selector="{{AdminTaxRateFormSection.save}}" stepKey="clickSave"/> |
| 45 | + <see selector="{{AdminMessagesSection.success}}" userInput="You saved the tax rate." stepKey="seeSuccess"/> |
| 46 | + |
| 47 | + <amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRateIndex2"/> |
| 48 | + <waitForPageLoad stepKey="waitForTaxRateIndex3"/> |
| 49 | + <!-- Create a tax rate for zipCodeRange and verify we see expected values on the tax rate grid page --> |
| 50 | + <click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters2"/> |
| 51 | + <fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="{{SimpleTaxRate.code}}" stepKey="fillTaxIdentifierField2"/> |
| 52 | + <selectOption selector="{{AdminTaxRateGridSection.filterByCountry}}" userInput="United Kingdom" stepKey="selectCountry2" /> |
| 53 | + <fillField selector="{{AdminTaxRateGridSection.filterByPostCode}}" userInput="1-7800935" stepKey="seeTaxPostCode1"/> |
| 54 | + <click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch2"/> |
| 55 | + <click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow1"/> |
| 56 | + <!-- Verify we see expected values on the tax rate form page --> |
| 57 | + <seeInField selector="{{AdminTaxRateFormSection.taxIdentifier}}" userInput="{{SimpleTaxRate.code}}" stepKey="seeTaxIdentifierField2"/> |
| 58 | + <seeCheckboxIsChecked selector="{{AdminTaxRateFormSection.zipRange}}" stepKey="clickZipRange"/> |
| 59 | + <seeInField selector="{{AdminTaxRateFormSection.rangeFrom}}" userInput="1" stepKey="seeTaxPostCode2"/> |
| 60 | + <seeInField selector="{{AdminTaxRateFormSection.rangeTo}}" userInput="7800935" stepKey="seeTaxPostCode3"/> |
| 61 | + <seeOptionIsSelected selector="{{AdminTaxRateFormSection.country}}" userInput="United Kingdom" stepKey="seeCountry2"/> |
| 62 | + |
| 63 | + <!-- Verify we see expected values on the tax rule form page --> |
| 64 | + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRuleIndex1"/> |
| 65 | + <waitForPageLoad stepKey="waitForTaxRateIndex4"/> |
| 66 | + <click selector="{{AdminTaxRuleGridSection.add}}" stepKey="clickAdd"/> |
| 67 | + <see selector="{{AdminTaxRulesSection.taxRateMultiSelectItems}}" userInput="{{SimpleTaxRate.code}}" stepKey="seeTaxRateOnNewTaxRulePage"/> |
| 68 | + </test> |
| 69 | +</tests> |
0 commit comments