<?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="AssertStorefrontMiniCartItemsActionGroup">
        <annotations>
            <description>Validates that the provided Product details (Name, Price, Subtotal and Quantity) are present and correct in the Storefront Mini Shopping Cart.</description>
        </annotations>
        <arguments>
            <argument name="productName" type="string"/>
            <argument name="productPrice" type="string"/>
            <argument name="cartSubtotal" type="string"/>
            <argument name="qty" type="string"/>
        </arguments>

        <see selector="{{StorefrontMinicartSection.productPriceByName(productName)}}" userInput="{{productPrice}}" stepKey="seeProductPriceInMiniCart"/>
        <seeElement selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="seeCheckOutButtonInMiniCart"/>
        <seeElement selector="{{StorefrontMinicartSection.productQuantity(productName, qty)}}" stepKey="seeProductQuantity1"/>
        <seeElement selector="{{StorefrontMinicartSection.productImage}}" stepKey="seeProductImage"/>
        <see selector="{{StorefrontMinicartSection.productSubTotal}}" userInput="{{cartSubtotal}}" stepKey="seeSubTotal"/>
    </actionGroup>
</actionGroups>
