Skip to content

Commit 5c8bee1

Browse files
committed
fix: add missing Popover and Command mocks to provider filtering tests
1 parent d8502d7 commit 5c8bee1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

webview-ui/src/components/settings/__tests__/ApiOptions.provider-filtering.spec.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,21 @@ vi.mock("@src/components/ui", () => ({
8080
CollapsibleContent: ({ children }: any) => <div>{children}</div>,
8181
Slider: ({ children, ...props }: any) => <div {...props}>{children}</div>,
8282
Button: ({ children, ...props }: any) => <button {...props}>{children}</button>,
83+
// Popover components (used by ModelPicker)
84+
Popover: ({ children }: any) => <div>{children}</div>,
85+
PopoverTrigger: ({ children }: any) => <div>{children}</div>,
86+
PopoverContent: ({ children }: any) => <div>{children}</div>,
87+
// Command components (used by ModelPicker)
88+
Command: ({ children }: any) => <div>{children}</div>,
89+
CommandInput: ({ ...props }: any) => <input {...props} />,
90+
CommandList: ({ children }: any) => <div>{children}</div>,
91+
CommandEmpty: ({ children }: any) => <div>{children}</div>,
92+
CommandGroup: ({ children }: any) => <div>{children}</div>,
93+
CommandItem: ({ children, value, onSelect }: any) => (
94+
<div data-value={value} onClick={() => onSelect?.(value)}>
95+
{children}
96+
</div>
97+
),
8398
}))
8499

85100
describe("ApiOptions Provider Filtering", () => {

0 commit comments

Comments
 (0)