Skip to content

Commit

Permalink
[8.x] [React@18] fix When on the host isolation exceptions page shoul…
Browse files Browse the repository at this point in the history
…d search using expected exception item fields (#208396) (#208574)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[React@18] fix When on the host isolation exceptions page should
search using expected exception item fields
(#208396)](#208396)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Anton
Dosov","email":"anton.dosov@elastic.co"},"sourceCommit":{"committedDate":"2025-01-28T16:32:02Z","message":"[React@18]
fix When on the host isolation exceptions page should search using
expected exception item fields (#208396)\n\n##
Summary\r\n\r\nfix\r\nhttps://github.com//pull/208339#issuecomment-2615621371\r\n\r\n-
[
]\r\n[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/270417#0194a78a-264a-4056-8026-2be65f9e16b9)\r\n[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/270417/jobs/0194a78a-264a-4056-8026-2be65f9e16b9/artifacts/0194a7ad-2ab6-40c2-a11c-685683bbb663)\r\nJest
Integration Tests / When on the host isolation exceptions page\r\nshould
search using expected exception item fields\r\n\r\n\r\nFix the test so
it passes with React@18\r\n\r\n\r\n```\r\nREACT_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\r\n```\r\n\r\n\r\nWe
already saw a very similar timeout failure
here:\r\nhttps://github.com//pull/207195/files#r1922454027","sha":"8f10ac2163de398e8d22a0d14a5cbe99ccc951fa","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:SharedUX","backport:prev-minor","React@18"],"title":"[React@18]
fix When on the host isolation exceptions page should search using
expected exception item
fields","number":208396,"url":"https://github.com/elastic/kibana/pull/208396","mergeCommit":{"message":"[React@18]
fix When on the host isolation exceptions page should search using
expected exception item fields (#208396)\n\n##
Summary\r\n\r\nfix\r\nhttps://github.com//pull/208339#issuecomment-2615621371\r\n\r\n-
[
]\r\n[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/270417#0194a78a-264a-4056-8026-2be65f9e16b9)\r\n[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/270417/jobs/0194a78a-264a-4056-8026-2be65f9e16b9/artifacts/0194a7ad-2ab6-40c2-a11c-685683bbb663)\r\nJest
Integration Tests / When on the host isolation exceptions page\r\nshould
search using expected exception item fields\r\n\r\n\r\nFix the test so
it passes with React@18\r\n\r\n\r\n```\r\nREACT_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\r\n```\r\n\r\n\r\nWe
already saw a very similar timeout failure
here:\r\nhttps://github.com//pull/207195/files#r1922454027","sha":"8f10ac2163de398e8d22a0d14a5cbe99ccc951fa"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208396","number":208396,"mergeCommit":{"message":"[React@18]
fix When on the host isolation exceptions page should search using
expected exception item fields (#208396)\n\n##
Summary\r\n\r\nfix\r\nhttps://github.com//pull/208339#issuecomment-2615621371\r\n\r\n-
[
]\r\n[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/270417#0194a78a-264a-4056-8026-2be65f9e16b9)\r\n[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/270417/jobs/0194a78a-264a-4056-8026-2be65f9e16b9/artifacts/0194a7ad-2ab6-40c2-a11c-685683bbb663)\r\nJest
Integration Tests / When on the host isolation exceptions page\r\nshould
search using expected exception item fields\r\n\r\n\r\nFix the test so
it passes with React@18\r\n\r\n\r\n```\r\nREACT_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\r\n```\r\n\r\n\r\nWe
already saw a very similar timeout failure
here:\r\nhttps://github.com//pull/207195/files#r1922454027","sha":"8f10ac2163de398e8d22a0d14a5cbe99ccc951fa"}}]}]
BACKPORT-->

Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
  • Loading branch information
kibanamachine and Dosant authored Jan 28, 2025
1 parent b48c3f9 commit c1c7728
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 c1c7728

Please sign in to comment.