The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test: add missing test files for FlowCanvasPage and Skills channels grid
Steven Enamakel98524bf84d7d
diff --git a/app/src/pages/__tests__/FlowCanvasPage.test.tsx b/app/src/pages/__tests__/FlowCanvasPage.test.tsxindex 8b87578fb1..43258b541e 100644--- a/app/src/pages/__tests__/FlowCanvasPage.test.tsx+++ b/app/src/pages/__tests__/FlowCanvasPage.test.tsx@@ -28,9 +28,13 @@ const validateFlow = vi.hoisted(() => vi.fn());const listFlowConnections = vi.hoisted(() => vi.fn());const runFlowDetached = vi.hoisted(() => vi.fn());const setFlowEnabled = vi.hoisted(() => vi.fn());-// Backs the projected `FlowRunsSidebar` (real, not stubbed) so the side-panel-// switching tests below can click a real run row to open the Run tab.-const listFlowRuns = vi.hoisted(() => vi.fn());+// Backs the projected `FlowRunsSidebar` (real, not stubbed): now that the Back+// button + run history live in the shell's sidebar region (`SidebarContent`),+// every `renderEditor` mounts a `SidebarSlotProvider`/`SidebarSlotOutlet`, so+// this sidebar actually renders (and calls `listFlowRuns`) in every describe+// block, not just the side-panel-switching tests. Default to an empty list so+// `useFlowRunsQuery`/`useFlowRunsLiveRefresh` always see a real array.+const listFlowRuns = vi.hoisted(() => vi.fn(() => Promise.resolve([])));vi.mock('../../services/api/flowsApi', () => ({getFlow,updateFlow,diff --git a/app/src/pages/__tests__/Skills.channels-grid.test.tsx b/app/src/pages/__tests__/Skills.channels-grid.test.tsxindex 002db019a0..684133d24f 100644--- a/app/src/pages/__tests__/Skills.channels-grid.test.tsx+++ b/app/src/pages/__tests__/Skills.channels-grid.test.tsx@@ -226,20 +226,23 @@ describe('Skills page — Channels grid', () => {};renderWithProviders(<Skills />, { initialEntries: ['/connections'], preloadedState });- // Switch to the Channels tab so the Channels card is visible.+ // Switch to the Channels tab so the Channels overview is visible.fireEvent.click(screen.getByTestId('two-pane-nav-channels'));- const channelsCard = screen- .getByRole('heading', { name: 'Messaging' })- .closest('[data-slot="card"]');- const telegramTile = within(channelsCard as HTMLElement).getByRole('button', {+ const overview = screen.getByTestId('channels-overview');+ const telegramButton = within(overview).getByRole('button', {name: new RegExp(`Telegram.*${labelPattern.source}`, 'i'),});- // The connection-status colour now lives on the tile container (the- // inner button only owns the "configure" affordance), so assert against- // the wrapping tile rather than the button itself.- const tileContainer = telegramTile.closest('.rounded-2xl');+ // The connection status is carried by the tile's status Badge (chip+ // text + a coloured dot), not a tinted tile background — consistent+ // with the shared Badge primitive used everywhere else in the redesign.+ const tileContainer = telegramButton.closest('.rounded-xl');expect(tileContainer).not.toBeNull();- expect((tileContainer as HTMLElement).className).toMatch(classPattern);+ const statusBadge = within(tileContainer as HTMLElement)+ .getByText(labelPattern)+ .closest('[data-slot="badge"]');+ expect(statusBadge).not.toBeNull();+ const dot = (statusBadge as HTMLElement).querySelector('[data-slot="badge-dot"]');+ expect(dot?.className).toContain(dotClass);});