Skip to content

Commit acc9454

Browse files
glo74170Manjusha.S
authored andcommitted
MC-27441 : [SPM-2] Password Reset settings (for Admin)
1 parent a945273 commit acc9454

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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="AdminPasswordResetSettingsTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<title value="[SPM-2] Password Reset settings (for Admin)"/>
15+
<description value="Password Reset settings for Admin"/>
16+
<severity value="MINOR"/>
17+
<testCaseId value="MC-27441"/>
18+
<group value="Admin_UI"/>
19+
</annotations>
20+
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
23+
</before>
24+
25+
<after>
26+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
27+
</after>
28+
29+
<!-- Goto Configurable>Advance>Admin and expand security Tab -->
30+
<amOnPage url="{{AdminConfigAdvancedAdmin.url}}" stepKey="navigateToConfigurationPage"/>
31+
<waitForPageLoad stepKey="wait1"/>
32+
<conditionalClick stepKey="expandSecurityTab" selector="{{AdminSection.SecurityTab}}" dependentSelector="{{AdminSection.CheckIfTabExpand}}" visible="true"/>
33+
34+
<!-- Uncheck system value and enter the number for password reset limitation -->
35+
<actionGroup ref="AdminUncheckUseSystemValueActionGroup" stepKey="uncheckUseSystemValue">
36+
<argument name="rowId" value="row_admin_security_max_number_password_reset_requests"/>
37+
</actionGroup>
38+
<waitForPageLoad stepKey="waitForPageLoad"/>
39+
<fillField selector="{{AdminSection.passwordLimitation}}" userInput="1" stepKey="fillNumbersForPasswordLimitation"/>
40+
<waitForPageLoad stepKey="waitForPageLoad1"/>
41+
42+
<!-- check system value after entering the password reset limitation and save the configuration-->
43+
<actionGroup ref="AdminCheckUseSystemValueActionGroup" stepKey="checkUseSystemValue">
44+
<argument name="rowId" value="row_admin_security_max_number_password_reset_requests"/>
45+
</actionGroup>
46+
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/>
47+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="assertSaveCookieLifetimeSuccessMessage">
48+
<argument name="message" value="You saved the configuration."/>
49+
<argument name="messageType" value="success"/>
50+
</actionGroup>
51+
52+
<!--Collabase Security Tab and log out -->
53+
<click selector="{{AdminSection.SecurityTab}}" stepKey="minimiseSecurityTab"/>
54+
55+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
56+
57+
<!-- login with wrong password and verify the error message first time1-->
58+
<amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/>
59+
<fillField selector="{{AdminLoginFormSection.username}}" userInput="admin" stepKey="fillUsername"/>
60+
<fillField selector="{{AdminLoginFormSection.password}}" userInput="Admin@1234" stepKey="fillPassword"/>
61+
<click selector="{{AdminLoginFormSection.signIn}}" stepKey="clickLogin"/>
62+
<actionGroup ref="AssertMessageOnAdminLoginActionGroup" stepKey="verifyErrorMessage"/>
63+
64+
<!-- login with wrong password and verify the error message first time2-->
65+
<amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin1"/>
66+
<fillField selector="{{AdminLoginFormSection.username}}" userInput="admin" stepKey="fillUsername1"/>
67+
<fillField selector="{{AdminLoginFormSection.password}}" userInput="Admin@1" stepKey="fillPassword1"/>
68+
<click selector="{{AdminLoginFormSection.signIn}}" stepKey="clickLogin1"/>
69+
<actionGroup ref="AssertMessageOnAdminLoginActionGroup" stepKey="verifyErrorMessage1"/>
70+
71+
<!-- login with valid credentials-->
72+
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin1"/>
73+
74+
</test>
75+
</tests>

app/code/Magento/Config/Test/Mftf/Section/AdminSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
<element name="EnableSystemValue" type="button" selector="#admin_security_admin_account_sharing_inherit"/>
1616
<element name="systemValueForMaximumLoginFailures" type="checkbox" selector="#admin_security_lockout_failures_inherit"/>
1717
<element name="MaximumLoginFailures" type="input" selector="#admin_security_lockout_failures"/>
18+
<element name="passwordLimitation" type="input" selector="//input[@id='admin_security_max_number_password_reset_requests']"/>
1819
</section>
1920
</sections>

0 commit comments

Comments
 (0)