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:
Shokkstokk 2026-06-05 00:28:50 +00:00
parent aa9e78f858
commit 4ae0796b3d

View file

@ -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