<?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="UnassignAttributeFromGroupActionGroup">
        <annotations>
            <description>Unassign the provided Attribute from an Attribute Set from the Attribute Sets creation/edit page.</description>
        </annotations>
        <arguments>
            <argument name="group" type="string"/>
            <argument name="attribute" type="string"/>
        </arguments>

        <conditionalClick selector="{{AdminProductAttributeSetEditSection.attributeGroupExtender(group)}}" dependentSelector="{{AdminProductAttributeSetEditSection.attributeGroupCollapsed(group)}}" visible="true" stepKey="extendGroup"/>
        <waitForPageLoad stepKey="waitForPageLoad1"/>
        <dragAndDrop selector1="{{AdminProductAttributeSetEditSection.assignedAttribute(attribute)}}" selector2="{{AdminProductAttributeSetEditSection.xThLineItemUnassignedAttribute('1')}}" stepKey="dragAndDropToUnassigned"/>
        <waitForPageLoad stepKey="waitForPageLoad2"/>
        <see userInput="{{attribute}}" selector="{{AdminProductAttributeSetEditSection.unassignedAttributesTree}}" stepKey="seeAttributeInUnassigned"/>
    </actionGroup>
</actionGroups>
