<?xml version="1.0" encoding="UTF-8"?>
<!--
 /**
  * Copyright 2024 Adobe
  * All Rights Reserved.
  */
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
    <actionGroup name="ClickPlaceOrderActionGroup">
        <annotations>
            <description>Clicks on the 'Place Order' button. Waits for the success page title (no post-click waitForPageLoad: payment gateways can leave jQuery AJAX active while the loader is shown, which causes that wait to time out).</description>
        </annotations>

        <waitForElementClickable selector="{{CheckoutPaymentSection.placeOrderWithoutTimeout}}" stepKey="waitForPlaceOrderButton"/>
        <click selector="{{CheckoutPaymentSection.placeOrderWithoutTimeout}}" stepKey="clickPlaceOrder"/>
        <waitForText selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" time="120" stepKey="waitForLoadSuccessPage"/>
    </actionGroup>
</actionGroups>
