Skip to content

RenamesrenderReactTestingLibraryWithI18n to renderWithI18n#218371

Merged
TinaHeiligers merged 4 commits intoelastic:mainfrom
TinaHeiligers:kbn-rename-i18n-renderhelper
Apr 21, 2025
Merged

RenamesrenderReactTestingLibraryWithI18n to renderWithI18n#218371
TinaHeiligers merged 4 commits intoelastic:mainfrom
TinaHeiligers:kbn-rename-i18n-renderhelper

Conversation

@TinaHeiligers
Copy link
Contributor

@TinaHeiligers TinaHeiligers commented Apr 16, 2025

Summary

This PR only renames the helper, no test implementations were changed.

Why now?

Migrating tests from Enzyme to RTL means that all usage of mountWithIntl has to change and will likely be replaced by the helper that wraps RTL render with I18n. A shorter name improves devEx.

ATM, consumption is limited to a few tests, reducing the number of codeowner reviews required.

Identify risks

  • In progress work and open PRs might fail. Updating from main will prompt an undefined function that will need to be renamed.

@TinaHeiligers TinaHeiligers added chore release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting backport:prev-minor and removed backport:skip This PR does not require backporting labels Apr 16, 2025
@TinaHeiligers TinaHeiligers requested a review from a team April 16, 2025 01:53
@TinaHeiligers TinaHeiligers self-assigned this Apr 16, 2025
@TinaHeiligers TinaHeiligers marked this pull request as ready for review April 16, 2025 16:16
@TinaHeiligers TinaHeiligers requested review from a team as code owners April 16, 2025 16:16
@TinaHeiligers TinaHeiligers requested a review from a team April 16, 2025 16:16
@TinaHeiligers TinaHeiligers requested review from a team as code owners April 16, 2025 16:16
Copy link
Contributor

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/platform/packages/shared/kbn-test-jest-helpers/src/testing_library_react_helpers.tsx change LGTM

@botelastic botelastic bot added Team:Fleet Team label for Observability Data Collection Fleet team Team:obs-ux-infra_services - DEPRECATED DEPRECATED - Use Team:obs-presentation. labels Apr 16, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@Dosant Dosant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transform test changes LGTM

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fleet changes 🚀

Copy link
Contributor

@rmyz rmyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/view_in_apm_button.test.tsx changes LGTM

Copy link
Contributor

@janmonschke janmonschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THI changes lgtm 👍

@TinaHeiligers
Copy link
Contributor Author

@parkiino automation added you as a required reviewer and the PR's already been approved by your team. Good to merge?

@TinaHeiligers
Copy link
Contributor Author

@elasticmachine merge upstream

@TinaHeiligers TinaHeiligers enabled auto-merge (squash) April 18, 2025 16:19
@TinaHeiligers
Copy link
Contributor Author

@elasticmachine merge upstream

@TinaHeiligers TinaHeiligers requested a review from a team as a code owner April 19, 2025 19:42
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

cc @TinaHeiligers

@TinaHeiligers TinaHeiligers merged commit 1fe09dc into elastic:main Apr 21, 2025
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 9.0

https://github.com/elastic/kibana/actions/runs/14569360315

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 21, 2025
…ic#218371)

## Summary

This PR only renames the helper, no test implementations were changed.

Why now?

Migrating tests from Enzyme to RTL means that all usage of
`mountWithIntl` has to change and will likely be replaced by the helper
that wraps RTL render with I18n. [A shorter name improves devEx](url).

ATM, consumption is limited to a few tests, reducing the number of
codeowner reviews required.

### Identify risks

