<?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="UseStaticURLForMediaContentInWYSIWYGActionGroup">
        <annotations>
            <description>Goes to the 'Configuration' page for 'Content Management'. Sets 'Use Static URLs for Media Content in WYSIWYG' to the provided value. Clicks on the Save button.</description>
        </annotations>
        <arguments>
            <argument name="value" defaultValue="Yes" type="string"/>
        </arguments>

        <amOnPage url="{{ConfigurationStoresPage.url}}" stepKey="navigateToWYSIWYGConfigPage1"/>
        <waitForPageLoad stepKey="waitForPageLoad1"/>
        <conditionalClick stepKey="expandWYSIWYGOptions" selector="{{ContentManagementSection.WYSIWYGOptions}}" dependentSelector="{{ContentManagementSection.CheckIfTabExpand}}" visible="true"/>
        <waitForElementVisible selector="{{ContentManagementSection.EnableWYSIWYG}}" stepKey="waitForEnableWYSIWYGDropdown1"/>
        <selectOption selector="{{ContentManagementSection.StaticURL}}" userInput="{{value}}" stepKey="selectOption1"/>
        <click selector="{{ContentManagementSection.WYSIWYGOptions}}" stepKey="collapseWYSIWYGOptions"/>
        <click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig"/>
        <waitForPageLoad stepKey="waitForPageLoad2"/>
    </actionGroup>
</actionGroups>
