Skip to content

Commit 4a55ed3

Browse files
committed
Merge remote-tracking branch 'origin/MC-5801' into mtf-eol
2 parents a8768eb + 3fcd59e commit 4a55ed3

File tree

4 files changed

+60
-0
lines changed

4 files changed

+60
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
<element name="filterByCountry" type="input" selector="#tax_rate_grid_filter_tax_country_id"/>
1717
<element name="filterByPostCode" type="input" selector="#tax_rate_grid_filter_tax_postcode"/>
1818
<element name="nthRow" type="block" selector="tr[data-role='row']:nth-of-type({{var}})" parameterized="true" timeout="30"/>
19+
<element name="emptyText" type="text" selector=".empty-text"/>
1920
</section>
2021
</sections>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminTaxRuleFormSection">
1212
<element name="taxIdentifier" type="input" selector="input.admin__control-text admin__action-multiselect-search"/>
13+
<element name="taxRateSearch" type="input" selector="input[data-role='advanced-select-text']"/>
14+
<element name="fieldTaxRate" type="block" selector="div.field-tax_rate"/>
1315
</section>
1416
</sections>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminTaxRuleGridSection">
1212
<element name="add" type="button" selector="#add" timeout="30"/>
13+
<element name="search" type="button" selector="button[data-action='grid-filter-apply']" timeout="30"/>
14+
<element name="filterByTaxIdentifier" type="text" selector="#taxRuleGrid_filter_code"/>
1315
</section>
1416
</sections>
1517

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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="DeleteTaxRateEntityTest">
12+
<annotations>
13+
<stories value="Delete Tax Rate"/>
14+
<title value="Delete tax rate"/>
15+
<description value="Test log in to Tax Rate and Delete Tax Rate"/>
16+
<testCaseId value="MC-5801"/>
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+
26+
<!-- Search the tax rate on tax grid page -->
27+
<amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRateIndex1"/>
28+
<waitForPageLoad stepKey="waitForTaxRateIndex1"/>
29+
<click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters1"/>
30+
<fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="$$initialTaxRate.code$$" stepKey="fillCode"/>
31+
<click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch1"/>
32+
<click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow1"/>
33+
34+
<!-- Delete values on the tax rate form page -->
35+
<click selector="{{AdminTaxRateFormSection.deleteRate}}" stepKey="clickDeleteRate"/>
36+
<click selector="{{AdminTaxRateFormSection.ok}}" stepKey="clickOk"/>
37+
<see selector="{{AdminMessagesSection.success}}" userInput="You Deleted the tax rate." stepKey="seeSuccess1"/>
38+
39+
<!-- Confirm Deleted TaxIdentifier(from the above step) on the tax rate grid page -->
40+
<amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRateIndex2"/>
41+
<waitForPageLoad stepKey="waitForTaxRateIndex2"/>
42+
<click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters2"/>
43+
<fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="{{defaultTaxRate.code}}" stepKey="fillTaxIdentifierField3"/>
44+
<click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch2"/>
45+
<see selector="{{AdminTaxRateGridSection.emptyText}}" userInput="We couldn't find any records." stepKey="seeSuccess"/>
46+
47+
<!-- Confirm Deleted TaxIdentifier on the tax rule grid page -->
48+
<amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRuleIndex3"/>
49+
<click selector="{{AdminTaxRuleGridSection.add}}" stepKey="clickAddNewTaxRuleButton"/>
50+
<waitForPageLoad stepKey="waitForTaxRuleIndex1"/>
51+
<fillField selector="{{AdminTaxRuleFormSection.taxRateSearch}}" userInput="$$initialTaxRate.code$$" stepKey="fillTaxRateSearch"/>
52+
<wait stepKey="waitForSearch" time="5" />
53+
<dontSee selector="{{AdminTaxRuleFormSection.fieldTaxRate}}" userInput="$$initialTaxRate.code$$" stepKey="dontSeeInTaxRuleForm"/>
54+
</test>
55+
</tests>

0 commit comments

Comments
 (0)