<?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="AdminOpenUserEditPageActionGroup">
        <arguments>
            <argument name="user" type="entity" />
        </arguments>

        <amOnPage url="{{AdminUsersPage.url}}" stepKey="openAdminUsersPage"/>
        <waitForPageLoad stepKey="waitForPageToLoad"/>
        <click selector="{{AdminLegacyDataGridFilterSection.clear}}" stepKey="resetFilters" />
        <waitForPageLoad stepKey="waitForPageToLoadAfterFilterReset"/>
        <fillField selector="{{AdminLegacyDataGridFilterSection.inputFieldByNameAttr('username')}}" userInput="{{user.username}}" stepKey="fillSearchUsernameFilter"/>
        <click selector="{{AdminLegacyDataGridFilterSection.apply}}" stepKey="clickSearch" />
        <waitForPageLoad stepKey="waitForGridToLoad"/>

        <click selector="{{AdminLegacyDataGridTableSection.rowTemplateStrict(user.username)}}" stepKey="openUserEdit"/>
        <waitForPageLoad stepKey="waitForUserEditPageLoad"/>
    </actionGroup>
</actionGroups>
