Skip to content

Commit

Permalink
[Security Solution] Update host isolation exceptions test to check fo…
Browse files Browse the repository at this point in the history
…r specific API call (#119876)
  • Loading branch information
academo authored Dec 1, 2021
1 parent 55430eb commit f1aae77
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,15 @@ describe('When on the host isolation exceptions page', () => {
userEvent.click(renderResult.getByTestId('searchButton'));

// wait for the page render
await waitForApiCall();
await waitFor(() =>
expect(getHostIsolationExceptionItemsMock).toHaveBeenLastCalledWith({
filter:
'(exception-list-agnostic.attributes.name:(*this*does*not*exists*) OR exception-list-agnostic.attributes.description:(*this*does*not*exists*) OR exception-list-agnostic.attributes.entries.value:(*this*does*not*exists*))',
http: mockedContext.coreStart.http,
page: 1,
perPage: 10,
})
);

// check the url changed
expect(mockedContext.history.location.search).toBe('?filter=this%20does%20not%20exists');
Expand Down

0 comments on commit f1aae77

Please sign in to comment.