Skip to content

Commit 4b38a66

Browse files
Merge branch 'ACQE-9047' into ACQE-functional-deployment-v4-7
2 parents 9f34178 + 07c56c6 commit 4b38a66

File tree

1 file changed

+119
-0
lines changed

1 file changed

+119
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
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="AdminVerifyOriginalPriceForProductWithCustomizableOptionInMultishippingOrderTest">
12+
<annotations>
13+
<features value="Multishipping"/>
14+
<stories value="Verify original price for products with customizable options in multishipping orders"/>
15+
<title value="Admin should display correct original price for products with customizable options in multishipping orders"/>
16+
<description value="Verify original price displays correctly in admin for multishipping orders with products having special price and customizable options"/>
17+
<severity value="AVERAGE"/>
18+
<testCaseId value="AC-15747"/>
19+
<group value="multishipping"/>
20+
</annotations>
21+
<before>
22+
<!-- Create customer with two addresses -->
23+
<createData entity="Simple_US_Customer_Two_Addresses" stepKey="createCustomer"/>
24+
<!-- Create product with special price -->
25+
<createData entity="SimpleProductWithSpecialPrice" stepKey="createProductWithSpecialPrice"/>
26+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
27+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage">
28+
<argument name="productId" value="$createProductWithSpecialPrice.id$"/>
29+
</actionGroup>
30+
<actionGroup ref="AddSpecialPriceToProductActionGroup" stepKey="addSpecialPrice">
31+
<argument name="price" value="{{SimpleProductWithSpecialPrice.special_price}}"/>
32+
</actionGroup>
33+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
34+
<!-- Create product with customizable option -->
35+
<createData entity="ApiSimpleProduct" stepKey="createProductWithCustomOption">
36+
<field key="price">50.00</field>
37+
</createData>
38+
<!-- add customizable option to product -->
39+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openProductWithCustomOptionEditPage">
40+
<argument name="productId" value="$createProductWithCustomOption.id$"/>
41+
</actionGroup>
42+
<actionGroup ref="AddProductCustomOptionFieldActionGroup" stepKey="addCustomOption">
43+
<argument name="option" value="ProductOptionField"/>
44+
</actionGroup>
45+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductWithCustomOption"/>
46+
</before>
47+
<after>
48+
<!-- Delete created data -->
49+
<deleteData createDataKey="createProductWithSpecialPrice" stepKey="deleteProductWithSpecialPrice"/>
50+
<deleteData createDataKey="createProductWithCustomOption" stepKey="deleteProductWithCustomOption"/>
51+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
52+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
53+
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrderFilters"/>
54+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAdmin"/>
55+
</after>
56+
<!-- Login as customer on storefront -->
57+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefront">
58+
<argument name="Customer" value="$createCustomer$"/>
59+
</actionGroup>
60+
<!-- Add product with special price to cart -->
61+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductWithSpecialPriceToCart">
62+
<argument name="product" value="$createProductWithSpecialPrice$"/>
63+
</actionGroup>
64+
<!-- Add product with customizable option to cart -->
65+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="navigateToProductWithCustomOption">
66+
<argument name="product" value="$createProductWithCustomOption$"/>
67+
</actionGroup>
68+
<fillField selector="{{StorefrontProductInfoMainSection.productOptionFieldInput(ProductOptionField.title)}}" userInput="Test Value" stepKey="fillCustomOptionField"/>
69+
<actionGroup ref="StorefrontAddToCartCustomOptionsProductPageActionGroup" stepKey="addProductWithCustomOptionToCart">
70+
<argument name="productName" value="$createProductWithCustomOption.name$"/>
71+
</actionGroup>
72+
<!-- Open cart and start multishipping checkout -->
73+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="openShoppingCartPage"/>
74+
<actionGroup ref="CheckingWithMultipleAddressesActionGroup" stepKey="checkoutWithMultipleAddresses"/>
75+
<click selector="{{ShippingMethodSection.goToBillingInfo}}" stepKey="clickContinue"/>
76+
<actionGroup ref="SelectBillingInfoActionGroup" stepKey="checkoutWithPaymentMethod"/>
77+
<actionGroup ref="ReviewOrderForMultiShipmentActionGroup" stepKey="reviewOrderForMultiShipment"/>
78+
<actionGroup ref="StorefrontPlaceOrderForMultipleAddressesActionGroup" stepKey="placeOrder">
79+
<argument name="firstOrderPosition" value="1"/>
80+
<argument name="secondOrderPosition" value="2"/>
81+
</actionGroup>
82+
<waitForPageLoad stepKey="waitForSuccessPage"/>
83+
<!-- Grab order IDs -->
84+
<grabTextFrom selector="{{StorefrontMultipleShippingMethodSection.orderId('1')}}" stepKey="grabFirstOrderId"/>
85+
<grabTextFrom selector="{{StorefrontMultipleShippingMethodSection.orderId('2')}}" stepKey="grabSecondOrderId"/>
86+
<!-- Verify first order in admin -->
87+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openFirstOrderInAdmin">
88+
<argument name="orderId" value="{$grabFirstOrderId}"/>
89+
</actionGroup>
90+
<scrollTo selector="{{AdminOrderItemsOrderedSection.productNameColumn}}" stepKey="scrollToOrderItemsForFirstOrder"/>
91+
<waitForElementVisible selector="{{AdminOrderItemsOrderedSection.itemProductName('1')}}" stepKey="waitForFirstOrderProductName"/>
92+
<!-- Verify original price for product in first order -->
93+
<grabTextFrom selector="{{AdminOrderItemsOrderedSection.itemOriginalPrice('1')}}" stepKey="grabOriginalPriceForSpecialPriceProduct"/>
94+
<assertStringContainsString stepKey="verifyOriginalPriceForSpecialPriceProduct">
95+
<expectedResult type="string">$100.00</expectedResult>
96+
<actualResult type="variable">grabOriginalPriceForSpecialPriceProduct</actualResult>
97+
</assertStringContainsString>
98+
<!-- Verify second order in admin -->
99+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openSecondOrderInAdmin">
100+
<argument name="orderId" value="{$grabSecondOrderId}"/>
101+
</actionGroup>
102+
<scrollTo selector="{{AdminOrderItemsOrderedSection.productNameColumn}}" stepKey="scrollToOrderItemsForSecondOrder"/>
103+
<waitForElementVisible selector="{{AdminOrderItemsOrderedSection.itemProductName('1')}}" stepKey="waitForSecondOrderProductName"/>
104+
<!-- Verify original price and price for product with customizable option in second order -->
105+
<grabTextFrom selector="{{AdminOrderItemsOrderedSection.itemOriginalPrice('1')}}" stepKey="grabOriginalPriceForCustomOptionProduct"/>
106+
<!-- Critical assertion: Original price should NOT be $0.00 for product with customizable option -->
107+
<assertStringContainsString stepKey="verifyOriginalPriceIsNotZero">
108+
<expectedResult type="string">$50.00</expectedResult>
109+
<actualResult type="variable">grabOriginalPriceForCustomOptionProduct</actualResult>
110+
</assertStringContainsString>
111+
<assertStringNotContainsString stepKey="verifyOriginalPriceIsNotDisplayingAsZero">
112+
<expectedResult type="string">$0.00</expectedResult>
113+
<actualResult type="variable">grabOriginalPriceForCustomOptionProduct</actualResult>
114+
</assertStringNotContainsString>
115+
<!-- Verify customizable option is displayed in order items -->
116+
<waitForText selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="{{ProductOptionField.title}}" stepKey="verifyCustomOptionTitle"/>
117+
<waitForText selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="Test Value" stepKey="verifyCustomOptionValue"/>
118+
</test>
119+
</tests>

0 commit comments

Comments
 (0)