<?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="AdminNavigateToProductAttributeEditPageActionGroup">
        <annotations>
            <description>Navigate to the given product attribute edit page by attribute label</description>
        </annotations>
        <arguments>
            <argument name="ProductAttributeLabel" type="string"/>
        </arguments>

        <amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="navigateToProductAttributeGrid"/>
        <fillField selector="{{AdminProductAttributeGridSection.GridFilterFrontEndLabel}}" userInput="{{ProductAttributeLabel}}" stepKey="fillTheAttributesFilterByLabel"/>
        <click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="clickTheSearchButton"/>
        <waitForPageLoad stepKey="waitForSearchToComplete"/>
        <click selector="{{AdminProductAttributeGridSection.FirstRow}}" stepKey="clickOnTheFirstSearchResultRow"/>
        <waitForPageLoad stepKey="waitForAttribiteEditPageToLoad"/>
    </actionGroup>
</actionGroups>
