<?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="VerifyCustomerNameOnFrontendActionGroup">
        <annotations>
            <description>Goes to the Storefront Customer Dashboard page. Validates that the Customer First/Last Name is present and correct.</description>
        </annotations>
        <arguments>
            <argument name="customer"/>
        </arguments>

        <!--Verify customer name on frontend-->
        <amOnPage url="customer/account/edit/" stepKey="goToAddressPage"/>
        <waitForPageLoad stepKey="waitForAddressPageLoad"/>
        <click selector="{{StorefrontCustomerSidebarSection.sidebarCurrentTab('Account Information')}}" stepKey="clickAccountInformationFromSidebarCurrentTab"/>
        <waitForPageLoad stepKey="waitForAccountInformationTabToOpen"/>
        <seeInField selector="{{StorefrontCustomerAccountInformationSection.firstName}}" userInput="{{customer.firstname}}" stepKey="seeAssertCustomerFirstName"/>
        <seeInField selector="{{StorefrontCustomerAccountInformationSection.lastName}}" userInput="{{customer.lastname}}" stepKey="seeAssertCustomerLastName"/>
    </actionGroup>
</actionGroups>
