Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] remove outstanding testing-library/react-hooks usages (#205307) #205780

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

eokoneyo
Copy link
Contributor

@eokoneyo eokoneyo commented Jan 7, 2025

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine ","sha":"1c3f7a6215be2c3459325145a9e4677b2ff4b836","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","Team:obs-ux-infra_services","Team:obs-ux-management","React@18"],"number":205307,"url":"https://github.com//pull/205307","mergeCommit":{"message":"remove outstanding testing-library/react-hooks usages (#205307)\n\n## Summary\r\n\r\nThis PR removes usages of `@testing-library/react-hooks` from the\r\ncodebase, as we've transitioned to using `@testing-library/react`\r\nespecially that it provides the same utils we need and the later package\r\nis not supported for react 18. alongside this ~other instance of the\r\nusages for `@testing-library/react-hooks` have been removed~ an eslint\r\nrule has been enabled to prevent further usages of the mentioned\r\npackage.\r\n\r\n\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine ","sha":"1c3f7a6215be2c3459325145a9e4677b2ff4b836"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com//pull/205307","number":205307,"mergeCommit":{"message":"remove outstanding testing-library/react-hooks usages (#205307)\n\n## Summary\r\n\r\nThis PR removes usages of `@testing-library/react-hooks` from the\r\ncodebase, as we've transitioned to using `@testing-library/react`\r\nespecially that it provides the same utils we need and the later package\r\nis not supported for react 18. alongside this ~other instance of the\r\nusages for `@testing-library/react-hooks` have been removed~ an eslint\r\nrule has been enabled to prevent further usages of the mentioned\r\npackage.\r\n\r\n\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine ","sha":"1c3f7a6215be2c3459325145a9e4677b2ff4b836"}}]}] BACKPORT-->

## Summary

This PR removes usages of `@testing-library/react-hooks` from the
codebase, as we've transitioned to using `@testing-library/react`
especially that it provides the same utils we need and the later package
is not supported for react 18. alongside this ~other instance of the
usages for `@testing-library/react-hooks` have been removed~ an eslint
rule has been enabled to prevent further usages of the mentioned
package.

<!--
### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

-->

---------

Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 1c3f7a6)

# Conflicts:
#	x-pack/plugins/lens/public/app_plugin/app_helpers.test.ts
#	x-pack/solutions/observability/plugins/apm/public/components/shared/summary/http_status_badge/http_status_badge.test.tsx
@eokoneyo eokoneyo enabled auto-merge (squash) January 7, 2025 15:58
@botelastic botelastic bot added the Team:obs-ux-management Observability Management User Experience Team label Jan 7, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@eokoneyo eokoneyo merged commit b98dcc9 into elastic:8.x Jan 8, 2025
13 checks passed
@eokoneyo eokoneyo deleted the backport/8.x/pr-205307 branch January 8, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:obs-ux-management Observability Management User Experience Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants