<?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="AdminAssertShipmentInShipmentsGrid">
        <arguments>
            <argument name="shipmentId" type="string"/>
        </arguments>
        <!--Assert Shipment in Shipments Grid-->
        <amOnPage url="{{AdminShipmentsGridPage.url}}" stepKey="onShipmentsGridPage"/>
        <waitForPageLoad stepKey="waitForLoadingPage"/>
        <conditionalClick selector="{{AdminShipmentsGridSection.clearFilters}}" dependentSelector="{{AdminShipmentsGridSection.clearFilters}}" visible="true" stepKey="clearFilter"/>
        <waitForLoadingMaskToDisappear stepKey="waitForFilterLoad"/>
        <click selector="{{AdminShipmentsGridSection.buttonFilters}}" stepKey="openFilterSearch"/>
        <waitForLoadingMaskToDisappear stepKey="waitForFilterFields"/>
        <fillField userInput="{{shipmentId}}" selector="{{AdminShipmentsGridSection.fieldShipment}}" stepKey="fillSearchByShipmentId"/>
        <click selector="{{AdminShipmentsGridSection.applyFilter}}" stepKey="clickSearchButton"/>
        <waitForLoadingMaskToDisappear stepKey="waitForSearchResult"/>
        <see userInput="{{shipmentId}}" selector="{{AdminShipmentsGridSection.rowShipments}}" stepKey="seeShipmentId"/>
    </actionGroup>
</actionGroups>
