p2-signup-enumeration-e2e

readytype/backlogpriority/p2severity/lowtopic/authtopic/enumerationtopic/testing

p2 · Signup enumeration E2E

TL;DR

Playwright spec proving existing email vs new email signup both land on the same “check your inbox” UI (data-testid="signup-check-inbox"), with no error toast leaking existence.

Description

  • Problem: C3 behavior is implemented in signup() but not asserted in E2E. Timing equalization is tracked separately ([[Projects/personal-finance-notion/backlog/p1-signup-timing-equalization|p1 signup timing]]).
  • Context: Spun out from [[Projects/personal-finance-notion/backlog/done/p0-c3-signup-enumeration|C3 done]].

Acceptance criteria

  • [ ] Guest spec: sign up with brand-new email → signup-check-inbox visible; no session / not redirected to /
  • [ ] Same spec (or second test): sign up again with same email (verified user from first test after verify, or pre-seeded user) → identical check-inbox UI; no “already exists” toast
  • [ ] Optional: assert correct email template captured (email-verify vs account-exists-already) via email stub API — internal only, not user-visible

Implications

If skipped

  • Future refactors to signup() or signup page could re-introduce enumeration in UI or response handling without CI catching it.

Why this priority

  • p2 — product behavior is already correct; this locks the contract in CI so refactors cannot reintroduce “email exists” UI leaks.

When shipped

  • C3 acceptance (“identical outcome in browser”) is enforced automatically alongside functional code.

Dependencies

  • E2E email stub enabled in test env (same as email-verify.spec.ts).

Links

  • App repo: tests/e2e/, tests/pom/signup.page.ts, src/lib/actions/auth.ts