Skip to content

Commit ff7445a

Browse files
Merge branch 'ACQE-8470-1' into ACQE-functional-deployment-v3-4
2 parents c83f178 + 1e04ada commit ff7445a

File tree

3 files changed

+69
-2
lines changed

3 files changed

+69
-2
lines changed

app/code/Magento/Sales/Test/Mftf/Data/ConstData.xml

Lines changed: 6 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 2018 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88

@@ -13,4 +13,8 @@
1313
<data key="two">2</data>
1414
<data key="fifty">50</data>
1515
</entity>
16+
<entity name="OrderLinks" type="constant">
17+
<data key="linkToNewOrder">Link to the New Order</data>
18+
<data key="linkToPreviousOrder">Link to the Previous Order</data>
19+
</entity>
1620
</entities>

app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsMainActionsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@
3131
<element name="void" type="button" selector="#void_payment span"/>
3232
<element name="invoiceTabContent1" type="text" selector="#sales_order_view_tabs_order_invoices_content > div > div.admin__data-grid-wrap > table > tbody > tr > td"/>
3333
<element name="creditMemoWarning" type="text" selector="//div[@class='modal-content']//div[text()='This will create an offline refund. To create an online refund, open an invoice and create credit memo for it. Do you want to continue?']"/>
34+
<element name="linkOrder" type="text" selector="//*[@id='sales_order_view_tabs_order_info_content']//table[contains(@class,'order-information-table')]/tbody//tr//th[text()='{{orderInfo}}']/following-sibling::td//a" parameterized="true"/>
3435
</section>
3536
</sections>
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="AdminOrderEditParentChildOrderLinksTest">
12+
<annotations>
13+
<features value="Sales"/>
14+
<title value="Admin can see parent-child order links when editing and submitting an order"/>
15+
<stories value="Order parent-child link display"/>
16+
<description value="Test that parent-child order links are shown after editing and submitting an order."/>
17+
<severity value="MINOR"/>
18+
<testCaseId value="AC-8706"/>
19+
<group value="Sales"/>
20+
</annotations>
21+
<before>
22+
<!-- Create product and customer -->
23+
<createData entity="SimpleProduct2" stepKey="createProduct"/>
24+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
25+
<!-- Login to Admin page -->
26+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
27+
<!-- Precondition 2: Create order in admin -->
28+
<actionGroup ref="CreateOrderActionGroup" stepKey="createOrder">
29+
<argument name="product" value="$$createProduct$$"/>
30+
<argument name="customer" value="$$createCustomer$$"/>
31+
</actionGroup>
32+
</before>
33+
<after>
34+
<!-- Clean up test data -->
35+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
36+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
37+
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
38+
</after>
39+
<!-- Grab original order ID -->
40+
<grabTextFrom selector="{{AdminOrderDetailsInformationSection.orderId}}" stepKey="grabOriginalOrderId"/>
41+
<!-- Step 1: Go to sales >> order and open the original order -->
42+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOriginalOrderInAdmin">
43+
<argument name="orderId" value="{$grabOriginalOrderId}"/>
44+
</actionGroup>
45+
<!-- Step 2: Edit the order -->
46+
<waitForElementClickable selector="{{AdminOrderDetailsMainActionsSection.edit}}" stepKey="waitForClickEditOrderButton"/>
47+
<click selector="{{AdminOrderDetailsMainActionsSection.edit}}" stepKey="clickEditOrderButton"/>
48+
<waitForElementClickable selector="{{AdminOrderDetailsMainActionsSection.ok}}" stepKey="waitForEditOrderConfirmation"/>
49+
<click selector="{{AdminOrderDetailsMainActionsSection.ok}}" stepKey="confirmEditOrder"/>
50+
<!-- Step 3: Submit edited order -->
51+
<waitForElementClickable selector="{{OrdersGridSection.submitOrder}}" stepKey="waitForSubmitEditedOrder"/>
52+
<click selector="{{OrdersGridSection.submitOrder}}" stepKey="submitEditedOrder"/>
53+
<!-- Step 4: Verify the link is displayed on child order view to parent order -->
54+
<grabTextFrom selector="{{AdminOrderDetailsInformationSection.orderId}}" stepKey="grabNewOrderId"/>
55+
<waitForText userInput="$grabOriginalOrderId" selector="{{AdminOrderDetailsMainActionsSection.linkOrder(OrderLinks.linkToPreviousOrder)}}" stepKey="assertPreviousOrder"/>
56+
<!-- Step 5: Verify the link is displayed on parent order view to new order -->
57+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOriginalOrderInAdminAgain">
58+
<argument name="orderId" value="{$grabOriginalOrderId}"/>
59+
</actionGroup>
60+
<waitForText userInput="$grabNewOrderId" selector="{{AdminOrderDetailsMainActionsSection.linkOrder(OrderLinks.linkToNewOrder)}}" stepKey="assertNewOrder"/>
61+
</test>
62+
</tests>

0 commit comments

Comments
 (0)