Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion .storybook/test-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ const executeA11y = async (page, context) => {
}

const executeVisualTest = async (page, context) => {
const image = await page.locator('#storybook-root').screenshot();
const storyContext = await getStoryContext(page, context);
const screenshotSelector = storyContext.parameters?.visualTest?.selector ?? '#storybook-root';

const image = await page.locator(screenshotSelector).screenshot();
expect(image).toMatchImageSnapshot({
customSnapshotsDir,
customSnapshotIdentifier: `${context.id}-${page.context().browser().browserType().name()}`,
Expand Down
Binary file modified __snapshots__/menu--menu-account-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/menu--menu-account-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/menu--menu-account-list-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/menu--menu-account-list-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/menu--menu-account-list-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/menu--menu-account-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/components/menu/Menu.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ const meta: Meta = {
options: ['left start', 'left end', 'bottom start', 'bottom end', 'top start', 'top end', 'right start', 'right end'],
control: {type: 'radio'},
}
},
parameters: {
visualTest: {
selector: 'body'
}
}
}

Expand Down