Skip to content

Commit 8a5b779

Browse files
ACQE-7510 CustomerOrderCancellationInStatusProcessingTest
modified code to grad order entity id and open oprder using this id in admin
1 parent 344fce2 commit 8a5b779

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

app/code/Magento/OrderCancellationUi/Test/Mftf/Section/CustomerOrderCancellationSection.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 2023 Adobe
5-
* All Rights Reserved.
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
@@ -16,5 +16,6 @@
1616
<element name="referenceToLatestOrderId" type="text" selector=".table-order-items tr:first-child td.id" />
1717
<element name="messageAtTheTop" type="text" selector=".messages .message-error" />
1818
<element name="loadingMask" type="text" selector=".loading-mask" />
19+
<element name="linkToOpenViewOrder" type="button" selector=".actions .action.view" />
1920
</section>
2021
</sections>

app/code/Magento/OrderCancellationUi/Test/Mftf/Test/CustomerOrderCancellationInStatusProcessingTest.xml

Lines changed: 8 additions & 7 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 2023 Adobe
5-
* All Rights Reserved.
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
@@ -77,14 +77,15 @@
7777
<expectedResult type="string">Closed</expectedResult>
7878
<actualResult type="variable">$getLatestOrderStatus</actualResult>
7979
</assertEquals>
80-
80+
<!-- open order view page -->
81+
<click selector="{{CustomerOrderCancellationSection.linkToOpenViewOrder}}" stepKey="clickOnLinkToViewOrder"/>
8182
<!--Grab Order Id for later usage-->
82-
<grabTextFrom selector="{{CustomerOrderCancellationSection.referenceToLatestOrderId}}" stepKey="getOrderId"/>
83-
83+
<grabFromCurrentUrl regex="~/order_id/(\d+)/~" stepKey="getOrderId"/>
8484
<!--Go to Admin Sales Order View Page-->
85-
<amOnPage url="{{AdminSalesOrderViewPage.url({$getOrderId})}}" stepKey="navigateToSalesOrderViewPage"/>
85+
<actionGroup ref="AdminOpenOrderByEntityIdActionGroup" stepKey="navigateToSalesOrderViewPage">
86+
<argument name="entityId" value="{$getOrderId}"/>
87+
</actionGroup>
8688
<waitForPageLoad stepKey="waitForAdminSalesOrderViewPageLoad"/>
87-
8889
<!--Check Order History block-->
8990
<grabTextFrom selector="{{AdminSalesOrderViewSection.orderHistoryNoteListFirstComment}}" stepKey="getOrderCancellationReason"/>
9091
<assertEquals message="Order cancellation reason should be Other." stepKey="assertOrderCancellationReason" after="getOrderCancellationReason">

0 commit comments

Comments
 (0)