From cd584585ed94ea2a5539872d350e7d4e3c1cae47 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Wed, 4 Nov 2026 15:16:38 +0100 Subject: [PATCH] test: expect Sign out in the command palette to name the open account, since it now says which account it leaves --- .../command-palette/__tests__/command-registry.test.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/command-palette/__tests__/command-registry.test.tsx b/components/command-palette/__tests__/command-registry.test.tsx index 0d6ed7a2b..4122fea84 100644 --- a/components/command-palette/__tests__/command-registry.test.tsx +++ b/components/command-palette/__tests__/command-registry.test.tsx @@ -114,12 +114,13 @@ describe('global commands', () => { } as never); render(); pressCtrlK(); - expect(screen.queryByRole('option', { name: /me@example\.com/ })).toBeNull(); + // The open account isn't offered as a switch target; Sign out names it. + expect(screen.queryByRole('option', { name: /^switch_to\(me@example\.com/ })).toBeNull(); act(() => { fireEvent.click(screen.getByRole('option', { name: 'switch_to(Work)' })); }); expect(switchAccount).toHaveBeenCalledWith('b'); pressCtrlK(); - act(() => { fireEvent.click(screen.getByRole('option', { name: 'sign_out' })); }); + act(() => { fireEvent.click(screen.getByRole('option', { name: 'sign_out_of(me@example.com)' })); }); expect(logout).toHaveBeenCalled(); }); });