From 395791feeb8f354504767b839ef01f2a5cd6f322 Mon Sep 17 00:00:00 2001 From: liqoingyu Date: Sun, 18 Jan 2026 21:21:44 +0800 Subject: [PATCH] test(cli): stabilize AuthDialog ESC assertion --- packages/cli/src/ui/auth/AuthDialog.test.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/ui/auth/AuthDialog.test.tsx b/packages/cli/src/ui/auth/AuthDialog.test.tsx index 610cb1152..b33caf649 100644 --- a/packages/cli/src/ui/auth/AuthDialog.test.tsx +++ b/packages/cli/src/ui/auth/AuthDialog.test.tsx @@ -438,9 +438,10 @@ describe('AuthDialog', () => { await wait(); // Should show error message instead of calling handleAuthSelect - expect(lastFrame()).toContain( - 'You must select an auth method to proceed. Press Ctrl+C again to exit.', - ); + await vi.waitFor(() => { + expect(lastFrame()).toContain('You must select an auth method'); + }); + expect(lastFrame()).toContain('Press Ctrl+C again to exit'); expect(handleAuthSelect).not.toHaveBeenCalled(); unmount(); });