mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-17 16:50:53 +00:00
fix: add data-testid to TextInput mock in EPG test
This commit is contained in:
parent
c0b7cc5fe8
commit
e731527104
1 changed files with 8 additions and 1 deletions
|
|
@ -245,7 +245,14 @@ vi.mock('@mantine/core', async () => ({
|
|||
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>
|
||||
<input
|
||||
type="text"
|
||||
aria-label={label}
|
||||
data-testid={`input-${label?.toString().toLowerCase().replace(/\s+/g, '-')}`}
|
||||
value={value || ''}
|
||||
onChange={onChange}
|
||||
placeholder={placeholder}
|
||||
/>
|
||||
),
|
||||
}));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue