<?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="AdminAddImageToCMSBlockContent">
        <arguments>
            <argument name="image" type="entity" defaultValue="MagentoLogo"/>
        </arguments>
        <click selector="{{TinyMCESection.InsertImageIcon}}" stepKey="clickAddImageButton"/>
        <waitForElementVisible selector="{{MediaGallerySection.Browse}}" stepKey="waitForBrowseImage"/>
        <click  selector="{{MediaGallerySection.Browse}}" stepKey="clickBrowseImage"/>
        <waitForElementVisible selector="{{MediaGallerySection.StorageRootArrow}}" stepKey="waitForAttacheFiles"/>
        <waitForLoadingMaskToDisappear stepKey="waitForStorageRootLoadingMaskDisappear"/>
        <click  selector="{{MediaGallerySection.StorageRootArrow}}" stepKey="clickRoot"/>
        <waitForPageLoad stepKey="waitForPageLoad"/>
        <attachFile selector="{{MediaGallerySection.BrowseUploadImage}}" userInput="{{image.file}}" stepKey="attachLogo"/>
        <waitForElementVisible selector="{{MediaGallerySection.InsertFile}}" stepKey="waitForAddSelected"/>
        <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear"/>
        <click  selector="{{MediaGallerySection.InsertFile}}" stepKey="clickAddSelected"/>
        <waitForElementVisible selector="{{MediaGallerySection.OkBtn}}" stepKey="waitForOkButton"/>
        <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear2"/>
        <click  selector="{{MediaGallerySection.OkBtn}}" stepKey="clickOk"/>
    </actionGroup>
</actionGroups>
