kibana icon indicating copy to clipboard operation
kibana copied to clipboard

[ObsUX-Infra&Services] Migrate from enzyme to RTL

Open rmyz opened this issue 6 months ago • 4 comments

Summary

Closes https://github.com/elastic/kibana/issues/222967

This PR replaces enzyme with React Testing Library for files owned by @elastic/obs-ux-infra_services-team.

How to test

Run the following commands:

node scripts/jest --config=x-pack/solutions/observability/plugins/apm/jest.config.js 
node scripts/jest --config=x-pack/solutions/observability/plugins/infra/jest.config.js
node scripts/jest --config=x-pack/solutions/observability/plugins/observability/jest.config.js
node scripts/jest --config=x-pack/platform/packages/shared/kbn-event-stacktrace/jest.config.js

rmyz avatar Jun 12 '25 11:06 rmyz

/ci

rmyz avatar Jun 16 '25 11:06 rmyz

/ci

rmyz avatar Jun 16 '25 11:06 rmyz

/ci

rmyz avatar Jun 16 '25 12:06 rmyz

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

elasticmachine avatar Jun 16 '25 15:06 elasticmachine

Starting backport for target branches: 8.19

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

kibanamachine avatar Jun 17 '25 14:06 kibanamachine

:green_heart: Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 2.6MB 2.6MB +270.0B
unifiedDocViewer 223.0KB 223.1KB +158.0B
total +428.0B

Count of Enzyme imports

Enzyme is no longer supported, and we should switch to @testing-library/react instead.

id before after diff
@kbn/event-stacktrace 4 0 -4
apm 21 0 -21
infra 5 0 -5
observability 4 3 -1
total -31
Unknown metric groups

ESLint disabled line counts

id before after diff
@kbn/event-stacktrace 2 1 -1
apm 70 68 -2
total -3

Total ESLint disabled count

id before after diff
@kbn/event-stacktrace 2 1 -1
apm 83 81 -2
total -3

History

  • :broken_heart: Build #309343 failed be2ce60634e03bc01d8fd4cf5a6cd18fba0866ac
  • :green_heart: Build #309208 succeeded 3b4cec23d17a9e5205c5a9cda6d31c22222254b5
  • :green_heart: Build #308811 succeeded 47615ce9ce0fd235479f30d3c1df634348596de2
  • :broken_heart: Build #308773 failed 2019930e1ea10ddaf145cf479564bab14c2f8e5d

cc @rmyz

elasticmachine avatar Jun 17 '25 14:06 elasticmachine

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.19:
- Upgrade EUI to v103.0.0 (#223414)

Manual backport

To create the backport manually run:

node scripts/backport --pr 223530

Questions ?

Please refer to the Backport tool documentation

kibanamachine avatar Jun 17 '25 14:06 kibanamachine

💚 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

rmyz avatar Jun 17 '25 15:06 rmyz