<?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="AdminUpdateWidgetsOfCatalogCategoryLinkActionGroup">
        <annotations>
            <description>Update Widgets.</description>
        </annotations>
        <arguments>
            <argument name="WidgetTitle" type="string" defaultValue="Catalog CategoryB Link"/>
        </arguments>
        <click selector="{{CmsNewWidgetOptionsSection.FirstWidget}}" stepKey="clickFirstWidgetSelect"/>
        <waitForPageLoad stepKey="waitToLoadWidgetPage"/>
        <clearField selector="{{CmsNewWidgetStoreforntPropertiesSection.WidgetTitle}}" stepKey="clearWidgetTitle"/>
        <fillField selector="{{CmsNewWidgetStoreforntPropertiesSection.WidgetTitle}}" userInput="{{WidgetTitle}}" stepKey="fillFieldTitle"/>
        <click selector="{{CmsNewWidgetOptionsSection.WidgetOptions}}" stepKey="clickWidgetOptionsSection"/>
        <click selector="{{CmsNewWidgetOptionsSection.SelectCategory}}" stepKey="clickSelectCategoryButton1"/>
        <waitForPageLoad stepKey="waitToLoadRootCategory"/>
        <click selector="{{CmsNewWidgetOptionsSection.ExpandRootCategory}}" stepKey="clickToExpandRootCat"/>
        <waitForPageLoad stepKey="waitToExpandRootCategory"/>
        <click selector="{{CmsNewWidgetOptionsSection.SecondCategory}}" stepKey="clickSecondCategoryToSelect"/>
        <waitForPageLoad stepKey="waitToSelectSecondCategory"/>
        <click selector="{{CmsNewWidgetOptionsSection.SaveWidget}}" stepKey="clickSaveWidgetButton"/>
        <waitForPageLoad stepKey="waitToSaveConfig"/>
        <magentoCLI command="cache:flush" stepKey="cleanCache"/>
    </actionGroup>
</actionGroups>
