<?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="StorefrontAssertUnableSearchNegativeForPriceFieldActionGroup" extends="StorefrontFillFormAdvancedSearchActionGroup">
        <remove keyForRemoval="waitForPageLoad" />
        <grabTextFrom selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceFromError}}" stepKey="grabPriceFromError"/>
        <grabTextFrom selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceToError}}" stepKey="grabPriceToError"/>
        <assertEquals stepKey="assertErrorMessagePriceFrom">
            <actualResult type="string">{{UnableNegativePrice.Error_message}}</actualResult>
            <expectedResult type="string">$grabPriceFromError</expectedResult>
        </assertEquals>
        <assertEquals stepKey="assertErrorMessagePriceTo">
            <actualResult type="string">{{UnableNegativePrice.Error_message}}</actualResult>
            <expectedResult type="string">$grabPriceToError</expectedResult>
        </assertEquals>
    </actionGroup>
</actionGroups>
