<?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="CheckRequiredFieldsInBundleProductFormActionGroup">
        <annotations>
            <description>Clears the Name and SKU fields when adding a Product and then verifies that they are required after attempting to Save.</description>
        </annotations>

        <clearField selector="{{AdminProductFormSection.productName}}" stepKey="clearProductSku"/>
        <clearField selector="{{AdminProductFormSection.productSku}}" stepKey="clearProductName"/>
        <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveButton"/>
        <see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Product" stepKey="seeStillOnEditPage"/>
        <see selector="{{AdminProductFormSection.fieldError('name')}}" userInput="This is a required field." stepKey="seeNameRequired"/>
        <see selector="{{AdminProductFormSection.fieldError('sku')}}" userInput="This is a required field." stepKey="seeSkuRequired"/>
    </actionGroup>
</actionGroups>
