<?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="AdminDeleteCreatedColorAttributeActionGroup" >
        <annotations>
            <description>Delete the created new colors in color attribute</description>
        </annotations>
        <arguments>
            <argument name="Color" type="string"/>
        </arguments>
        <amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="navigateToProductAttributeGrid"/>
        <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearExistingFilters"/>
        <fillField selector="{{AdminProductAttributeGridSection.FilterByAttributeCode}}" userInput="Color" stepKey="setAttributeCode"/>
        <click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="searchForAttributeFromTheGrid"/>
        <click selector="{{AdminProductAttributeGridSection.FirstRow}}" stepKey="clickOnAttributeRow"/>
        <waitForPageLoad stepKey="waitForPageLoad2"/>
        <click selector="{{AdminColorGridBodySection.deleteColor(Color)}}" stepKey="deleteColor"/>
        <click selector="{{AttributePropertiesSection.Save}}" stepKey="saveTheDeletedColor"/>
        <see userInput="You saved the product attribute." stepKey="seeSuccessMessage"/>
    </actionGroup>
</actionGroups>
