Skip to content

test(e2e): no seeded user can reach a protected route — onboarding and legal gates block every office spec #575

Closed

Description

@thinkclay

Split out of #553. Independent of any Playwright configuration: until a seeded user can reach a protected route, no office e2e spec can pass under any config.

Evidence

auth.setup.ts authenticates [email protected] successfully via the API, then navigates and asserts:

Expected pattern: /dashboard/
Received string:  "http://localhost:8081/onboarding"

The page snapshot shows the profile-completion form, pre-filled with the seeded first name — so the account exists and the session is valid. It simply has not completed onboarding.

The super-admin state has the same problem one layer further on. tests/.auth/super-admin.json is produced, but loading it and navigating to /office/applications lands on the public marketing page. All 20 tests in test-office-applications-kanban.spec.ts fail identically on that.

There is also a versioned legal-acceptance gate (core.legal_documents, migration 342) that redirects to /legal-update before protected routes render. A seeded user needs to be past both.

Why this is not a test-configuration problem

The setup project has been fixed (#574) and now runs and writes its files. The specs are correct. The blocker is that the seed produces accounts which cannot get past the app's own gates — so every assertion about a protected screen fails on the landing or onboarding page instead.

Work

  1. Seed at least one account past onboarding: the profile-completion requirements satisfied so /dashboard renders.
  2. Seed a current legal acceptance for that account, or have auth.setup.ts accept the terms as an explicit setup step. Prefer the seed — a setup step that clicks "Agree and continue" is a test accepting an agreement, which is worth doing deliberately rather than incidentally.
  3. Confirm by loading tests/.auth/super-admin.json and navigating to /office/applications: the kanban board should render, not the marketing page.

Acceptance

Note

This is the same class of problem as several findings in the #539 epic: a thing that looks configured and has never actually executed. The specs, the helpers and the fixtures for the kanban board are all real work that has never once run against the app.

Activity

  1. added a commit that references this issue on Aug 12, 2026
    d5fdd8b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions