<?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="FilterInvoiceGridByOrderIdActionGroup">
        <annotations>
            <description>Goes to the Admin Invoices grid page. Filters the grid for the provided Order ID.</description>
        </annotations>
        <arguments>
            <argument name="orderId" type="string"/>
        </arguments>

        <amOnPage url="{{AdminInvoicesPage.url}}" stepKey="goToInvoices"/>
        <click selector="{{AdminInvoicesGridSection.filter}}" stepKey="clickFilter"/>
        <fillField selector="{{AdminInvoicesFiltersSection.orderNum}}" userInput="{{orderId}}" stepKey="fillOrderIdForFilter"/>
        <click selector="{{AdminInvoicesFiltersSection.applyFilters}}" stepKey="clickApplyFilters"/>
        <waitForPageLoad stepKey="waitForFiltersApply"/>
    </actionGroup>
</actionGroups>
