File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
app/code/Magento/OrderCancellationUi/Test/Mftf Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<!--
3
3
/**
4
- * Copyright 2023 Adobe
5
- * All Rights Reserved.
4
+ * Copyright 2025 Adobe
5
+ * All Rights Reserved.
6
6
*/
7
7
-->
8
8
<sections xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Page/etc/SectionObject.xsd" >
16
16
<element name =" referenceToLatestOrderId" type =" text" selector =" .table-order-items tr:first-child td.id" />
17
17
<element name =" messageAtTheTop" type =" text" selector =" .messages .message-error" />
18
18
<element name =" loadingMask" type =" text" selector =" .loading-mask" />
19
+ <element name =" linkToOpenViewOrder" type =" button" selector =" .actions .action.view" />
19
20
</section >
20
21
</sections >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<!--
3
3
/**
4
- * Copyright 2023 Adobe
5
- * All Rights Reserved.
4
+ * Copyright 2025 Adobe
5
+ * All Rights Reserved.
6
6
*/
7
7
-->
8
8
<tests xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Test/etc/testSchema.xsd" >
77
77
<expectedResult type =" string" >Closed</expectedResult >
78
78
<actualResult type =" variable" >$getLatestOrderStatus</actualResult >
79
79
</assertEquals >
80
-
80
+ <!-- open order view page -->
81
+ <click selector =" {{CustomerOrderCancellationSection.linkToOpenViewOrder}}" stepKey =" clickOnLinkToViewOrder" />
81
82
<!-- Grab Order Id for later usage-->
82
- <grabTextFrom selector =" {{CustomerOrderCancellationSection.referenceToLatestOrderId}}" stepKey =" getOrderId" />
83
-
83
+ <grabFromCurrentUrl regex =" ~/order_id/(\d+)/~" stepKey =" getOrderId" />
84
84
<!-- 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 >
86
88
<waitForPageLoad stepKey =" waitForAdminSalesOrderViewPageLoad" />
87
-
88
89
<!-- Check Order History block-->
89
90
<grabTextFrom selector =" {{AdminSalesOrderViewSection.orderHistoryNoteListFirstComment}}" stepKey =" getOrderCancellationReason" />
90
91
<assertEquals message =" Order cancellation reason should be Other." stepKey =" assertOrderCancellationReason" after =" getOrderCancellationReason" >
You can’t perform that action at this time.
0 commit comments