<?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="ChangeDefaultStoreViewActionGroup" extends="EditStoreGroupActionGroup">
        <annotations>
            <description>Change the default store view for provided store group.</description>
        </annotations>
        <arguments>
            <argument name="storeViewName" type="string"/>
        </arguments>
        <selectOption selector="{{AdminEditStoreGroupSection.defaultStoreView}}" userInput="{{storeViewName}}" stepKey="changeDefaultStoreView" after="waitForStorePageToLoad"/>
        <click selector="{{AdminStoreGroupActionsSection.saveButton}}" stepKey="clickSaveStoreGroup"/>
        <waitForElementVisible selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitForModal"/>
        <see selector="{{AdminConfirmationModalSection.title}}" userInput="Warning message" stepKey="seeWarningAboutTakingALongTimeToComplete"/>
        <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmModal"/>
        <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="seeForSuccessMessage"/>
        <see selector="{{AdminMessagesSection.success}}" userInput="You saved the store." stepKey="seeSuccessMessage"/>
    </actionGroup>
</actionGroups>
