diff --git a/src/components/InstancesList/InstancesList.test.js b/src/components/InstancesList/InstancesList.test.js index 2c88470d9..2680d5c2f 100644 --- a/src/components/InstancesList/InstancesList.test.js +++ b/src/components/InstancesList/InstancesList.test.js @@ -458,10 +458,10 @@ describe('InstancesList', () => { it('should have query in search input', () => { renderInstancesList({ segment: 'instances' }); - fireEvent.change(screen.getByRole('searchbox', { name: 'Search' }), { target: { value: 'search query' } }); + fireEvent.change(screen.getByRole('textbox', { name: 'Search' }), { target: { value: 'search query' } }); fireEvent.click(screen.getAllByRole('button', { name: 'Search' })[1]); - expect(screen.getByRole('searchbox', { name: 'Search' })).toHaveValue('search query'); + expect(screen.getByRole('textbox', { name: 'Search' })).toHaveValue('search query'); }); describe('when the search option is changed', () => { @@ -549,7 +549,7 @@ describe('InstancesList', () => { await act(async () => fireEvent.change(screen.getByLabelText('Search field index'), { target: { value: qindex } })); - fireEvent.change(screen.getByRole('searchbox', { name: 'Search' }), { target: { value: _query } }); + fireEvent.change(screen.getByRole('textbox', { name: 'Search' }), { target: { value: _query } }); fireEvent.click(screen.getAllByRole('button', { name: 'Search' })[1]); const row = screen.getAllByText('ABA Journal')[0]; diff --git a/src/views/BrowseInventory/BrowseInventory.test.js b/src/views/BrowseInventory/BrowseInventory.test.js index fe745614b..5d21850cb 100644 --- a/src/views/BrowseInventory/BrowseInventory.test.js +++ b/src/views/BrowseInventory/BrowseInventory.test.js @@ -163,7 +163,7 @@ describe('BrowseInventory', () => { it('should call "changeSearch" when search query was changed', async () => { const { container } = renderBrowseInventory(); - await act(async () => userEvent.type(screen.getByRole('searchbox'), 'newQuery')); + await act(async () => userEvent.type(screen.getByRole('textbox'), 'newQuery')); await act(async () => userEvent.click(container.querySelector('[data-test-single-search-form-submit="true"]'))); expect(applySearch).toHaveBeenCalled();