Skip to content

Commit 6722dc3

Browse files
committed
Merge branch '2.4-develop' of https://github.com/adobe-commerce-tier-4/magento2ce into ACP2E-3043
2 parents ca1f668 + df2f7aa commit 6722dc3

8 files changed

+374
-12
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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="StorefrontOpenOrderLinkOnMyOrdersPageActionGroup">
12+
<annotations>
13+
<description>Clicks the top "View Order" link on the My Account->My Orders page</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="orderID" type="string" defaultValue="1"/>
17+
</arguments>
18+
<waitForElementClickable selector="{{StorefrontCustomerOrderSection.viewOrderByOrderID(orderID)}}" stepKey="waitForViewOrderElementToBeClickable"/>
19+
<click selector="{{StorefrontCustomerOrderSection.viewOrderByOrderID(orderID)}}" stepKey="clickViewOrder"/>
20+
<waitForPageLoad stepKey="waitForPageLoaded"/>
21+
</actionGroup>
22+
</actionGroups>

app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerOrderSection.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88

@@ -23,5 +23,6 @@
2323
<element name="pageNumber" type="text" selector="//*[@class='order-products-toolbar toolbar bottom']//a[contains(@class, 'page')]//span[2][contains(text() ,'{{var1}}')]" parameterized="true"/>
2424
<element name="perPage" type="select" selector="//*[@class='order-products-toolbar toolbar bottom']//select[@id='limiter']"/>
2525
<element name="rowsInColumn" type="text" selector="//tbody/tr/td[contains(@class, '{{column}}')]" parameterized="true"/>
26+
<element name="viewOrderByOrderID" type="button" selector="//td[@data-th='Order #' and contains(text(), '{{orderID}}')]/following-sibling::td[@data-th='Actions']//a[contains(@class, 'action view')]//span" parameterized="true"/>
2627
</section>
2728
</sections>

