Skip to content
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

[ML] Migrate tests using enzyme to use @testing-library/react. #153288

Open
2 of 30 tasks
walterra opened this issue Mar 20, 2023 · 1 comment
Open
2 of 30 tasks

[ML] Migrate tests using enzyme to use @testing-library/react. #153288

walterra opened this issue Mar 20, 2023 · 1 comment
Assignees
Labels
Meta :ml refactoring technical debt Improvement of the software architecture and operational architecture

Comments

@walterra
Copy link
Contributor

walterra commented Mar 20, 2023

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 to react-testing-lib #153321
  • x-pack/plugins/ml/public/application/components/controls/select_severity/select_severity.test.tsx
    [ML] Migrate SelectInterval/SelectSeverity unit tests from enzyme to react-testing-lib #153321
  • x-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
  • 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
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Meta :ml refactoring technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

No branches or pull requests

2 participants