Skip to content

test: migrate template settings tests to Storybook play stories#26957

Open
ethanndickson wants to merge 2 commits into
mainfrom
ethan/storybook-template-settings
Open

test: migrate template settings tests to Storybook play stories#26957
ethanndickson wants to merge 2 commits into
mainfrom
ethan/storybook-template-settings

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Jul 2, 2026

Copy link
Copy Markdown
Member

Migrates the TemplateSettingsPage tests from vitest to Storybook play-function stories.

The old TemplateSettingsPage.test.tsx rendered the full settings layout through renderWithTemplateSettingsLayout 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 as Storybook interaction tests instead of in the vitest unit project.

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

…: migrate template settings tests to Storybook play stories
@ethanndickson ethanndickson marked this pull request as ready for review July 2, 2026 07:16
@linear-code

linear-code Bot commented Jul 2, 2026

Copy link
Copy Markdown

CODAGT-686

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ethanndickson ethanndickson changed the title test(site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage): migrate template settings tests to Storybook play stories test: migrate template settings tests to Storybook play stories Jul 2, 2026
@ethanndickson ethanndickson requested a review from jakehwll July 2, 2026 07:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 5811fbd98e

ℹ️ 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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants