Skip to content

Commit 9c55259

Browse files
committed
Merge remote-tracking branch 'origin/MC-29052' into 2.4-develop-pr21
2 parents c8a815e + 1861380 commit 9c55259

12 files changed

+331
-227
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
9+
<page name="AdminSalesTaxReportPage" url="reports/report_sales/tax/" area="admin" module="Magento_Reports">
10+
</page>
11+
</pages>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminSelectProductTaxClassActionGroup">
12+
<annotations>
13+
<description>Select "Product Tax Class" in tax rule edit form.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="taxClass" type="string" defaultValue="{{productTaxClass.class_name}}"/>
17+
</arguments>
18+
19+
<conditionalClick selector="{{AdminTaxRuleFormSection.additionalSettings}}" dependentSelector="{{AdminTaxRuleFormSection.additionalSettingsOpened}}" visible="false" stepKey="openAdditionalSettings"/>
20+
<waitForElementVisible selector="{{AdminTaxRuleFormSection.productTaxClassOption(taxClass)}}" stepKey="waitForVisibleTaxClass"/>
21+
<conditionalClick selector="{{AdminTaxRuleFormSection.productTaxClassOption(taxClass)}}" dependentSelector="{{AdminTaxRuleFormSection.productTaxClassSelected(taxClass)}}" visible="false" stepKey="assignProdTaxClass"/>
22+
</actionGroup>
23+
</actionGroups>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminSelectTaxRateActionGroup">
12+
<annotations>
13+
<description>Select "Tax Rate" in tax rule edit form.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="taxRate" type="string" defaultValue="{{TaxRateTexas.code}}"/>
17+
</arguments>
18+
19+
<fillField selector="{{AdminTaxRuleFormSection.taxRateSearch}}" userInput="{{taxRate}}" stepKey="searchTaxRate"/>
20+
<waitForPageLoad time="30" stepKey="waitForAjaxLoad"/>
21+
<waitForElementVisible selector="{{AdminTaxRuleFormSection.taxRateOption(taxRate)}}" time="30" stepKey="waitForVisibleTaxRate" />
22+
<click selector="{{AdminTaxRuleFormSection.taxRateOption(taxRate)}}" stepKey="clickTaxRate"/>
23+
</actionGroup>
24+
</actionGroups>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminUnassignProductTaxClassActionGroup">
12+
<annotations>
13+
<description>Admin unassign "Product Tax Class" in tax rule edit form</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="taxClass" type="string" defaultValue="{{productTaxClass.class_name}}"/>
17+
</arguments>
18+
19+
<conditionalClick selector="{{AdminTaxRuleFormSection.additionalSettings}}" dependentSelector="{{AdminTaxRuleFormSection.additionalSettingsOpened}}" visible="false" stepKey="openAdditionalSettings"/>
20+
<waitForElementVisible selector="{{AdminProductTaxClassSection.productTaxClass}}" stepKey="waitForAddProductTaxClassButton"/>
21+
<conditionalClick selector="{{AdminTaxRuleFormSection.productTaxClassOption(taxClass)}}" dependentSelector="{{AdminTaxRuleFormSection.productTaxClassSelected(taxClass)}}" visible="true" stepKey="unSelectTaxClass"/>
22+
</actionGroup>
23+
</actionGroups>

app/code/Magento/Tax/Test/Mftf/Data/TaxRateData.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,15 @@
127127
<data key="zip_is_range">0</data>
128128
<data key="rate">100.0000</data>
129129
</entity>
130+
<entity name="TaxRateTexas" type="taxRate">
131+
<data key="code" unique="suffix">Tax Rate </data>
132+
<data key="tax_region">Texas</data>
133+
<data key="tax_country_id">US</data>
134+
<data key="tax_country">United States</data>
135+
<data key="tax_postcode">78729</data>
136+
<data key="rate">7.25</data>
137+
</entity>
138+
<entity name="SecondTaxRateTexas" extends="TaxRateTexas">
139+
<data key="rate">0.125</data>
140+
</entity>
130141
</entities>

app/code/Magento/Tax/Test/Mftf/Metadata/tax_rate-meta.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
<field key="zip_is_range">integer</field>
1818
<field key="zip_from">integer</field>
1919
<field key="zip_to">integer</field>
20-
<field key="rate">integer</field>
20+
<field key="rate">number</field>
2121
<field key="code">string</field>
2222
</object>
2323
</operation>
2424
<operation name="DeleteTaxRate" dataType="taxRate" type="delete" auth="adminOauth" url="/V1/taxRates/{id}" method="DELETE">
2525
<contentType>application/json</contentType>
2626
</operation>
27-
</operations>
27+
</operations>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminOrderFormTotalSection">
12+
<element name="totalTax" type="text" selector="//table[contains(@class, 'order-subtotal-table')]/tbody/tr/td/div[contains(text(), 'Tax')]/ancestor::tr/td/span[contains(@class, 'price')]"/>
13+
</section>
14+
</sections>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminOrderItemsOrderedSection">
12+
<element name="itemTaxAmountByProductName" type="text" selector="//table[contains(@class,'edit-order-table')]//div[contains(text(),'{{productName}}')]/ancestor::tr//td[contains(@class, 'col-tax-amount')]//span" parameterized="true"/>
13+
</section>
14+
</sections>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<section name="AdminTaxReportsSection">
1212
<element name="refreshStatistics" type="button" selector="//a[contains(text(),'here')]"/>
1313
<element name="fromDate" type="input" selector="#sales_report_from"/>
14+
<element name="toDateInput" type="input" selector="#sales_report_to"/>
1415
<element name="toDate" type="input" selector="//*[@id='sales_report_to']/following-sibling::button"/>
1516
<element name="goTodayButton" type="input" selector="//button[contains(text(),'Go Today')]"/>
1617
<element name="showReportButton" type="button" selector="#filter_form_submit"/>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<element name="deleteRule" type="button" selector="#delete" timeout="30"/>
2020
<element name="ok" type="button" selector="button.action-primary.action-accept" timeout="30"/>
2121
<element name="additionalSettings" type="button" selector="#details-summarybase_fieldset" timeout="30"/>
22+
<element name="additionalSettingsOpened" type="button" selector="#details-summarybase_fieldset[aria-expanded=true]"/>
2223
<element name="customerTaxClassOption" type="checkbox" selector="//*[@id='tax_customer_class']/..//span[.='{{taxCustomerClass}}']" parameterized="true"/>
2324
<element name="productTaxClassOption" type="checkbox" selector="//*[@id='tax_product_class']/..//span[.='{{taxProductClass}}']" parameterized="true"/>
2425
<element name="customerTaxClassSelected" type="checkbox" selector="//*[@id='tax_customer_class']/..//span[.='{{taxCustomerClass}}' and preceding-sibling::input[contains(@class, 'mselect-checked')]]" parameterized="true"/>

0 commit comments

Comments
 (0)