<?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">
    <!--Filter customer grid by the email -->
    <actionGroup name="AdminFilterCustomerGridByEmail">
        <annotations>
            <description>Filters the Admin Customers grid by the provided Email Address.</description>
        </annotations>
        <arguments>
            <argument name="email" type="string"/>
        </arguments>

        <click selector="{{AdminCustomerFiltersSection.filtersButton}}" stepKey="openFilters"/>
        <conditionalClick selector="{{AdminCustomerFiltersSection.clearAll}}" dependentSelector="{{AdminCustomerFiltersSection.clearAll}}" visible="true" stepKey="clickClearFilters"/>
        <waitForPageLoad stepKey="waitForClearFilters"/>
        <fillField selector="{{AdminCustomerFiltersSection.emailInput}}" userInput="{{email}}" stepKey="fillEmail"/>
        <click selector="{{AdminCustomerFiltersSection.apply}}" stepKey="clickApplyFilters"/>
        <waitForPageLoad stepKey="waitForPageToLoad"/>
    </actionGroup>
</actionGroups>
