diff --git a/packages/react/src/SearchField/SearchField.test.tsx b/packages/react/src/SearchField/SearchField.test.tsx index bac4dba421..4187fd95fc 100644 --- a/packages/react/src/SearchField/SearchField.test.tsx +++ b/packages/react/src/SearchField/SearchField.test.tsx @@ -34,9 +34,9 @@ describe('Search field', () => { it('renders the button with a label', () => { render() - const component = screen.getByRole('button') + const component = screen.getByRole('button', { name: 'Search' }) - expect(component).toHaveTextContent('Search') + expect(component).toBeInTheDocument() }) it('renders the outer container design system BEM class name', () => {