fix(site): move pagination test from vitest to storybook story#24165
Merged
Conversation
28226e8 to
65c4867
Compare
4c02b07 to
0787a75
Compare
The pagination query key test timed out in CI (6204ms vs 5000ms limit) because renderWithAuth boots 12+ MSW round-trips through the auth, dashboard, and proxy provider waterfall before the page even mounts. Move the test to a Storybook story where decorators pre-seed the query cache and provide context directly, skipping the MSW waterfall entirely. Both page query keys are pre-populated via parameters.queries so no API spy is needed — the rendered output alone proves the query key includes pagination parameters. Also exports workspacesKey from the queries module so stories can reference it directly. This aligns with the codebase convention that page interaction tests belong in stories, not vitest files.
0787a75 to
e8d6876
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes coder/internal#1458
The pagination query key test timed out in CI (6204ms vs 5000ms limit) because
renderWithAuthboots 12+ MSW round-trips through the auth, dashboard, and proxy provider waterfall before the page even mounts.Moves the test to a Storybook story where decorators (
withAuthProvider,withDashboardProvider,withProxyProvider) pre-seed the query cache and provide context directly, skipping the MSW waterfall entirely. This also aligns with the codebase convention that page interaction tests belong in stories, not vitest files.