test(client): update shared component mocks

This commit is contained in:
Marco Beretta 2026-07-27 16:17:25 +02:00 committed by Danny Avila
parent 18237b671e
commit 2c5cdf2267
2 changed files with 8 additions and 0 deletions

View file

@ -94,6 +94,9 @@ jest.mock('@librechat/client', () => ({
</button>
),
Input: (props: React.ComponentProps<'input'>) => <input {...props} />,
Label: ({ children, ...props }: React.ComponentProps<'label'>) => (
<label {...props}>{children}</label>
),
Radio: () => null,
OGDialog: ({ open, children }: { open: boolean; children: React.ReactNode }) =>
open ? <div>{children}</div> : null,

View file

@ -24,6 +24,11 @@ jest.mock(
...props
}: React.ButtonHTMLAttributes<HTMLButtonElement> & { variant?: string }) =>
React.createElement('button', props, children),
Input: React.forwardRef<HTMLInputElement, React.InputHTMLAttributes<HTMLInputElement>>(
(props, ref) => React.createElement('input', { ...props, ref }),
),
Label: ({ children, ...props }: React.LabelHTMLAttributes<HTMLLabelElement>) =>
React.createElement('label', props, children),
OGDialog: ({ open, children }: { open: boolean; children: ReactNode }) =>
open ? React.createElement(React.Fragment, null, children) : null,
OGDialogContent: ({ children }: { children: ReactNode }) =>