Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

test: cover command palette footer opener

[._.]/ Adam Eivyc152d9df227e
diff --git a/client/src/components/CmdKSearch.test.jsx b/client/src/components/CmdKSearch.test.jsx
index 231cb6ee6f..293fa9b332 100644
--- a/client/src/components/CmdKSearch.test.jsx
+++ b/client/src/components/CmdKSearch.test.jsx
@@ -3,6 +3,7 @@ import { act, fireEvent, render, screen, waitFor, within } from '@testing-librar
import userEvent from '@testing-library/user-event';
import { MemoryRouter, useLocation } from 'react-router';
import { RECENT_KEY } from '../utils/navWorkingSet.js';
+import { CMD_K_SEARCH_OPEN_EVENT } from '../hooks/useCmdKSearch.js';
const getPaletteManifest = vi.fn();
const getInstanceFeatures = vi.fn();
@@ -351,6 +352,18 @@ describe('CmdKSearch dialog accessibility', () => {
await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
expect(opener).toHaveFocus();
});
+
+ it('opens when the shared command-palette event is dispatched', async () => {
+ render(
+ <MemoryRouter>
+ <CmdKSearch />
+ </MemoryRouter>,
+ );
+
+ act(() => document.dispatchEvent(new Event(CMD_K_SEARCH_OPEN_EVENT)));
+
+ expect(await screen.findByRole('dialog', { name: 'Command palette' })).toBeInTheDocument();
+ });
});
describe('CmdKSearch recent destinations', () => {