- [x] In progress work and open PRs might fail. Updating from main will
prompt an undefined function that will need to be renamed.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 1fe09dc)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
9.0

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 Apr 21, 2025
…218371) (#218714)

# Backport

This will backport the following commits from `main` to `9.0`:
- [Renames`renderReactTestingLibraryWithI18n` to `renderWithI18n`
(#218371)](#218371)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Christiane (Tina)
Heiligers","email":"christiane.heiligers@elastic.co"},"sourceCommit":{"committedDate":"2025-04-21T07:21:59Z","message":"Renames`renderReactTestingLibraryWithI18n`
to `renderWithI18n` (#218371)\n\n## Summary\n\nThis PR only renames the
helper, no test implementations were changed.\n\nWhy now?\n\nMigrating
tests from Enzyme to RTL means that all usage of\n`mountWithIntl` has to
change and will likely be replaced by the helper\nthat wraps RTL render
with I18n. [A shorter name improves devEx](url).\n\nATM, consumption is
limited to a few tests, reducing the number of\ncodeowner reviews
required.\n\n### Identify risks\n\n- [x] In progress work and open PRs
might fail. Updating from main will\nprompt an undefined function that
will need to be renamed.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"1fe09dcff4ec20ff877e17a181ed77c28e3e05d1","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","release_note:skip","Team:Fleet","backport:prev-minor","Team:obs-ux-infra_services","v9.1.0"],"title":"Renames`renderReactTestingLibraryWithI18n`
to
`renderWithI18n`","number":218371,"url":"https://github.com/elastic/kibana/pull/218371","mergeCommit":{"message":"Renames`renderReactTestingLibraryWithI18n`
to `renderWithI18n` (#218371)\n\n## Summary\n\nThis PR only renames the
helper, no test implementations were changed.\n\nWhy now?\n\nMigrating
tests from Enzyme to RTL means that all usage of\n`mountWithIntl` has to
change and will likely be replaced by the helper\nthat wraps RTL render
with I18n. [A shorter name improves devEx](url).\n\nATM, consumption is
limited to a few tests, reducing the number of\ncodeowner reviews
required.\n\n### Identify risks\n\n- [x] In progress work and open PRs
might fail. Updating from main will\nprompt an undefined function that
will need to be renamed.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"1fe09dcff4ec20ff877e17a181ed77c28e3e05d1"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/218371","number":218371,"mergeCommit":{"message":"Renames`renderReactTestingLibraryWithI18n`
to `renderWithI18n` (#218371)\n\n## Summary\n\nThis PR only renames the
helper, no test implementations were changed.\n\nWhy now?\n\nMigrating
tests from Enzyme to RTL means that all usage of\n`mountWithIntl` has to
change and will likely be replaced by the helper\nthat wraps RTL render
with I18n. [A shorter name improves devEx](url).\n\nATM, consumption is
limited to a few tests, reducing the number of\ncodeowner reviews
required.\n\n### Identify risks\n\n- [x] In progress work and open PRs
might fail. Updating from main will\nprompt an undefined function that
will need to be renamed.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"1fe09dcff4ec20ff877e17a181ed77c28e3e05d1"}}]}]
BACKPORT-->

---------

Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
davismcphee pushed a commit to davismcphee/kibana that referenced this pull request Apr 22, 2025
…ic#218371)

## Summary

This PR only renames the helper, no test implementations were changed.

Why now?

Migrating tests from Enzyme to RTL means that all usage of
`mountWithIntl` has to change and will likely be replaced by the helper
that wraps RTL render with I18n. [A shorter name improves devEx](url).

ATM, consumption is limited to a few tests, reducing the number of
codeowner reviews required.

### Identify risks

- [x] In progress work and open PRs might fail. Updating from main will
prompt an undefined function that will need to be renamed.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
…ic#218371)

## Summary

This PR only renames the helper, no test implementations were changed.

Why now?

Migrating tests from Enzyme to RTL means that all usage of
`mountWithIntl` has to change and will likely be replaced by the helper
that wraps RTL render with I18n. [A shorter name improves devEx](url).

ATM, consumption is limited to a few tests, reducing the number of
codeowner reviews required.

### Identify risks

- [x] In progress work and open PRs might fail. Updating from main will
prompt an undefined function that will need to be renamed.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@Dosant
Copy link
Contributor

Dosant commented Jun 12, 2025

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

Dosant pushed a commit to Dosant/kibana that referenced this pull request Jun 12, 2025
…ic#218371)

## Summary

This PR only renames the helper, no test implementations were changed.

Why now?

Migrating tests from Enzyme to RTL means that all usage of
`mountWithIntl` has to change and will likely be replaced by the helper
that wraps RTL render with I18n. [A shorter name improves devEx](url).

ATM, consumption is limited to a few tests, reducing the number of
codeowner reviews required.

