blob: 492aa4884ce60f9a29750df17f4cb85c88e378c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
import { render, screen } from '../../../../tests/utils';
import { Field } from './field';
describe('Field', () => {
it('renders a text input', () => {
render(
<Field
id="text-field"
name="text-field"
type="text"
value=""
setValue={() => null}
/>
);
expect(screen.getByRole('textbox')).toHaveAttribute('type', 'text');
});
it('renders a search input', () => {
render(
<Field
id="search-field"
name="search-field"
type="search"
value=""
setValue={() => null}
/>
);
expect(screen.getByRole('searchbox')).toHaveAttribute('type', 'search');
});
});
|