<?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="StorefrontRemoveProductFromMiniCartPopupActionGroup">
        <annotations>
            <description>Remove the product form min Card pop-up in storefromt.</description>
        </annotations>
        <arguments>
            <argument name="qty" type="string"/>
        </arguments>

        <waitForElementClickable selector="{{StorefrontMinicartSection.deleteProductBasedOnQty(qty)}}" stepKey="waitForDeleteElementToBeClickable"/>
        <click selector="{{StorefrontMinicartSection.deleteProductBasedOnQty(qty)}}" stepKey="deleteProductFromMiniCart"/>
        <waitForText selector="{{StoreFrontRemoveItemModalSection.message}}" userInput="Are you sure you would like to remove this item from the shopping cart?" stepKey="seeDeleteConfirmationMessage"/>
        <waitForElementClickable selector="{{StoreFrontRemoveItemModalSection.ok}}" stepKey="waitForOkButtonToBeClickable"/>
        <click selector="{{StoreFrontRemoveItemModalSection.ok}}" stepKey="selectOk"/>
        <waitForPageLoad stepKey="waitForPageToFinish"/>
    </actionGroup>
</actionGroups>
