<?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="OpenCatalogPriceRuleActionGroup">
        <arguments>
            <argument name="ruleName" type="string" defaultValue="CustomCatalogRule.name"/>
        </arguments>
        <amOnPage url="{{AdminCatalogPriceRuleGridPage.url}}" stepKey="goToAdminCatalogPriceRuleGridPage"/>
        <waitForPageLoad stepKey="waitForAdminCatalogPriceRuleGridPageLoad"/>
        <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearExistingFilters"/>
        <fillField selector="{{AdminCatalogPriceRuleGridSection.filterByRuleName}}" userInput="{{ruleName}}" stepKey="filterByRuleName"/>
        <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickSearch"/>
        <click selector="{{AdminGridTableSection.row('1')}}" stepKey="clickEdit"/>
        <waitForPageLoad stepKey="waitForPageLoad"/>
    </actionGroup>
</actionGroups>
