Skip to content

Commit db88424

Browse files
Manjusha.SManjusha.S
Manjusha.S
authored and
Manjusha.S
committed
Merge branch 'MQE-3395' into functional--test--automation
merge commits
2 parents 0a85713 + beb1608 commit db88424

File tree

4 files changed

+122
-0
lines changed

4 files changed

+122
-0
lines changed

app/code/Magento/Backend/Test/Mftf/Section/AdminSystemAccountSection.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@
1111
<section name="AdminSystemAccountSection">
1212
<element name="interfaceLocale" type="select" selector="#interface_locale"/>
1313
<element name="currentPassword" type="text" selector="#current_password"/>
14+
<element name="username" type="text" selector="#username"/>
15+
<element name="newPassword" type="text" selector="#password"/>
16+
<element name="passwordConfirmation" type="text" selector="#confirmation"/>
1417
</section>
1518
</sections>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminResetPasswordActionGroup">
12+
<annotations>
13+
<description>Reset password using old password on My Account page.</description>
14+
</annotations>
15+
<amOnPage url="{{AdminSystemAccountPage.url}}" stepKey="openAdminSystemAccountPage" />
16+
<fillField selector="{{AdminSystemAccountSection.newPassword}}" userInput="Admin@12345678" stepKey="enterPassword"/>
17+
<fillField selector="{{AdminSystemAccountSection.passwordConfirmation}}" userInput="Admin@12345678" stepKey="confirmPassword"/>
18+
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveUser"/>
19+
<waitForPageLoad stepKey="waitForPageLoad"/>
20+
<see userInput="This is a required field." stepKey="seeRequiredField1"/>
21+
<fillField selector="{{AdminSystemAccountSection.currentPassword}}" userInput="Invalid12345678" stepKey="fillWrongPassword"/>
22+
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveUser1"/>
23+
<waitForPageLoad stepKey="waitForPageLoad1"/>
24+
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
25+
<see userInput="The password entered for the current user is invalid. Verify the password and try again." stepKey="seeErrorMessage1"/>
26+
<fillField selector="{{AdminSystemAccountSection.newPassword}}" userInput="Admin@12345678" stepKey="enterPassword1"/>
27+
<fillField selector="{{AdminSystemAccountSection.passwordConfirmation}}" userInput="Admin@12345678" stepKey="confirmPassword1"/>
28+
<fillField selector="{{AdminSystemAccountSection.currentPassword}}" userInput="123123aaa" stepKey="fillCorrectPassword"/>
29+
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveUser2"/>
30+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the account." stepKey="seeSuccessMessage"/>
31+
32+
</actionGroup>
33+
</actionGroups>
34+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminResetPasswordUsingOldPasswordActionGroup">
12+
<annotations>
13+
<description>Reset password using old password on All Users page.</description>
14+
</annotations>
15+
<fillField selector="{{AdminEditUserSection.passwordTextField}}" userInput="123123aaa" stepKey="enterPassword"/>
16+
<fillField selector="{{AdminEditUserSection.pwConfirmationTextField}}" userInput="123123aaa" stepKey="confirmPassword"/>
17+
<click selector="{{AdminEditUserSection.saveButton}}" stepKey="clickSaveUser"/>
18+
<waitForPageLoad stepKey="waitForPageLoad"/>
19+
<see userInput="This is a required field." stepKey="seeRequiredField"/>
20+
<fillField selector="{{AdminEditUserSection.currentPasswordField}}" userInput="Invalid12345678" stepKey="enterWrongPassword"/>
21+
<click selector="{{AdminEditUserSection.saveButton}}" stepKey="clickSaveUser1"/>
22+
<waitForPageLoad stepKey="waitForPageLoad1"/>
23+
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
24+
<see userInput="The password entered for the current user is invalid. Verify the password and try again." stepKey="seeErrorMessage"/>
25+
<fillField selector="{{AdminEditUserSection.passwordTextField}}" userInput="123123aaa" stepKey="enterPassword1"/>
26+
<fillField selector="{{AdminEditUserSection.pwConfirmationTextField}}" userInput="123123aaa" stepKey="confirmPassword1"/>
27+
<fillField selector="{{AdminEditUserSection.currentPasswordField}}" userInput="{{_CREDS.magento/MAGENTO_ADMIN_PASSWORD}}" stepKey="enterCurrentPassword"/>
28+
<click selector="{{AdminEditUserSection.saveButton}}" stepKey="clickSaveUser2"/>
29+
<waitForPageLoad stepKey="waitForPageLoad2"/>
30+
<see userInput="You saved the user." stepKey="seeSuccessMessage"/>
31+
32+
</actionGroup>
33+
</actionGroups>
34+
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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="AdminOldPasswordRequiredToResetAdminPasswordTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<stories value="Old Password Required TO Reset Admin Password"/>
15+
<title value="Admin should be able to change old password "/>
16+
<description value="Admin should be able to change old password"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-27477"/>
19+
</annotations>
20+
<before>
21+
<createData entity="AdminConstantUserNameUpdatedPassword" stepKey="createUser"/>
22+
</before>
23+
<after>
24+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin2"/>
25+
<actionGroup ref="AdminDeleteUserActionGroup" stepKey="deleteUser">
26+
<argument name="user" value="AdminConstantUserNameUpdatedPassword"/>
27+
</actionGroup>
28+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin2"/>
29+
</after>
30+
31+
<!-- Login to Admin page -->
32+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
33+
<actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="assertLoggedIn"/>
34+
<actionGroup ref="AdminOpenAdminUsersPageActionGroup" stepKey="navigateToAdminUsersPage"/>
35+
<actionGroup ref="AdminOpenUserEditPageActionGroup" stepKey="AdminOpenUserEditPageActionGroup">
36+
<argument name="user" value="AdminConstantUserNameUpdatedPassword"/>
37+
</actionGroup>
38+
<actionGroup ref="AdminResetPasswordUsingOldPasswordActionGroup" stepKey="resetPassword"/>
39+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
40+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin1">
41+
<argument name="username" value="$$createUser.username$$"/>
42+
<argument name="password" value="123123aaa"/>
43+
</actionGroup>
44+
<actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="seeSuccessLoginMessage"/>
45+
<actionGroup ref="AdminResetPasswordActionGroup" stepKey="resetPassword1"/>
46+
47+
48+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin1"/>
49+
50+
</test>
51+
</tests>

0 commit comments

Comments
 (0)