From f32bebf7b42307c0b0be8d713a1b10c4b60c9ae5 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Sun, 6 Jul 2025 20:48:02 +0200 Subject: [PATCH] Fix stories (#13069) As per title --- .../components/__stories__/CommandMenu.stories.tsx | 4 ++-- .../record-table/__stories__/RecordTable.stories.tsx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/twenty-front/src/modules/command-menu/components/__stories__/CommandMenu.stories.tsx b/packages/twenty-front/src/modules/command-menu/components/__stories__/CommandMenu.stories.tsx index 6e284e892..7f36dd653 100644 --- a/packages/twenty-front/src/modules/command-menu/components/__stories__/CommandMenu.stories.tsx +++ b/packages/twenty-front/src/modules/command-menu/components/__stories__/CommandMenu.stories.tsx @@ -133,9 +133,9 @@ export const DefaultWithoutSearch: Story = { export const LimitedPermissions: Story = { play: async () => { 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(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 Notes')).toBeVisible(); }, diff --git a/packages/twenty-front/src/modules/object-record/record-table/__stories__/RecordTable.stories.tsx b/packages/twenty-front/src/modules/object-record/record-table/__stories__/RecordTable.stories.tsx index b2d56122a..5d19fef05 100644 --- a/packages/twenty-front/src/modules/object-record/record-table/__stories__/RecordTable.stories.tsx +++ b/packages/twenty-front/src/modules/object-record/record-table/__stories__/RecordTable.stories.tsx @@ -44,14 +44,14 @@ export const Default: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - await canvas.findByText('Linkedin'); + await canvas.findByText('Linkedin', {}, { timeout: 3000 }); }, }; export const HeaderMenuOpen: Story = { play: async () => { const canvas = within(document.body); - await canvas.findByText('Linkedin'); + await canvas.findByText('Linkedin', {}, { timeout: 3000 }); const headerMenuButton = await canvas.findByText('Domain Name'); @@ -69,7 +69,7 @@ export const ScrolledLeft: Story = { }, play: async () => { const canvas = within(document.body); - await canvas.findByText('Linkedin'); + await canvas.findByText('Linkedin', {}, { timeout: 3000 }); const scrollWrapper = document.body.querySelector( '.scroll-wrapper-x-enabled', @@ -99,7 +99,7 @@ export const ScrolledBottom: Story = { }, play: async () => { const canvas = within(document.body); - await canvas.findByText('Linkedin'); + await canvas.findByText('Linkedin', {}, { timeout: 3000 }); const scrollWrapper = document.body.querySelector( '.scroll-wrapper-y-enabled',