Skip to content

Commit 8797202

Browse files
Merge branch 'ACQE-8182' into ACQE-functional-deployment-v7
2 parents d421f7f + 608f184 commit 8797202

File tree

4 files changed

+93
-0
lines changed

4 files changed

+93
-0
lines changed

app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,4 +1604,8 @@
16041604
<requiredEntity type="product_option">ProductOptionField20</requiredEntity>
16051605
<requiredEntity type="product_option">ProductOptionField21</requiredEntity>
16061606
</entity>
1607+
<entity name="productWithCheckboxCustomOptions" type="product">
1608+
<var key="sku" entityType="product" entityKey="sku"/>
1609+
<requiredEntity type="product_option">ProductOptionCheckboxFor2</requiredEntity>
1610+
</entity>
16071611
</entities>

app/code/Magento/Catalog/Test/Mftf/Data/ProductFormData.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@
1212
<data key="remove_image_notice">The image cannot be removed as it has been assigned to the other image role</data>
1313
<data key="save_success">You saved the product.</data>
1414
</entity>
15+
<entity name="ProductWarningMessage" type="message">
16+
<data key="require_Message">This is a required field.</data>
17+
</entity>
1518
</entities>
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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="StorefrontVerifyProductReorderWithCustomOptionTest">
12+
<annotations>
13+
<features value="Catalog"/>
14+
<stories value="Reorder product with custom option"/>
15+
<title value="Customer should be able to reorder product with a selected custom checkbox option"/>
16+
<description value="Verifies that a customer can reorder a product where one custom checkbox option was selected during the original purchase."/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="AC-13538"/>
19+
<group value="Catalog"/>
20+
</annotations>
21+
<before>
22+
<!-- Precondition: Create customer -->
23+
<createData entity="Simple_US_Customer_NY" stepKey="createCustomer"/>
24+
<!-- Step1&2&3: Create product with checkbox two custom options -->
25+
<createData entity="SimpleProduct2" stepKey="createSimpleProduct"/>
26+
<updateData entity="productWithCheckboxCustomOptions" createDataKey="createSimpleProduct" stepKey="addCustomOptions">
27+
<requiredEntity createDataKey="createSimpleProduct"/>
28+
</updateData>
29+
</before>
30+
<after>
31+
<!-- Customer logout -->
32+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
33+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
34+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
35+
</after>
36+
<!-- Step4: Login as a customer -->
37+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
38+
<argument name="Customer" value="$createCustomer$"/>
39+
</actionGroup>
40+
<!-- Step5: Open Product Page-->
41+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProductPage">
42+
<argument name="product" value="$createSimpleProduct$"/>
43+
</actionGroup>
44+
<!-- Add Product to Cart from product detail page -->
45+
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addToCart"/>
46+
<!-- see custom option validation message -->
47+
<waitForText userInput="{{ProductWarningMessage.require_Message}}" stepKey="seeRequiredField"/>
48+
<!-- Choose checkbox value1 -->
49+
<actionGroup ref="StorefrontAddSimpleProductCustomOptionCheckBoxActionGroup" stepKey="selectCustomOptionCheckBoxForValue1"/>
50+
<!-- Step6: place order -->
51+
<actionGroup ref="StorefrontProductPageAddSimpleProductToCartActionGroup" stepKey="addSimpleProductToCart"/>
52+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="clickToProceedToCheckout"/>
53+
<actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/>
54+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNextOnShippingStep"/>
55+
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrder"/>
56+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlaceOrder"/>
57+
<!-- Step7: Go to order page -->
58+
<actionGroup ref="StorefrontOpenMyAccountPageActionGroup" stepKey="goToMyAccountPage"/>
59+
<actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="goToSidebarMenu">
60+
<argument name="menu" value="{{sidebarTabMenu.my_orders}}"/>
61+
</actionGroup>
62+
<!-- Clicking View Order from My Orders Grid -->
63+
<actionGroup ref="StorefrontClickViewOrderLinkOnMyOrdersPageActionGroup" stepKey="clickViewOrder"/>
64+
<!-- Clicking on Reorder link from Order Details Tab -->
65+
<waitForElementClickable selector="{{StorefrontCustomerOrderViewSection.reorder}}" stepKey="waitForReorderButtonToBeClickable"/>
66+
<click selector="{{StorefrontCustomerOrderViewSection.reorder}}" stepKey="clickReorder"/>
67+
<actionGroup ref="StorefrontCheckoutCheckProductActionGroup" stepKey="checkProduct">
68+
<argument name="product" value="$$createSimpleProduct$$"/>
69+
<argument name="cartItem" value="SimpleCartItem"/>
70+
</actionGroup>
71+
</test>
72+
</tests>
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 2025 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
9+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="sidebarTabMenu">
12+
<data key="my_orders">My Orders</data>
13+
</entity>
14+
</entities>

0 commit comments

Comments
 (0)