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

  This code snippet is ported from Magento 2.3 core for backward-compatibility
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
    <actionGroup name="AdminOrderCreateBeginAddingGroupedProductActionGroup">
        <arguments>
            <argument name="product"/>
            <argument name="exampleOption"/>
        </arguments>

        <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/>
        <fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilterGrouped"/>
        <click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchGrouped"/>
        <scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/>
        <checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectGroupedProduct"/>
        <waitForElementVisible selector="{{AdminOrderFormGroupedProductSection.optionQty(exampleOption.sku)}}" stepKey="waitForGroupedOptionLoad"/>
        <wait time="2" stepKey="waitForOptionsToLoad"/>
    </actionGroup>
</actionGroups>
