Skip to content

Commit 5a1e0ff

Browse files
committed
MQE-1921: [MTF-To-MFTF] Process PR 711
1 parent c265b7f commit 5a1e0ff

File tree

8 files changed

+66
-32
lines changed

8 files changed

+66
-32
lines changed

app/code/Magento/Cms/Test/Mftf/ActionGroup/StorefrontClickHeaderLinkActionGroup.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1010
<actionGroup name="StorefrontClickHeaderLinkActionGroup">
1111
<arguments>
12-
<argument name="LinkName" type="string" defaultValue="Create an Account"/>
12+
<argument name="linkName" type="string" defaultValue="Create an Account"/>
1313
</arguments>
14-
<click stepKey="ClickTheLink" selector="{{StorefrontHeaderSection.HeaderLinkByText(LinkName)}}"/>
15-
<waitForPageLoad stepKey="Wait"/>
14+
<click stepKey="clickTheLink" selector="{{StorefrontHeaderSection.headerLinkByText(linkName)}}"/>
15+
<waitForPageLoad stepKey="wait"/>
1616
</actionGroup>
1717
</actionGroups>

app/code/Magento/Cms/Test/Mftf/ActionGroup/StorefrontSeeHeaderLinksActionGroup.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1010
<actionGroup name="StorefrontSeeHeaderLinksActionGroup">
1111
<arguments>
12-
<argument name="LinkName" type="string" defaultValue="Create an Account"/>
12+
<argument name="linkName" type="string" defaultValue="Create an Account"/>
1313
</arguments>
14-
<see stepKey="SeeElement" selector="{{StorefrontHeaderSection.headerlinks}}" userInput="{{LinkName}}"/>
14+
<see stepKey="seeElement" selector="{{StorefrontHeaderSection.headerlinks}}" userInput="{{linkName}}"/>
1515
</actionGroup>
1616
</actionGroups>

app/code/Magento/Cms/Test/Mftf/Section/StorefrontHeaderSection.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontHeaderSection">
1212
<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" />
13+
<element name="headerLinkByText" type="text" selector="//ul[contains(@class, 'header') and contains(@class, 'links')]/li/a[contains(text(),'{{LinkName}}')]" parameterized="true"/>
1514
</section>
1615
</sections>

app/code/Magento/Customer/Test/Mftf/ActionGroup/AssertMessageCustomerCreateAccountPasswordComplexityActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
<arguments>
1313
<argument name="message" type="string"/>
1414
</arguments>
15-
<see userInput="{{message}}" selector="{{StorefrontCustomerCreateFormSection.PasswordErrorMessages}}" stepKey="verifyMessage" />
15+
<see userInput="{{message}}" selector="{{StorefrontCustomerCreateFormSection.passwordErrorMessages}}" stepKey="verifyMessage"/>
1616
</actionGroup>
1717
</actionGroups>

app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerCreateFormSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<element name="passwordField" type="input" selector="#password"/>
1818
<element name="confirmPasswordField" type="input" selector="#password-confirmation"/>
1919
<element name="createAccountButton" type="button" selector="button.action.submit.primary" timeout="30"/>
20-
<element name="PasswordErrorMessages" type="text" selector="#password-error"/>
20+
<element name="passwordErrorMessages" type="text" selector="#password-error"/>
2121
</section>
2222
<section name="StoreFrontCustomerAdvancedAttributesSection">
2323
<element name="textFieldAttribute" type="input" selector="//input[@id='{{var}}']" parameterized="true" />

app/code/Magento/Security/Test/Mftf/Test/NewCustomerPasswordComplexityTest.xml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,39 +11,33 @@
1111
<test name="NewCustomerPasswordComplexityTest">
1212
<annotations>
1313
<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"/>
14+
<stories value="Checking customer's password complexity"/>
15+
<title value="Notify the customer if password complexity does not match the requirements"/>
16+
<description value="Notify the customer if password complexity does not match the requirements"/>
17+
<testCaseId value="MC-14368"/>
1718
<group value="security"/>
1819
<group value="mtf_migrated"/>
1920
</annotations>
2021

