<?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">
    <!--Delete customer address from grid row, row starts at 0 -->
    <actionGroup name="AdminDeleteAddressInCustomersAddressGrid">
        <annotations>
            <description>Deletes a Customer Address from the Customer creation/edit page under the 'Addresses' section.</description>
        </annotations>
        <arguments>
            <argument name="row" type="string"/>
        </arguments>

        <click selector="{{AdminCustomerAddressesGridSection.checkboxByRow(row)}}" stepKey="clickRowCustomerAddressCheckbox"/>
        <click selector="{{AdminCustomerAddressesGridSection.selectLinkByRow(row)}}" stepKey="openActionsDropdown"/>
        <click selector="{{AdminCustomerAddressesGridSection.deleteLinkByRow(row)}}" stepKey="chooseDeleteOption"/>
        <waitForPageLoad stepKey="waitForCustomerAddressesGridPageLoad"/>
        <click selector="{{AdminCustomerAddressesGridActionsSection.ok}}" stepKey="clickOkOnPopup"/>
    </actionGroup>
</actionGroups>
