<?xml version="1.0" encoding="UTF-8"?>
<!--
 /**
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-->
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
    <suite name="RemoteStorageAwsS3EnabledPageBuilderSuite">
        <before>
            <magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage"/>
            <magentoCLI command="config:set cms/pagebuilder/enabled 1" stepKey="enablePageBuilder"/>
            <magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYG"/>
            <actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE" >
                <argument name="TinyMCEValue" value="{{EnableTinyMCE.value}}"/>
            </actionGroup>
            <magentoCLI command="config:set cms/pagebuilder/google_maps_api_key ''" stepKey="setEmptyGoogleMapsAPIKey"/>
            <magentoCLI command="config:set web/default_layouts/default_cms_layout cms-full-width" stepKey="setPageBuilderDefaultCmsLayout"/>
            <magentoCLI command="config:set web/default_layouts/default_category_layout category-full-width" stepKey="setPageBuilderDefaultCategoryLayout"/>
            <magentoCLI command="config:set web/default_layouts/default_product_layout product-full-width" stepKey="setPageBuilderDefaultProductLayout"/>
            <actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCache">
                <argument name="tags" value="config"/>
            </actionGroup>
        </before>
        <after>
            <magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage"/>
            <magentoCLI command="config:set cms/pagebuilder/enabled 1" stepKey="enablePageBuilder"/>
            <actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE" >
                <argument name="TinyMCEValue" value="{{EnableTinyMCE.value}}"/>
            </actionGroup>
            <magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/>
            <magentoCLI command="config:set cms/pagebuilder/google_maps_api_key ''" stepKey="setEmptyGoogleMapsAPIKey"/>
            <actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCache">
                <argument name="tags" value="config"/>
            </actionGroup>
        </after>
        <include>
            <group name="remote_storage_aws_s3_pagebuilder"/>
        </include>
    </suite>
</suites>
