Merge pull request #1535 from liqiongyu/test/authdialog-esc-stabilize

test(cli): stabilize AuthDialog ESC assertion
This commit is contained in:
tanzhenxin 2026-02-03 20:26:36 +08:00 committed by GitHub
commit 10ae15c00b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -438,9 +438,11 @@ 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(() => {
const frame = lastFrame();
expect(frame).toContain('You must select an auth method');
expect(frame).toContain('Press Ctrl+C again to exit');
});
expect(handleAuthSelect).not.toHaveBeenCalled();
unmount();
});