test(fe): run the signing-in session scenarios in a browser - #4287
test(fe): run the signing-in session scenarios in a browser#4287sea-snake wants to merge 148 commits into
Conversation
|
✅ No security or compliance issues detected. Reviewed everything up to 0d64d5f. Security Overview
Detected Code Changes
|
There was a problem hiding this comment.
Pull request overview
Adds a new Playwright E2E spec to exercise the “Signing in” app-session scenarios in a real browser, validating what state a successful sign-in leaves in the test app (session/account/delegation) and how repeated sign-ins behave within the same browser context.
Changes:
- Introduces
signing-in.spec.tscovering FIRST-1 and FIRST-3 behavior plus a per-app account check. - Verifies (a) first sign-in yields session + delegation, (b) repeated sign-in replaces the session, and (c) the same identity derives different app accounts on different origins.
Suppressed comments (1)
src/frontend/tests/e2e-playwright/routes/authorize/app-sessions/signing-in.spec.ts:61
- The comparison against
here ?? ""has the same issue as above: it can hide a missing/empty account value and reduce test signal. It’s clearer to assert both accounts are non-empty and compare against a concrete string.
await testApp.signIn(authenticate);
const here = await testApp.account.textContent();
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
6425fe6 to
6b872d5
Compare
|
Fixed. |
578e1c4 to
6f4a991
Compare
6f4a991 to
f0da0f5
Compare
Signing in twice was asserted by the session key changing, which proves only that it rotated — a second ceremony that had registered a second browser would rotate one too. What the scenario claims is one entry for that pairing, so that is what is counted. The key is also no longer reported by the panel, so the check was resting on a readout that has gone. Read from a second browser, because a browser reading its own list finds itself under no Sign out button: signing out the browser in front of you goes through the identity's own sign-out instead. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LVi99RYo2jyi2kCurgovNJ
The "Signing in" scenarios of
docs/ongoing/session-test-scenarios.md— FIRST-1 and FIRST-3 — plus the per-app account, which the designs promise and no scenario there names.What a sign-in leaves behind: an account the app acts as, a delegation to act with straight away rather than at the next foreground, and one sign-in per browser rather than one per attempt.
FIRST-1 lets
authorizePageperform the ceremony, so its body is the provider's side and the panel is read inafterEach. The other two sign in twice, which that fixture does not do, so they drive the app themselves.