Two issues caused the same class of flake locally: 1. Default workers were CPU-count, but the journal/planner are served by Vite dev (not the production build CI uses). Cold-compiling `/api/auth/register` under N parallel hits produced 30s timeouts on a quarter of runs. Set workers to 1 in both environments for parity with CI. 2. Even sequentially, a button is clickable per Playwright's actionability check before React has hydrated its `onClick`. So the first click after a navigation could fire native form submit (or do nothing), which manifested as "URL never changed to /" or "menuitem Log Out never appeared". Add a `waitForHydration` helper that polls for React fibers (`__reactProps$<id>`) attached to a DOM node and call it after each cross-page navigation that ends in an interactive form or dropdown. CI is unaffected (production builds hydrate fast and didn't expose either bug), but the helper is harmless there. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| brouter-mock.ts | ||
| test.ts | ||