Skip to content

Commit 89dd87d

Browse files
committed
Convert NewCustomerPasswordComplexityTest
1 parent 02bca98 commit 89dd87d

File tree

4 files changed

+99
-0
lines changed

4 files changed

+99
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="StorefrontFillRegistryFormActionGroup">
11+
12+
<!--Fill Registry Form with password length is below 8 characters -->
13+
<fillField stepKey="fillFirstName1stVariation" userInput="John" selector="{{StorefrontCustomerCreateFormSection.firstnameField}}"/>
14+
<fillField stepKey="fillLastName1stVariation" userInput="Doe" selector="{{StorefrontCustomerCreateFormSection.lastnameField}}"/>
15+
<fillField stepKey="fillEmail1stVariation" userInput="johndoe@domain.com" selector="{{StorefrontCustomerCreateFormSection.emailField}}"/>
16+
<fillField stepKey="fillPassword1stVariation" userInput="123123" selector="{{StorefrontCustomerCreateFormSection.passwordField}}"/>
17+
<fillField stepKey="fillConfirmPassword1stVariation" userInput="123123" selector="{{StorefrontCustomerCreateFormSection.confirmPasswordField}}"/>
18+
<click stepKey="clickCreateAccountButton1stVariation" selector="{{StorefrontCustomerCreateFormSection.createAccountButton}}"/>
19+
<see userInput="Minimum length of this field must be equal or greater than 8 symbols. Leading and trailing spaces will be ignored." stepKey="seeTheErrorMessageIsDisplayed1"/>
20+
21+
<!--Fill Registry Form with not secure enough password -->
22+
<fillField stepKey="fillFirstName2ndVariation" userInput="John" selector="{{StorefrontCustomerCreateFormSection.firstnameField}}"/>
23+
<fillField stepKey="fillLastName2ndVariation" userInput="Doe" selector="{{StorefrontCustomerCreateFormSection.lastnameField}}"/>
24+
<fillField stepKey="fillEmail2ndVariation" userInput="johndoe@domain.com" selector="{{StorefrontCustomerCreateFormSection.emailField}}"/>
25+
<fillField stepKey="fillPassword2ndVariation" userInput="123123qa" selector="{{StorefrontCustomerCreateFormSection.passwordField}}"/>
26+
<fillField stepKey="fillConfirmPassword2ndVariation" userInput="123123qa" selector="{{StorefrontCustomerCreateFormSection.confirmPasswordField}}"/>
27+
<click stepKey="clickCreateAccountButton" selector="{{StorefrontCustomerCreateFormSection.createAccountButton}}"/>
28+
<see userInput="Minimum of different classes of characters in password is 3. Classes of characters: Lower Case, Upper Case, Digits, Special Characters." stepKey="seeTheErrorMessageIsDisplayed2"/>
29+
30+
</actionGroup>
31+
</actionGroups>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="StorefrontSeeHeaderLinksActionGroup">
11+
<arguments>
12+
<argument name="LinkName" type="string" defaultValue="Create an Account"/>
13+
</arguments>
14+
15+
<see stepKey="SeeElement" selector="{{StorefrontHeaderSection.headerlinks}}" userInput="{{LinkName}}"/>
16+
<click stepKey="ClickLink" selector="{{StorefrontHeaderSection.HeaderLinkByText(LinkName)}}"/>
17+
<waitForPageLoad stepKey="Wait"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="StorefrontHeaderSection">
12+
<element name="headerlinks" type="text" selector="ul.header.links"/>
13+
<element name="HeaderLinkByText" type="text" selector="//ul[contains(@class, 'header') and contains(@class, 'links')]/li/a[contains(text(),'{{LinkName}}')]"
14+
parameterized="true" />
15+
</section>
16+
</sections>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="NewCustomerPasswordComplexityTest">
12+
<annotations>
13+
<features value="Security"/>
14+
<stories value="Checking customer's password length and password complexity"/>
15+
<title value="Notify the customer if password length or complexity is not match to requirements"/>
16+
<description value="Show notifies to the customer if password length or complexity is not match to requirements"/>
17+
<group value="security"/>
18+
<group value="mtf_migrated"/>
19+
</annotations>
20+
21+
<!-- TEST BODY -->
22+
<!-- Go to storefront home page -->
23+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openStoreFrontHomePage"/>
24+
<!-- Click the Registration Link -->
25+
<actionGroup ref="StorefrontSeeHeaderLinksActionGroup" stepKey="ClickTheLink">
26+
<argument name="LinkName" value="Create an Account" />
27+
</actionGroup>
28+
<!-- Fill Registry Form with Incorrect Password (Two variations) -->
29+
<actionGroup ref="StorefrontFillRegistryFormActionGroup" stepKey="FillRegistryForm"/>
30+
<!--Test Body END-->
31+
32+
</test>
33+
</tests>

0 commit comments

Comments
 (0)