<?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="AssertStorefrontProductDropDownOptionValueActionGroup">
        <annotations>
            <description>Validates that the provided Product Option is selected under the provided Drop-down Attribute.</description>
        </annotations>
        <arguments>
            <argument name="attributeLabel" type="string" defaultValue="{{ProductAttributeFrontendLabel.label}}"/>
            <argument name="optionLabel" type="string" defaultValue="{{productAttributeOption1.label}}"/>
        </arguments>

        <waitForElementVisible selector="{{StorefrontProductInfoMainSection.attributeSelectByAttributeID(attributeLabel)}}" stepKey="waitForAttributeVisible" />
        <seeOptionIsSelected selector="{{StorefrontProductInfoMainSection.attributeSelectByAttributeID(attributeLabel)}}" userInput="{{optionLabel}}" stepKey="assertAttributeOption"/>
    </actionGroup>
</actionGroups>
