<?xml version="1.0" encoding="UTF-8"?>
<!--
 /**
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  *
  * This file is part of the Klarna KP module
  *
  * (c) Klarna Bank AB (publ)
  *
  * For the full copyright and license information, please view the NOTICE
  * and LICENSE files that were distributed with this source code.
  */
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
    <actionGroup name="GoToOrderPageFromKlarnaConfirmationPageGuest">
        <annotations>
            <description>Grabs the order number from an order created by a GUEST customer and goes to the order page</description>
        </annotations>
        <!--Grab order number-->
        <waitForElementVisible selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="waitForOrderNumber" before="navigateToAdminOrderPage"/>
        <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber" before="navigateToAdminOrderPage"/>

        <!--Go to order page-->
        <amOnPage url="{{AdminOrderPage.url({$grabOrderNumber})}}" stepKey="navigateToAdminOrderPage"/>
        <waitForPageLoad stepKey="waitForAdminOrderPage"/>
    </actionGroup>
</actionGroups>
