mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 21:51:48 +08:00
fix the play function of this story that was failing in chromatic
This commit is contained in:
parent
131f72f58a
commit
2f5e7c31de
@ -12,6 +12,7 @@ const meta: Meta<typeof Canvas> = {
|
|||||||
title: 'Blocks/Internal/Canvas',
|
title: 'Blocks/Internal/Canvas',
|
||||||
component: Canvas,
|
component: Canvas,
|
||||||
parameters: {
|
parameters: {
|
||||||
|
theme: 'light',
|
||||||
relativeCsfPaths: ['../examples/Button.stories'],
|
relativeCsfPaths: ['../examples/Button.stories'],
|
||||||
},
|
},
|
||||||
render: (args) => {
|
render: (args) => {
|
||||||
@ -43,7 +44,7 @@ const expectAmountOfStoriesInSource =
|
|||||||
|
|
||||||
// Assert - check that the correct amount of stories' source is shown
|
// Assert - check that the correct amount of stories' source is shown
|
||||||
await waitFor(async () => {
|
await waitFor(async () => {
|
||||||
const booleanControlNodes = await canvas.findAllByText('BooleanControl');
|
const booleanControlNodes = await canvas.findAllByText('Button');
|
||||||
expect(booleanControlNodes).toHaveLength(amount);
|
expect(booleanControlNodes).toHaveLength(amount);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user