feat(twenty-front/Button): add loading state on Button (#10536)
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { expect } from '@storybook/jest';
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
import { within } from '@storybook/test';
|
||||
|
||||
@ -31,6 +32,12 @@ export const Default: Story = {
|
||||
const canvas = within(canvasElement);
|
||||
sleep(1000);
|
||||
|
||||
await canvas.findByRole('button', { name: 'View billing details' });
|
||||
const buttons = await canvas.findAllByRole('button');
|
||||
|
||||
expect(
|
||||
buttons.findIndex((button) =>
|
||||
button.outerHTML.includes('View billing details'),
|
||||
),
|
||||
).toBeGreaterThan(-1);
|
||||
},
|
||||
};
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { expect } from '@storybook/jest';
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
import { within } from '@storybook/test';
|
||||
|
||||
@ -30,6 +31,10 @@ export const Default: Story = {
|
||||
|
||||
await sleep(1000);
|
||||
|
||||
await canvas.getByRole('button', { name: 'Copy link' });
|
||||
const buttons = await canvas.getAllByRole('button');
|
||||
|
||||
expect(
|
||||
buttons.findIndex((button) => button.outerHTML.includes('Copy link')),
|
||||
).toBeGreaterThan(-1);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user