<?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="AdminInvoiceWithUpdatedProductQtyActionGroup" extends="AdminCreateInvoiceActionGroup">
         <annotations>
            <description>Start order Invoicing.
                         Update product qty to invoice (there is one product in the Order).
                         Submit the invoice.
            </description>
        </annotations>
        <arguments>
            <argument name="qty" type="string"/>
        </arguments>

        <fillField selector="{{AdminInvoiceItemsSection.qtyToInvoiceColumn}}" userInput="{{qty}}" stepKey="fillQtyField" after="waitForInvoicePage"/>
        <click selector="{{AdminInvoiceItemsSection.updateQty}}" stepKey="clickUpdateQuantityButton" after="fillQtyField"/>
        <waitForPageLoad stepKey="waitForPageRefreshed" after="clickUpdateQuantityButton"/>
    </actionGroup>
</actionGroups>
