diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/actions_log_users_filter.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/actions_log_users_filter.test.tsx index afcd051af1bd8..e5fc4584f644f 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/actions_log_users_filter.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/actions_log_users_filter.test.tsx @@ -27,7 +27,7 @@ describe('Users filter', () => { const filterPrefix = 'users-filter'; let onChangeUsersFilter: jest.Mock; - beforeEach(async () => { + beforeEach(() => { onChangeUsersFilter = jest.fn(); mockedContext = createAppRootMockRenderer(); ({ history } = mockedContext); @@ -57,7 +57,7 @@ describe('Users filter', () => { const searchInput = renderResult.getByTestId(`${testPrefix}-${filterPrefix}-search`); await userEvent.type(searchInput, 'usernameX'); - await userEvent.type(searchInput, '{enter}'); + await userEvent.keyboard('{enter}'); expect(onChangeUsersFilter).toHaveBeenCalledWith(['usernameX']); }); @@ -66,7 +66,7 @@ describe('Users filter', () => { const searchInput = renderResult.getByTestId(`${testPrefix}-${filterPrefix}-search`); await userEvent.type(searchInput, 'usernameX,usernameY,usernameZ'); - await userEvent.type(searchInput, '{enter}'); + await userEvent.keyboard('{enter}'); expect(onChangeUsersFilter).toHaveBeenCalledWith(['usernameX', 'usernameY', 'usernameZ']); }); @@ -75,7 +75,7 @@ describe('Users filter', () => { const searchInput = renderResult.getByTestId(`${testPrefix}-${filterPrefix}-search`); await userEvent.type(searchInput, ' usernameX '); - await userEvent.type(searchInput, '{enter}'); + await userEvent.keyboard('{enter}'); expect(onChangeUsersFilter).toHaveBeenCalledWith(['usernameX']); }); @@ -84,7 +84,7 @@ describe('Users filter', () => { const searchInput = renderResult.getByTestId(`${testPrefix}-${filterPrefix}-search`); await userEvent.type(searchInput, ' , usernameX ,usernameY , '); - await userEvent.type(searchInput, '{enter}'); + await userEvent.keyboard('{enter}'); expect(onChangeUsersFilter).toHaveBeenCalledWith(['usernameX', 'usernameY']); }); });