Skip to content

Commit cdf9654

Browse files
ACQE-8470: Reorder the previously created order and verify the parent child relation in the order view page.
- Add waitForElementClickable before click and optimise the selector.
1 parent 617a1b8 commit cdf9654

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
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="linkToNewOrder" type="text" selector="//*[@id='sales_order_view_tabs_order_info_content']/section[1]/div[2]/div[1]/div[2]/table/tbody/tr[4]/th"/>
35-
<element name="linkToPreviousOrder" type="text" selector="//*[@id='sales_order_view_tabs_order_info_content']/section[1]/div[2]/div[1]/div[2]/table/tbody/tr[4]/th"/>
34+
<element name="linkToNewOrder" type="text" selector="//th[text()='Link to the New Order']"/>
35+
<element name="linkToPreviousOrder" type="text" selector="//th[text()='Link to the Previous Order']"/>
3636
</section>
3737
</sections>

app/code/Magento/Sales/Test/Mftf/Test/AdminOrderEditParentChildOrderLinksTest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@
5050
<argument name="orderId" value="{$grabOriginalOrderId}"/>
5151
</actionGroup>
5252
<!-- Step 2: Edit the order -->
53+
<waitForElementClickable selector="{{AdminOrderDetailsMainActionsSection.edit}}" stepKey="waitForClickEditOrderButton"/>
5354
<click selector="{{AdminOrderDetailsMainActionsSection.edit}}" stepKey="clickEditOrderButton"/>
54-
<waitForElement selector="{{AdminOrderDetailsMainActionsSection.ok}}" time="30" stepKey="waitForEditOrderConfirmation"/>
55+
<waitForElementClickable selector="{{AdminOrderDetailsMainActionsSection.ok}}" time="30" stepKey="waitForEditOrderConfirmation"/>
5556
<click selector="{{AdminOrderDetailsMainActionsSection.ok}}" stepKey="confirmEditOrder"/>
5657
<!-- Step 3: Submit edited order -->
58+
<waitForElementClickable selector="{{OrdersGridSection.submitOrder}}" stepKey="waitForSubmitEditedOrder"/>
5759
<click selector="{{OrdersGridSection.submitOrder}}" stepKey="submitEditedOrder"/>
5860
<!-- Step 4: Verify the link is displayed on child order view to parent order -->
5961
<grabTextFrom selector="{{AdminOrderDetailsMainActionsSection.linkToPreviousOrder}}" stepKey="grabLinkToPreviousOrderText"/>

0 commit comments

Comments
 (0)