Skip to content

test(e2e): the office kanban suite runs, and passes, against the real board - #808

Merged
thinkclay merged 1 commit into
mainfrom
test/e2e-office-suite
Sep 17, 2026
Merged

thinkclay merged 1 commit into
mainfrom
test/e2e-office-suite

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Closes #553.

What was actually wrong

The suite had never executed. The auth-setup half was fixed in #574; this PR is the other half plus everything that surfaced once the specs ran for the first time. Every change is a selector or a flow in test code; no product code changes.

Symptom Cause Fix
Spec not in the plan Not in the root testMatch allow-list Added, one spec, per the two-step rule in the config
Super-admin setup timed out on every fresh run; only the retry wrote tests/.auth/super-admin.json waitUntil: 'networkidle' never settles on the Expo dev server's HMR socket domcontentloaded, same as the admin and user steps
Every test timed out waiting for columns The page opens in the Lanes view now; the board is behind a segmented control Setup clicks the Board segment
Candidate names never resolved locator('text') — react-native-web renders Text as <div dir="auto">, there is no <text> element First text line of the card
Cards never found, counts doubled [draggable="true"] (dnd-kit sets none) and [role="button"] (matched every Move menu) [data-testid^="kanban-card-"], filtered by name
Totals one short Helper column list lacked inquired Added
"Rejected" label missing Board labels the terminal column "Closed" Assertion updated
Modal buttons never found The modal's data-testid props never reach the DOM (ui Button/TextArea do not forward them) Located by accessible name and placeholder
Drags to Offer/Hired/Closed could not land Columns off the 1280 px viewport; dnd-kit does not auto-scroll a RNW ScrollView 2800 px viewport for this spec
Drops under the cookie banner swallowed Banner floats over the board Consent pre-answered via addInitScript
"confirms hiring with optional notes" impossible Hire is now gated behind the success-fee clickwrap and a card payment; handleConfirm returns early for hires Test pins the gate instead: notes field present, no bare confirm, cancel restores

Verified

Not done here, on purpose: #553's third box, "reverting the employer applications endpoint turns the suite red", was not re-proved by a revert. The fixture-precondition block from #538 is what makes an empty board fail rather than skip, and the first run in this session showed the whole suite red rather than green-by-skipping when the board could not be reached.

🤖 Generated with Claude Code

… board (#553)

The suite had never executed: it was not in the root config's testMatch,
and once it was, it had been written against a DOM the board no longer
has. Every fix is a selector or a flow, none is a product change:

- playwright.config.ts: add the kanban spec to testMatch (one at a time,
  as #553 asks; the other office specs stay off until each is green).
- auth.setup.ts: the super-admin step waited for `networkidle`, which the
  Expo dev server's HMR socket never reaches, so it timed out on every
  fresh run and only the retry wrote tests/.auth/super-admin.json. It
  waits for `domcontentloaded` like the other two steps.
- kanban-helpers.ts: cards are `[data-testid^="kanban-card-"]`, not
  `[draggable]` (dnd-kit sets none) or `[role="button"]` (which also
  matched every Move menu and doubled the counts); a card is found by
  filtering those on the candidate name; `inquired` joins the column
  list, so the summary equals the cards on the page.
- the spec: the page opens in the Lanes view now, so the setup clicks the
  Board segment; candidate names come from the card's first text line
  (react-native-web has no `<text>` element for `locator('text')` to
  find); the rejected column reads "Closed"; the modal is located by
  button name and placeholder because its `data-testid` props never reach
  the DOM; the viewport is wide enough that every drag target is on
  screen; the cookie banner is pre-answered so it cannot swallow a drop;
  and the hire test pins the success-fee gate (notes field, no bare
  confirm, cancel restores) instead of a confirm that no longer exists.

Verified: 23/23 against `expo export --platform web` + `expo serve` on
8081 with the local stack and the seeded ATS fixtures, from a deleted
tests/.auth. Against `expo start --web` the same run OOMs Metro's 8 GB
heap after ~9 minutes of parallel SSR renders; the export is the target
the root config wants.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
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.

test(e2e): the office suite never runs — excluded from testMatch, and its auth setup is outside testDir

1 participant