### Identify risks

- [x] In progress work and open PRs might fail. Updating from main will
prompt an undefined function that will need to be renamed.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 1fe09dc)

# Conflicts:
#	src/core/packages/apps/browser-internal/src/status/components/status_table.test.tsx
Dosant added a commit that referenced this pull request Jun 12, 2025
…#218371) (#223516)

# Backport

This will backport the following commits from `main` to `8.19`:
- [Renames`renderReactTestingLibraryWithI18n` to `renderWithI18n`
(#218371)](#218371)

<!--- Backport version: 10.0.0 -->

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

<!--BACKPORT [{"author":{"name":"Christiane (Tina)
Heiligers","email":"christiane.heiligers@elastic.co"},"sourceCommit":{"committedDate":"2025-04-21T07:21:59Z","message":"Renames`renderReactTestingLibraryWithI18n`
to `renderWithI18n` (#218371)\n\n## Summary\n\nThis PR only renames the
helper, no test implementations were changed.\n\nWhy now?\n\nMigrating
tests from Enzyme to RTL means that all usage of\n`mountWithIntl` has to
change and will likely be replaced by the helper\nthat wraps RTL render
with I18n. [A shorter name improves devEx](url).\n\nATM, consumption is
limited to a few tests, reducing the number of\ncodeowner reviews
required.\n\n### Identify risks\n\n- [x] In progress work and open PRs
might fail. Updating from main will\nprompt an undefined function that
will need to be renamed.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"1fe09dcff4ec20ff877e17a181ed77c28e3e05d1","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","release_note:skip","Team:Fleet","backport:prev-minor","Team:obs-ux-infra_services","v9.1.0","v9.0.1"],"title":"Renames`renderReactTestingLibraryWithI18n`
to
`renderWithI18n`","number":218371,"url":"https://github.com/elastic/kibana/pull/218371","mergeCommit":{"message":"Renames`renderReactTestingLibraryWithI18n`
to `renderWithI18n` (#218371)\n\n## Summary\n\nThis PR only renames the
helper, no test implementations were changed.\n\nWhy now?\n\nMigrating
tests from Enzyme to RTL means that all usage of\n`mountWithIntl` has to
change and will likely be replaced by the helper\nthat wraps RTL render
with I18n. [A shorter name improves devEx](url).\n\nATM, consumption is
limited to a few tests, reducing the number of\ncodeowner reviews
required.\n\n### Identify risks\n\n- [x] In progress work and open PRs
might fail. Updating from main will\nprompt an undefined function that
will need to be renamed.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"1fe09dcff4ec20ff877e17a181ed77c28e3e05d1"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/218371","number":218371,"mergeCommit":{"message":"Renames`renderReactTestingLibraryWithI18n`
to `renderWithI18n` (#218371)\n\n## Summary\n\nThis PR only renames the
helper, no test implementations were changed.\n\nWhy now?\n\nMigrating
tests from Enzyme to RTL means that all usage of\n`mountWithIntl` has to
change and will likely be replaced by the helper\nthat wraps RTL render
with I18n. [A shorter name improves devEx](url).\n\nATM, consumption is
limited to a few tests, reducing the number of\ncodeowner reviews
required.\n\n### Identify risks\n\n- [x] In progress work and open PRs
might fail. Updating from main will\nprompt an undefined function that
will need to be renamed.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"1fe09dcff4ec20ff877e17a181ed77c28e3e05d1"}},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/218714","number":218714,"state":"MERGED","mergeCommit":{"sha":"2af22f2f0422d3038caa56dcc154b8db20eb6554","message":"[9.0]
Renames`renderReactTestingLibraryWithI18n` to `renderWithI18n` (#218371)
(#218714)\n\n# Backport\n\nThis will backport the following commits from
`main` to `9.0`:\n- [Renames`renderReactTestingLibraryWithI18n` to
`renderWithI18n`\n(#218371)](https://github.com/elastic/kibana/pull/218371)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\n---------\n\nCo-authored-by:
Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>"}}]}]
BACKPORT-->

---------

Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team Team:obs-ux-infra_services - DEPRECATED DEPRECATED - Use Team:obs-presentation. v8.19.0 v9.0.1 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.