test: migrate WorkspacesPage tests to Storybook play stories#26958
Open
ethanndickson wants to merge 1 commit into
Open
test: migrate WorkspacesPage tests to Storybook play stories#26958ethanndickson wants to merge 1 commit into
ethanndickson wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Migrates the WorkspacesPage tests from vitest to Storybook play-function stories.
The old
WorkspacesPage.test.tsxrendered the page throughrenderWithAuthand 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 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.tsxfile is removed since it contained no pure-logic tests to keep.Relates to CODAGT-686