Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore(deps): update reactflow dependency in NodePalette test

Steven Enamakelcd55031e3064
diff --git a/app/src/components/flows/canvas/NodePalette.test.tsx b/app/src/components/flows/canvas/NodePalette.test.tsx
index cbd2783290..80079ecbbd 100644
--- a/app/src/components/flows/canvas/NodePalette.test.tsx
+++ b/app/src/components/flows/canvas/NodePalette.test.tsx
@@ -40,4 +40,28 @@ describe('NodePalette', () => {
});
expect(setData).toHaveBeenCalledWith(PALETTE_DND_MIME, first.key);
});
+
+ describe('panel variant', () => {
+ it('shows the panel hint and every entry still works, still with the overlay layout absent', () => {
+ const onAdd = vi.fn();
+ render(<NodePalette onAdd={onAdd} variant="panel" />);
+
+ const palette = screen.getByTestId('flow-node-palette');
+ expect(palette).toBeInTheDocument();
+ // The panel-only hint copy only renders for `variant="panel"`.
+ expect(screen.getByText('flows.palette.panelHint')).toBeInTheDocument();
+ // The overlay's floating position/sizing classes are absent in panel mode.
+ expect(palette.className).not.toContain('absolute');
+ expect(palette.className).toContain('flex h-full min-h-0 flex-col');
+
+ const first = ALL_ENTRIES[0];
+ fireEvent.click(screen.getByTestId(`flow-palette-item-${first.key}`));
+ expect(onAdd).toHaveBeenCalledWith(first);
+ });
+
+ it('omits the panel hint in the default overlay variant', () => {
+ render(<NodePalette onAdd={vi.fn()} />);
+ expect(screen.queryByText('flows.palette.panelHint')).not.toBeInTheDocument();
+ });
+ });
});