Fix stories (#13069)

As per title
This commit is contained in:
Charles Bochet
2025-07-06 20:48:02 +02:00
committed by GitHub
parent ee8e223aed
commit f32bebf7b4
2 changed files with 6 additions and 6 deletions

View File

@ -133,9 +133,9 @@ export const DefaultWithoutSearch: Story = {
export const LimitedPermissions: Story = { export const LimitedPermissions: Story = {
play: async () => { play: async () => {
const canvas = within(document.body); const canvas = within(document.body);
await expect(canvas.findByText('Go to Opportunities')).rejects.toThrow();
await expect(canvas.findByText('Go to Tasks')).rejects.toThrow();
expect(await canvas.findByText('Go to People')).toBeVisible(); expect(await canvas.findByText('Go to People')).toBeVisible();
expect(canvas.queryByText('Go to Opportunities')).not.toBeInTheDocument();
expect(canvas.queryByText('Go to Tasks')).not.toBeInTheDocument();
expect(await canvas.findByText('Go to Settings')).toBeVisible(); expect(await canvas.findByText('Go to Settings')).toBeVisible();
expect(await canvas.findByText('Go to Notes')).toBeVisible(); expect(await canvas.findByText('Go to Notes')).toBeVisible();
}, },

View File

@ -44,14 +44,14 @@ export const Default: Story = {
play: async ({ canvasElement }) => { play: async ({ canvasElement }) => {
const canvas = within(canvasElement); const canvas = within(canvasElement);
await canvas.findByText('Linkedin'); await canvas.findByText('Linkedin', {}, { timeout: 3000 });
}, },
}; };
export const HeaderMenuOpen: Story = { export const HeaderMenuOpen: Story = {
play: async () => { play: async () => {
const canvas = within(document.body); const canvas = within(document.body);
await canvas.findByText('Linkedin'); await canvas.findByText('Linkedin', {}, { timeout: 3000 });
const headerMenuButton = await canvas.findByText('Domain Name'); const headerMenuButton = await canvas.findByText('Domain Name');
@ -69,7 +69,7 @@ export const ScrolledLeft: Story = {
}, },
play: async () => { play: async () => {
const canvas = within(document.body); const canvas = within(document.body);
await canvas.findByText('Linkedin'); await canvas.findByText('Linkedin', {}, { timeout: 3000 });
const scrollWrapper = document.body.querySelector( const scrollWrapper = document.body.querySelector(
'.scroll-wrapper-x-enabled', '.scroll-wrapper-x-enabled',
@ -99,7 +99,7 @@ export const ScrolledBottom: Story = {
}, },
play: async () => { play: async () => {
const canvas = within(document.body); const canvas = within(document.body);
await canvas.findByText('Linkedin'); await canvas.findByText('Linkedin', {}, { timeout: 3000 });
const scrollWrapper = document.body.querySelector( const scrollWrapper = document.body.querySelector(
'.scroll-wrapper-y-enabled', '.scroll-wrapper-y-enabled',