-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Lens] rewrite BucketNestingEditor tests to use react testing library #199888
[Lens] rewrite BucketNestingEditor tests to use react testing library #199888
Conversation
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
.first() | ||
.simulate('click'); | ||
|
||
fireEvent.click(screen.getByTestId('indexPattern-nesting-switch')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement!
Would it be possible to make the whole test function async
and then use
fireEvent.click(screen.getByTestId('indexPattern-nesting-switch')); | |
await userEvent.click(screen.getByTestId('indexPattern-nesting-switch')); |
(same for the other tests that use events)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing! I'll go ahead and approve it now, thank you for all the hard work 🥇
run docs-build |
buildkite test this |
24ef29d
to
e8de359
Compare
run docs-build |
buildkite test this |
💚 Build Succeeded
Metrics [docs]
History
|
…elastic#199888) ## Summary Hi! This PR rewrites the `BucketNestingEditor` tests to use the react testing library. Fixes elastic#199839 <img width="1063" alt="Screenshot 2024-11-12 at 3 35 06 PM" src="https://github.com/user-attachments/assets/95036fe0-46e8-4bf2-9d77-31d225d38ed1"> ### Checklist - [n/a] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed --------- Co-authored-by: Marta Bondyra <[email protected]>
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
2 similar comments
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
…elastic#199888) ## Summary Hi! This PR rewrites the `BucketNestingEditor` tests to use the react testing library. Fixes elastic#199839 <img width="1063" alt="Screenshot 2024-11-12 at 3 35 06 PM" src="https://github.com/user-attachments/assets/95036fe0-46e8-4bf2-9d77-31d225d38ed1"> ### Checklist - [n/a] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed --------- Co-authored-by: Marta Bondyra <[email protected]> (cherry picked from commit eddfe5b)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…elastic#199888) ## Summary Hi! This PR rewrites the `BucketNestingEditor` tests to use the react testing library. Fixes elastic#199839 <img width="1063" alt="Screenshot 2024-11-12 at 3 35 06 PM" src="https://github.com/user-attachments/assets/95036fe0-46e8-4bf2-9d77-31d225d38ed1"> ### Checklist - [n/a] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed --------- Co-authored-by: Marta Bondyra <[email protected]> (cherry picked from commit eddfe5b)
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
…ibrary (#199888) (#201529) # Backport This will backport the following commits from `main` to `8.x`: - [[Lens] rewrite BucketNestingEditor tests to use react testing library (#199888)](#199888) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Kyra Cho","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-18T16:46:33Z","message":"[Lens] rewrite BucketNestingEditor tests to use react testing library (#199888)\n\n## Summary\r\n\r\nHi! This PR rewrites the `BucketNestingEditor` tests to use the react\r\ntesting library.\r\n\r\nFixes #199839 \r\n\r\n<img width=\"1063\" alt=\"Screenshot 2024-11-12 at 3 35 06 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/95036fe0-46e8-4bf2-9d77-31d225d38ed1\">\r\n\r\n### Checklist\r\n\r\n- [n/a] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by: Marta Bondyra <[email protected]>","sha":"eddfe5b8a73ac636d5e75606280bd771a01b1adb","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","backport missing","💝community","v9.0.0","backport:version"],"number":199888,"url":"https://github.com/elastic/kibana/pull/199888","mergeCommit":{"message":"[Lens] rewrite BucketNestingEditor tests to use react testing library (#199888)\n\n## Summary\r\n\r\nHi! This PR rewrites the `BucketNestingEditor` tests to use the react\r\ntesting library.\r\n\r\nFixes #199839 \r\n\r\n<img width=\"1063\" alt=\"Screenshot 2024-11-12 at 3 35 06 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/95036fe0-46e8-4bf2-9d77-31d225d38ed1\">\r\n\r\n### Checklist\r\n\r\n- [n/a] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by: Marta Bondyra <[email protected]>","sha":"eddfe5b8a73ac636d5e75606280bd771a01b1adb"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199888","number":199888,"mergeCommit":{"message":"[Lens] rewrite BucketNestingEditor tests to use react testing library (#199888)\n\n## Summary\r\n\r\nHi! This PR rewrites the `BucketNestingEditor` tests to use the react\r\ntesting library.\r\n\r\nFixes #199839 \r\n\r\n<img width=\"1063\" alt=\"Screenshot 2024-11-12 at 3 35 06 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/95036fe0-46e8-4bf2-9d77-31d225d38ed1\">\r\n\r\n### Checklist\r\n\r\n- [n/a] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by: Marta Bondyra <[email protected]>","sha":"eddfe5b8a73ac636d5e75606280bd771a01b1adb"}}]}] BACKPORT--> Co-authored-by: Kyra Cho <[email protected]>
…library (#199888) (#201530) # Backport This will backport the following commits from `main` to `8.17`: - [[Lens] rewrite BucketNestingEditor tests to use react testing library (#199888)](#199888) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Kyra Cho","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-18T16:46:33Z","message":"[Lens] rewrite BucketNestingEditor tests to use react testing library (#199888)\n\n## Summary\r\n\r\nHi! This PR rewrites the `BucketNestingEditor` tests to use the react\r\ntesting library.\r\n\r\nFixes #199839 \r\n\r\n<img width=\"1063\" alt=\"Screenshot 2024-11-12 at 3 35 06 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/95036fe0-46e8-4bf2-9d77-31d225d38ed1\">\r\n\r\n### Checklist\r\n\r\n- [n/a] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by: Marta Bondyra <[email protected]>","sha":"eddfe5b8a73ac636d5e75606280bd771a01b1adb","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","backport missing","💝community","v9.0.0","backport:version"],"number":199888,"url":"https://github.com/elastic/kibana/pull/199888","mergeCommit":{"message":"[Lens] rewrite BucketNestingEditor tests to use react testing library (#199888)\n\n## Summary\r\n\r\nHi! This PR rewrites the `BucketNestingEditor` tests to use the react\r\ntesting library.\r\n\r\nFixes #199839 \r\n\r\n<img width=\"1063\" alt=\"Screenshot 2024-11-12 at 3 35 06 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/95036fe0-46e8-4bf2-9d77-31d225d38ed1\">\r\n\r\n### Checklist\r\n\r\n- [n/a] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by: Marta Bondyra <[email protected]>","sha":"eddfe5b8a73ac636d5e75606280bd771a01b1adb"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199888","number":199888,"mergeCommit":{"message":"[Lens] rewrite BucketNestingEditor tests to use react testing library (#199888)\n\n## Summary\r\n\r\nHi! This PR rewrites the `BucketNestingEditor` tests to use the react\r\ntesting library.\r\n\r\nFixes #199839 \r\n\r\n<img width=\"1063\" alt=\"Screenshot 2024-11-12 at 3 35 06 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/95036fe0-46e8-4bf2-9d77-31d225d38ed1\">\r\n\r\n### Checklist\r\n\r\n- [n/a] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by: Marta Bondyra <[email protected]>","sha":"eddfe5b8a73ac636d5e75606280bd771a01b1adb"}}]}] BACKPORT--> Co-authored-by: Kyra Cho <[email protected]>
…elastic#199888) ## Summary Hi! This PR rewrites the `BucketNestingEditor` tests to use the react testing library. Fixes elastic#199839 <img width="1063" alt="Screenshot 2024-11-12 at 3 35 06 PM" src="https://github.com/user-attachments/assets/95036fe0-46e8-4bf2-9d77-31d225d38ed1"> ### Checklist - [n/a] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed --------- Co-authored-by: Marta Bondyra <[email protected]>
Summary
Hi! This PR rewrites the
BucketNestingEditor
tests to use the react testing library.Fixes #199839
Checklist