From 7027791b4f8c9c7df9bd1b1ae9237016308eaad1 Mon Sep 17 00:00:00 2001 From: colafornia Date: Thu, 3 Sep 2026 17:32:16 +0800 Subject: [PATCH] test(desktop): wait for restored focus Settings focus returns on the next animation frame, so the Storybook assertion waits for the final state. Generated-by: Codex --- apps/desktop/stories/settings/provider-settings.stories.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/desktop/stories/settings/provider-settings.stories.tsx b/apps/desktop/stories/settings/provider-settings.stories.tsx index c0c5ee61ec..8c2ac7789c 100644 --- a/apps/desktop/stories/settings/provider-settings.stories.tsx +++ b/apps/desktop/stories/settings/provider-settings.stories.tsx @@ -903,7 +903,7 @@ export const OAuthCreateAdoptsExactConnection: Story = { '[data-connection-id="connection-openai-codex-4"]', ); await expect(createdRow).not.toBeNull(); - await expect(within(createdRow!).getByRole('button')).toHaveFocus(); + await waitFor(() => expect(within(createdRow!).getByRole('button')).toHaveFocus()); }, };