fix: add missing Popover and Command mocks to provider filtering tests

This commit is contained in:
Roo Code 2025-12-28 08:24:53 +00:00
parent d8502d76b0
commit 5c8bee16ac

View file

@ -80,6 +80,21 @@ vi.mock("@src/components/ui", () => ({
CollapsibleContent: ({ children }: any) => <div>{children}</div>,
Slider: ({ children, ...props }: any) => <div {...props}>{children}</div>,
Button: ({ children, ...props }: any) => <button {...props}>{children}</button>,
// Popover components (used by ModelPicker)
Popover: ({ children }: any) => <div>{children}</div>,
PopoverTrigger: ({ children }: any) => <div>{children}</div>,
PopoverContent: ({ children }: any) => <div>{children}</div>,
// Command components (used by ModelPicker)
Command: ({ children }: any) => <div>{children}</div>,
CommandInput: ({ ...props }: any) => <input {...props} />,
CommandList: ({ children }: any) => <div>{children}</div>,
CommandEmpty: ({ children }: any) => <div>{children}</div>,
CommandGroup: ({ children }: any) => <div>{children}</div>,
CommandItem: ({ children, value, onSelect }: any) => (
<div data-value={value} onClick={() => onSelect?.(value)}>
{children}
</div>
),
}))
describe("ApiOptions Provider Filtering", () => {