<?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="AssertSuccessfulCreditMemoCreationAndAmountsActionGroup">
        <arguments>
            <argument name="expectedGrandTotal" type="string"/>
            <argument name="expectedRefundTotal" type="string"/>
        </arguments>
        <!--Assert credit memo creation successful-->
        <see selector="{{AdminIndexManagementSection.successMessage}}" userInput="You created the credit memo." stepKey="assertCreditMemo"/>

        <!--Assert credit memo amounts match expectations-->
        <see selector="{{AdminCreditMemoTotalSection.grandTotal}}" userInput="{{expectedGrandTotal}}" stepKey="assertGrandTotal"/>
        <see selector="{{AdminCreditMemoTotalSection.totalRefunded}}" userInput="{{expectedRefundTotal}}" stepKey="assertRefundedTotal"/>
    </actionGroup>
</actionGroups>
