<?xml version="1.0" encoding="UTF-8"?>
<!--
 /**
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
    <actionGroup name="AdminAssertRefundOrderStatusCommentsHistoryActionGroup">
        <annotations>
            <description>Clicks on the 'Comments History' on Admin View Order page. Validates that the provided Order Status and Refund message are present and correct.</description>
        </annotations>
        <arguments>
            <argument name="orderStatus" type="string"/>
            <argument name="refundMessage" type="string"/>
        </arguments>
        
        <!-- Assert refund order status in Comments History -->
        <click selector="{{AdminOrderDetailsOrderViewSection.commentsHistory}}" stepKey="clickOnTabCommentsHistory"/>
        <waitForPageLoad stepKey="waitForComments"/>
        <see userInput="{{orderStatus}}" selector="{{AdminOrderCommentsTabSection.orderNotesList}}" stepKey="assertRefundOrderStatusInCommentsHistory"/>
        <see userInput="{{refundMessage}}" selector="{{AdminOrderCommentsTabSection.orderComment}}" stepKey="assertOrderStatus"/>
    </actionGroup>
</actionGroups>
