generated from storybookjs/addon-kit
-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
Hello!
I have a few full-page tests with a storybook viewport typically set to 2160 x 1440 pixels. The subsequent image that is generated on my filesystem is only 720 x 480 pixels, however. This is exactly a 3x reduction of the original value in both dimensions.
I am specifying the view port similar to this:
import { INITIAL_VIEWPORTS } from "storybook/viewport";
export const Default: Story = {
tags: ["snapshot"],
parameters: {
viewport: {
options: {
...INITIAL_VIEWPORTS,
test: {
name: "Test",
styles: {
width: `1440px`,
height: `2160px`,
},
},
},
defaultViewport: "test",
},
},
args: {},
};I'm hoping someone can help me figure out why this image is being reduced in size and how I can prevent it.
Things I've tried:
- Increasing the viewport size as implemented above yields similarly resized images. For example, bumping this up to 2880 x 1920 still yields a 720 x 480 image, which is a 4x reduction in each dimension. Varying the height and width independently does yield different final image dimensions that are similarly small.
- I've tried setting the browser viewport directly in my vitest browser configuration.
- I've poured over the source code in the repo without luck. The compare_image.ts file seems to be the most interesting of the bunch, but I can't detect any explicit resizing commands besides matching the baseline and results images.
Metadata
Metadata
Assignees
Labels
No labels