<?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="AssertProductNameAndSkuInStorefrontProductPageActionGroup">
        <annotations>
            <description>Goes to the Storefront Product page for the provided Product. Validates that the Product details are present and correct.</description>
        </annotations>
        <arguments>
            <argument name="product"/>
        </arguments>

        <!-- Go to storefront product page, assert product name and sku -->
        <amOnPage url="{{product.urlKey}}.html" stepKey="navigateToProductPage"/>
        <waitForPageLoad stepKey="waitForPageLoad2"/>
        <seeInTitle userInput="{{product.name}}" stepKey="assertProductNameTitle"/>
        <see userInput="{{product.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="assertProductName"/>
        <see userInput="{{product.sku}}" selector="{{StorefrontProductInfoMainSection.productSku}}" stepKey="assertProductSku"/>
    </actionGroup>
</actionGroups>
