Skip to content

Commit 59021f9

Browse files
author
OlgaVasyltsun
committed
Merge remote-tracking branch 'origin/MC-31444' into 2.4-develop-pr15
2 parents 1be7897 + 7fa4a1d commit 59021f9

10 files changed

+345
-209
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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="AssertStorefrontCheckoutCartEstimateShippingAndTaxAddressActionGroup">
12+
<annotations>
13+
<description>Check address data in Estimate Shipping And Tax section of shopping cart on storefront</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="country" type="string" defaultValue="{{US_Address_TX.country}}"/>
17+
<argument name="state" type="string" defaultValue="{{US_Address_TX.state}}"/>
18+
<argument name="postcode" type="string" defaultValue="{{US_Address_TX.postcode}}"/>
19+
</arguments>
20+
21+
<waitForElementVisible selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="waitForSubtotalVisible"/>
22+
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.country}}" visible="false" stepKey="expandEstimateShippingAndTaxIfNeeded" />
23+
<seeOptionIsSelected selector="{{CheckoutCartSummarySection.country}}" userInput="{{country}}" stepKey="checkCountry"/>
24+
<seeOptionIsSelected selector="{{CheckoutCartSummarySection.stateProvince}}" userInput="{{state}}" stepKey="checkState" />
25+
<grabValueFrom selector="{{CheckoutCartSummarySection.postcode}}" stepKey="grabPostCodeText"/>
26+
<assertEquals message="Address postcode is invalid" stepKey="checkPostcode">
27+
<expectedResult type="string">{{postcode}}</expectedResult>
28+
<actualResult type="variable">grabPostCodeText</actualResult>
29+
</assertEquals>
30+
</actionGroup>
31+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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="StorefrontCheckoutCartFillEstimateShippingAndTaxActionGroup">
12+
<annotations>
13+
<description>Fill address data in Estimate Shipping And Tax section of shopping cart on storefront</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="country" type="string" defaultValue="{{US_Address_TX.country}}"/>
17+
<argument name="state" type="string" defaultValue="{{US_Address_TX.state}}"/>
18+
<argument name="postcode" type="string" defaultValue="{{US_Address_TX.postcode}}"/>
19+
</arguments>
20+
21+
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.estimateShippingAndTaxSummary}}" visible="false" stepKey="openEestimateShippingAndTaxSection"/>
22+
<selectOption selector="{{CheckoutCartSummarySection.country}}" userInput="{{country}}" stepKey="selectCountry"/>
23+
<selectOption selector="{{CheckoutCartSummarySection.stateProvince}}" userInput="{{state}}" stepKey="selectState"/>
24+
<waitForElementVisible selector="{{CheckoutCartSummarySection.postcode}}" stepKey="waitForPostCodeVisible"/>
25+
<fillField selector="{{CheckoutCartSummarySection.postcode}}" userInput="{{postcode}}" stepKey="selectPostCode"/>
26+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDiappear"/>
27+
</actionGroup>
28+
</actionGroups>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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="AssertStorefrontCheckoutCartTaxAmountActionGroup">
12+
<annotations>
13+
<description>Check tax summary data in Summary section of shopping cart on storefront</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="taxAmount" type="string" defaultValue="$0.83"/>
17+
<argument name="rate" type="string" defaultValue="US-CA-*-Rate 1 (8.25%)"/>
18+
</arguments>
19+
20+
<see selector="{{CheckoutCartSummarySection.taxAmount}}" userInput="{{taxAmount}}" stepKey="checkTaxAmount" />
21+
<scrollTo selector="{{CheckoutCartSummarySection.taxSummary}}" stepKey="scrollToTaxSummary" />
22+
<conditionalClick selector="{{CheckoutCartSummarySection.taxSummary}}" dependentSelector="{{CheckoutCartSummarySection.rate}}" visible="false" stepKey="expandTaxSummary"/>
23+
<see selector="{{CheckoutCartSummarySection.rate}}" userInput="{{rate}}" stepKey="checkRate" />
24+
</actionGroup>
25+
</actionGroups>

app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxInformationInShoppingCartForGuestVirtualQuoteTest.xml

Lines changed: 0 additions & 79 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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="AssertStorefrontCheckoutCartTaxAmountFPTActionGroup" extends="AssertStorefrontCheckoutCartTaxAmountActionGroup">
12+
<annotations>
13+
<description>EXTENDS: AssertStorefrontCheckoutCartTaxAmountActionGroup. Add check FPT tax summary in Summary section of shopping cart on storefront</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="FPTAmount" type="string" defaultValue="$10"/>
17+
</arguments>
18+
19+
<see selector="{{CheckoutCartSummarySection.amountFPT}}" userInput="{{FPTAmount}}" before="checkTaxAmount" stepKey="checkFPTAmount"/>
20+
</actionGroup>
21+
</actionGroups>

app/code/Magento/Weee/Test/Mftf/Section/AdminProductAddFPTValueSection.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
<section name="AdminProductAddFPTValueSection">
1212
<element name="addFPT" type="button" selector="[data-index='{{FPTAttributeCode}}'] [data-action='add_new_row']" parameterized="true"/>
1313
<element name="removeRowByIndex" type="button" selector="[data-index='{{FPTAttributeCode}}'] [data-action='remove_row']:nth-of-type({{rowIndex}})" parameterized="true"/>
14-
<element name="selectCountryForFPT" type="select" selector="(//select[contains(@name, 'product[{{FPTAttributeCode}}]') and contains(@name, '[country]')])[last()]" parameterized="true"/>
15-
<element name="selectStateForFPT" type="select" selector="(//select[contains(@name, 'product[{{FPTAttributeCode}}]') and contains(@name, '[state]')])[last()]" parameterized="true"/>
16-
<element name="setTaxValueForFPT" type="text" selector="(//input[contains(@name, 'product[{{FPTAttributeCode}}]') and contains(@name, '[value]')])[last()]" parameterized="true"/>
17-
<element name="setWebSiteForFPT" type="text" selector="(//select[contains(@name, 'product[{{FPTAttributeCode}}]') and contains(@name, '[website_id]')])[last()]" parameterized="true"/>
14+
<element name="selectCountryForFPT" type="select" selector="div.admin__field-control[data-index='{{FPTAttributeCode}}'] table tbody tr.data-row:last-child select[name*='[country]']" parameterized="true"/>
15+
<element name="selectStateForFPT" type="select" selector="div.admin__field-control[data-index='{{FPTAttributeCode}}'] table tbody tr.data-row:last-child select[name*='[state]']" parameterized="true"/>
16+
<element name="setTaxValueForFPT" type="text" selector="div.admin__field-control[data-index='{{FPTAttributeCode}}'] table tbody tr.data-row:last-child input[name*='[value]']" parameterized="true"/>
17+
<element name="setWebSiteForFPT" type="text" selector="div.admin__field-control[data-index='{{FPTAttributeCode}}'] table tbody tr.data-row:last-child select[name*='[website_id]']" parameterized="true"/>
1818
<element name="setWebSiteForFPTOption" type="text" selector="(//select[contains(@name, 'product[{{FPTAttributeCode}}]') and contains(@name, '[website_id]')])/option[contains(text(), '{{website}}')]" parameterized="true"/>
1919
</section>
2020
</sections>

0 commit comments

Comments
 (0)