<?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">
    <!-- Check configurable product on the category page -->
    <actionGroup name="StorefrontCheckCategoryConfigurableProductActionGroup">
        <annotations>
            <description>Validates that the provided Configurable Product is present and correct on a Category page.</description>
        </annotations>
        <arguments>
            <argument name="product"/>
            <argument name="optionProduct"/>
        </arguments>

        <seeElement selector="{{StorefrontCategoryProductSection.ProductTitleByName(product.name)}}" stepKey="assertProductName"/>
        <see userInput="${{optionProduct.price}}.00" selector="{{StorefrontCategoryProductSection.ProductPriceByName(product.name)}}" stepKey="AssertProductPrice"/>
        <!-- @TODO: MAGETWO-80272 Move to Magento_Checkout -->
        <moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct"/>
        <!-- @TODO: MAGETWO-80272 Move to Magento_Checkout -->
        <seeElement selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(product.name)}}" stepKey="AssertAddToCart"/>
    </actionGroup>
</actionGroups>
