<?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.
  */
-->
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
    <suite name="KlarnaPaymentsUS_Commerce">
        <before>
            <createData entity="Klarna_US_Customer_B2C" stepKey="marketDefaultCustomerInstance"/>
            <createData entity="Klarna_US_Customer_B2B" stepKey="marketDefaultCustomerB2bInstance"/>
            <createData entity="taxRate_US_NY_8_1" stepKey="taxRateTwo"/>

            <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
            <actionGroup ref="ConfigureKlarna" stepKey="kpConfigureCredentials">
                <argument name="api_version" value="kp_na"/>
                <argument name="merchant_id" value="{{_CREDS.klarna/klarna_us_merchant_id}}"/>
                <argument name="shared_secret" value="{{_CREDS.klarna/klarna_us_shared_secret}}"/>
            </actionGroup>
            <actionGroup ref="AdminLogoutActionGroup" stepKey="signOutFromAdmin"/>
        </before>
        <after>
            <deleteData createDataKey="marketDefaultCustomerInstance" stepKey="deleteCustomer"/>
            <deleteData createDataKey="marketDefaultCustomerB2bInstance" stepKey="deleteCustomerB2b"/>
            <deleteData stepKey="deleteTaxRateTwo" createDataKey="taxRateTwo"/>

            <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
            <actionGroup ref="DisableKlarnaPayment" stepKey="disableKlarnaPayment"/>
            <actionGroup ref="AdminLogoutActionGroup" stepKey="signOutFromAdmin"/>
        </after>
        <include>
            <group name="Klarna_KP"/>
        </include>
    </suite>
</suites>
