Skip to content

Commit

Permalink
📱 [#724] Disable mobile-viewport test
Browse files Browse the repository at this point in the history
When running tests using @storybook/test-runner, we need to apply
the same viewport to get the proper responsive elements as we
get in the real browser/storybook. However, we just ripped out
the viewport support because it's super flaky. So, we disable
these tests here, but they should still run on Chromatic so
we still get feedback there (provided we don't disable the
Chromatic snapshotting).
  • Loading branch information
sergei-maertens committed Dec 3, 2024
1 parent ecba3a1 commit 81a271c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion src/components/App.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ export const SeveralStepsInMobileViewport = {
accessibleToggleStepsLabel: 'Current step in form Formulier: Stap 2',
},
parameters: {
chromatic: {disableSnapshot: true}, // TODO: set up viewports in chromatic
layout: 'fullscreen', // removes padding in canvas
viewport: {
defaultViewport: 'mobile1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ export const Default = {};
export const MobileViewport = {
name: 'Mobile version',
parameters: {
// TODO enable viewport in chromatic
chromatic: {disableSnapshot: true},
viewport: {
defaultViewport: 'mobile1',
},
Expand All @@ -81,4 +79,5 @@ export const MobileViewport = {
await expect(toggleButton).toHaveAttribute('aria-pressed', 'false');
await userEvent.click(toggleButton);
},
tags: ['!test'],
};

0 comments on commit 81a271c

Please sign in to comment.