Skip to content

Commit 8ee36e5

Browse files
committed
MC-4892: Convert CreateTaxRuleEntityTest to MFTF. Addressing code review comments.
1 parent 5c2ebda commit 8ee36e5

8 files changed

+21
-15
lines changed

app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminDeleteTaxRuleActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<argument name="taxRuleCode" type="string" />
1414
</arguments>
1515
<amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRuleGridPage"/>
16+
<waitForPageLoad stepKey="waitForPageLoad1" />
1617
<click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters"/>
1718
<fillField selector="{{AdminTaxRuleGridSection.code}}" userInput="{{taxRuleCode}}" stepKey="fillTaxRuleCode"/>
1819
<click selector="{{AdminTaxRuleGridSection.search}}" stepKey="clickSearch"/>

app/code/Magento/Tax/Test/Mftf/Section/AdminTaxRuleFormSection.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminTaxRuleFormSection">
12-
<element name="taxIdentifier" type="input" selector="input.admin__control-text admin__action-multiselect-search"/>
12+
<element name="taxIdentifier" type="input" selector="input.admin__control-text admin__action-multiselect-search" timeout="30"/>
1313
<element name="code" type="input" selector="#code"/>
1414
<element name="taxRateSearch" type="input" selector="input[data-role='advanced-select-text']"/>
1515
<element name="taxRateSelected" type="input" selector="//span[contains(., '{{taxRateCode}}') and preceding-sibling::input[contains(@class, 'mselect-checked')]]" parameterized="true" />
1616
<element name="taxRateOption" type="multiselect" selector="//*[@data-ui-id='tax-rate-form-fieldset-element-form-field-tax-rate']//span[.='{{taxRateCode}}']" parameterized="true" />
17-
<element name="save" type="button" selector="#save"/>
18-
<element name="deleteRule" type="button" selector="#delete" />
17+
<element name="save" type="button" selector="#save" timeout="30"/>
18+
<element name="deleteRule" type="button" selector="#delete" timeout="30"/>
1919
<element name="ok" type="button" selector="button.action-primary.action-accept" timeout="30"/>
20-
<element name="additionalSettings" type="button" selector="#details-summarybase_fieldset"/>
20+
<element name="additionalSettings" type="button" selector="#details-summarybase_fieldset" timeout="30"/>
2121
<element name="customerTaxClassOption" type="checkbox" selector="//*[@id='tax_customer_class']/..//span[.='{{taxCustomerClass}}']" parameterized="true"/>
2222
<element name="productTaxClassOption" type="checkbox" selector="//*[@id='tax_product_class']/..//span[.='{{taxProductClass}}']" parameterized="true"/>
2323
<element name="customerTaxClassSelected" type="checkbox" selector="//*[@id='tax_customer_class']/..//span[.='{{taxCustomerClass}}' and preceding-sibling::input[contains(@class, 'mselect-checked')]]" parameterized="true"/>

app/code/Magento/Tax/Test/Mftf/Section/AdminTaxRuleGridSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<element name="add" type="button" selector="#add" timeout="30"/>
1313
<element name="code" type="input" selector="#taxRuleGrid_filter_code"/>
1414
<element name="taxRate" type="input" selector="#taxRuleGrid_filter_tax_rates_codes"/>
15-
<element name="search" type="button" selector=".admin__filter-actions button[data-action='grid-filter-apply']"/>
15+
<element name="search" type="button" selector=".admin__filter-actions button[data-action='grid-filter-apply']" timeout="30"/>
1616
<element name="nthRow" type="block" selector="tr[data-role='row']:nth-of-type({{var}})" parameterized="true" timeout="30"/>
1717
<element name="successMessage" type="text" selector="#messages"/>
1818
</section>

app/code/Magento/Tax/Test/Mftf/Test/AdminCreateDefaultsTaxRule.xml renamed to app/code/Magento/Tax/Test/Mftf/Test/AdminCreateDefaultsTaxRuleTest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="AdminCreateDefaultsTaxRule">
11+
<test name="AdminCreateDefaultsTaxRuleTest">
1212
<annotations>
1313
<stories value="Create tax rule"/>
1414
<title value="Create tax rule, defaults"/>
@@ -30,8 +30,9 @@
3030
</after>
3131

3232
<amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRuleIndex1"/>
33-
<click selector="{{AdminTaxRuleGridSection.add}}" stepKey="clickAddNewTaxRuleButton"/>
3433
<waitForPageLoad stepKey="waitForTaxRuleIndex1"/>
34+
<click selector="{{AdminTaxRuleGridSection.add}}" stepKey="clickAddNewTaxRuleButton"/>
35+
<waitForPageLoad stepKey="waitForTaxRuleIndex2"/>
3536
<!-- Create a tax rule with defaults -->
3637
<fillField selector="{{AdminTaxRuleFormSection.code}}" userInput="{{SimpleTaxRule.code}}" stepKey="fillTaxRuleCode1"/>
3738
<fillField selector="{{AdminTaxRuleFormSection.taxRateSearch}}" userInput="$$initialTaxRate.code$$" stepKey="fillTaxRateSearch"/>

