<?xml version="1.0" encoding="UTF-8"?>
<!--
 /**
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
    <test name="NewCustomerPasswordComplexityTest">
        <annotations>
            <features value="Security"/>
            <stories value="Checking customer's password complexity"/>
            <title value="Notify the customer if password complexity does not match the requirements"/>
            <description value="Notify the customer if password complexity does not match the requirements"/>
            <testCaseId value="MC-14368"/>
            <severity value="CRITICAL"/>
            <group value="security"/>
            <group value="mtf_migrated"/>
            <group value="cloud"/>
        </annotations>

        <!-- Go to storefront home page -->
        <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openStoreFrontHomePage"/>

        <!-- See the Registration Link -->
        <actionGroup ref="StorefrontSeeHeaderLinksActionGroup" stepKey="seeTheLink"/>

        <!-- Click the Registration Link -->
        <actionGroup ref="StorefrontClickHeaderLinkActionGroup" stepKey="clickTheLink">
            <argument name="linkName" value="Create an Account"/>
        </actionGroup>

        <!-- Fill Registration Form with not secure enough password -->
        <actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillRegistrationFormPasswordNotSecure">
            <argument name="customer" value="Simple_Customer_With_Not_Secure_Password"/>
        </actionGroup>

        <!-- See the Error -->
        <actionGroup ref="AssertMessageCustomerCreateAccountPasswordComplexityActionGroup" stepKey="seeTheErrorPasswordSecure">
            <argument name="message" value="Minimum of different classes of characters in password is 3. Classes of characters: Lower Case, Upper Case, Digits, Special Characters."/>
        </actionGroup>
    </test>
</tests>
