Skip to content

Commit f64b618

Browse files
committed
created actiongroup section page for shipping origin and created seperate actiongroups for tax configs
1 parent 7f7569f commit f64b618

File tree

7 files changed

+187
-100
lines changed

7 files changed

+187
-100
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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="AdminSetShippingOriginConfigActionGroup">
12+
<!-- navigate to the tax configuration page -->
13+
<amOnPage url="{{AdminShippingSettingsPage.url}}" stepKey="goToAdminShippingPage"/>
14+
<waitForPageLoad stepKey="waitForShippingConfigLoad"/>
15+
<conditionalClick selector="{{AdminShippingSettingsConfigSection.Origin}}" dependentSelector="{{AdminShippingSettingsConfigSection.OriginOpened}}" visible="false" stepKey="openPriceDisplaySettings"/>
16+
<uncheckOption stepKey="clickCountry" selector="{{AdminShippingSettingsConfigSection.systemValueCountry}}"/>
17+
<waitForPageLoad stepKey="waitForUncheck"/>
18+
<selectOption selector="{{AdminShippingSettingsConfigSection.dropdownCountry}}" userInput="Canada" stepKey="SelectCountry"/>
19+
<uncheckOption stepKey="clickState" selector="{{AdminShippingSettingsConfigSection.systemValueState}}"/>
20+
<wait stepKey="WaitForUncheckStateSystemValue" time="10"/>
21+
<selectOption selector="{{AdminShippingSettingsConfigSection.dropdownState}}" userInput="Saskatchewan" stepKey="SelectState"/>
22+
<uncheckOption stepKey="clickPostcode" selector="{{AdminShippingSettingsConfigSection.systemValuePostcode}}"/>
23+
<wait stepKey="waitForUncheckSystemPostcode" time="10"/>
24+
<fillField selector="{{AdminShippingSettingsConfigSection.PostcodeValue}}" userInput="S4P3Y2" stepKey="fillPostcode"/>
25+
<!-- Save the settings -->
26+
<scrollToTopOfPage stepKey="scrollToTop"/>
27+
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveChanges"/>
28+
</actionGroup>
29+
</actionGroups>
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11+
<page name="AdminShippingSettingsPage" url="admin/system_config/edit/section/shipping/" area="admin" module="Magento_Shipping">
12+
<section name="AdminShippingSettingsConfigSection"/>
13+
</page>
14+
</pages>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
10+
<section name="AdminShippingSettingsConfigSection">
11+
<element name="Origin" type="block" selector="#shipping_origin-head" timeout="30"/>
12+
<element name="OriginOpened" type="block" selector="#shipping_origin-head.open" timeout="30"/>
13+
<element name="systemValueCountry" type="checkbox" selector="#row_shipping_origin_country_id input[type='checkbox']"/>
14+
<element name="dropdownCountry" type="select" selector="#row_shipping_origin_country_id select"/>
15+
<element name="systemValueState" type="checkbox" selector="#row_shipping_origin_region_id input[type='checkbox']"/>
16+
<element name="dropdownState" type="checkbox" selector="#row_shipping_origin_region_id select"/>
17+
<element name="systemValuePostcode" type="checkbox" selector="#row_shipping_origin_postcode input[type='checkbox']"/>
18+
<element name="PostcodeValue" type="input" selector="#row_shipping_origin_postcode input[type='text']"/>
19+
</section>
20+
</sections>
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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="AdminChangeTaxAndFptConfigActionGroup">
12+
<!-- navigate to the tax configuration page -->
13+
<amOnPage url="{{AdminTaxConfigurationPage.url}}" stepKey="goToAdminTaxPage"/>
14+
<waitForPageLoad stepKey="waitForTaxConfigLoad"/>
15+
<!-- change configurations on tax calculation settings-->
16+
<conditionalClick selector="{{AdminConfigureTaxSection.taxCalculationSettings}}" dependentSelector="{{AdminConfigureTaxSection.taxCalculationSettingsOpened}}" visible="false" stepKey="openCalculationSettingsTab"/>
17+
<conditionalClick selector="{{AdminConfigureTaxSection.taxCalculationAlgorithmInherit}}" dependentSelector="{{AdminConfigureTaxSection.taxCalculationAlgorithmDisabled}}" visible="true" stepKey="clickCalculationMethodBasedCheckBox"/>
18+
<selectOption userInput="Total" selector="{{AdminConfigureTaxSection.taxCalculationAlgorithm}}" stepKey="fillCalculationMethodBased"/>
19+
<conditionalClick selector="{{AdminConfigureTaxSection.taxCalculationBasedInherit}}" dependentSelector="{{AdminConfigureTaxSection.taxCalculationBasedDisabled}}" visible="true" stepKey="clickTaxCalculationBasedCheckBox"/>
20+
<selectOption userInput="Shipping Origin" selector="{{AdminConfigureTaxSection.taxCalculationBased}}" stepKey="fillTaxCalculationBased"/>
21+
<conditionalClick selector="{{AdminConfigureTaxSection.taxCalculationPricesInherit}}" dependentSelector="{{AdminConfigureTaxSection.taxCalculationPricesDisabled}}" visible="true" stepKey="clickCalculationPricesCheckBox"/>
22+
<selectOption userInput="Excluding Tax" selector="{{AdminConfigureTaxSection.taxCalculationPrices}}" stepKey="clickCalculationPrices"/>
23+
<!-- change the Default Tax Destination Calculation Configurations -->
24+
<scrollTo selector="#tax_defaults-head" x="0" y="-80" stepKey="scrollToTaxDefaults"/>
25+
<!-- conditionalClick twice to fix some flaky behavior -->
26+
<conditionalClick stepKey="clickCalculationSettings" selector="{{AdminConfigureTaxSection.defaultDestination}}" dependentSelector="#tax_defaults" visible="false"/>
27+
<conditionalClick stepKey="clickCalculationSettingsAgain" selector="{{AdminConfigureTaxSection.defaultDestination}}" dependentSelector="#tax_defaults" visible="false"/>
28+
<uncheckOption stepKey="clickDefaultState" selector="{{AdminConfigureTaxSection.systemValueDefaultState}}"/>
29+
<selectOption stepKey="selectDefaultState" selector="{{AdminConfigureTaxSection.dropdownDefaultState}}" userInput="*"/>
30+
<uncheckOption stepKey="clickDefaultCountry" selector="{{AdminConfigureTaxSection.systemValueDefaultCountry}}"/>
31+
<selectOption stepKey="selectDefaultCountry" selector="{{AdminConfigureTaxSection.dropdownDefaultCountry}}" userInput="Canada"/>
32+
<fillField stepKey="fillDefaultPostCode" selector="{{AdminConfigureTaxSection.defaultPostCode}}" userInput="*"/>
33+
<!-- change display setting configurations -->
34+
<conditionalClick selector="{{AdminConfigureTaxSection.taxPriceDisplaySettings}}" dependentSelector="{{AdminConfigureTaxSection.taxPriceDisplaySettingsOpened}}" visible="false" stepKey="openPriceDisplaySettings"/>
35+
<conditionalClick selector="{{AdminConfigureTaxSection.taxDisplayProductPricesInherit}}" dependentSelector="{{AdminConfigureTaxSection.taxDisplayProductPricesDisabled}}" visible="true" stepKey="clickDisplayProductPricesCheckBox"/>
36+
<selectOption userInput="Excluding Tax" selector="{{AdminConfigureTaxSection.taxDisplayProductPrices}}" stepKey="clickDisplayProductPrices"/>
37+
<!-- change shopping cart display configuration -->
38+
<!-- conditionalClick twice to fix some flaky behavior -->
39+
<conditionalClick stepKey="clickShoppingCartDisplaySettings" selector="{{AdminConfigureTaxSection.shoppingCartDisplay}}" dependentSelector="{{AdminConfigureTaxSection.systemValueIncludeTaxTotalCart}}" visible="false"/>
40+
<conditionalClick stepKey="clickShoppingCartDisplaySettingsAgain" selector="{{AdminConfigureTaxSection.shoppingCartDisplay}}" dependentSelector="{{AdminConfigureTaxSection.systemValueIncludeTaxTotalCart}}" visible="false"/>
41+
<uncheckOption stepKey="clickDisplayTaxSummaryCart" selector="{{AdminConfigureTaxSection.systemValueDisplayTaxSummaryCart}}"/>
42+
<selectOption stepKey="selectDisplayTaxSummaryCart" selector="{{AdminConfigureTaxSection.dropdownDisplayTaxSummaryCart}}" userInput="Yes"/>
43+
<!-- Orders, Invoices, Credit Memos Display Settings configurations -->
44+
<!-- conditionalClick twice to fix some flaky behavior -->
45+
<conditionalClick stepKey="clickOrdersInvoicesCreditSales" selector="{{AdminConfigureTaxSection.ordersInvoicesCreditSales}}" dependentSelector="#tax_sales_display" visible="false"/>
46+
<conditionalClick stepKey="clickOrdersInvoicesCreditSalesAgain" selector="{{AdminConfigureTaxSection.ordersInvoicesCreditSales}}" dependentSelector="#tax_sales_display" visible="false"/>
47+
<uncheckOption stepKey="clickDisplayTaxSummarySales" selector="{{AdminConfigureTaxSection.systemValueDisplayTaxSummarySales}}"/>
48+
<selectOption stepKey="selectDisplayTaxSummarySales" selector="{{AdminConfigureTaxSection.dropdownDisplayTaxSummarySales}}" userInput="Yes"/>
49+
<!-- Enable fixed product taxes and change configurations -->
50+
<!-- conditionalClick twice to fix some flaky behavior -->
51+
<scrollTo selector="#tax_weee-head" x="0" y="-80" stepKey="scrollToFPT"/>
52+
<conditionalClick stepKey="clickFixedProductTaxes" selector="{{AdminConfigureTaxSection.fixedProductTaxes}}" dependentSelector="{{AdminConfigureTaxSection.fixedProductTaxesOpened}}" visible="false"/>
53+
<uncheckOption stepKey="clickEnableFpt" selector="{{AdminConfigureTaxSection.systemValueEnableFpt}}"/>
54+
<selectOption stepKey="selectEnableFpt" selector="{{AdminConfigureTaxSection.dropdownFptYes}}" userInput="Yes"/>
55+
<uncheckOption stepKey="clickDisplayPricesInProductLists" selector="{{AdminConfigureTaxSection.systemValueDisplayPricesProducts}}"/>
56+
<selectOption stepKey="selectDisplayPricesInProductLists" selector="{{AdminConfigureTaxSection.dropdownIncludingFPTAndFPTDescription}}" userInput="Including FPT and FPT description"/>
57+
<uncheckOption stepKey="ClickApplyTaxToFPT" selector="{{AdminConfigureTaxSection.systemValueApplyTaxToFpt}}"/>
58+
<selectOption stepKey="selectApplyTaxOnFPT" selector="{{AdminConfigureTaxSection.dropdownApplyTaxToFpt}}" userInput="Yes"/>
59+
<!-- Save the settings -->
60+
<scrollToTopOfPage stepKey="scrollToTop"/>
61+
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveChanges"/>
62+
</actionGroup>
63+
</actionGroups>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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="AdminResetTaxAndFptActionGroup">
12+
<!-- Reset tax calculation settings -->
13+
<amOnPage url="{{AdminTaxConfigurationPage.url}}" stepKey="goToAdminTaxPage"/>
14+
<waitForPageLoad stepKey="waitForTaxConfigLoad"/>
15+
<!-- change configurations on tax calculation settings-->
16+
<conditionalClick selector="{{AdminConfigureTaxSection.taxCalculationSettings}}" dependentSelector="{{AdminConfigureTaxSection.taxCalculationSettingsOpened}}" visible="false" stepKey="openCalculationSettingsTab"/>
17+
<conditionalClick selector="{{AdminConfigureTaxSection.taxCalculationAlgorithmInherit}}" dependentSelector="{{AdminConfigureTaxSection.taxCalculationAlgorithmDisabled}}" visible="true" stepKey="clickCalculationMethodBasedCheckBox"/>
18+
<selectOption userInput="Total" selector="{{AdminConfigureTaxSection.taxCalculationAlgorithm}}" stepKey="fillCalculationMethodBased"/>
19+
<conditionalClick selector="{{AdminConfigureTaxSection.taxCalculationBasedInherit}}" dependentSelector="{{AdminConfigureTaxSection.taxCalculationBasedDisabled}}" visible="true" stepKey="clickTaxCalculationBasedCheckBox"/>
20+
<selectOption userInput="Shipping Origin" selector="{{AdminConfigureTaxSection.taxCalculationBased}}" stepKey="fillTaxCalculationBased"/>
21+
<conditionalClick selector="{{AdminConfigureTaxSection.taxCalculationPricesInherit}}" dependentSelector="{{AdminConfigureTaxSection.taxCalculationPricesDisabled}}" visible="true" stepKey="clickCalculationPricesCheckBox"/>
22+
<selectOption userInput="Excluding Tax" selector="{{AdminConfigureTaxSection.taxCalculationPrices}}" stepKey="clickCalculationPrices"/>
23+
<!--reset tax destination calculation settings-->
24+
<scrollTo selector="#tax_defaults-head" x="0" y="-80" stepKey="scrollToTaxDefaults"/>
25+
<conditionalClick stepKey="clickCalculationSettings" selector="{{AdminConfigureTaxSection.defaultDestination}}" dependentSelector="#tax_defaults" visible="false"/>
26+
<conditionalClick stepKey="clickCalculationSettingsAgain" selector="{{AdminConfigureTaxSection.defaultDestination}}" dependentSelector="#tax_defaults" visible="false"/>
27+
<uncheckOption stepKey="clickDefaultState" selector="{{AdminConfigureTaxSection.systemValueDefaultState}}"/>
28+
<selectOption stepKey="selectDefaultState" selector="{{AdminConfigureTaxSection.dropdownDefaultState}}" userInput="*"/>
29+
<uncheckOption stepKey="clickDefaultCountry" selector="{{AdminConfigureTaxSection.systemValueDefaultCountry}}"/>
30+
<selectOption stepKey="selectDefaultCountry" selector="{{AdminConfigureTaxSection.dropdownDefaultCountry}}" userInput="United States"/>
31+
<fillField stepKey="fillDefaultPostCode" selector="{{AdminConfigureTaxSection.defaultPostCode}}" userInput="*"/>
32+
<!-- reset display setting configurations -->
33+
<conditionalClick selector="{{AdminConfigureTaxSection.taxPriceDisplaySettings}}" dependentSelector="{{AdminConfigureTaxSection.taxPriceDisplaySettingsOpened}}" visible="false" stepKey="openPriceDisplaySettings"/>
34+
<conditionalClick selector="{{AdminConfigureTaxSection.taxDisplayProductPricesInherit}}" dependentSelector="{{AdminConfigureTaxSection.taxDisplayProductPricesDisabled}}" visible="true" stepKey="clickDisplayProductPricesCheckBox"/>
35+
<selectOption userInput="Excluding Tax" selector="{{AdminConfigureTaxSection.taxDisplayProductPrices}}" stepKey="clickDisplayProductPrices"/>
36+
<!-- Reset shopping cart display configuration -->
37+
<!-- conditionalClick twice to fix some flaky behavior -->
38+
<conditionalClick stepKey="clickShoppingCartDisplaySettings" selector="{{AdminConfigureTaxSection.shoppingCartDisplay}}" dependentSelector="{{AdminConfigureTaxSection.systemValueIncludeTaxTotalCart}}" visible="false"/>
39+
<conditionalClick stepKey="clickShoppingCartDisplaySettingsAgain" selector="{{AdminConfigureTaxSection.shoppingCartDisplay}}" dependentSelector="{{AdminConfigureTaxSection.systemValueIncludeTaxTotalCart}}" visible="false"/>
40+
<uncheckOption stepKey="clickDisplayTaxSummaryCart" selector="{{AdminConfigureTaxSection.systemValueDisplayTaxSummaryCart}}"/>
41+
<selectOption stepKey="selectDisplayTaxSummaryCart" selector="{{AdminConfigureTaxSection.dropdownDisplayTaxSummaryCart}}" userInput="No"/>
42+
<!-- Reset Orders, Invoices, Credit Memos Display Settings configurations -->
43+
<!-- conditionalClick twice to fix some flaky behavior -->
44+
<conditionalClick stepKey="clickOrdersInvoicesCreditSales" selector="{{AdminConfigureTaxSection.ordersInvoicesCreditSales}}" dependentSelector="#tax_sales_display" visible="false"/>
45+
<conditionalClick stepKey="clickOrdersInvoicesCreditSalesAgain" selector="{{AdminConfigureTaxSection.ordersInvoicesCreditSales}}" dependentSelector="#tax_sales_display" visible="false"/>
46+
<uncheckOption stepKey="clickDisplayTaxSummarySales" selector="{{AdminConfigureTaxSection.systemValueDisplayTaxSummarySales}}"/>
47+
<selectOption stepKey="selectDisplayTaxSummarySales" selector="{{AdminConfigureTaxSection.dropdownDisplayTaxSummarySales}}" userInput="No"/>
48+
<!-- Reset fixed product taxes and change configurations -->
49+
<!-- conditionalClick twice to fix some flaky behavior -->
50+
<conditionalClick stepKey="clickFixedProductTaxes" selector="{{AdminConfigureTaxSection.fixedProductTaxes}}" dependentSelector="{{AdminConfigureTaxSection.fixedProductTaxesOpened}}" visible="false"/><uncheckOption stepKey="clickEnableFpt" selector="{{AdminConfigureTaxSection.systemValueEnableFpt}}"/>
51+
<selectOption stepKey="selectEnableFpt" selector="{{AdminConfigureTaxSection.dropdownFptYes}}" userInput="No"/>
52+
<!-- Save the settings -->
53+
<scrollToTopOfPage stepKey="scrollToTop"/>
54+
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveChanges"/>
55+
</actionGroup>
56+
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
<element name="systemValueDisplayZeroTaxSales" type="checkbox" selector="#row_tax_sales_display_zero_tax input[type='checkbox']"/>
6363
<element name="dropdownDisplayZeroTaxSales" type="checkbox" selector="#row_tax_sales_display_zero_tax select"/>
6464
<element name="fixedProductTaxes" type="block" selector="#tax_weee-head" timeout="30"/>
65+
<element name="fixedProductTaxesOpened" type="block" selector="#tax_weee-head.open" timeout="30"/>
6566
<element name="systemValueEnableFpt" type="checkbox" selector="#row_tax_weee_enable input[type='checkbox']"/>
6667
<element name="dropdownFptYes" type="checkbox" selector="#row_tax_weee_enable select"/>
6768
<element name="systemValueDisplayPricesProducts" type="checkbox" selector="#row_tax_weee_display_list input[type='checkbox']"/>

0 commit comments

Comments
 (0)