app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithCustomerAndProductTaxClass.xml renamed to app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithCustomerAndProductTaxClassTest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="AdminCreateTaxRuleWithCustomerAndProductTaxClass">
11+
<test name="AdminCreateTaxRuleWithCustomerAndProductTaxClassTest">
1212
<annotations>
1313
<stories value="Create tax rule"/>
1414
<title value="Create tax rule, with customer and product tax class"/>
@@ -40,8 +40,9 @@
4040
</after>
4141

4242
<amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRuleIndex1"/>
43-
<click selector="{{AdminTaxRuleGridSection.add}}" stepKey="clickAddNewTaxRuleButton"/>
4443
<waitForPageLoad stepKey="waitForTaxRuleIndex1"/>
44+
<click selector="{{AdminTaxRuleGridSection.add}}" stepKey="clickAddNewTaxRuleButton"/>
45+
<waitForPageLoad stepKey="waitForTaxRuleIndex2"/>
4546

4647
<!-- Create a tax rule with customer and product class -->
4748
<fillField selector="{{AdminTaxRuleFormSection.code}}" userInput="{{SimpleTaxRule.code}}" stepKey="fillTaxRuleCode1"/>
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="AdminCreateTaxRuleWithNewAndExistingTaxRateAndCustomerAndProductTaxClass">
11+
<test name="AdminCreateTaxRuleWithNewAndExistingTaxRateAndCustomerAndProductTaxClassTest">
1212
<annotations>
1313
<stories value="Create tax rule"/>
1414
<title value="Test log in to Create Tax Rule and Create Tax Rule with New and Existing Tax Rate, Customer Tax Class, Product Tax Class"/>
@@ -41,8 +41,9 @@
4141
</after>
4242

4343
<amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRuleIndex1"/>
44-
<click selector="{{AdminTaxRuleGridSection.add}}" stepKey="clickAddNewTaxRuleButton"/>
4544
<waitForPageLoad stepKey="waitForTaxRuleIndex1"/>
45+
<click selector="{{AdminTaxRuleGridSection.add}}" stepKey="clickAddNewTaxRuleButton"/>
46+
<waitForPageLoad stepKey="waitForTaxRuleIndex2"/>
4647

4748
<!-- Create a tax rule with new and existing tax rate, customer tax class, product tax class -->
4849
<fillField selector="{{AdminTaxRuleFormSection.code}}" userInput="{{SimpleTaxRule.code}}" stepKey="fillTaxRuleCode1"/>

app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithNewTaxClassesAndTaxRate.xml renamed to app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithNewTaxClassesAndTaxRateTest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="AdminCreateTaxRuleWithNewTaxClassesAndTaxRate">
11+
<test name="AdminCreateTaxRuleWithNewTaxClassesAndTaxRateTest">
1212
<annotations>
1313
<stories value="Create tax rule"/>
1414
<title value="Creating tax rule with new tax classes and tax rate"/>
@@ -41,8 +41,9 @@
4141
</after>
4242

4343
<amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRuleIndex1"/>
44-
<click selector="{{AdminTaxRuleGridSection.add}}" stepKey="clickAddNewTaxRuleButton"/>
4544
<waitForPageLoad stepKey="waitForTaxRuleIndex1"/>
45+
<click selector="{{AdminTaxRuleGridSection.add}}" stepKey="clickAddNewTaxRuleButton"/>
46+
<waitForPageLoad stepKey="waitForTaxRuleIndex2"/>
4647

4748
<!-- Create a tax rule with new tax classes and tax rate -->
4849
<fillField selector="{{AdminTaxRuleFormSection.code}}" userInput="{{SimpleTaxRule.code}}" stepKey="fillTaxRuleCode1"/>

app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithZipRange.xml renamed to app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithZipRangeTest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="AdminCreateTaxRuleWithZipRange">
11+
<test name="AdminCreateTaxRuleWithZipRangeTest">
1212
<annotations>
1313
<stories value="Create tax rule"/>
1414
<title value="Create tax rule, with zip range"/>
@@ -41,8 +41,9 @@
4141
</after>
4242

4343
<amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRuleIndex1"/>
44-
<click selector="{{AdminTaxRuleGridSection.add}}" stepKey="clickAddNewTaxRuleButton"/>
4544
<waitForPageLoad stepKey="waitForTaxRuleIndex1"/>
45+
<click selector="{{AdminTaxRuleGridSection.add}}" stepKey="clickAddNewTaxRuleButton"/>
46+
<waitForPageLoad stepKey="waitForTaxRuleIndex2"/>
4647

4748
<!-- Create a tax rule with new tax classes and tax rate -->
4849
<fillField selector="{{AdminTaxRuleFormSection.code}}" userInput="{{SimpleTaxRule.code}}" stepKey="fillTaxRuleCode1"/>

0 commit comments

Comments
 (0)