mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
## Summary Upgrades `@testing-library/user-event` to `^14.5.2`. See the release notes for `v14` for breaking changes: https://github.com/testing-library/user-event/releases/tag/v14.0.0 I was facing an [issue](https://github.com/testing-library/user-event/issues/662) with `v13.5.0` with `userEvent.click()` in a PR (https://github.com/elastic/kibana/pull/189729) and was able to verify that `v14.4.3` onwards fixes it so I decided to update that package. What a rabbit hole 😅 ! - In `user-event` `v14` events return a promise, so this PR updates usage of the likes of `userEvent.click` with `await userEvent.click`. Regex to search for `userEvent` calls that miss `await` except `.setup`: `(?<!await\s)userEvent\.(?!setup\b)` - The way to handle pointer events needed changing from `, undefined, { skipPointerEventsCheck: true });` to `, { pointerEventsCheck: 0 });`. - I tried a bit to do the refactor with codemods, but there were quite some edge cases so it ended up being done manually. - I looked into all failing tests and tried my best to update them, but for some of them I lacked the context to make them work again. If you're a code owner and find a skipped test in this PR please give it a try to fix and push in this PR or let me know if it's fine for you to fix in follow ups. List of files where I had to skip tests (`git diff main...HEAD -G'\.skip' --name-only`): ### `packages/kbn-dom-drag-drop` - `packages/kbn-dom-drag-drop/src/droppable.test.tsx` ### `x-pack/plugins/cases` - `x-pack/plugins/cases/public/components/templates/form.test.tsx` - `x-pack/plugins/cases/public/components/user_actions/user_actions_list.test.tsx` ### `x-pack/plugins/cloud_security_posture` - `x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.test.tsx` ### `x-pack/plugins/lens` - `x-pack/plugins/lens/public/datasources/form_based/dimension_panel/format_selector.test.tsx` ### `x-pack/plugins/observability_solution` - `x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_add_edit/fields/request_body_field.test.tsx` ### `x-pack/plugins/security_solution` - `x-pack/plugins/security_solution/public/management/components/console/components/command_input/integration_tests/command_input.test.tsx` - `x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/kill_process_action.test.tsx` - `x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/release_action.test.tsx` - `x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/status_action.test.tsx` - `x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/upload_action.test.tsx` - `x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/integration_tests/response_actions_log.test.tsx` - `x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/event_filters_flyout.test.tsx` - `x-pack/plugins/security_solution/public/management/pages/response_actions/view/response_actions_list_page.test.tsx` ---- I plan to do a talk on Kibana Demo Days to walk through some of the breaking changes and learnings. ### Checklist - [x] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) |
||
---|---|---|
.. | ||
src | ||
index.ts | ||
jest.config.js | ||
kibana.jsonc | ||
package.json | ||
README.md | ||
setup_tests.ts | ||
tsconfig.json |
@kbn/alerts-grouping
Platform components to create hierarchical alerts grouping UIs