<?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="AdminReviewOrderActionGroup">
        <annotations>
            <description>Clicks on 'REPORTS' in the Admin side menu. Clicks on 'Ordered'. Clicks on 'Refresh'. Validates that the provided Product name appears in the list.</description>
        </annotations>
        <arguments>
            <argument name="productName" type="string"/>
        </arguments>
        
        <click stepKey="openReports" selector="{{OrderedProductsSection.reports}}"/>
        <waitForPageLoad stepKey="waitForReports" time="5"/>
        <click stepKey="openOrdered" selector="{{OrderedProductsSection.ordered}}"/>
        <waitForPageLoad stepKey="waitForOrdersPage" time="5"/>
        <click stepKey="refresh" selector="{{OrderedProductsSection.refresh}}"/>
        <waitForPageLoad stepKey="waitForOrderList" time="5"/>
        <scrollTo stepKey="scrollTo" selector="{{OrderedProductsSection.total}}"/>
        <see stepKey="seeOrder" userInput="{{productName}}"/>
    </actionGroup>
</actionGroups>
