<?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">
    <!-- Open the Minicart and check Summary -->
    <actionGroup name="StorefrontCheckCartDiscountAndSummaryActionGroup">
        <arguments>
            <argument name="total" type="string"/>
            <argument name="discount" type="string"/>
        </arguments>
        <waitForPageLoad stepKey="waitForPageLoad"/>
        <waitForLoadingMaskToDisappear stepKey="waitForPrices"/>
        <see selector="{{CheckoutCartSummarySection.discountAmount}}" userInput="-${{discount}}" stepKey="assertDiscount"/>
        <wait time="10" stepKey="waitForTotalPrice"/>
        <see selector="{{CheckoutCartSummarySection.total}}" userInput="${{total}}" stepKey="assertTotal"/>
    </actionGroup>
</actionGroups>
