forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deactivate expired users on session prolong (magento#22833)
- Loading branch information
Showing
4 changed files
with
74 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
app/code/Magento/Security/Test/Mftf/Test/AdminNavigateWhileUserExpiredTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
|
||
<test name="AdminNavigateWhileUserExpiredTest"> | ||
<annotations> | ||
<features value="Security"/> | ||
<stories value="Navigate to an admin page after user expiration date passes."/> | ||
<title value="Navigate to an admin page after user expiration date passes"/> | ||
<description value="Navigate to an admin page after user expiration date passes."/> | ||
<testCaseId value="" /> | ||
<severity value="CRITICAL"/> | ||
<group value="security"/> | ||
</annotations> | ||
|
||
<before> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
</before> | ||
<after> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
|
||
<!-- Create user --> | ||
<actionGroup ref="AdminOpenNewUserPageActionGroup" stepKey="openNewUserPage" /> | ||
<generateDate date="+2 minute" format="M d, Y g:i:s A" stepKey="expiresDateTime"/> | ||
<actionGroup ref="AdminFillInUserWithExpirationActionGroup" stepKey="fillInNewUserWithValidExpiration"> | ||
<argument name="expires_at" value="{$expiresDateTime}"/> | ||
</actionGroup> | ||
<grabValueFrom selector="{{AdminNewUserFormSection.username}}" stepKey="grabUsername"/> | ||
<grabValueFrom selector="{{AdminNewUserFormSection.password}}" stepKey="grabPassword"/> | ||
<scrollToTopOfPage stepKey="scrollToTopOfPage"/> | ||
<click selector="{{AdminNewUserFormSection.userInfoTab}}" stepKey="openUserInfoTab"/> | ||
<actionGroup ref="AdminSaveUserSuccessActionGroup" stepKey="saveNewUserWithValidExpirationSuccess"/> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
|
||
<!-- Login as that user --> | ||
<actionGroup ref="LoginAdminWithCredentialsActionGroup" stepKey="loginAsNewAdmin"> | ||
<argument name="adminUser" value="{$grabUsername}"/> | ||
<argument name="adminPassword" value="{$grabPassword}"/> | ||
</actionGroup> | ||
<actionGroup ref="AssertAdminDashboardPageIsVisibleActionGroup" stepKey="seeDashboardPage"/> | ||
<wait time="120" stepKey="waitForUserToExpire"/> | ||
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomers"/> | ||
<!-- Confirm that user is logged out --> | ||
<seeInCurrentUrl url="{{AdminLoginPage.url}}" stepKey="seeAdminLoginUrl"/> | ||
|
||
<!-- Delete created user --> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
<actionGroup ref="AdminDeleteCustomUserActionGroup" stepKey="deleteUser"> | ||
<argument name="user" value="NewAdminUser"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters