fix the play function of this story that was failing in chromatic

This commit is contained in:
Norbert de Langen 2023-01-06 15:42:32 +01:00
parent 131f72f58a
commit 2f5e7c31de
No known key found for this signature in database
GPG Key ID: FD0E78AF9A837762

View File

@ -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);
}); });
}; };