Skip to content

Commit da627a0

Browse files
Merge branch 'ACQE-8465' into ACQE-functional-deployment-version15
2 parents 259041c + 6a96855 commit da627a0

File tree

2 files changed

+84
-2
lines changed

2 files changed

+84
-2
lines changed

app/code/Magento/Shipping/Test/Mftf/Data/USPSShippingMethodData.xml

Lines changed: 22 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

@@ -52,4 +52,24 @@
5252
<data key="label">No</data>
5353
<data key="value">0</data>
5454
</entity>
55+
<entity name="AdminEnableFreeMethodUSPSConfigData" type="usps_config">
56+
<data key="path">carriers/usps/free_method</data>
57+
<data key="value">7</data>
58+
</entity>
59+
<entity name="AdminDisableFreeMethodUSPSConfigData" type="usps_config">
60+
<data key="path">carriers/usps/free_method</data>
61+
<data key="value">0</data>
62+
</entity>
63+
<entity name="AdminEnableFreeShippingThresholdUSPSConfigData" type="usps_config">
64+
<data key="path">carriers/usps/free_shipping_enable</data>
65+
<data key="value">1</data>
66+
</entity>
67+
<entity name="AdminDisableFreeShippingThresholdUSPSConfigData" type="usps_config">
68+
<data key="path">carriers/usps/free_shipping_enable</data>
69+
<data key="value">0</data>
70+
</entity>
71+
<entity name="AdminFillFreeShippingAmountThresholdUSPSConfigData" type="usps_config">
72+
<data key="path">carriers/usps/free_shipping_subtotal</data>
73+
<data key="value">49</data>
74+
</entity>
5575
</entities>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
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="StorefrontVerifyUSPSShippingPriceIsZeroWhenFreeShippingThresholdEnabledTest">
12+
<annotations>
13+
<features value="Shipping"/>
14+
<stories value="USPS Shipping With Free Shipping Threshold Enabled"/>
15+
<title value="Customer able to see USPS shipping zero when free shipping threshold enabled"/>
16+
<description value="Verify in storefront USPS shipping for particular shipping method is showing zero when free shipping threshold is enabled"/>
17+
<testCaseId value="AC-15004"/>
18+
<severity value="MAJOR"/>
19+
<group value="3rd_party_integration"/>
20+
<group value="EnableUSPSShippingSuite"/>
21+
<group value="pr_exclude"/>
22+
</annotations>
23+
<before>
24+
<!-- Create product -->
25+
<createData entity="SimpleProduct" stepKey="createProduct">
26+
<field key="price">49.00</field>
27+
</createData>
28+
<!-- Step 1to3:Enable Free Method select any shipping method -->
29+
<magentoCLI command="config:set {{AdminEnableFreeMethodUSPSConfigData.path}} {{AdminEnableFreeMethodUSPSConfigData.value}}" stepKey="enableFreeMethodUSPS"/>
30+
<!-- Step 4:Enable Free Shipping Threshold -->
31+
<magentoCLI command="config:set {{AdminEnableFreeShippingThresholdUSPSConfigData.path}} {{AdminEnableFreeShippingThresholdUSPSConfigData.value}}" stepKey="enableFreeShippingThresholdUSPS"/>
32+
<!-- Step 5:Fill Free Shipping Amount Threshold add amount -->
33+
<magentoCLI command="config:set {{AdminFillFreeShippingAmountThresholdUSPSConfigData.path}} {{AdminFillFreeShippingAmountThresholdUSPSConfigData.value}}" stepKey="fillFreeShippingAmountThresholdUSPS"/>
34+
</before>
35+
<after>
36+
<!--delete product-->
37+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
38+
<!-- Disable Free Method select any shipping method -->
39+
<magentoCLI command="config:set {{AdminDisableFreeMethodUSPSConfigData.path}} {{AdminDisableFreeMethodUSPSConfigData.value}}" stepKey="disableFreeMethodUSPS"/>
40+
<!-- Disable Free Shipping Threshold -->
41+
<magentoCLI command="config:set {{AdminDisableFreeShippingThresholdUSPSConfigData.path}} {{AdminDisableFreeShippingThresholdUSPSConfigData.value}}" stepKey="disableFreeShippingThresholdUSPS"/>
42+
</after>
43+
<!-- Step 7:Navigate to storefront add product to cart and checkout to shipping page -->
44+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="navigateToProductPage">
45+
<argument name="productUrlKey" value="$createProduct.custom_attributes[url_key]$"/>
46+
</actionGroup>
47+
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart">
48+
<argument name="product" value="$createProduct$"/>
49+
<argument name="productCount" value="1"/>
50+
</actionGroup>
51+
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMiniCart"/>
52+
<actionGroup ref="GuestCheckoutFillNewShippingAddressActionGroup" stepKey="guestCheckoutFillingShippingSection">
53+
<argument name="customer" value="CustomerEntityOne"/>
54+
<argument name="address" value="CustomerAddressSimple"/>
55+
</actionGroup>
56+
<waitForPageLoad stepKey="waitForShippingPageToLoadShippingMethods"/>
57+
<!-- Step 8:Select USPS Shipping method which is configured with free shipping -->
58+
<checkOption selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('Library Mail Parcel')}}" stepKey="checkUSPSLibraryMailParcelShippingMethod"/>
59+
<!-- Step 9:Check shipping price is showing Zero -->
60+
<waitForText selector="{{CheckoutShippingMethodsSection.shippingRatePriceByName('Library Mail Parcel')}}" userInput="$0.00" stepKey="assertUSPSLibraryMailParcelShippingMethodPriceAsZero"/>
61+
</test>
62+
</tests>

0 commit comments

Comments
 (0)