// Forces a narrow viewport for stories that specifically exercise mobile-only // CSS breakpoints, since @storybook/addon-viewport does not affect the // headless iframe size that @storybook/test-runner navigates to directly. export default { async preVisit(page, context) { if (context.id?.startsWith('pages-catalogpage--mobile')) { await page.setViewportSize({ width: 375, height: 900 }); } }, };