<?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="AdminAssertSpecialPriceAttributeValueOnProductGridPageActionGroup">
        <annotations>
            <description>Assert special price attribute value from the catalog product grid page</description>
        </annotations>
        <arguments>
            <argument name="specialPriceColumn" type="string" defaultValue="Special Price"/>
            <argument name="expectedValue" type="string" defaultValue=""/>
        </arguments>
        <!-- Check the special price column are present in catalog product grid -->
        <seeElement selector="{{AdminProductGridSection.columnHeader(specialPriceColumn)}}" stepKey="seeSpecialPriceColumn"/>
        <!-- Grab the special price value from the catalog product grid -->
        <grabTextFrom selector="{{AdminProductGridSection.productGridCell('1', specialPriceColumn)}}" stepKey="getSpecialPrice"/>
        <assertStringContainsString  stepKey="assertSpecialPricePercentageSymbol">
            <expectedResult type="string">{{expectedValue}}</expectedResult>
            <actualResult type="variable">$getSpecialPrice</actualResult>
        </assertStringContainsString>
    </actionGroup>
</actionGroups>
