fix(e2e): use storageState pattern for login page screenshot test#228
Merged
Conversation
The Login page screenshot test used `browser.newContext()` to get an
unauthenticated session, but this bare context lacked all project-level
settings (viewport, baseURL, timeouts, device emulation), causing the
SPA to never render within the timeout on CI.
Switch to `test.use({ storageState: { cookies: [], origins: [] } })`
which clears auth cookies while preserving all project settings —
matching the proven pattern used by auth-guard and login-logout tests.
Also fix the `screenshots` script in e2e/package.json to reference the
correct `desktop` project name (not the non-existent `desktop-lg`).
Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
🎉 This PR is included in version 1.9.0-beta.63 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This was referenced Feb 23, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Login pagescreenshot test that fails in CI E2E shards 5 and 10 on the EPIC-05 promotion PR (EPIC-05: Budget Management — promote to stable #160)browser.newContext()creates a bare context without project-level settings (viewport, baseURL, timeouts), so the SPA never renders within the timeouttest.use({ storageState: { cookies: [], origins: [] } })which clears auth while preserving all project settings — the same pattern used byauth-guard.spec.tsandlogin-logout.spec.tsscreenshotsscript referencing non-existentdesktop-lgproject (correct name isdesktop)Test plan
🤖 Generated with Claude Code