mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-18 00:55:50 +00:00
fix: add remaining Mantine component mocks to EPG test
Add UnstyledButton, Alert, Stack, Text, TextInput mocks to prevent test failures from unmocked Mantine components in SD settings UI.
This commit is contained in:
parent
4ae0796b3d
commit
6b5c745962
1 changed files with 11 additions and 0 deletions
|
|
@ -235,6 +235,17 @@ vi.mock('@mantine/core', async () => ({
|
|||
{label}
|
||||
</label>
|
||||
),
|
||||
UnstyledButton: ({ children, onClick, ...props }) => (
|
||||
<button type="button" onClick={onClick} {...props}>{children}</button>
|
||||
),
|
||||
Alert: ({ children, title, color, icon }) => (
|
||||
<div data-testid="alert" data-color={color}><strong>{title}</strong>{children}</div>
|
||||
),
|
||||
Stack: ({ children, gap }) => <div data-testid="stack">{children}</div>,
|
||||
Text: ({ children, ...props }) => <span>{children}</span>,
|
||||
TextInput: ({ label, value, onChange, placeholder, ...props }) => (
|
||||
<label>{label}<input type="text" value={value || ""} onChange={onChange} placeholder={placeholder} /></label>
|
||||
),
|
||||
}));
|
||||
|
||||
// ── Imports after mocks ────────────────────────────────────────────────────────
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue