Skip to content

[Logs UX] Replace enzyme with React Testing Library#224304

Merged
gbamparop merged 1 commit intoelastic:mainfrom
gbamparop:replace-enzyme-references
Jun 18, 2025
Merged

[Logs UX] Replace enzyme with React Testing Library#224304
gbamparop merged 1 commit intoelastic:mainfrom
gbamparop:replace-enzyme-references

Conversation

@gbamparop
Copy link
Contributor

@gbamparop gbamparop commented Jun 17, 2025

Summary

Replaces enzyme with React Testing Library in a Data Set Quality test.

Test instructions

It can be validated through CI but you can run it manually through:

npx jest --config=x-pack/platform/plugins/shared/dataset_quality/jest.config.js ----testPathPattern=dataset_quality_details_link.test

Closes #223020

@gbamparop gbamparop added the release_note:skip Skip the PR/issue when compiling release notes label Jun 17, 2025
@gbamparop gbamparop requested a review from a team as a code owner June 17, 2025 16:28
@gbamparop gbamparop added backport:version Backport to applied version labels v9.1.0 v8.19.0 labels Jun 17, 2025
@gbamparop gbamparop changed the title Replace enzyme with React Testing Library [Logs UX] Replace enzyme with React Testing Library Jun 17, 2025
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Count of Enzyme imports

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

id before after diff
datasetQuality 1 0 -1

Copy link
Contributor

@tonyghiani tonyghiani left a comment

Choose a reason for hiding this comment

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

LGTM, code review only as CI validated it works well 👌

@gbamparop gbamparop merged commit 07e1010 into elastic:main Jun 18, 2025
20 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 18, 2025
## Summary
Replaces enzyme with React Testing Library in a Data Set Quality test.

### Test instructions
It can be validated through CI but you can run it manually through:
```
npx jest --config=x-pack/platform/plugins/shared/dataset_quality/jest.config.js ----testPathPattern=dataset_quality_details_link.test
```

Closes elastic#223020

(cherry picked from commit 07e1010)
@kibanamachine
Copy link
Contributor

💚 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

kibanamachine added a commit that referenced this pull request Jun 19, 2025
…224401)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Logs UX] Replace enzyme with React Testing Library
(#224304)](#224304)

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

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

<!--BACKPORT [{"author":{"name":"Giorgos
Bamparopoulos","email":"georgios.bamparopoulos@elastic.co"},"sourceCommit":{"committedDate":"2025-06-18T10:23:18Z","message":"[Logs
UX] Replace enzyme with React Testing Library (#224304)\n\n##
Summary\nReplaces enzyme with React Testing Library in a Data Set
Quality test.\n\n### Test instructions\nIt can be validated through CI
but you can run it manually through:\n```\nnpx jest
--config=x-pack/platform/plugins/shared/dataset_quality/jest.config.js
----testPathPattern=dataset_quality_details_link.test\n```\n\nCloses
https://github.com/elastic/kibana/issues/223020","sha":"07e101006ad7549182d27f83bf1cdc3ff5878b61","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.1.0","v8.19.0"],"title":"[Logs
UX] Replace enzyme with React Testing
Library","number":224304,"url":"https://github.com/elastic/kibana/pull/224304","mergeCommit":{"message":"[Logs
UX] Replace enzyme with React Testing Library (#224304)\n\n##
Summary\nReplaces enzyme with React Testing Library in a Data Set
Quality test.\n\n### Test instructions\nIt can be validated through CI
but you can run it manually through:\n```\nnpx jest
--config=x-pack/platform/plugins/shared/dataset_quality/jest.config.js
----testPathPattern=dataset_quality_details_link.test\n```\n\nCloses
https://github.com/elastic/kibana/issues/223020","sha":"07e101006ad7549182d27f83bf1cdc3ff5878b61"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224304","number":224304,"mergeCommit":{"message":"[Logs
UX] Replace enzyme with React Testing Library (#224304)\n\n##
Summary\nReplaces enzyme with React Testing Library in a Data Set
Quality test.\n\n### Test instructions\nIt can be validated through CI
but you can run it manually through:\n```\nnpx jest
--config=x-pack/platform/plugins/shared/dataset_quality/jest.config.js
----testPathPattern=dataset_quality_details_link.test\n```\n\nCloses
https://github.com/elastic/kibana/issues/223020","sha":"07e101006ad7549182d27f83bf1cdc3ff5878b61"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Giorgos Bamparopoulos <georgios.bamparopoulos@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Logs UX] Migrate from Enzyme

4 participants