<?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">
    <actionGroup name="StorefrontSearchAddressInSelectBillingAddressPopupOnPaymentStepOnCheckoutActionGroup">
        <annotations>
            <description>Search customer address in 'Select Billing Address' popup on the Storefront Checkout on the 'Payment' step.</description>
        </annotations>
        <arguments>
            <argument name="addressSearchTerm" type="string" defaultValue="10001"/>
        </arguments>

        <fillField selector="{{CheckoutBillingAddressSearchSection.searchAddressField}}" userInput="{{addressSearchTerm}}" stepKey="fillAddressInSearchField"/>
        <click selector="{{CheckoutBillingAddressSearchSection.searchAddressButton}}" stepKey="clickSearchAddressButton"/>
        <see selector="{{CheckoutBillingAddressSearchSection.addressesFound}}" userInput="1 addresses" stepKey="assertOneAddressesWasFound"/>
        <see selector="{{CheckoutBillingAddressSearchSection.firstBillingAddressItem}}" userInput="{{addressSearchTerm}}" stepKey="verifyAddresses"/>
    </actionGroup>
</actionGroups>
