<?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="CategoryPresentActionGroup" >
        <annotations>
            <description>Navigates to category page, asserts category is there. Navigates to storefront category page and asserts category is there. This action group will not work categories where name does NOT equal SEO.</description>
        </annotations>
        <arguments>
            <argument name="categoryName" defaultValue="Test Category" type="string"/>
        </arguments>

        <amOnPage url="{{AdminCategoryPage.url}}" stepKey="goToCategoryAdminPage"/>
        <waitForPageLoad stepKey="waitForCategoryAdminPageLoad"/>
        <see userInput="{{categoryName}}" stepKey="assertCategoryOnAdminPage" selector="{{AdminCategorySidebarTreeSection.treeContainer}}"/>
        <amOnPage url="/{{categoryName}}.html" stepKey="goToCustomerFrontPage"/>
        <see userInput="{{categoryName}}" stepKey="assertCategoryNameOnStorefront" selector="{{StorefrontCategoryMainSection.CategoryTitle}}"/>
        <waitForPageLoad stepKey="waitForCustomerCategoryPageLoad"/>
    </actionGroup>
</actionGroups>
