<?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="CheckCustomizableOptionImportActionGroup">
        <annotations>
            <description>Validate that the Custom Product Option Import value is present and correct.</description>
        </annotations>
        <arguments>
            <argument name="option" defaultValue="ProductOptionField"/>
            <argument name="optionIndex" type="string"/>
        </arguments>

        <grabValueFrom selector="{{AdminProductCustomizableOptionsSection.optionTitleInput(optionIndex)}}" stepKey="grabOptionTitle"/>
        <grabValueFrom selector="{{AdminProductCustomizableOptionsSection.optionPrice(optionIndex)}}" stepKey="grabOptionPrice"/>
        <grabValueFrom selector="{{AdminProductCustomizableOptionsSection.optionSku(optionIndex)}}" stepKey="grabOptionSku"/>
        <assertEquals stepKey="assertOptionTitle">
			<actualResult type="const">$grabOptionTitle</actualResult>
			<expectedResult type="string">{{option.title}}</expectedResult>
        </assertEquals>
        <assertEquals stepKey="assertOptionPrice">
			<actualResult type="const">$grabOptionPrice</actualResult>
			<expectedResult type="string">{{option.priceWithDecimals}}</expectedResult>
        </assertEquals>
        <assertEquals stepKey="assertOptionSku">
			<actualResult type="const">$grabOptionSku</actualResult>
			<expectedResult type="string">{{option.title}}</expectedResult>
        </assertEquals>
    </actionGroup>
</actionGroups>
