Skip to content

test(ats): seed the whole pipeline; make an empty board fail instead of skip - #554

Merged
thinkclay merged 1 commit into
mainfrom
claude/ats-seed-and-e2e
Aug 10, 2026
Merged

thinkclay merged 1 commit into
mainfrom
claude/ats-seed-and-e2e

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

#538, plus the reason it was worse than filed.

The seed

006 landed six applications across four stages with no source, no screening answers, no messages and no activity — enough for a board to render, not enough for anything to be tested.

Extended with the missing stages (inquired, hired, rejected, withdrawn), source and screening data on the existing rows, a message thread, and the stage history in core.application_activity. Nothing had ever written to that table, which is why the office UI hardcoded stageHistory to [] and time-to-hire couldn't compute — so #531 now has something real to read.

Idempotent. Every column and constraint the SQL depends on was checked against the live schema over PostgREST.

I did not execute the seed — you're working in this database in another session, so I stayed read-only and didn't run supa db seed, db reset, or kill any process.

The suite

Each behavioural test calls test.skip() when its column is empty, so on an unseeded board all ten opt out and the run reports green having exercised nothing. Added a "Fixture preconditions" block that fails instead, naming the seed command.

Also fixed 20 pre-existing type errors in the spec, down to zero — test.skip("msg") matches no Playwright overload (it takes (condition, description) and was relying on the string being truthy), and let sourceColumn = KANBAN_COLUMNS.NEW infers the literal "new".

The part I did not do, deliberately

The suite doesn't run at all. Filed as #553:

  1. testMatch is an explicit allow-list of 9 patterns. There are 15 office specs; two match. The kanban suite — ~30 tests, 617 lines — isn't one. Repo-wide Playwright finds 100 tests in 9 files.
  2. The setup project uses testDir: "./tests/e2e", but auth.setup.ts lives at tests/infrastructure/playwright/setup/setup/. So it matches nothing and tests/.auth/*.json is never created — every spec using storageState would fail at startup.

These hide each other. Adding the spec to testMatch alone makes it fail on the missing auth state; fixing the setup alone changes nothing visible. I didn't flip either: turning on ~30 never-run tests I can't execute locally (no dev server, no auth state, and I won't create one by entering credentials) would be shipping unverified.

#538 said the suite "passes on an empty board." The truth is it never ran — which is why nobody noticed the board had been empty since the tRPC→SDK migration.

🤖 Generated with Claude Code

…suite

## The seed

006 landed six applications across four stages with no source, no screening
answers, no messages and no activity. Enough for a board to render, not enough
for anything to be tested.

Extends it with the missing stages (inquired, hired, rejected, withdrawn),
source and screening data on the existing rows, a message thread, and — most
of all — the stage history in core.application_activity. Nothing had ever
written to that table, which is why the office UI hardcoded stageHistory to []
and time-to-hire could not compute (#531). The synthesised transitions give it
something real to read.

Idempotent: re-running changes nothing. Every column and constraint the SQL
depends on was checked against the live local schema over PostgREST rather than
assumed — I did not execute the seed, because another session is working in
this database.

## The suite

Each behavioural test calls `test.skip()` when its column is empty, so on an
unseeded board all ten opt out and the run reports green having exercised
nothing. Adds a "Fixture preconditions" block that *fails* instead, naming the
seed command, so a missing fixture is a red suite rather than a silent pass.

Also fixes 20 pre-existing type errors in the spec, down to zero:
`test.skip("msg")` matched no Playwright overload — it takes
`(condition, description)` and was relying on the string being truthy — and
`let sourceColumn = KANBAN_COLUMNS.NEW` infers the literal `"new"`, so every
later reassignment was an error.

## What this does not fix

The suite still does not run at all, for two reasons outside this change. See
the follow-up issue; flipping either on without the other just turns CI red.

Refs #538
@thinkclay
thinkclay merged commit 245bba7 into main Aug 10, 2026
6 of 7 checks passed
@thinkclay
thinkclay deleted the claude/ats-seed-and-e2e branch August 10, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant