You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #94 (feat(storybook): @storybook/addon-vitest + CI matrix) added @storybook/addon-vitest to the CI matrix but had to remove 10 play() interaction tests across 6 stories because the Storybook 10 vitest-browser integration hangs in the sb-preparing-story state (upstream issue: storybookjs/storybook#18663).
The ClickHandler / LoadingClickHandler stories were renamed (not removed) in commit 46c5db3 with JSDoc clarifying they are visual-stories-only and that the spy is registered but never asserted (since play() is gone).
Acceptance criteria
When upstream storybookjs/storybook#18663 is fixed and Storybook 10 vitest-browser can run play() blocks in CI, this issue tracks restoring ALL 10 deleted play() blocks:
Re-add the play: async ({ canvasElement, args, step }) => { ... } bodies to the 6 stories above.
Re-convert ClickHandler / LoadingClickHandler from "visual-stories-only" JSDoc back to real interaction tests that assert the spy is called / not called.
Run the full test:storybook matrix locally and verify all 10 play() tests pass in CI.
New unit tests in tests/unit/ cover the same components in isolation (MapContainer, MediaPreview, DataScreen).
The visual-regression screenshot baseline in tests/e2e/storybook-screenshots-baseline/ still renders every story (including the ones that lost play()), so visual regressions are still caught.
The removed play() blocks are interaction tests, not rendering tests — the rendered DOM is unchanged.
Summary
PR #94 (
feat(storybook): @storybook/addon-vitest + CI matrix) added@storybook/addon-vitestto the CI matrix but had to remove 10play()interaction tests across 6 stories because the Storybook 10 vitest-browser integration hangs in thesb-preparing-storystate (upstream issue: storybookjs/storybook#18663).Lost play() tests (per commit 45673c1)
src/components/ui/button.stories.tsxTest(renamed →ClickHandler)src/components/ui/button.stories.tsxLoadingBlocksClicks(renamed →LoadingClickHandler)loading: truesrc/screens/ObservationDetailScreen.stories.tsxWithObservationsrc/screens/SettingsScreen.stories.tsxInviteFormFilledsrc/screens/SettingsScreen.stories.tsxWithInviteResultssrc/screens/SettingsScreen.stories.tsxInviteFormErrorsrc/screens/SettingsScreen.stories.tsxClearDataDialogOpensrc/components/shared/ExportObservationsButton.stories.tsxOpensrc/components/shared/FilterSheet.stories.tsxOpen(×3 play() blocks)src/screens/InviteScreen.stories.tsxConnectedThe
ClickHandler/LoadingClickHandlerstories were renamed (not removed) in commit 46c5db3 with JSDoc clarifying they are visual-stories-only and that the spy is registered but never asserted (sinceplay()is gone).Acceptance criteria
When upstream
storybookjs/storybook#18663is fixed and Storybook 10 vitest-browser can runplay()blocks in CI, this issue tracks restoring ALL 10 deletedplay()blocks:play: async ({ canvasElement, args, step }) => { ... }bodies to the 6 stories above.ClickHandler/LoadingClickHandlerfrom "visual-stories-only" JSDoc back to real interaction tests that assert the spy is called / not called.test:storybookmatrix locally and verify all 10 play() tests pass in CI.Workaround applied in PR #94
tests/unit/cover the same components in isolation (MapContainer, MediaPreview, DataScreen).tests/e2e/storybook-screenshots-baseline/still renders every story (including the ones that lostplay()), so visual regressions are still caught.play()blocks are interaction tests, not rendering tests — the rendered DOM is unchanged.Related
WithObservation), tracked in test(storybook): re-add play() interaction test for ObservationDetailScreen back-nav affordance #101