Skip to content

test: migrate WorkspacesPage tests to Storybook play stories#26958

Open
ethanndickson wants to merge 1 commit into
mainfrom
ethan/storybook-workspaces-page
Open

test: migrate WorkspacesPage tests to Storybook play stories#26958
ethanndickson wants to merge 1 commit into
mainfrom
ethan/storybook-workspaces-page

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Jul 2, 2026

Copy link
Copy Markdown
Member

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

The old WorkspacesPage.test.tsx rendered the 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 as Storybook interaction tests instead of in the vitest unit project.

Coverage is preserved across all flows from the old test: rendering the empty and filled pages, deleting only the selected workspaces, the three batch-update cases (skipping up-to-date workspaces, updating a running workspace after acknowledging the restart risk, and ignoring dormant workspaces), stopping only the selected running workspaces, starting only the selected stopped workspaces, filtering workspace apps by health and visibility, and hiding the start button for an outdated stopped always-update workspace. The entire WorkspacesPage.test.tsx file is removed since it contained no pure-logic tests to keep.

Relates to CODAGT-686

@ethanndickson ethanndickson marked this pull request as ready for review July 2, 2026 07:34
@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.

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.

1 participant