File tree 6 files changed +79
-11
lines changed
app/code/Magento/Security/Test/Mftf 6 files changed +79
-11
lines changed Original file line number Diff line number Diff line change 5
5
* See COPYING.txt for license details.
6
6
*/
7
7
-->
8
-
9
8
<actionGroups xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
10
9
xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Test/etc/actionGroupSchema.xsd" >
11
- <actionGroup name =" AdminCreateNewUserWithUserExpirationActionGroup " >
10
+ <actionGroup name =" AdminCreateNewUserWithExpirationActionGroup " >
12
11
<annotations >
13
12
<description >Goes to the Admin Users grid page. Clicks on Create User. Fills in the provided User with an expiration date and saves.</description >
14
13
</annotations >
28
27
<fillField selector =" {{AdminNewUserFormSection.currentPassword}}" userInput =" {{_ENV.MAGENTO_ADMIN_PASSWORD}}" stepKey =" enterCurrentPassword" />
29
28
<click selector =" {{AdminNewUserFormSection.save}}" stepKey =" clickSaveUser" />
30
29
<waitForPageLoad stepKey =" waitForSaveTheUser" />
31
- <see userInput =" You saved the user." stepKey =" seeSuccessMessage" />
32
-
33
30
</actionGroup >
34
31
</actionGroups >
Original file line number Diff line number Diff line change
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 =" AdminSaveUserInvalidExpirationActionGroup" >
11
+ <annotations >
12
+ <description >Error message for saving an admin user with an invalid expiration date.</description >
13
+ </annotations >
14
+ <see selector =" {{AdminMessagesSection.errorMessage}}" userInput =' "Expiration date" must be later than the current date.' stepKey =" seeErrorMessage" />
15
+ </actionGroup >
16
+ </actionGroups >
Original file line number Diff line number Diff line change
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 =" AdminSaveUserSuccessActionGroup" >
11
+ <annotations >
12
+ <description >Success message for saving an admin user successfully.</description >
13
+ </annotations >
14
+ <see userInput =" You saved the user." stepKey =" seeSuccessMessage" />
15
+ </actionGroup >
16
+ </actionGroups >
Original file line number Diff line number Diff line change 8
8
9
9
<entities xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
10
10
xsi : noNamespaceSchemaLocation =" urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd" >
11
+
11
12
<entity name =" NewAdminUserWithValidExpiration" type =" user" >
12
- <data key =" username" unique =" suffix" >adminExpired </data >
13
+ <data key =" username" unique =" suffix" >adminExpiresAt </data >
13
14
<data key =" firstname" >John</data >
14
15
<data key =" lastname" >Doe</data >
15
16
<
data key =
" email" unique =
" prefix" >
[email protected] </
data >
26
27
<item >1</item >
27
28
</array >
28
29
</entity >
30
+
31
+ <entity name =" NewAdminUserWithInvalidExpiration" type =" user" extends =" NewAdminUserWithValidExpiration" >
32
+ <data key =" expires_at" >Sep 3, 2000 4:42:36 PM</data >
33
+ </entity >
29
34
</entities >
Original file line number Diff line number Diff line change
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
+ <tests xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
9
+ xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Test/etc/testSchema.xsd" >
10
+ <test name =" AdminUserCreateNewUserWithInvalidExpirationTest" >
11
+ <annotations >
12
+ <features value =" Security" />
13
+ <stories value =" Create new user with invalid expiration date." />
14
+ <title value =" Create new user with invalid expiration date" />
15
+ <description value =" Create new user with invalid expiration date." />
16
+ <testCaseId value =" " />
17
+ <severity value =" CRITICAL" />
18
+ <group value =" security_userexpiration" />
19
+ </annotations >
20
+ <before >
21
+ <!-- Log in to Admin Panel -->
22
+ <actionGroup ref =" LoginAsAdmin" stepKey =" loginAsAdmin" />
23
+ </before >
24
+
25
+ <!-- Create new user with user expiration set -->
26
+ <actionGroup ref =" AdminCreateNewUserWithExpirationActionGroup" stepKey =" fillInNewUserWithInvalidExpiration" >
27
+ <argument name =" user" value =" NewAdminUserWithInvalidExpiration" />
28
+ </actionGroup >
29
+
30
+ <actionGroup ref =" AdminSaveUserInvalidExpirationActionGroup" stepKey =" saveNewUserWithInvalidExpirationError" />
31
+ </test >
32
+ </tests >
Original file line number Diff line number Diff line change 7
7
-->
8
8
<tests xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
9
9
xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Test/etc/testSchema.xsd" >
10
- <test name =" AdminUserCreateNewUserWithExpirationTest " >
10
+ <test name =" AdminUserCreateNewUserWithValidExpirationTest " >
11
11
<annotations >
12
12
<features value =" Security" />
13
- <stories value =" Create new user with expiration date." />
14
- <title value =" Create new user with expiration date" />
15
- <description value =" Create new user with expiration date." />
13
+ <stories value =" Create new user with valid expiration date." />
14
+ <title value =" Create new user with valid expiration date" />
15
+ <description value =" Create new user with valid expiration date." />
16
16
<testCaseId value =" " />
17
17
<severity value =" CRITICAL" />
18
- <group value =" security " />
18
+ <group value =" security_userexpiration " />
19
19
</annotations >
20
20
<before >
21
21
<!-- Log in to Admin Panel -->
22
22
<actionGroup ref =" LoginAsAdmin" stepKey =" loginAsAdmin" />
23
23
</before >
24
24
25
25
<!-- Create new user with user expiration set -->
26
- <actionGroup ref =" AdminCreateNewUserWithUserExpirationActionGroup " stepKey =" createNewUserWithValidExpiration " >
26
+ <actionGroup ref =" AdminCreateNewUserWithExpirationActionGroup " stepKey =" fillInNewUserWithValidExpiration " >
27
27
<argument name =" user" value =" NewAdminUserWithValidExpiration" />
28
28
</actionGroup >
29
+
30
+ <actionGroup ref =" AdminSaveUserSuccessActionGroup" stepKey =" saveNewUserWithValidExpirationSuccess" />
29
31
</test >
30
32
</tests >
You can’t perform that action at this time.
0 commit comments