diff --git a/plugins/search-react/src/components/SearchBar/SearchBar.test.tsx b/plugins/search-react/src/components/SearchBar/SearchBar.test.tsx index 30df27aba7..5846d02013 100644 --- a/plugins/search-react/src/components/SearchBar/SearchBar.test.tsx +++ b/plugins/search-react/src/components/SearchBar/SearchBar.test.tsx @@ -133,7 +133,9 @@ describe('SearchBar', () => { ); await waitFor(() => { - expect(screen.getByRole('textbox', { name: 'Search' })).toHaveValue(term); + expect( + screen.getByRole('textbox', { name: 'Search in Mock title' }), + ).toHaveValue(term); }); }); @@ -154,7 +156,9 @@ describe('SearchBar', () => { , ); - const textbox = screen.getByRole('textbox', { name: 'Search' }); + const textbox = screen.getByRole('textbox', { + name: 'Search in Mock title', + }); const value = 'value'; @@ -191,7 +195,9 @@ describe('SearchBar', () => { , ); - const textbox = screen.getByRole('textbox', { name: 'Search' }); + const textbox = screen.getByRole('textbox', { + name: 'Search in Mock title', + }); await waitFor(() => { expect(textbox).toHaveValue(term); @@ -249,7 +255,9 @@ describe('SearchBar', () => { , ); - const textbox = await screen.findByRole('textbox', { name: 'Search' }); + const textbox = await screen.findByRole('textbox', { + name: 'Search in Mock title', + }); const value = 'value'; @@ -293,7 +301,9 @@ describe('SearchBar', () => { , ); - const textbox = await screen.findByRole('textbox', { name: 'Search' }); + const textbox = await screen.findByRole('textbox', { + name: 'Search in Mock title', + }); const value = 'value'; @@ -343,7 +353,9 @@ describe('SearchBar', () => { , ); - const textbox = await screen.findByRole('textbox', { name: 'Search' }); + const textbox = await screen.findByRole('textbox', { + name: 'Search in Mock title', + }); let value = 'value'; diff --git a/plugins/search/src/components/SearchModal/SearchModal.test.tsx b/plugins/search/src/components/SearchModal/SearchModal.test.tsx index d24764f5d4..b45046c429 100644 --- a/plugins/search/src/components/SearchModal/SearchModal.test.tsx +++ b/plugins/search/src/components/SearchModal/SearchModal.test.tsx @@ -166,6 +166,6 @@ describe('SearchModal', () => { }, ); - expect(screen.getByLabelText('Search')).toHaveFocus(); + expect(screen.getByLabelText('Search in Mock app')).toHaveFocus(); }); });