<?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="DeleteFolderActionGroup">
        <annotations>
            <description>Deletes the provided folder by name from the Media Gallery.</description>
        </annotations>
        <arguments>
            <argument name="ImageFolder" defaultValue="ImageFolder"/>
        </arguments>

        <click userInput="{{ImageFolder.name}}" stepKey="clickOnCreatedFolder"/>
        <waitForPageLoad stepKey="waitForLoading"/>
        <waitForText selector="{{MediaGallerySection.DeleteFolder}}" userInput="Delete Folder" stepKey="seeDeleteFolderBtn"/>
        <click selector="{{MediaGallerySection.DeleteFolder}}" stepKey="clickDeleteFolderBtn"/>
        <waitForText userInput="OK" stepKey="waitForConfirm"/>
        <click selector="{{MediaGallerySection.confirmDelete}}" stepKey="confirmDelete"/>
        <waitForPageLoad stepKey="waitForPopUpHide"/>
        <dontSeeElement selector="{{ImageFolder.name}}" stepKey="dontSeeFolderName"/>
    </actionGroup>
</actionGroups>
