You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by as...@apache.org on 2026/09/03 16:59:37 UTC

(maka) branch main updated: test(desktop): wait for restored focus (#4644)

This is an automated email from the ASF dual-hosted git repository.

Astro-Han pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/maka.git


The following commit(s) were added to refs/heads/main by this push:
     new 35010f4974 test(desktop): wait for restored focus (#4644)
35010f4974 is described below

commit 35010f497431edaee7aa6fced1ffa15a42b260fd
Author: Colafornia <me...@colafornia.me>
AuthorDate: Fri Sep 4 00:59:33 2026 +0800

    test(desktop): wait for restored focus (#4644)
    
    `OAuthCreateAdoptsExactConnection` asserted focus on the created connection's
    button immediately, but the row restores focus on the next frame, so the
    assertion could run before the restoration landed.
    
    Wrapping it in `waitFor` matches what the rest of the file already does at two
    other assertions, and keeps the assertion's strength: focus that never arrives
    still fails.
    
    Storybook story only, no production change.
    
    Generated-by: OpenAI 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());
   },
 };
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org