You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(e2e): no seeded user can reach a protected route — onboarding and legal gates block every office spec #575
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.jsonis 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
Seed at least one account past onboarding: the profile-completion requirements satisfied so /dashboard renders.
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.
Confirm by loading tests/.auth/super-admin.json and navigating to /office/applications: the kanban board should render, not the marketing page.
Acceptance
auth.setup.ts produces all three files with no failures.
A spec using tests/.auth/super-admin.json reaches /office/applications and sees the board.
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
fix(seeds): get demo accounts past the legal gate, and the e2e users …