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(); }); });