component-tests
Component tests
Each package suite starts one story server, a plain Vite dev server for packages/stories, and every worker shares it (packages/stories/playwright/config.ts:17-26; CI uses 2 workers, config.ts:15). With fullyParallel (config.ts:12), the tests of one file run on several workers in any order. There is no backend: server, SDK and sync modules are in-page mocks. Every test gets a fresh context, and mount is a full page navigation to the frame (packages/stories/playwright/story.ts:37). Slow or flaky component tests in CI have come from five sources: the shared server's dependency optimizer, module resolution that depended on the install layout, a cold first story, a product race (the mobile drawer), or an action that ran before the UI reached the state it needed.
Read these first rather than repeating them:
packages/stories/playwright/README.mdcovers layout, run commands and "Adding a test".packages/app/AGENTS.md"Tests" decides whether a test should exist, when theme or direction cases are allowed, and that a regression test must fail before the fix.packages/app/e2e/AGENTS.md"Test Hygiene" applies here unchanged.