mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-18 00:55:50 +00:00
fix: add Switch mock to EPG test for SD logo toggle
Frontend test was failing because the Mantine core mock didn't include the Switch component used by the SD logo style picker.
This commit is contained in:
parent
aa9e78f858
commit
4ae0796b3d
1 changed files with 12 additions and 0 deletions
|
|
@ -223,6 +223,18 @@ vi.mock('@mantine/core', async () => ({
|
|||
ScrollArea: ({ children }) => <div data-testid="scroll-area">{children}</div>,
|
||||
Table: ({ children }) => <table>{children}</table>,
|
||||
Tooltip: ({ children }) => <div>{children}</div>,
|
||||
Switch: ({ label, checked, onChange, disabled, description }) => (
|
||||
<label>
|
||||
<input
|
||||
type="checkbox"
|
||||
data-testid={`switch-${label?.toString().toLowerCase().replace(/\s+/g, '-')}`}
|
||||
checked={checked ?? false}
|
||||
onChange={(e) => onChange?.(e)}
|
||||
disabled={disabled}
|
||||
/>
|
||||
{label}
|
||||
</label>
|
||||
),
|
||||
}));
|
||||
|
||||
// ── Imports after mocks ────────────────────────────────────────────────────────
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue