mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
Migrates the CreateUserPage tests from vitest to Storybook play-function stories. The old `CreateUserPage.test.tsx` rendered the full page through `renderWithAuth` and MSW, which is slow and contributes to `test-js` timeout flakes. The new stories seed the react-query cache directly and assert the same behavior in `play` functions, so they run in the Storybook test lane instead of the vitest `unit` project. Coverage is preserved: a success story asserts the success toast after creating a user, and an error story asserts that an API failure surfaces in the form's error alert. Relates to CODAGT-686 Relates to https://github.com/coder/internal/issues/1598