<?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="FindProductToEditActionGroup">
        <annotations>
            <description>Clears the Backend Admin Grid Filters on the Backend Admin Product Grid page. Searches for the BundleProduct Data Entity. Then clicks on the first item in the Admin Grid. PLEASE NOTE: The Action Group values are Hardcoded.</description>
        </annotations>

        <amOnPage url="{{ProductCatalogPage.url}}" stepKey="GoToProductCatalog"/>
        <waitForPageLoad stepKey="WaitForCatalogProductPageToLoad"/>
        <conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial"/>
        <fillField userInput="{{BundleProduct.name}}" selector="#fulltext" stepKey="EnterProductNameInSearch"/>
        <click stepKey="ClickSearch" selector="{{AdminProductFormBundleSection.searchButton}}"/>
        <click stepKey="ClickOnProduct" selector="{{AdminProductFormBundleSection.firstCatalogProduct}}"/>
        <waitForPageLoad stepKey="WaitForProductEditPageToLoad"/>
    </actionGroup>
</actionGroups>
