test(fe): run the session-ending scenarios in a browser - #4290
Open
sea-snake wants to merge 144 commits into
Open
test(fe): run the session-ending scenarios in a browser#4290sea-snake wants to merge 144 commits into
sea-snake wants to merge 144 commits into
Conversation
sea-snake
marked this pull request as ready for review
August 26, 2026 12:56
|
✅ No security or compliance issues detected. Reviewed everything up to 5c178c2. Security Overview
Detected Code Changes
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Playwright E2E spec that exercises the “Ending a session” browser scenarios (EXIT-1, EXIT-3, EXIT-5, EXIT-6) to validate session teardown behavior when signing out in-app and when signing the whole browser out from II settings.
Changes:
- Introduces E2E coverage for sign-out persistence across reload and for silent re-auth failing when there is no session to resume.
- Verifies that “sign out this browser” from settings revokes access (detected on next delegation refresh after aging).
- Adds multi-origin checks: signing out of one app/origin doesn’t affect another, and a signed-out browser entry is reused after signing back in.
Suppressed comments (1)
src/frontend/tests/e2e-playwright/routes/authorize/app-sessions/ending-a-session.spec.ts:138
locator.count()does not wait for the list to render. If the "Sign out" buttons haven’t appeared yet,listedcan be 0 and the latertoHaveCount(listed)check becomes vacuous. Also, the "Signed out" visibility check uses the default 5s expect timeout, which can be flaky for a backend-driven sign-out.
const listed = await settings
.getByRole("button", { name: "Sign out" })
.count();
await settings.getByRole("button", { name: "Sign out" }).first().click();
await expect(settings.getByText("Signed out")).toBeVisible();
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
sea-snake
force-pushed
the
test/session-e2e-ending-a-session
branch
from
August 26, 2026 13:07
ea59096 to
f229a79
Compare
sea-snake
force-pushed
the
test/session-e2e-ending-a-session
branch
from
August 26, 2026 13:34
f229a79 to
797d383
Compare
sea-snake
force-pushed
the
test/session-e2e-ending-a-session
branch
from
August 26, 2026 13:36
797d383 to
4cc006d
Compare
sea-snake
force-pushed
the
test/session-e2e-ending-a-session
branch
from
August 26, 2026 13:53
4cc006d to
aeb6fd6
Compare
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
sea-snake
removed this pull request from stack #4294
September 9, 2026 20:42
sea-snake
added this pull request to stack #4327
September 9, 2026 20:44
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
MRmarioruci
reviewed
Sep 11, 2026
…2e-ending-a-session
sea-snake
removed this pull request from stack #4327
September 11, 2026 14:36
sea-snake
added this pull request to stack #4330
September 11, 2026 14:36
…2e-ending-a-session
One app only proves one session was ended; what the browser-wide action claims is that it reaches every app that browser signed into. So two are signed in before it, and both are checked. It also splits in two, because the two cases are reached differently. The list offers no button for the browser reading it — signing out the browser in front of you goes through the identity's own sign-out, where forgetting is what revokes — so there is one scenario for this browser through that route, and one for another browser through the list, read from a second context where the entry does carry a button. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LVi99RYo2jyi2kCurgovNJ
…2e-ending-a-session
…2e-ending-a-session
…2e-ending-a-session
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.
The "Ending a session" scenarios of
docs/ongoing/session-test-scenarios.md— EXIT-1, EXIT-3, EXIT-5 and EXIT-6 — and the silent re-issue that has nothing left to answer from.Access that can be ended is the point of the design, so this is where it gets ended: by the app signing out, and by the identity's owner signing a whole browser out from settings.
The settings scenario is the one to read: END-5 lets an app keep working until the delegation it holds expires, so nothing shows the moment access is revoked, and it is the next mint that discovers the session is gone. The test therefore ages the delegation and asks for a replacement rather than expecting an instant answer.