21-
<!-- TEST BODY -->
2222
<!-- Go to storefront home page -->
2323
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openStoreFrontHomePage"/>
24+
2425
<!-- See the Registration Link -->
25-
<actionGroup ref="StorefrontSeeHeaderLinksActionGroup" stepKey="SeeTheLink"/>
26+
<actionGroup ref="StorefrontSeeHeaderLinksActionGroup" stepKey="seeTheLink"/>
27+
2628
<!-- Click the Registration Link -->
27-
<actionGroup ref="StorefrontClickHeaderLinkActionGroup" stepKey="ClickTheLink">
28-
<argument name="LinkName" value="Create an Account"/>
29-
</actionGroup>
30-
<!-- Fill Registration Form with Password length is bellow 8 Characters -->
31-
<actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="FillRegistrationFormPasswordLengthBellowEightCharacters">
32-
<argument name="customer" value="Simple_Customer_With_Password_Length_Is_Below_Eight_Characters"/>
33-
</actionGroup>
34-
<!-- See the Error -->
35-
<actionGroup ref="AssertMessageCustomerCreateAccountPasswordComplexityActionGroup" stepKey="SeeTheErrorPasswordLength">
36-
<argument name="message" value="Minimum length of this field must be equal or greater than 8 symbols. Leading and trailing spaces will be ignored."/>
29+
<actionGroup ref="StorefrontClickHeaderLinkActionGroup" stepKey="clickTheLink">
30+
<argument name="linkName" value="Create an Account"/>
3731
</actionGroup>
32+
3833
<!-- Fill Registration Form with not secure enough password -->
39-
<actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="FillRegistrationFormPasswordNotSecure">
34+
<actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillRegistrationFormPasswordNotSecure">
4035
<argument name="customer" value="Simple_Customer_With_Not_Secure_Password"/>
4136
</actionGroup>
37+
4238
<!-- See the Error -->
43-
<actionGroup ref="AssertMessageCustomerCreateAccountPasswordComplexityActionGroup" stepKey="SeeTheErrorPasswordSecure">
39+
<actionGroup ref="AssertMessageCustomerCreateAccountPasswordComplexityActionGroup" stepKey="seeTheErrorPasswordSecure">
4440
<argument name="message" value="Minimum of different classes of characters in password is 3. Classes of characters: Lower Case, Upper Case, Digits, Special Characters."/>
4541
</actionGroup>
46-
<!--Test Body END-->
47-
4842
</test>
4943
</tests>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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="NewCustomerPasswordLengthTest">
12+
<annotations>
13+
<features value="Security"/>
14+
<stories value="Checking customer's password length"/>
15+
<title value="Notify the customer if password length does not match the requirements"/>
16+
<description value="Notify the customer if password length does not match the requirements"/>
17+
<testCaseId value="MC-14367"/>
18+
<group value="security"/>
19+
<group value="mtf_migrated"/>
20+
</annotations>
21+
22+
<!-- Go to storefront home page -->
23+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openStoreFrontHomePage"/>
24+
25+
<!-- See the Registration Link -->
26+
<actionGroup ref="StorefrontSeeHeaderLinksActionGroup" stepKey="seeTheLink"/>
27+
28+
<!-- Click the Registration Link -->
29+
<actionGroup ref="StorefrontClickHeaderLinkActionGroup" stepKey="clickTheLink">
30+
<argument name="linkName" value="Create an Account"/>
31+
</actionGroup>
32+
33+
<!-- Fill Registration Form with Password length is bellow 8 Characters -->
34+
<actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillRegistrationFormPasswordLengthBellowEightCharacters">
35+
<argument name="customer" value="Simple_Customer_With_Password_Length_Is_Below_Eight_Characters"/>
36+
</actionGroup>
37+
38+
<!-- See the Error -->
39+
<actionGroup ref="AssertMessageCustomerCreateAccountPasswordComplexityActionGroup" stepKey="seeTheErrorPasswordLength">
40+
<argument name="message" value="Minimum length of this field must be equal or greater than 8 symbols. Leading and trailing spaces will be ignored."/>
41+
</actionGroup>
42+
</test>
43+
</tests>

dev/tests/functional/tests/app/Magento/Security/Test/TestCase/NewCustomerPasswordComplexityTest.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,24 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
99
<testCase name="Magento\Security\Test\TestCase\NewCustomerPasswordComplexityTest" summary="New customer password complexity" ticketId="MAGETWO-49044">
1010
<variation name="PasswordLengthTest" summary="Customer password length is below 8 characters">
11-
<data name="tag" xsi:type="string">severity:S1</data>
11+
<data name="tag" xsi:type="string">severity:S1,mftf_migrated:yes</data>
1212
<data name="customer/data/firstname" xsi:type="string">john</data>
1313
<data name="customer/data/lastname" xsi:type="string">doe</data>
1414
<data name="customer/data/email" xsi:type="string">johndoe%isolation%@example.com</data>
1515
<data name="customer/data/is_subscribed" xsi:type="string">No</data>
1616
<data name="customer/data/password" xsi:type="string">123123</data>
1717
<data name="customer/data/password_confirmation" xsi:type="string">123123</data>
1818
<constraint name="Magento\Security\Test\Constraint\AssertPasswordLengthErrorMessage" />
19-
<data name="tag" xsi:type="string">mftf_migrated:yes</data>
2019
</variation>
2120
<variation name="PasswordComplexityTest" summary="Customer password is not secure enough">
22-
<data name="tag" xsi:type="string">severity:S1</data>
21+
<data name="tag" xsi:type="string">severity:S1,mftf_migrated:yes</data>
2322
<data name="customer/data/firstname" xsi:type="string">john</data>
2423
<data name="customer/data/lastname" xsi:type="string">doe</data>
2524
<data name="customer/data/email" xsi:type="string">johndoe%isolation%@example.com</data>
2625
<data name="customer/data/is_subscribed" xsi:type="string">No</data>
2726
<data name="customer/data/password" xsi:type="string">123123qa</data>
2827
<data name="customer/data/password_confirmation" xsi:type="string">123123qa</data>
2928
<constraint name="Magento\Security\Test\Constraint\AssertPasswordIsNotSecureEnoughMessage" />
30-
<data name="tag" xsi:type="string">mftf_migrated:yes</data>
3129
</variation>
3230
</testCase>
3331
</config>

0 commit comments

Comments
 (0)