app/code/Magento/Fedex/Test/Mftf/Test/StorefrontAssertAvailableShippingRateIsChangedBasedOnInputedDataTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<description value="Testcase verifies On storefront Available shipping rate is changed on fly according to inputed data"/>
1717
<severity value="MAJOR"/>
1818
<testCaseId value="AC-9283"/>
19+
<group value="pr_exclude"/>
1920
</annotations>
2021
<before>
2122
<createData entity="SimpleProduct" stepKey="createProduct">
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
9+
<test name="AdminImportTableRatesWithSpecificAmountTest">
10+
<annotations>
11+
<features value="Shipping"/>
12+
<stories value="Offline Shipping Methods"/>
13+
<title value="Import table rate shipping prices with specific amount including and excluding virtual products"/>
14+
<description value="Admin imports table rate shipping prices with specific amount including and excluding virtual products and validates the shipping cost reflects as per the configurations"/>
15+
<severity value="MAJOR"/>
16+
<testCaseId value="AC-13526"/>
17+
<group value="shipping"/>
18+
</annotations>
19+
<before>
20+
<!--Create customer-->
21+
<createData entity="Simple_US_CA_Customer" stepKey="createCustomer"/>
22+
<!-- Add simple product -->
23+
<createData entity="SimpleProduct2" stepKey="createFirstSimpleProduct">
24+
<field key="price">9.00</field>
25+
</createData>
26+
<createData entity="SimpleProduct2" stepKey="createSecondSimpleProduct">
27+
<field key="price">11.00</field>
28+
</createData>
29+
<createData entity="SimpleProduct3" stepKey="createThirdSimpleProduct">
30+
<field key="price">64.00</field>
31+
</createData>
32+
<createData entity="ApiVirtualProductWithDescription" stepKey="createVirtualProduct"/>
33+
</before>
34+
<after>
35+
<deleteData createDataKey="createVirtualProduct" stepKey="deleteVirtualProduct"/>
36+
<!-- Remove simple products-->
37+
<deleteData createDataKey="createFirstSimpleProduct" stepKey="deleteFirstSimpleProduct"/>
38+
<deleteData createDataKey="createSecondSimpleProduct" stepKey="deleteSecondSimpleProduct"/>
39+
<deleteData createDataKey="createThirdSimpleProduct" stepKey="deleteThirdSimpleProduct"/>
40+
<!-- Delete sales rule -->
41+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
42+
<!-- Go to Stores > Configuration > Sales > Shipping Methods -->
43+
<actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodConfigPage"/>
44+
<!-- Check Use Default checkbox for Default Condition and Active -->
45+
<checkOption selector="{{AdminShippingMethodTableRatesSection.carriersTableRateConditionName}}" stepKey="enableUseDefaultCondition"/>
46+
<checkOption selector="{{AdminShippingMethodTableRatesSection.enabledUseSystemValue}}" stepKey="enableUseDefaultActive"/>
47+
<actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfigs"/>
48+
<!-- Log out -->
49+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
50+
<!-- Remove Virtual products-->
51+
</after>
52+
<!-- Login as admin -->
53+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
54+
<!-- Go to Stores > Configuration > Sales > Shipping Methods -->
55+
<actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodConfigPage"/>
56+
<!-- Switch to Website scope -->
57+
<actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="AdminSwitchStoreView">
58+
<argument name="website" value="_defaultWebsite"/>
59+
</actionGroup>
60+
<!-- Enable Table Rate method and save config -->
61+
<actionGroup ref="AdminChangeTableRatesShippingMethodStatusActionGroup" stepKey="enableTableRatesShippingMethod"/>
62+
<!-- Uncheck Use Default checkbox for Default Condition -->
63+
<uncheckOption selector="{{AdminShippingMethodTableRatesSection.carriersTableRateConditionName}}" stepKey="disableUseDefaultCondition"/>
64+
<!-- Make sure you have Condition Price vs. Destination -->
65+
<selectOption selector="{{AdminShippingMethodTableRatesSection.condition}}" userInput="{{TableRateShippingMethodConfig.package_value_with_discount}}" stepKey="setCondition"/>
66+
<!-- Uncheck Use Default checkbox for include virtual price -->
67+
<uncheckOption selector="{{AdminShippingMethodTableRatesSection.carriersTableRateIncludeVirtualPrice}}" stepKey="uncheckIncludeVirtualPrice"/>
68+
<selectOption selector="{{AdminShippingMethodTableRatesSection.carriersTableRateIncludeVirtualPriceDropdown}}" userInput="No" stepKey="setIncludeVirtualPriceAsNo"/>
69+
<!-- Import file and save config -->
70+
<attachFile selector="{{AdminShippingMethodTableRatesSection.importFile}}" userInput="usa_tablerates.csv" stepKey="attachFileForImport"/>
71+
<actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfigs"/>
72+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
73+
<argument name="indices" value=""/>
74+
</actionGroup>
75+
<!-- Login as Customer Login from Customer page -->
76+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
77+
<argument name="Customer" value="$$createCustomer$$" />
78+
</actionGroup>
79+
<waitForPageLoad stepKey="waitForPageLoad"/>
80+
<!-- Add simple product to cart -->
81+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart">
82+
<argument name="product" value="$$createFirstSimpleProduct$$"/>
83+
</actionGroup>
84+
<!-- Assert that table rate value is correct for US -->
85+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCheckout"/>
86+
<waitForElementVisible selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" stepKey="seeEstimateShippingandTax"/>
87+
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.country}}" visible="false" stepKey="expandEstimateShippingandTax" />
88+
<grabValueFrom selector="{{CheckoutCartSummarySection.shippingPrice}}" stepKey="grabShippingForUS"/>
89+
<waitForText selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$grabShippingForUS" stepKey="seeShippingForUS1"/>
90+
<waitForPageLoad stepKey="waitForSelectCountry"/>
91+
<!-- Add Virtual product to cart -->
92+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addSecondProductToCart1">
93+
<argument name="product" value="$$createVirtualProduct$$"/>
94+
</actionGroup>
95+
<!-- Assert that table rate value is correct for US -->
96+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goAgainToCheckout"/>
97+
<waitForElementVisible selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" stepKey="seeEstimateShippingandTax1"/>
98+
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.country}}" visible="false" stepKey="expandToEstimateShippingandTax1"/>
99+
<grabValueFrom selector="{{CheckoutCartSummarySection.shippingPrice}}" stepKey="grabShippingForUS1"/>
100+
<waitForText selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$grabShippingForUS1" stepKey="seeShippingForUS"/>
101+
<!-- Customer Click On Mini Cart -->
102+
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>
103+
<!--Remove an item from the cart using minicart-->
104+
<actionGroup ref="RemoveProductFromMiniCartActionGroup" stepKey="removeProductFromMiniCart">
105+
<argument name="productName" value="$$createFirstSimpleProduct.name$$"/>
106+
</actionGroup>
107+
<!-- Add simple product to cart -->
108+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addAnotherProductToCart">
109+
<argument name="product" value="$$createSecondSimpleProduct$$"/>
110+
</actionGroup>
111+
<!-- Assert that table rate value is correct for US -->
112+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="navigateToToCheckout"/>
113+
<waitForElementVisible selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" stepKey="seeEstimateShippingandTax2"/>
114+
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.country}}" visible="false" stepKey="expandEstimateShippingPrice"/>
115+
<grabValueFrom selector="{{CheckoutCartSummarySection.shippingPrice}}" stepKey="grabTableratePrice1"/>
116+
<waitForText selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$grabTableratePrice1" stepKey="seeShippingForUS2"/>
117+
<!-- Assert product details in Mini Cart -->
118+
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart1"/>
119+
<!--Remove an item from the cart using minicart-->
120+
<actionGroup ref="RemoveProductFromMiniCartActionGroup" stepKey="removeProductFromMiniCart1">
121+
<argument name="productName" value="$$createSecondSimpleProduct.name$$"/>
122+
</actionGroup>
123+
<!-- Add simple product to cart -->
124+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addAnotherProductIntoCart">
125+
<argument name="product" value="$$createThirdSimpleProduct$$"/>
126+
</actionGroup>
127+
<!-- Assert that table rate value is correct for US -->
128+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="navigateAgainToToCheckout"/>
129+
<waitForElementVisible selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" stepKey="seeEstimateShippingandTax3"/>
130+
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.country}}" visible="false" stepKey="expandEstimateShippingPrice1"/>
131+
<waitForText selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$4.99" stepKey="seeShippingForUS3"/>
132+
<!-- Assert product details in Mini Cart -->
133+
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart2"/>
134+
<!--Remove an item from the cart using minicart-->
135+
<actionGroup ref="RemoveProductFromMiniCartActionGroup" stepKey="removeProductFromMiniCart3">
136+
<argument name="productName" value="$$createThirdSimpleProduct.name$$"/>
137+
</actionGroup>
138+
<!-- Assert that table rate value is correct for US -->
139+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="navigateAgainToToCheckout1"/>
140+
<waitForElementVisible selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" stepKey="seeEstimateShippingandTax4"/>
141+
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.country}}" visible="false" stepKey="expandEstimateShippingPrice2"/>
142+
<waitForElementNotVisible selector="{{CheckoutCartSummarySection.shippingPrice}}" stepKey="dontSeeShippingPriceForUS"/>
143+
<actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openAgainShippingMethodConfigPage"/>
144+
<actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="AdminSwitchStoreView1">
145+
<argument name="website" value="_defaultWebsite"/>
146+
</actionGroup>
147+
<selectOption selector="{{AdminShippingMethodTableRatesSection.carriersTableRateIncludeVirtualPriceDropdown}}" userInput="Yes" stepKey="setIncludeVirtualPriceAsYes"/>
148+
<actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfig"/>
149+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="navigateToStorefront"/>
150+
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart3"/>
151+
<!--Remove an item from the cart using minicart-->
152+
<actionGroup ref="RemoveProductFromMiniCartActionGroup" stepKey="removeVirtualProductFromMiniCart">
153+
<argument name="productName" value="$$createVirtualProduct.name$$"/>
154+
</actionGroup>
155+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addSimpleProductToCart">
156+
<argument name="product" value="$$createFirstSimpleProduct$$"/>
157+
</actionGroup>
158+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goAgainToCheckout3"/>
159+
<waitForElementVisible selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" stepKey="seeEstimateShippingandTax5"/>
160+
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.country}}" visible="false" stepKey="expandEstimateShippingandTax1" />
161+
<grabValueFrom selector="{{CheckoutCartSummarySection.shippingPrice}}" stepKey="grabAgainTableratePrice"/>
162+
<waitForText selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$grabAgainTableratePrice" stepKey="seeShippingForUS5"/>
163+
<!-- Add Virtual product to cart -->
164+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addVirtualProductToCart">
165+
<argument name="product" value="$$createVirtualProduct$$"/>
166+
</actionGroup>
167+
<!-- Assert that table rate value is correct for US -->
168+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goAgainToCheckout2"/>
169+
<waitForElementVisible selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" stepKey="seeEstimateShippingandTax6"/>
170+
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.country}}" visible="false" stepKey="expandEstimateTableRatePrice"/>
171+
<waitForText selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$4.99" stepKey="seeShippingForUS4"/>
172+
</test>
173+
</tests>

app/code/Magento/Shipping/Test/Mftf/Section/AdminShippingMethodTableRatesSection.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88

@@ -22,5 +22,6 @@
2222
<element name="carriersTableRateSpecificErrMsg" type="input" selector="#carriers_tablerate_specificerrmsg_inherit"/>
2323
<element name="carriersTableRateAllowSpecific" type="input" selector="#carriers_tablerate_sallowspecific_inherit"/>
2424
<element name="carriersTableRateSpecificCountry" type="input" selector="#carriers_tablerate_specificcountry"/>
25+
<element name="carriersTableRateIncludeVirtualPriceDropdown" type="select" selector="#carriers_tablerate_include_virtual_price"/>
2526
</section>
2627
</sections>

0 commit comments

Comments
 (0)