Fix storybook tests (#6594)

As title
This commit is contained in:
Thomas Trompette
2024-08-09 19:39:16 +02:00
committed by GitHub
parent 13d05d8c74
commit 39512a779e
9 changed files with 44 additions and 74 deletions

View File

@ -87,30 +87,12 @@ export const Default: Story = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
await canvas.findAllByText(
peopleMock[0].name.firstName + ' ' + peopleMock[0].name.lastName,
);
expect(
await canvas.findByText('Add your first Activity', undefined, {
timeout: 3000,
}),
).toBeInTheDocument();
},
};
export const Loading: Story = {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
decorators: [PageDecorator],
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
expect(
canvas.queryByText(
peopleMock[0].name.firstName + ' ' + peopleMock[0].name.lastName,
),
).toBeNull();
// await canvas.findAllByText(peopleMock[0].name.firstName);
expect(
await canvas.findByText('Twenty', undefined, {
timeout: 3000,
}),
).toBeInTheDocument();
expect(
await canvas.findByText('Add your first Activity', undefined, {
timeout: 3000,