<?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="AdminAssertUnAssignedSourcesQtyInGridForProductActionGroup">
        <annotations>
            <description>Admin asserts the unassigned sources for the product on product grid page.</description>
        </annotations>
        <arguments>
            <argument name="productSku" type="string"/>
            <argument name="source1_name"/>
            <argument name="source2_name"/>
            <argument name="source3_name"/>
            <argument name="source4_name"/>
        </arguments>
        <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/>
        <waitForPageLoad stepKey="waitForProductIndexPageToLoad"/>
        <conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
        <click selector="{{AdminProductGridFilterSection.filters}}" stepKey="openProductFilters"/>
        <fillField selector="{{AdminProductGridFilterSection.skuFilter}}" userInput="{{productSku}}" stepKey="fillProduct1SkuFilter"/>
        <click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFilters"/>
        <waitForElementNotVisible selector="{{AdminProductGridSection.loadingMask}}" stepKey="waitForFilteredGridLoad" time="30"/>
        <moveMouseOver selector="{{AdminProductGridSection.qtyPerSourceInGrid('productSku')}}" stepKey="hoverOverProduct1AssignedSourcesGrid"/>
        <dontSeeElement selector="{{AdminProductGridSection.qtyPerSourceOnHover(source1_name,'0')}}" stepKey="dontSeeAssignedSources1ForProduct"/>
        <dontSeeElement selector="{{AdminProductGridSection.qtyPerSourceOnHover(source2_name,'0')}}" stepKey="dontSeeAssignedSources2ForProduct"/>
        <dontSeeElement selector="{{AdminProductGridSection.qtyPerSourceOnHover(source3_name,'0')}}" stepKey="dontSeeAssignedSources3ForProduct"/>
        <dontSeeElement selector="{{AdminProductGridSection.qtyPerSourceOnHover(source4_name,'0')}}" stepKey="dontSeeAssignedSources4ForProduct"/>
    </actionGroup>
</actionGroups>
