<?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="AdminViewAuthorizationTransactionsInOrderActionGroup" extends="AdminAssertTransactionIdOfVoidOrderActionGroup">
        <annotations>
            <description>Click the Transactions button on the Order Details page and validate authorization transaction</description>
        </annotations>
        <remove keyForRemoval="selectVoidTypeTxn"/>
        <remove keyForRemoval="assertEquals"/>
        <waitForElementVisible selector="{{AdminTransactionsGridSection.orderTxnTableTypeFilter}}" after="orderTransactionsTableIsVisible" stepKey="waitForTransactionTypeAuthorizationToBeClicked"/>
        <selectOption selector="{{AdminTransactionsGridSection.orderTxnTableTypeFilter}}" userInput="authorization" after="orderTransactionsTableIsVisible" stepKey="selectAuthorizationTypeTxn" />
        <assertRegExp stepKey="assertEquals" message="pass">
            <expectedResult type="string">/([0-9a-z\-])*(?&lt;!authorization)$/</expectedResult>
            <actualResult type="variable">getVoidTransaction</actualResult>
        </assertRegExp>
    </actionGroup>
</actionGroups>
