Handle token expiry mid-session
Expert190 pts
- Session Expiry
- Token Refresh
- Logout Flow
Practice app · Acme Ops
A sign-in page with field validation and an authenticated dashboard.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Test application handling of expired authentication tokens and verify redirection to login.
Your Task
- 1Navigate to the sign-in page at TEST_URL.
- 2Sign in with 'qa@target.dev' and 'Test@123'.
- 3Assert that the dashboard container (#dashboard) is visible.
- 4Click the logout button (#logout-button) to simulate session invalidation.
- 5Assert that the email input field (#username) is visible again upon returning to the sign-in screen.
Validation Checks
- Signs in and validates session invalidation/logout
- Returns to sign-in screen (#username is visible)
- At least 2 assertions pass
Fixtures
- username
- qa@target.dev
- password
- Test@123
Playwright · QA Automation Practice Track · Authentication & storage state