Skip to content

Commit

Permalink
chore(chromatic): disable flaky snapshots (#3829)
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-in-a-box authored Jan 7, 2025
1 parent 2f69783 commit 200420d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,9 @@ export default {
hasHeader: true,
token: global.TOKEN,
},
parameters: {
chromatic: {
disableSnapshot: true,
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ export const hoverOverCitation = {
const citation = await modal.getByRole('button', { name: 'Reference 1' });
expect(citation).toBeInTheDocument();
await userEvent.hover(citation);

const main = await waitFor(() => document.querySelector('.sb-main-padded.sb-show-main'));
await waitFor(async () => {
await expect(within(main).getByText('Public APIs are key drivers of innovation and growth.')).toBeVisible();
});
},
};

Expand Down Expand Up @@ -249,7 +254,7 @@ export default {
},
parameters: {
chromatic: {
ignoreSelectors: ['[data-testid="content-answers-question-input-avatar"]'], // highly inconsistent in snapshots
ignoreSelectors: ['[class^="bp_avatar_module_avatar--"] > [class^="bp_avatar_module_text--"]'],
},
msw: {
handlers: [
Expand Down
7 changes: 6 additions & 1 deletion src/utils/createTheme.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,5 +269,10 @@ export const ThemeExample = () => {
export default {
title: 'Theming/Theme',
component: ThemeExample,
parameters: { notes },
parameters: {
notes,
chromatic: {
disableSnapshot: true,
},
},
};

0 comments on commit 200420d

Please sign in to comment.