test: migrate template settings tests to Storybook play stories#26957
test: migrate template settings tests to Storybook play stories#26957ethanndickson wants to merge 2 commits into
Conversation
…: migrate template settings tests to Storybook play stories
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 436ba99714
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |

Migrates the TemplateSettingsPage tests from vitest to Storybook play-function stories.
The old
TemplateSettingsPage.test.tsxrendered the full settings layout throughrenderWithTemplateSettingsLayoutand MSW, which is slow and contributes totest-jstimeout flakes. The new stories seed the react-query cache directly and assert the same behavior inplayfunctions, so they run as Storybook interaction tests instead of in the vitestunitproject.Coverage is preserved across four flows: a successful metadata update, the validation error surfaced in the form when the name is already taken, deprecating a template when the access_control entitlement is present, and leaving the deprecation message empty when it is not. The pure-logic description validation tests stay in
TemplateSettingsPage.test.tsx.Relates to CODAGT-686