<?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="AdminAddOptionForDropdownAttributeActionGroup">
        <annotations>
            <description>Click on new value of selector attribute and fill the values for storefront view, and admin product edit page</description>
        </annotations>
        <arguments>
            <argument name="storefrontViewAttributeValue" defaultValue="{{ProductAttributeOption8.label}}" type="string" />
            <argument name="adminAttributeValue" defaultValue="{{ProductAttributeOption8.label}}" type="string" />
            <argument name="rowNumber" defaultValue="0" type="string"/>
        </arguments>
        <scrollTo selector="{{AdminCreateNewProductAttributeSection.addValue}}" stepKey="scrollToOption"/>
        <click selector="{{AdminCreateNewProductAttributeSection.addValue}}" stepKey="clickOnAddValueButton"/>
        <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.defaultStoreView(rowNumber)}}" stepKey="waitForDefaultStoreViewToVisible"/>
        <fillField selector="{{AdminCreateNewProductAttributeSection.defaultStoreView(rowNumber)}}" userInput="{{storefrontViewAttributeValue}}" stepKey="fillDefaultStoreView"/>
        <fillField selector="{{AdminCreateNewProductAttributeSection.adminOption(rowNumber)}}" userInput="{{adminAttributeValue}}" stepKey="fillAdminField"/>
    </actionGroup>
</actionGroups>
