Commit 2fff666
ci+test: stabilize frontend on arc-runner (timeout, ResizeObserver, pin to ubuntu-latest)
The Backend job now passes on ubuntu-latest (see prior commit). The
Frontend job was also failing on the arc-runner, with two distinct
root causes — both pre-existing latent issues that only became visible
once the upstream Test step got past the gcc problem and the suite
actually started running:
1. **45 "Test timed out in 5000ms" failures.** The arc-runner is
resource-starved enough that vitest's default 5s testTimeout is
below the noise floor for tests that mount QueryClient + Router +
lazy-loaded chart components. Bump `testTimeout` and `hookTimeout`n in `vite.config.ts` to 30s — generous enough to absorb CI jitter
while still catching genuinely runaway tests. Local full-suite
runtime is unchanged (~80s end-to-end).
2. **~10 "ReferenceError: ResizeObserver is not defined" failures.**
jsdom doesn't ship `ResizeObserver`. A couple of individual test
files installed ad-hoc `vi.stubGlobal('ResizeObserver', …)` shims,
but as soon as ANY non-stubbing test imports a chart (Recharts
ResponsiveContainer) or a grid (react-grid-layout) component
transitively, it crashes. Install a global polyfill in
`src/test-setup.ts`, matching what we already do for
`IntersectionObserver` and `EventSource`. Removes per-test
boilerplate that lived in `SmallMultiplesChart.test.tsx` and
`DashboardGrid.mobile.test.tsx` (those files keep their local
stubs — the global polyfill just makes them no-ops).
3. **Pin Frontend job to ubuntu-latest** for the same reason as
Backend: even with the 30s timeout, the arc-runner's throughput is
inconsistent enough that we trade flakes for wall-clock and burnt
minutes. Re-pin to arc-runner once the runner image gets the
bandwidth budget.
Verified locally:
- `npx tsc --noEmit` clean
- `npm test -- --run` -> 397 files / 4137 tests / 0 failures
- `npm run lint` (24 audit stages) clean
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 93423ff commit 2fff666
3 files changed
Lines changed: 32 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
184 | 190 | | |
185 | 191 | | |
186 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
119 | 136 | | |
120 | 137 | | |
121 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
141 | 149 | | |
142 | 150 | | |
143 | 151 | | |
| |||
0 commit comments