[React@18] Refactor overview.tsx test to rtl#206805
Merged
Dosant merged 1 commit intoelastic:mainfrom Jan 16, 2025
Merged
Conversation
Contributor
|
Pinging @elastic/appex-sharedux (Team:SharedUX) |
eokoneyo
approved these changes
Jan 16, 2025
Contributor
eokoneyo
left a comment
There was a problem hiding this comment.
Nice!! Code changes LGTM
Contributor
|
Starting backport for target branches: 8.x |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Jan 16, 2025
## Summary Extracted from elastic#206411 [[job]](https://buildkite.com/elastic/kibana-pull-request/builds/267344#019469ff-7fb9-4c5d-8569-2e445aab27be) [[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/267344/jobs/019469ff-7fb9-4c5d-8569-2e445aab27be/artifacts/01946a1c-62fa-4d30-8863-1b40f8c0b924) Jest Tests elastic#9 / Overview renders correctly when there is no user data view This simplifies overview.tsx by refactoring to rtl and removing the whole snapshot. The snapshot was not useful and the test is still making sure that the intended component is still rendered. By removing enzyme, the test now works properly for both react 17 and 18. (cherry picked from commit bdcad52)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Jan 16, 2025
# Backport This will backport the following commits from `main` to `8.x`: - [[React@18] Refactor overview.tsx test to rtl (#206805)](#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":"anton.dosov@elastic.co"},"sourceCommit":{"committedDate":"2025-01-16T09:57:55Z","message":"[React@18] Refactor overview.tsx test to rtl (#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 #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 (#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 #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 (#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 #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 <anton.dosov@elastic.co>
viduni94
pushed a commit
to viduni94/kibana
that referenced
this pull request
Jan 23, 2025
## Summary Extracted from elastic#206411 [[job]](https://buildkite.com/elastic/kibana-pull-request/builds/267344#019469ff-7fb9-4c5d-8569-2e445aab27be) [[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/267344/jobs/019469ff-7fb9-4c5d-8569-2e445aab27be/artifacts/01946a1c-62fa-4d30-8863-1b40f8c0b924) Jest Tests elastic#9 / Overview renders correctly when there is no user data view This simplifies overview.tsx by refactoring to rtl and removing the whole snapshot. The snapshot was not useful and the test is still making sure that the intended component is still rendered. By removing enzyme, the test now works properly for both react 17 and 18.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extracted from #206411 [job] [logs] Jest Tests #9 / Overview renders correctly when there is no user data view
This simplifies overview.tsx by refactoring to rtl and removing the whole snapshot. The snapshot was not useful and the test is still making sure that the intended component is still rendered. By removing enzyme, the test now works properly for both react 17 and 18.