<?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="LoginToStorefrontWithEmailAndPassword">
        <annotations>
            <description>Goes to the Storefront Customer Sign In page. Logs in using the provided Email and Password.</description>
        </annotations>
        <arguments>
            <argument name="email" type="string"/>
            <argument name="password" type="string"/>
        </arguments>

        <amOnPage stepKey="amOnSignInPage" url="{{StorefrontCustomerSignInPage.url}}"/>
        <waitForPageLoad stepKey="wait"/>
        <fillField  stepKey="fillEmail" userInput="{{email}}" selector="{{StorefrontCustomerSignInFormSection.emailField}}"/>
        <fillField  stepKey="fillPassword" userInput="{{password}}" selector="{{StorefrontCustomerSignInFormSection.passwordField}}"/>
        <click stepKey="clickSignInAccountButton" selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}"/>
    </actionGroup>
</actionGroups>
