Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mobile/desktop tests in chromatic #620

Merged
merged 1 commit into from
Dec 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ export default {
},
parameters: {
actions: {argTypesRegex: '^on[A-Z].*'},
viewport: {
// These are the viewports that are shown in Storybook
viewports: {
smallMobile: { name: "Small mobile", styles: { width: "320px", height: "568px" } },
largeMobile: { name: "Large mobile", styles: { width: "414px", height: "896px" } },
tablet: { name: "Tablet", styles: { width: "834px", height: "1112px" } },
desktop: { name: "Desktop", styles: { width: "1024px", height: "1000px" } },
},
},
controls: {
matchers: {
color: /(background|color)$/i,
Expand Down Expand Up @@ -85,6 +94,13 @@ export default {
],
},
},
chromatic: {
// Here we specify the viewports of which we want snapshots in Chromatic
modes: {
mobile: {viewport: "smallMobile"},
desktop: {viewport: "desktop"}
}
}
},
loaders: [mswLoader],
};
Loading