<?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="StorefrontSetShippingMethodActionGroup">
        <annotations>
            <description>Selects the provided Shipping Method on checkout shipping and wait loading mask.</description>
        </annotations>
        <arguments>
            <argument name="shippingMethodName" type="string" defaultValue="Flat Rate"/>
        </arguments>
        <waitForPageLoad stepKey="waitForShippingToLoad"/>
        <waitForElementClickable selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName(shippingMethodName)}}" stepKey="waitForShippingButton"/>
        <checkOption selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName(shippingMethodName)}}" stepKey="selectFlatRateShippingMethod"/>
        <waitForPageLoad stepKey="waitForLoadingMaskForNextButton"/>
    </actionGroup>
</actionGroups>
