<?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="AssertTextInAdminProductRelatedUpSellCrossSellSectionActionGroup">
        <annotations>
            <description>Validates that provided Text appears in the provided Element on the Admin Product creation/edit page under 'Related Products, Up-Sells, and Cross-Sells' section.</description>
        </annotations>
        <arguments>
            <argument name="element" defaultValue="AdminProductFormRelatedUpSellCrossSellSection.relatedProductSectionText"/>
            <argument name="expectedText"/>
        </arguments>

        <conditionalClick selector="{{AdminProductFormSection.productFormTab('Related Products')}}" dependentSelector="{{AdminProductFormSection.productFormTabState('Related Products', 'closed')}}" visible="true" stepKey="openTab"/>
        <waitForPageLoad time="30" stepKey="waitForPageLoad"/>
        <see selector="{{element}}" userInput="{{expectedText}}" stepKey="assertText"/>
    </actionGroup>
</actionGroups>
