[ML] Migrate tests using enzyme
to use @testing-library/react
.
#153288
Labels
Meta
:ml
refactoring
technical debt
Improvement of the software architecture and operational architecture
At the moment it looks like to be able to migrate to React 18, we need to migrate tests using
enzyme
to@testing-library/react
, since Enzyme officially supporting React 18 looks still unlikely (see e.g. enzymejs/enzyme#2524, https://dev.to/wojtekmaj/enzyme-is-dead-now-what-ekl). When porting these tests, we should also try to avoid the use of existing snapshots again and refactor to more useful tests that assert rendered content and act on the components so we rely less on implementation details. And since we write new tests with@testing-library/react
only anyway, we should aim to migrate these tests so we rely on one framework only eventually.plugins/ml
x-pack/plugins/ml/public/application/components/controls/select_interval/select_interval.test.tsx
[ML] Migrate SelectInterval/SelectSeverity unit tests from
enzyme
toreact-testing-lib
#153321x-pack/plugins/ml/public/application/components/controls/select_severity/select_severity.test.tsx
[ML] Migrate SelectInterval/SelectSeverity unit tests from
enzyme
toreact-testing-lib
#153321x-pack/plugins/ml/public/application/components/job_selector/timerange_bar/timerange_bar.test.js
x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/outlier_exploration.test.tsx
x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/create_analytics_button/create_analytics_button.test.tsx
x-pack/plugins/ml/public/application/explorer/components/explorer_no_influencers_found/explorer_no_influencers_found.test.js
x-pack/plugins/ml/public/application/explorer/components/explorer_no_results_found/explorer_no_results_found.test.js
x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container.test.js
x-pack/plugins/ml/public/application/explorer/explorer_charts/components/explorer_chart_label/explorer_chart_label_badge.test.js
x-pack/plugins/ml/public/application/explorer/explorer_charts/components/explorer_chart_label/explorer_chart_label.test.js
x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/editor.test.tsx
react-testing-lib
that don't assert implementation details.x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/list.test.tsx
x-pack/plugins/ml/public/application/settings/filter_lists/components/filter_list_usage_popover/filter_list_usage_popover.test.js
plugins/transform
x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/agg_label_form.test.tsx
x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/list_form.test.tsx
x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/list_summary.test.tsx
x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/popover_form.test.tsx
x-pack/plugins/transform/public/app/sections/create_transform/components/group_by_list/group_by_label_form.test.tsx
x-pack/plugins/transform/public/app/sections/create_transform/components/group_by_list/group_by_label_summary.test.tsx
x-pack/plugins/transform/public/app/sections/create_transform/components/group_by_list/list_form.test.tsx
x-pack/plugins/transform/public/app/sections/create_transform/components/group_by_list/list_summary.test.tsx
x-pack/plugins/transform/public/app/sections/create_transform/components/group_by_list/popover_form.test.tsx
x-pack/plugins/transform/public/app/sections/transform_management/transform_management_section.test.tsx
x-pack/plugins/transform/public/app/sections/transform_management/components/action_delete/delete_action_name.test.tsx
x-pack/plugins/transform/public/app/sections/transform_management/components/action_start/start_action_name.test.tsx
x-pack/plugins/transform/public/app/sections/transform_management/components/action_stop/stop_action_name.test.tsx
x-pack/plugins/transform/public/app/sections/transform_management/components/create_transform_button/create_transform_button.test.tsx
x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row_details_pane.test.tsx
x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row_json_pane.test.tsx
x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row_json_pane.test.tsx
The text was updated successfully, but these errors were encountered: