<?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">
    <!--Assert That Shipping And Billing Address are the same-->
    <actionGroup name="AssertThatShippingAndBillingAddressTheSame">
        <annotations>
            <description>Validates that the Shipping and Billing Addresses are the same.</description>
        </annotations>

        <!--Get shipping and billing addresses-->
        <grabTextFrom selector="{{ShipmentFormSection.shippingAddress}}" stepKey="shippingAddr"/>
        <grabTextFrom selector="{{ShipmentFormSection.billingAddress}}" stepKey="billingAddr"/>
        <!--Make sure that shipping and billing addresses are different-->
        <see userInput="Shipping Address" stepKey="seeShippingAddress"/>
        <see userInput="Billing Address" stepKey="seeBillingAddress"/>
        <assertEquals stepKey="assert">
			<actualResult type="const">$billingAddr</actualResult>
			<expectedResult type="const">$shippingAddr</expectedResult>
        </assertEquals>
    </actionGroup>
</actionGroups>
