Repository navigation
Description
What
nx run scf-core:test fails on main (63c85be63) with 12 failures out of 1191, across three files in features/office/applications. This is not a flake and not a clock-dependent failure — it reproduces identically on a clean tree.
Found while verifying the dependabot batch (#650). I established a baseline on main specifically to prove the bumps were not the cause: 1191 total / 1121 passed / 12 failed, same test names, before and after. So this is standing red, unrelated to dependencies.
The failures
1. features/office/applications/__tests__/ApplicationsLanes.test.tsx — 10 tests
All ten die at render with the same React error:
Error: Objects are not valid as a React child (found: object with keys {label, value}).
If you meant to render a collection of children, use an array instead.
at throwOnInvalidObjectTypeImpl (react-dom-client.development.js:6099)
at reconcileChildFibersImpl (react-dom-client.development.js:7058)
{label, value} is the shape of LaneColumn, the labelled-cell form added to @scaffald/ui's Lane in Scaffald/ui#21 ("stacked rows were a column of orphaned values"). LaneProps.columns is typed Array<ReactNode | LaneColumn> and ApplicationsLanes.tsx:160 passes the labelled form. Under jsdom the object reaches React as a child instead of going through the isLaneColumn branch — so something on the test's render path is not the Lane the types describe.
Failing tests:
§12 #7, days in stage— shows days in the current stage, not days since applying§12 #7, days in stage— sorts the stalest row to the top of its stage§12 #8, the reasons to pick one row over another— puts score, source, union status and assignment on the row§12 #8, the reasons to pick one row over another— says Unassigned rather than leaving the cell blank§12 #9, empty states— shows rows instead of the empty state once a stage has any§12 #17, withdrawn is not rejected— distinguishes the two inside the shared Closed lane§12 #17, withdrawn is not rejected— never marks a terminal row overdue however old it isoverdue signalling— names what is late rather than only flagging that something isoverdue signalling— stays quiet inside the promiseselection— reports the row that was pressed
2. features/office/applications/components/__tests__/ApplicationsFilters.test.tsx — 1 test
resets filters when Clear Filters pressed:
TestingLibraryElementError: Unable to find an accessible element with the role "button"
and name `/clear filters/i`
The rendered tree has only combobox/option roles (three data-testid="responsive-select" elements). The button either does not render under the test's conditions or carries no accessible name on web — which is the same class of problem as #638 (accessibilityState is a no-op on web).
3. features/office/applications/hooks/__tests__/useApplicationStatusChange.test.ts — 1 test
executes valid non-critical transitions immediately:
TypeError: queryClient.getQueriesData is not a function
at patchCachedStatus (hooks/useApplicationStatusChange.ts:129:31)
at Object.changeStatus (hooks/useApplicationStatusChange.ts:247:24)
The test's queryClient double predates patchCachedStatus reaching for getQueriesData. Straightforwardly a stale test double, independent of the other two.
Reproduce
nx reset && nx run scf-core:testscf-core:test writes to tests/reports/coverage/test-results.json rather than stdout, so read the failures from there:
node -e "const r=require('./tests/reports/coverage/test-results.json');console.log(r.numPassedTests,'/',r.numTotalTests)"Note packages/ui must be built first (cd packages/ui && tsup) — its dist/ is gitignored, and a stale one produces a different, misleading failure (Module '@scaffald/ui' has no exported member 'ListToolbar' at typecheck).
Acceptance criteria
-
nx run scf-core:testreports 1191/1191. - The
ApplicationsLanesrender path is fixed at the cause, not by reverting the callers to bareReactNodecolumns — the labelled form is what makes a stacked row readable (fix(Lane): stacked rows were a column of orphaned values ui#21). -
ApplicationsFilters's Clear Filters control is reachable by role and name on web. - The
useApplicationStatusChangetest double covers thequeryClientsurface the hook actually uses.
Context
Related to #622 (SCF prototype parity — these are the screen primitives that landed in that epic) and #638 (web accessibility roles). The suite is excluded from aggregate commands per packages/scf-core/vitest.config.ts:17, which is part of why this went unnoticed.
Activity
chore(deps): batch dependabot #550, #551, #619, #641, #642 — and unbl…
chore(deps): batch dependabot #550, #551, #619, #641, #642 — and unbl…
thinkclay commentedon Sep 1, 2026
Fixed in #674.
Lane's
columnsisReactNode[]again — theReactNode | { label, value }union is gone, and the label is composed by the caller (ApplicationsLanes, in a smallcell()helper that also decides what a narrow row drops). A render path is the wrong place to be guessing what a value is, whatever the specific reason the guard evaluated differently under vitest than in the app.Four explanations were checked and eliminated first — stale
dist, a global mock,isValidElementas the fragile clause, a stale Vite cache — and bisecting reachedLanealone with a single labelled column. Scaffald/ui#27 has the detail, andLane.columns.test.tsxkeeps the union from coming back.Behaviour verified unchanged against the running app at both widths:
scf-coreis now 1148/1148 with--skip-nx-cache. The other three failures that were red alongside these turned out to be unrelated and are fixed in #676 — including one that was not a stale test at all, but #675.