Skip to content

Commit

Permalink
[React@18] fix When on the host isolation exceptions page should sear…
Browse files Browse the repository at this point in the history
…ch using expected exception item fields (elastic#208396)

## Summary

fix
elastic#208339 (comment)

- [ ]
[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/270417#0194a78a-264a-4056-8026-2be65f9e16b9)
[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/270417/jobs/0194a78a-264a-4056-8026-2be65f9e16b9/artifacts/0194a7ad-2ab6-40c2-a11c-685683bbb663)
Jest Integration Tests / When on the host isolation exceptions page
should search using expected exception item fields


Fix the test so it passes with React@18


```
REACT_18=true node scripts/jest --config=x-pack/solutions/security/plugins/security_solution/jest.integration.config.js /x-pack/solutions/security/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/integration_tests/host_isolation_exceptions_list.test.tsx
```


We already saw a very similar timeout failure here:
https://github.com/elastic/kibana/pull/207195/files#r1922454027
  • Loading branch information
Dosant authored Jan 28, 2025
1 parent 82d94f1 commit 8f10ac2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ describe('When on the host isolation exceptions page', () => {
it('should search using expected exception item fields', async () => {
const expectedFilterString = parseQueryFilterToKQL('fooFooFoo', SEARCHABLE_FIELDS);
const { renderResult, apiMocks, user } = prepareTest();
const { findAllByTestId } = renderResult;
const { getAllByTestId } = renderResult;

await waitFor(async () => {
expect(await findAllByTestId(`${pageTestId}-card`)).toHaveLength(10);
await waitFor(() => {
expect(getAllByTestId(`${pageTestId}-card`)).toHaveLength(10);
});

apiMocks.responseProvider.exceptionsFind.mockClear();
Expand Down

0 comments on commit 8f10ac2

Please sign in to comment.