Revoke All Sessions Function
Prepared by | Test Scenario for |
---|---|
Foivos Polykarpou | Revoke All Sessions Function |
Overview
Title | Test Name | Objective |
---|---|---|
Revoke All Sessions Function | revoke.js | Purpose
|
Prerequisites
Dependencies Installed: Make sure the required npm packages mentioned in Login with valid and wrong credentials are installed
Install minimist for environment variable (baseURL)
2.1. Ensure that the
loginfc.js
module is correctly set up and exports thebaseUrl
object.2.2. The
chai
library should be installed for assertions.2.3. The test environment should have access to the web application at the specified
baseUrl
.
npm install puppeteer minimist
Test Steps
4.1. Navigate to Security Page
Use the
page.goto
method to navigate to the security page.Verify successful navigation by checking the current URL.
4.2. Revoke Sessions
Select all "Revoke" buttons on the page.
Iterate through the buttons, clicking each one except the last.
Introduce a delay after each click to ensure the revocation process completes.
4.3. Error Handling
If an error occurs during the process, capture a screenshot and log the page's HTML content for debugging.
Expected Result
5.1. The function should successfully revoke all active sessions except the last one without errors.
5.2. The current URL should confirm successful navigation to the security page.