Skip to content

Commit

Permalink
[8.x] [React@18] Refactor overview.tsx test to rtl (elastic#206805) (e…
Browse files Browse the repository at this point in the history
…lastic#206916)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[React@18] Refactor overview.tsx test to rtl
(elastic#206805)](elastic#206805)

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

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

<!--BACKPORT [{"author":{"name":"Anton
Dosov","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-16T09:57:55Z","message":"[React@18]
Refactor overview.tsx test to rtl (elastic#206805)\n\n##
Summary\r\n\r\nExtracted from
https://github.com/elastic/kibana/pull/206411\r\n[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/267344#019469ff-7fb9-4c5d-8569-2e445aab27be)\r\n[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/267344/jobs/019469ff-7fb9-4c5d-8569-2e445aab27be/artifacts/01946a1c-62fa-4d30-8863-1b40f8c0b924)\r\nJest
Tests elastic#9 / Overview renders correctly when there is no user
data\r\nview\r\nThis simplifies overview.tsx by refactoring to rtl and
removing the\r\nwhole snapshot. The snapshot was not useful and the test
is still making\r\nsure that the intended component is still rendered.
By removing enzyme,\r\nthe test now works properly for both react 17 and
18.","sha":"bdcad52cd8d1569590107a43e3bea7cf25164af9","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]
Refactor overview.tsx test to
rtl","number":206805,"url":"https://github.com/elastic/kibana/pull/206805","mergeCommit":{"message":"[React@18]
Refactor overview.tsx test to rtl (elastic#206805)\n\n##
Summary\r\n\r\nExtracted from
https://github.com/elastic/kibana/pull/206411\r\n[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/267344#019469ff-7fb9-4c5d-8569-2e445aab27be)\r\n[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/267344/jobs/019469ff-7fb9-4c5d-8569-2e445aab27be/artifacts/01946a1c-62fa-4d30-8863-1b40f8c0b924)\r\nJest
Tests elastic#9 / Overview renders correctly when there is no user
data\r\nview\r\nThis simplifies overview.tsx by refactoring to rtl and
removing the\r\nwhole snapshot. The snapshot was not useful and the test
is still making\r\nsure that the intended component is still rendered.
By removing enzyme,\r\nthe test now works properly for both react 17 and
18.","sha":"bdcad52cd8d1569590107a43e3bea7cf25164af9"}},"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/206805","number":206805,"mergeCommit":{"message":"[React@18]
Refactor overview.tsx test to rtl (elastic#206805)\n\n##
Summary\r\n\r\nExtracted from
https://github.com/elastic/kibana/pull/206411\r\n[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/267344#019469ff-7fb9-4c5d-8569-2e445aab27be)\r\n[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/267344/jobs/019469ff-7fb9-4c5d-8569-2e445aab27be/artifacts/01946a1c-62fa-4d30-8863-1b40f8c0b924)\r\nJest
Tests elastic#9 / Overview renders correctly when there is no user
data\r\nview\r\nThis simplifies overview.tsx by refactoring to rtl and
removing the\r\nwhole snapshot. The snapshot was not useful and the test
is still making\r\nsure that the intended component is still rendered.
By removing enzyme,\r\nthe test now works properly for both react 17 and
18.","sha":"bdcad52cd8d1569590107a43e3bea7cf25164af9"}}]}] BACKPORT-->

Co-authored-by: Anton Dosov <[email protected]>
  • Loading branch information
kibanamachine and Dosant authored Jan 16, 2025
1 parent a290e46 commit 4708842
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1,658 deletions.
Loading

0 comments on commit 4708842

Please sign in to comment.