<?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="EnableWebUrlOptionsActionGroup">
        <annotations>
            <description>Goes to the 'Configuration' page for 'Url Options'. Enables 'Add Store Code to Urls'. Clicks on the Save button.</description>
        </annotations>

        <amOnPage url="{{WebConfigurationPage.url}}" stepKey="navigateToWebConfigurationPage"/>
        <waitForPageLoad stepKey="waitForPageLoad"/>
        <conditionalClick selector="{{WebSection.UrlOptionsTab}}" dependentSelector="{{WebSection.CheckIfUrlOptionsTabExpand}}" visible="true" stepKey="expandUrlSectionTab"/>
        <waitForElementVisible selector="{{UrlOptionsSection.addStoreCodeToUrl}}" stepKey="seeAddStoreCodeToUrl"/>
        <uncheckOption selector="{{UrlOptionsSection.systemValueForStoreCode}}" stepKey="uncheckUseSystemValue"/>
        <selectOption selector="{{UrlOptionsSection.addStoreCodeToUrl}}" userInput="Yes" stepKey="enableStoreCode"/>
        <click selector="{{WebSection.UrlOptionsTab}}" stepKey="collapseUrlOptions"/>
        <click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig"/>
    </actionGroup>
</actionGroups>
