Field: Use `Combobox` instead of `Select` in test (#101928)

This commit is contained in:
Laura Fernández 2025-03-11 15:58:09 +01:00 committed by GitHub
parent 510c76df49
commit 911c99f325
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,7 @@
import { render, screen } from '@testing-library/react';
import { Combobox } from '../Combobox/Combobox';
import { Input } from '../Input/Input';
import { Select } from '../Select/Select';
import { Field } from './Field';
@ -27,9 +27,13 @@ describe('Field', () => {
});
it('renders with the inputId of its children', () => {
const comboboxOptions = [
{ label: 'Option 1', value: 'option-1' },
{ label: 'Option 2', value: 'option-2' },
];
render(
<Field label="My other label">
<Select inputId="my-select-input" onChange={() => {}} />
<Combobox id="my-select-input" options={comboboxOptions} onChange={() => {}} />
</Field>
);