<?xml version="1.0" encoding="UTF-8"?>
<!--
 /**
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
    <!--Check customer information is correct in credit memo-->
    <actionGroup name="VerifyBasicCreditMemoInformationActionGroup">
        <annotations>
            <description>Validates that the provided Customer, Shipping/Billing Address and Customer Group are present and correct on the Admin Credit Memo view page.</description>
        </annotations>
        <arguments>
            <argument name="customer" defaultValue=""/>
            <argument name="shippingAddress" defaultValue=""/>
            <argument name="billingAddress" defaultValue=""/>
            <argument name="customerGroup" defaultValue="GeneralCustomerGroup"/>
        </arguments>

        <see selector="{{AdminCreditMemoOrderInformationSection.customerName}}" userInput="{{customer.firstname}}" stepKey="seeCustomerName"/>
        <see selector="{{AdminCreditMemoOrderInformationSection.customerEmail}}" userInput="{{customer.email}}" stepKey="seeCustomerEmail"/>
        <see selector="{{AdminCreditMemoOrderInformationSection.customerGroup}}" userInput="{{customerGroup.code}}" stepKey="seeCustomerGroup"/>

        <see selector="{{AdminCreditMemoAddressInformationSection.billingAddress}}" userInput="{{billingAddress.street[0]}}" stepKey="seeBillingAddressStreet"/>
        <see selector="{{AdminCreditMemoAddressInformationSection.billingAddress}}" userInput="{{billingAddress.city}}" stepKey="seeBillingAddressCity"/>
        <see selector="{{AdminCreditMemoAddressInformationSection.billingAddress}}" userInput="{{billingAddress.country_id}}" stepKey="seeBillingAddressCountry"/>
        <see selector="{{AdminCreditMemoAddressInformationSection.billingAddress}}" userInput="{{billingAddress.postcode}}" stepKey="seeBillingAddressPostcode"/>

        <see selector="{{AdminCreditMemoAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.street[0]}}" stepKey="seeShippingAddressStreet"/>
        <see selector="{{AdminCreditMemoAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.city}}" stepKey="seeShippingAddressCity"/>
        <see selector="{{AdminCreditMemoAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.country_id}}" stepKey="seeShippingAddressCountry"/>
        <see selector="{{AdminCreditMemoAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.postcode}}" stepKey="seeShippingAddressPostcode"/>
    </actionGroup>



</actionGroups>
