<?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="AssertCustomerGroupNotOnProductFormActionGroup">
        <annotations>
            <description>Clicks on 'Advanced Pricing' on the Admin Customers creation/edit page. Validates that the provided Customer Group does NOT appear in the dropdown menu.</description>
        </annotations>
        <arguments>
            <argument name="customerGroup" type="entity"/>
        </arguments>

        <click selector="{{AdminProductFormSection.advancedPricingLink}}" stepKey="clickOnAdvancedPricingButton"/>
        <waitForElementVisible selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" stepKey="waitForCustomerGroupPriceAddButton"/>
        <click selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" stepKey="addCustomerGroupAllGroupsQty1PriceDiscountAnd10percent"/>
        <grabMultiple selector="{{AdminProductFormAdvancedPricingSection.productTierPriceCustGroupSelectOptions('0')}}" stepKey="customerGroups"/>

        <assertNotContains stepKey="assertCustomerGroupNotInOptions">
            <actualResult type="variable">customerGroups</actualResult>
            <expectedResult type="string">{{customerGroup.code}}</expectedResult>
        </assertNotContains>
    </actionGroup>
</actionGroups>
