From b7c4d890c00bb55639bddd9bbc56a3eb22bdd1ef Mon Sep 17 00:00:00 2001 From: Bree Hall <40739624+breehall@users.noreply.github.com> Date: Wed, 8 Jun 2022 10:18:11 -0400 Subject: [PATCH] Upgrade EUI to v58.0.0 (#132257) * Initial commit for EUI 57.0.0 upgrade * Handle i18n changes * Resolved type errors in DatePicker and Markdown Editor * Resolve test failures in Jest Test Suite #1. Updated multiple snapshots for euiLink and euiTitle as they have been converted to Emotion * Resolved failing tests for Jest Suite #2. Updated snapshots for euiHealth, euiAvatar, euiSpacer, euiTitle, and euiLink as they have recently been converted to Emotion * Resolved failing tests for Jest Suite 3. Updated failing snapshots as EuiSpacer, EuiText, EuiCallout, EuiHorizontalRule, EuiTitle, and EuiLink have been converted to Emotion. Updated the i18n translation snapshots * Upgrade EUI verion to 58.0.0 * Resolved tests failures from Jest Test Suite 4. Updated snapshots as EuiLink, EuiTitle, EuiHorizontalRule, EuiSpace, and EuiCallout have been converted to Emotion * Resolved failing test cases for Jest Test Suite 5. Updated snapshots as EuiLoader has been converted to Emotion * Resolved failing tests in Jest Test Suite 6. Updated snapshots as EuiSpacer, EuiHorizontalRule, Eui Callout, and EuiLink have been converted to Emotion * Resolved type errors for EuiDatePicker component * Resolved type error within EuiContextMenu by removing the watchedItemProps prop. It was recently deprecated in EUI PR# 5880 (https://github.com/elastic/eui/pull/5880) as is no longer needed * Resolved type error within EuiContextMenu by removing the watchedItemProps prop. It was recently deprecated in EUI PR# 5880 (https://github.com/elastic/eui/pull/5880) as is no longer needed * Resolved type error within EuiContextMenu by removing the watchedItemProps prop. It was recently deprecated in EUI PR# 5880 (https://github.com/elastic/eui/pull/5880) as is no longer needed * Resolved type errors by updating the popoverPlacement prop for the EuiDatePicket component with new / valid values. A list of values were deprecated and new values were added in EUI PR #5868 (https://github.com/elastic/eui/pull/5868) * Resolved type error within EuiTabs by removing instances of display: condensed as it is no longer a part of the Amsterdam theme via EUI PR #5868(https://github.com/elastic/eui/pull/5868) * Remove deprecated `display` prop from EuiTabs * Deprecate `.eui-textOverflowWrap` * Deprecate EuiSuggestItem `labelDisplay` prop * [EuiStepsHorizontal] Replace deprecated `isComplete`/`isSelected` with `status` * Update last EuiStepsHorizontal `status` migration - this one was more complex than the previous commit due to existing `status` usage and conditional steps. Some amount of logic was simplified via `completedStep` * Resolved type error within EuiTabs by removing instances of display: condensed as it is no longer a part of the Amsterdam theme via EUI PR #5868(https://github.com/elastic/eui/pull/5868) * Resolved failing test cases in Jest Test Suite 5. Updated snapshots as EuiTitle has been converted to Emotion * Resovlved failing test cases in Jest Test Suite 4. Updated snapshots as EuiTitle and EuiSpacer have been converted to Emotion. Resolved failing tests for EuiLink click simlulations by esuring the test is referencing the correct element. * Resolved failing test cases in Jest Test Suite 3. Updated snapshots as EuiLink, EuiSpacr, and EuiTItle have been converted to Emotion. Updated various test cases to ensure that the references to EuiLink are correct * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * Resolved failing test cases in Jest Test Suite 1. Updated snapshots as EUI text utilities have been converted to Emotion. Updated referenes to EuiLink to ensure test are simulating clicks on the correct elements * Resolved failing test for Jet Test Suite 2. Updated required snapshots. Updated references to EuiLink to ensure that tests are simulating clicks on the correct elements * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * Resolved failing test cases for Jest Test Suite 5. Updated references to EuiLink to ensure tests are targeting the correct element * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * Resolved failing test cases across the Jest Test Suites. Updated required snaphots for components recently converted to Emotion. Updated test cases to ensure that tests targeting EuiLink are using the correct element. * Resolved failing tests from multiple Jest test suites. Updated snapshots for components that have recently been converted to Emotion. Updated tests that reference the EuiLink component to ensure the correct element is being targeted * Updated the getEuiStepsHorizontal function. Previously, this function used the .euiStepHorizontal-isSelected class (now deprecated) to determine which step was current. The function has been updated to use the status prop. * Updated Jest integration test snapshots to account for the recent conversion of EuiLoader to Emotion * Resolved failing tests in Jest suites 2 and 4. Updated required snapshots and references for tests using EuiLink * Removed a console statement. Extracted a nested turnary operation into its own function. * Rollback new turnary function and replace it with a simple if/else * Rollback new turnary function and replace it with a simple if/else * Rollback new turnary function and replace it with a simple if/else * Rollback new turnary function and replace it with a simple if/else * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * Resolved failing test cases in Jest Suites 3 and 5 by updating required snapshots * revert doc_viewer_source test and snapshot changes * Take care of merge conflict in license_checker: * Reverted .render() change for analytics_no_data_page.component.test.tsx. Restored snapshot * Reverted .render() change for analytics_no_data_page.component.test.tsx. Restored snapshot Co-authored-by: Constance Chen Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Greg Thompson --- package.json | 2 +- .../elastic_agent_card.test.tsx.snap | 521 +-- .../__snapshots__/no_data_card.test.tsx.snap | 10 +- .../no_data_card/elastic_agent_card.test.tsx | 2 +- ...ytics_no_data_page.component.test.tsx.snap | 123 +- .../integration_tests/router.test.tsx | 16 +- .../collapsible_nav.test.tsx.snap | 14 +- .../__snapshots__/i18n_service.test.tsx.snap | 1 + src/core/public/i18n/i18n_eui_mapping.tsx | 3 + src/dev/license_checker/config.ts | 2 +- .../dashboard_empty_screen.test.tsx.snap | 8 +- .../__snapshots__/data_view.test.tsx.snap | 14 +- .../url/__snapshots__/url.test.tsx.snap | 8 +- .../header/__snapshots__/header.test.tsx.snap | 145 +- .../components/header/header.test.tsx | 2 +- .../warning_call_out.test.tsx.snap | 30 +- .../skip_bottom_button.test.tsx | 2 +- .../loading_indicator.test.tsx.snap | 88 +- .../common/loading_indicator.test.tsx | 4 +- .../__snapshots__/source.test.tsx.snap | 256 +- .../view_api_request_flyout.test.tsx.snap | 8 +- .../public/forms/form_wizard/form_wizard.tsx | 9 +- .../saved_objects_installer.test.js.snap | 36 +- .../inspector_panel.test.tsx.snap | 498 +-- .../public/ui/inspector_panel.test.tsx | 2 +- .../__snapshots__/overview.test.tsx.snap | 244 +- .../components/overview/overview.test.tsx | 2 +- .../__snapshots__/no_data_card.test.tsx.snap | 8 +- .../__snapshots__/header.test.tsx.snap | 356 +- .../not_found_errors.test.tsx.snap | 658 +--- .../object_view/components/header.test.tsx | 2 +- .../components/not_found_errors.test.tsx | 8 +- .../telemetry_management_section.test.tsx | 5 +- .../agg_based_selection.test.tsx | 2 +- .../group_selection/group_selection.test.tsx | 2 +- .../public/wizard/new_vis_modal.test.tsx | 2 +- .../extended_template.stories.storyshot | 4 +- .../date_format.stories.storyshot | 4 +- .../number_format.stories.storyshot | 4 +- .../__snapshots__/asset.stories.storyshot | 8 +- .../asset_manager.stories.storyshot | 14 +- .../color_palette.stories.storyshot | 72 +- .../color_picker.stories.storyshot | 42 +- .../color_picker_popover.stories.storyshot | 8 +- .../custom_element_modal.stories.storyshot | 24 +- .../datasource_component.stories.storyshot | 10 +- .../element_card.stories.storyshot | 8 +- .../home/__snapshots__/home.stories.storyshot | 10 +- .../empty_prompt.stories.storyshot | 6 +- .../my_workpads.stories.storyshot | 4 +- .../workpad_table.stories.storyshot | 10 +- .../workpad_templates.stories.storyshot | 4 +- .../keyboard_shortcuts_doc.stories.storyshot | 26 +- .../element_grid.stories.storyshot | 6 +- .../saved_elements_modal.stories.storyshot | 18 +- .../shape_picker.stories.storyshot | 32 +- .../shape_picker_popover.stories.storyshot | 6 +- .../sidebar_header.stories.storyshot | 4 +- .../__snapshots__/tag.stories.storyshot | 4 +- .../__snapshots__/tag_list.stories.storyshot | 6 +- .../text_style_picker.stories.storyshot | 8 +- .../delete_var.stories.storyshot | 2 +- .../__snapshots__/edit_var.stories.storyshot | 62 +- .../extended_template.stories.storyshot | 34 +- .../simple_template.stories.storyshot | 4 +- .../extended_template.stories.storyshot | 4 +- .../simple_template.stories.storyshot | 10 +- .../api/__snapshots__/shareable.test.tsx.snap | 10 +- .../__snapshots__/canvas.stories.storyshot | 6 +- .../__snapshots__/footer.stories.storyshot | 4 +- .../__snapshots__/title.stories.storyshot | 6 +- .../__snapshots__/settings.test.tsx.snap | 2 +- .../autoplay_settings.stories.storyshot | 6 +- .../plugins/lens/use_lens_button_toggle.ts | 1 + .../user_actions/comment/alert_event.test.tsx | 2 +- .../comment/host_isolation_event.test.tsx | 2 +- .../auto_follow_pattern_add.test.js | 2 +- .../auto_follow_pattern_edit.test.js | 2 +- .../follower_index_edit.test.js | 2 +- .../import_progress/import_progress.tsx | 46 +- .../components/log_retention_callout.test.tsx | 16 +- .../extend_index_management.test.tsx.snap | 34 +- .../__snapshots__/policy_table.test.tsx.snap | 6 +- .../waffle/waffle_time_controls.tsx | 2 +- .../components/time_controls.test.tsx | 5 +- .../config_panel/layer_panel.test.tsx | 10 +- .../definitions/ranges/ranges.test.tsx | 8 +- .../__snapshots__/add_license.test.js.snap | 4 +- .../license_page_header.test.js.snap | 4 +- .../request_trial_extension.test.js.snap | 8 +- .../revert_to_basic.test.js.snap | 6 +- .../__snapshots__/start_trial.test.js.snap | 8 +- .../upload_license.test.tsx.snap | 114 +- .../pipeline_list/pipelines_table.test.js | 3 +- .../feature_properties.test.tsx.snap | 24 +- .../features_tooltip/feature_properties.tsx | 8 +- .../annotations_table/annotations_table.js | 2 +- .../anomalies_table/anomalies_table.js | 2 +- .../model_snapshots/model_snapshots_table.tsx | 2 +- .../datafeed_chart_flyout.tsx | 2 +- .../pages/new_job/wizard_horizontal_steps.tsx | 9 +- .../__snapshots__/checker_errors.test.js.snap | 18 +- .../__snapshots__/no_data.test.js.snap | 20 +- .../collection_enabled.test.js.snap | 6 +- .../collection_interval.test.js.snap | 879 +---- .../collection_interval.test.js | 4 +- .../__snapshots__/exporters.test.js.snap | 18 +- .../__snapshots__/plugin_enabled.test.js.snap | 4 +- .../__snapshots__/reason_found.test.js.snap | 28 +- .../__snapshots__/we_tried.test.js.snap | 4 +- .../__snapshots__/page_loading.test.js.snap | 4 +- .../__snapshots__/summary_status.test.js.snap | 16 +- .../components/date_range_picker.tsx | 4 +- .../public/components/main_navigation.tsx | 2 +- .../queries/ecs_mapping_editor_field.tsx | 4 +- ...screen_capture_panel_content.test.tsx.snap | 84 +- .../sections/job_create/job_create.js | 13 +- .../job_list/job_table/job_table.test.js | 6 +- .../helpers/job_create.helpers.js | 6 +- .../overwritten_session_page.test.tsx.snap | 6 +- .../collapsible_panel.test.tsx | 2 +- .../roles_grid_page.test.tsx.snap | 4 +- .../nav_control/nav_control_service.test.ts | 2 +- .../__snapshots__/prompt_page.test.tsx.snap | 4 +- .../unauthenticated_page.test.tsx.snap | 2 +- .../reset_session_page.test.tsx.snap | 2 +- .../authentications_host_table.test.tsx.snap | 2 +- .../authentications_user_table.test.tsx.snap | 2 +- .../__snapshots__/link_to_app.test.tsx.snap | 418 ++- .../components/endpoint/link_to_app.test.tsx | 12 +- .../__snapshots__/index.test.tsx.snap | 10 +- .../exceptions/error_callout.test.tsx | 15 +- .../viewer/exceptions_viewer_items.test.tsx | 4 +- .../components/last_event_time/index.test.tsx | 5 +- .../markdown_editor/renderer.test.tsx | 22 +- .../score/create_descriptions_list.test.tsx | 6 +- .../navigation/tab_navigation/index.tsx | 8 +- .../components/stat_items/index.test.tsx | 2 +- .../super_date_picker/index.test.tsx | 4 + .../common/components/tables/helpers.test.tsx | 2 +- .../first_last_seen_host/index.test.tsx | 6 +- .../alerts_by_category/index.test.tsx | 2 +- .../components/formatted_ip/index.test.tsx | 8 +- .../components/open_timeline/index.test.tsx | 2 +- .../open_timeline/open_timeline.test.tsx | 24 +- .../timelines_table/common_columns.test.tsx | 2 +- .../__snapshots__/index.test.tsx.snap | 2861 +++-------------- .../expandable_host.test.tsx.snap | 1310 ++------ .../host_details/expandable_host.test.tsx | 2 +- .../components/side_panel/index.test.tsx | 9 +- .../body/renderers/host_name.test.tsx | 8 +- .../body/renderers/user_name.test.tsx | 4 +- .../components/policy_form/navigation.tsx | 30 +- .../restore_snapshot_form/navigation.tsx | 23 +- .../__snapshots__/cert_monitors.test.tsx.snap | 6 +- .../__snapshots__/cert_status.test.tsx.snap | 2 +- .../__snapshots__/donut_chart.test.tsx.snap | 12 +- .../components/common/header/page_tabs.tsx | 2 +- .../link_for_eui.test.tsx | 4 +- .../ml_integerations.test.tsx.snap | 4 +- .../__snapshots__/expanded_row.test.tsx.snap | 10 +- .../monitor_status.bar.test.tsx.snap | 8 +- .../ssl_certificate.test.tsx.snap | 4 +- .../status_by_location.test.tsx.snap | 10 +- .../most_recent_error.test.tsx.snap | 2 +- .../es_index/es_index_params.test.tsx | 2 +- .../servicenow/servicenow_connectors.test.tsx | 12 +- .../swimlane/swimlane_connectors.tsx | 13 +- .../actions_connectors_list.test.tsx | 2 +- yarn.lock | 8 +- 170 files changed, 2874 insertions(+), 7091 deletions(-) diff --git a/package.json b/package.json index d567ef6814887..8784848260ec1 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "@elastic/datemath": "5.0.3", "@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.2.0-canary.2", "@elastic/ems-client": "8.3.3", - "@elastic/eui": "55.1.4", + "@elastic/eui": "58.0.0", "@elastic/filesaver": "1.1.2", "@elastic/node-crypto": "1.2.1", "@elastic/numeral": "^2.5.1", diff --git a/packages/kbn-shared-ux-components/src/page_template/no_data_page/no_data_card/__snapshots__/elastic_agent_card.test.tsx.snap b/packages/kbn-shared-ux-components/src/page_template/no_data_page/no_data_card/__snapshots__/elastic_agent_card.test.tsx.snap index 299e0a961bd3f..dbdb652a10c1f 100644 --- a/packages/kbn-shared-ux-components/src/page_template/no_data_page/no_data_card/__snapshots__/elastic_agent_card.test.tsx.snap +++ b/packages/kbn-shared-ux-components/src/page_template/no_data_page/no_data_card/__snapshots__/elastic_agent_card.test.tsx.snap @@ -1,460 +1,75 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`ElasticAgentCard renders 1`] = ` - - - +
+
- - - + + +
+
+
+ + + + Add Elastic Agent + + + +
+

+ Use Elastic Agent for a simple, unified way to collect data from your machines. +

+
+
+ - - - - - - - -
- - - -
-
+ Add Elastic Agent + + + + + + `; diff --git a/packages/kbn-shared-ux-components/src/page_template/no_data_page/no_data_card/__snapshots__/no_data_card.test.tsx.snap b/packages/kbn-shared-ux-components/src/page_template/no_data_page/no_data_card/__snapshots__/no_data_card.test.tsx.snap index bb4849450e7bb..0028d505e9187 100644 --- a/packages/kbn-shared-ux-components/src/page_template/no_data_page/no_data_card/__snapshots__/no_data_card.test.tsx.snap +++ b/packages/kbn-shared-ux-components/src/page_template/no_data_page/no_data_card/__snapshots__/no_data_card.test.tsx.snap @@ -8,7 +8,7 @@ exports[`NoDataCard props button 1`] = ` class="euiCard__content" > - - instead. - - -

- - - - + + runtime fields + + + instead. +
+

- - + + `; diff --git a/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.test.tsx b/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.test.tsx index d579a83c8ee72..238aaa9c020cf 100644 --- a/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.test.tsx +++ b/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.test.tsx @@ -34,6 +34,6 @@ describe('Header', () => { } ); - expect(component).toMatchSnapshot(); + expect(component.render()).toMatchSnapshot(); }); }); diff --git a/src/plugins/data_view_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap b/src/plugins/data_view_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap index 9e68c1b787b76..958025649b107 100644 --- a/src/plugins/data_view_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap +++ b/src/plugins/data_view_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap @@ -9,7 +9,7 @@ Array [ Familiarize yourself with and - - - - - - - - - + Inspector + - -
- } +
-
- - + + , +
+
+
+

+ View 1 +

+
+
+
, +] `; diff --git a/src/plugins/inspector/public/ui/inspector_panel.test.tsx b/src/plugins/inspector/public/ui/inspector_panel.test.tsx index 777611fb0e110..ed7bd6f8d2a4a 100644 --- a/src/plugins/inspector/public/ui/inspector_panel.test.tsx +++ b/src/plugins/inspector/public/ui/inspector_panel.test.tsx @@ -69,7 +69,7 @@ describe('InspectorPanel', () => { const component = mountWithIntl( ); - expect(component).toMatchSnapshot(); + expect(component.render()).toMatchSnapshot(); }); it('should not allow updating adapters', () => { diff --git a/src/plugins/kibana_overview/public/components/overview/__snapshots__/overview.test.tsx.snap b/src/plugins/kibana_overview/public/components/overview/__snapshots__/overview.test.tsx.snap index 37bb37a21c201..48e70a03d7fbb 100644 --- a/src/plugins/kibana_overview/public/components/overview/__snapshots__/overview.test.tsx.snap +++ b/src/plugins/kibana_overview/public/components/overview/__snapshots__/overview.test.tsx.snap @@ -1,241 +1,19 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Overview during loading 1`] = ` - - -
- -
- - - -
-
-
-
-
+ + + `; exports[`Overview render 1`] = ` diff --git a/src/plugins/kibana_overview/public/components/overview/overview.test.tsx b/src/plugins/kibana_overview/public/components/overview/overview.test.tsx index 3682629bf64d7..29d51087c3d67 100644 --- a/src/plugins/kibana_overview/public/components/overview/overview.test.tsx +++ b/src/plugins/kibana_overview/public/components/overview/overview.test.tsx @@ -204,6 +204,6 @@ describe('Overview', () => { await updateComponent(component); - expect(component).toMatchSnapshot(); + expect(component.render()).toMatchSnapshot(); }); }); diff --git a/src/plugins/kibana_react/public/page_template/no_data_page/no_data_card/__snapshots__/no_data_card.test.tsx.snap b/src/plugins/kibana_react/public/page_template/no_data_page/no_data_card/__snapshots__/no_data_card.test.tsx.snap index fccbbe3a9e8ee..d3eba0a505674 100644 --- a/src/plugins/kibana_react/public/page_template/no_data_page/no_data_card/__snapshots__/no_data_card.test.tsx.snap +++ b/src/plugins/kibana_react/public/page_template/no_data_page/no_data_card/__snapshots__/no_data_card.test.tsx.snap @@ -8,7 +8,7 @@ exports[`NoDataCard props button 1`] = ` class="euiCard__content" > Card title @@ -51,7 +51,7 @@ exports[`NoDataCard props href 1`] = ` class="euiCard__content" >
Card title @@ -137,7 +137,7 @@ exports[`NoDataCard renders 1`] = ` class="euiCard__content" > Card title diff --git a/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/header.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/header.test.tsx.snap index 26ff23b50d87b..a5e9a0a62c948 100644 --- a/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/header.test.tsx.snap +++ b/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/header.test.tsx.snap @@ -1,306 +1,82 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Intro component renders correctly 1`] = ` -
- - - , - - - , - ] - } + - + Delete + + + + - -
- - + + + + `; diff --git a/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap index ab1d0988e0c94..f0ca2221d207b 100644 --- a/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap +++ b/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap @@ -1,545 +1,211 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`NotFoundErrors component renders correctly for index-pattern type 1`] = ` - - } + - + `; exports[`NotFoundErrors component renders correctly for index-pattern-field type 1`] = ` - - } +
+

+

- - - - There is a problem with this saved object - - -
- -
- + A field associated with this object no longer exists in the data view. +
+
+ If you know what this error means, you can use the + - - + External link + + + (opens in a new tab or window) + + + to fix it — otherwise click the delete button above.
-
+
-
+ `; exports[`NotFoundErrors component renders correctly for search type 1`] = ` - - } +
+

+

- - - - There is a problem with this saved object - - -
- -
- + The saved search associated with this object no longer exists. +
+
+ If you know what this error means, you can use the + - - + External link + + + (opens in a new tab or window) + + + to fix it — otherwise click the delete button above.
-
+
-
+ `; exports[`NotFoundErrors component renders correctly for unknown type 1`] = ` - - } +
+

+

- - - - There is a problem with this saved object - - -
- -
- +
+ If you know what this error means, you can use the + - - +
- +
`; diff --git a/src/plugins/saved_objects_management/public/management_section/object_view/components/header.test.tsx b/src/plugins/saved_objects_management/public/management_section/object_view/components/header.test.tsx index d3285511c5c27..07ded7c92e283 100644 --- a/src/plugins/saved_objects_management/public/management_section/object_view/components/header.test.tsx +++ b/src/plugins/saved_objects_management/public/management_section/object_view/components/header.test.tsx @@ -40,7 +40,7 @@ describe('Intro component', () => { const mounted = mountHeader({ ...defaultProps, }); - expect(mounted).toMatchSnapshot(); + expect(mounted.render()).toMatchSnapshot(); }); it('displays correct title if one is provided', () => { diff --git a/src/plugins/saved_objects_management/public/management_section/object_view/components/not_found_errors.test.tsx b/src/plugins/saved_objects_management/public/management_section/object_view/components/not_found_errors.test.tsx index 61fda64215301..1359375f2143d 100644 --- a/src/plugins/saved_objects_management/public/management_section/object_view/components/not_found_errors.test.tsx +++ b/src/plugins/saved_objects_management/public/management_section/object_view/components/not_found_errors.test.tsx @@ -23,7 +23,7 @@ describe('NotFoundErrors component', () => { it('renders correctly for search type', () => { const mounted = mountError('search'); const callOut = mounted.find('EuiCallOut'); - expect(callOut).toMatchSnapshot(); + expect(callOut.render()).toMatchSnapshot(); expect(mounted.text()).toMatchInlineSnapshot( `"There is a problem with this saved objectThe saved search associated with this object no longer exists.If you know what this error means, you can use the Saved objects APIsExternal link(opens in a new tab or window) to fix it — otherwise click the delete button above."` ); @@ -32,7 +32,7 @@ describe('NotFoundErrors component', () => { it('renders correctly for index-pattern type', () => { const mounted = mountError('index-pattern'); const callOut = mounted.find('EuiCallOut'); - expect(callOut).toMatchSnapshot(); + expect(callOut.render()).toMatchSnapshot(); expect(mounted.text()).toMatchInlineSnapshot( `"There is a problem with this saved objectThe data view associated with this object no longer exists.If you know what this error means, you can use the Saved objects APIsExternal link(opens in a new tab or window) to fix it — otherwise click the delete button above."` ); @@ -41,7 +41,7 @@ describe('NotFoundErrors component', () => { it('renders correctly for index-pattern-field type', () => { const mounted = mountError('index-pattern-field'); const callOut = mounted.find('EuiCallOut'); - expect(callOut).toMatchSnapshot(); + expect(callOut.render()).toMatchSnapshot(); expect(mounted.text()).toMatchInlineSnapshot( `"There is a problem with this saved objectA field associated with this object no longer exists in the data view.If you know what this error means, you can use the Saved objects APIsExternal link(opens in a new tab or window) to fix it — otherwise click the delete button above."` ); @@ -50,7 +50,7 @@ describe('NotFoundErrors component', () => { it('renders correctly for unknown type', () => { const mounted = mountError('unknown'); const callOut = mounted.find('EuiCallOut'); - expect(callOut).toMatchSnapshot(); + expect(callOut.render()).toMatchSnapshot(); expect(mounted.text()).toMatchInlineSnapshot( `"There is a problem with this saved objectIf you know what this error means, you can use the Saved objects APIsExternal link(opens in a new tab or window) to fix it — otherwise click the delete button above."` ); diff --git a/src/plugins/telemetry_management_section/public/components/telemetry_management_section.test.tsx b/src/plugins/telemetry_management_section/public/components/telemetry_management_section.test.tsx index a8d67792b8625..3de78d474570a 100644 --- a/src/plugins/telemetry_management_section/public/components/telemetry_management_section.test.tsx +++ b/src/plugins/telemetry_management_section/public/components/telemetry_management_section.test.tsx @@ -217,7 +217,10 @@ describe('TelemetryManagementSectionComponent', () => { /> ); try { - const toggleExampleComponent = component.find('FormattedMessage > EuiLink[onClick]').at(0); + const toggleExampleComponent = component + .find('FormattedMessage > EuiLink') + .find('button') + .at(0); const updatedView = toggleExampleComponent.simulate('click'); updatedView.find('OptInExampleFlyout'); updatedView.simulate('close'); diff --git a/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.test.tsx b/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.test.tsx index b776068ab9c49..208eefe941528 100644 --- a/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.test.tsx +++ b/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.test.tsx @@ -77,7 +77,7 @@ describe('AggBasedSelection', () => { onVisTypeSelected={jest.fn()} /> ); - const aggBasedGroupCard = wrapper.find('[data-test-subj="goBackLink"]').at(0); + const aggBasedGroupCard = wrapper.find('[data-test-subj="goBackLink"]').last(); aggBasedGroupCard.simulate('click'); expect(toggleGroups).toHaveBeenCalled(); }); diff --git a/src/plugins/visualizations/public/wizard/group_selection/group_selection.test.tsx b/src/plugins/visualizations/public/wizard/group_selection/group_selection.test.tsx index f7dbd4c484fba..e1e9cec25e15a 100644 --- a/src/plugins/visualizations/public/wizard/group_selection/group_selection.test.tsx +++ b/src/plugins/visualizations/public/wizard/group_selection/group_selection.test.tsx @@ -192,7 +192,7 @@ describe('GroupSelection', () => { showExperimental={true} /> ); - const aggBasedGroupCard = wrapper.find('[data-test-subj="visGroupAggBasedExploreLink"]').at(0); + const aggBasedGroupCard = wrapper.find('[data-test-subj="visGroupAggBasedExploreLink"]').last(); aggBasedGroupCard.simulate('click'); expect(toggleGroups).toHaveBeenCalled(); }); diff --git a/src/plugins/visualizations/public/wizard/new_vis_modal.test.tsx b/src/plugins/visualizations/public/wizard/new_vis_modal.test.tsx index d807091f45438..cdbaab8e73abf 100644 --- a/src/plugins/visualizations/public/wizard/new_vis_modal.test.tsx +++ b/src/plugins/visualizations/public/wizard/new_vis_modal.test.tsx @@ -244,7 +244,7 @@ describe('NewVisModal', () => { ); const aggBasedGroupCard = wrapper .find('[data-test-subj="visGroupAggBasedExploreLink"]') - .at(0); + .last(); aggBasedGroupCard.simulate('click'); expect(wrapper.find('[data-test-subj="visType-visWithSearch"]').exists()).toBe(true); }); diff --git a/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/axis_config/__stories__/__snapshots__/extended_template.stories.storyshot b/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/axis_config/__stories__/__snapshots__/extended_template.stories.storyshot index 49e87d067e63a..38ea65195ee1c 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/axis_config/__stories__/__snapshots__/extended_template.stories.storyshot +++ b/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/axis_config/__stories__/__snapshots__/extended_template.stories.storyshot @@ -75,7 +75,7 @@ exports[`Storyshots arguments/AxisConfig extended 1`] = `
`; @@ -155,7 +155,7 @@ exports[`Storyshots arguments/AxisConfig/components extended 1`] = `
`; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/date_format/__stories__/__snapshots__/date_format.stories.storyshot b/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/date_format/__stories__/__snapshots__/date_format.stories.storyshot index a868d023ec135..88d6d0fb78ea2 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/date_format/__stories__/__snapshots__/date_format.stories.storyshot +++ b/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/date_format/__stories__/__snapshots__/date_format.stories.storyshot @@ -55,7 +55,7 @@ Array [ ,
,
,
,
,
,
,
,

Import your assets to get started

@@ -312,7 +312,7 @@ exports[`Storyshots components/Assets/AssetManager two assets 1`] = `

diff --git a/x-pack/plugins/canvas/public/components/home/my_workpads/__snapshots__/empty_prompt.stories.storyshot b/x-pack/plugins/canvas/public/components/home/my_workpads/__snapshots__/empty_prompt.stories.storyshot index 4761744ae6777..ef33fd6a49b7f 100644 --- a/x-pack/plugins/canvas/public/components/home/my_workpads/__snapshots__/empty_prompt.stories.storyshot +++ b/x-pack/plugins/canvas/public/components/home/my_workpads/__snapshots__/empty_prompt.stories.storyshot @@ -39,7 +39,7 @@ exports[`Storyshots Home/Components/Empty Prompt Empty Prompt 1`] = ` className="euiEmptyPrompt__contentInner" >

Add your first workpad

@@ -48,7 +48,7 @@ exports[`Storyshots Home/Components/Empty Prompt Empty Prompt 1`] = ` style={Object {}} >
diff --git a/x-pack/plugins/canvas/public/components/home/my_workpads/__snapshots__/my_workpads.stories.storyshot b/x-pack/plugins/canvas/public/components/home/my_workpads/__snapshots__/my_workpads.stories.storyshot index d081dffd219b0..61ee76f0f2450 100644 --- a/x-pack/plugins/canvas/public/components/home/my_workpads/__snapshots__/my_workpads.stories.storyshot +++ b/x-pack/plugins/canvas/public/components/home/my_workpads/__snapshots__/my_workpads.stories.storyshot @@ -16,7 +16,9 @@ exports[`Storyshots Home/Tabs/My Workpads My Workpads 1`] = ` className="euiFlexItem euiFlexItem--flexGrowZero" >
diff --git a/x-pack/plugins/canvas/public/components/home/my_workpads/__snapshots__/workpad_table.stories.storyshot b/x-pack/plugins/canvas/public/components/home/my_workpads/__snapshots__/workpad_table.stories.storyshot index 2370e01bb9b37..376ec3d276644 100644 --- a/x-pack/plugins/canvas/public/components/home/my_workpads/__snapshots__/workpad_table.stories.storyshot +++ b/x-pack/plugins/canvas/public/components/home/my_workpads/__snapshots__/workpad_table.stories.storyshot @@ -90,7 +90,7 @@ exports[`Storyshots Home/Components/Workpad Table Workpad Table 1`] = `
diff --git a/x-pack/plugins/canvas/public/components/keyboard_shortcuts_doc/__stories__/__snapshots__/keyboard_shortcuts_doc.stories.storyshot b/x-pack/plugins/canvas/public/components/keyboard_shortcuts_doc/__stories__/__snapshots__/keyboard_shortcuts_doc.stories.storyshot index e5432e0b6a9f4..7ddbed7421052 100644 --- a/x-pack/plugins/canvas/public/components/keyboard_shortcuts_doc/__stories__/__snapshots__/keyboard_shortcuts_doc.stories.storyshot +++ b/x-pack/plugins/canvas/public/components/keyboard_shortcuts_doc/__stories__/__snapshots__/keyboard_shortcuts_doc.stories.storyshot @@ -15,7 +15,7 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiFlyoutHeader euiFlyoutHeader--hasBorder" >

Keyboard shortcuts

@@ -34,12 +34,12 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="canvasKeyboardShortcut" >

Element controls


Expression controls


Editor controls


Presentation controls


diff --git a/x-pack/plugins/canvas/public/components/saved_elements_modal/__stories__/__snapshots__/element_grid.stories.storyshot b/x-pack/plugins/canvas/public/components/saved_elements_modal/__stories__/__snapshots__/element_grid.stories.storyshot index fbab31e5c8c5b..015072abca842 100644 --- a/x-pack/plugins/canvas/public/components/saved_elements_modal/__stories__/__snapshots__/element_grid.stories.storyshot +++ b/x-pack/plugins/canvas/public/components/saved_elements_modal/__stories__/__snapshots__/element_grid.stories.storyshot @@ -34,7 +34,7 @@ exports[`Storyshots components/SavedElementsModal/ElementGrid default 1`] = ` className="euiCard__content" >

Add new elements

@@ -123,7 +123,7 @@ exports[`Storyshots components/SavedElementsModal no custom elements 1`] = ` style={Object {}} >
" `; exports[`Canvas Shareable Workpad API Placed successfully with height specified 1`] = `"
"`; @@ -21,7 +21,7 @@ exports[`Canvas Shareable Workpad API Placed successfully with height specified
markdown mock
markdown mock
My Canvas Workpad
" +
markdown mock
My Canvas Workpad
" `; exports[`Canvas Shareable Workpad API Placed successfully with page specified 1`] = `"
"`; @@ -33,7 +33,7 @@ exports[`Canvas Shareable Workpad API Placed successfully with page specified 2`
markdown mock
markdown mock
My Canvas Workpad
" +
markdown mock
My Canvas Workpad
" `; exports[`Canvas Shareable Workpad API Placed successfully with width and height specified 1`] = `"
"`; @@ -45,7 +45,7 @@ exports[`Canvas Shareable Workpad API Placed successfully with width and height
markdown mock
markdown mock
My Canvas Workpad
" +
markdown mock
My Canvas Workpad
" `; exports[`Canvas Shareable Workpad API Placed successfully with width specified 1`] = `"
"`; @@ -57,5 +57,5 @@ exports[`Canvas Shareable Workpad API Placed successfully with width specified 2
markdown mock
markdown mock
My Canvas Workpad
" +
markdown mock
My Canvas Workpad
" `; diff --git a/x-pack/plugins/canvas/shareable_runtime/components/__stories__/__snapshots__/canvas.stories.storyshot b/x-pack/plugins/canvas/shareable_runtime/components/__stories__/__snapshots__/canvas.stories.storyshot index ae33ce42e0ee5..425a5311c74f9 100644 --- a/x-pack/plugins/canvas/shareable_runtime/components/__stories__/__snapshots__/canvas.stories.storyshot +++ b/x-pack/plugins/canvas/shareable_runtime/components/__stories__/__snapshots__/canvas.stories.storyshot @@ -1319,7 +1319,7 @@ exports[`Storyshots shareables/Canvas component 1`] = ` } > can navigate Autoplay Settings 2`] = `




{ ); - wrapper.find(`[data-test-subj="alert-rule-link-action-id-1"]`).first().simulate('click'); + wrapper.find(`[data-test-subj="alert-rule-link-action-id-1"]`).last().simulate('click'); expect(onRuleDetailsClick).toHaveBeenCalled(); }); diff --git a/x-pack/plugins/cases/public/components/user_actions/comment/host_isolation_event.test.tsx b/x-pack/plugins/cases/public/components/user_actions/comment/host_isolation_event.test.tsx index 64619ad137950..e17eb11e42aa5 100644 --- a/x-pack/plugins/cases/public/components/user_actions/comment/host_isolation_event.test.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/comment/host_isolation_event.test.tsx @@ -36,7 +36,7 @@ describe('UserActionHostIsolationCommentEvent', () => { ); - wrapper.find(`[data-test-subj="actions-link-e1"]`).first().simulate('click'); + wrapper.find(`[data-test-subj="actions-link-e1"]`).last().simulate('click'); expect(onActionsLinkClick).toHaveBeenCalled(); }); }); diff --git a/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/auto_follow_pattern_add.test.js b/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/auto_follow_pattern_add.test.js index e04cbb836157f..7dee4fcac57f4 100644 --- a/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/auto_follow_pattern_add.test.js +++ b/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/auto_follow_pattern_add.test.js @@ -157,7 +157,7 @@ describe('Create Auto-follow pattern', () => { const errorCallOut = find('notConnectedError'); expect(errorCallOut.length).toBe(1); - expect(errorCallOut.find('.euiCallOutHeader__title').text()).toBe( + expect(errorCallOut.find('.euiCallOutHeader__title').last().text()).toBe( `Remote cluster '${clusterName}' is not connected` ); expect(exists('notConnectedError.editButton')).toBe(true); diff --git a/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/auto_follow_pattern_edit.test.js b/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/auto_follow_pattern_edit.test.js index c72893473860d..ec4a1fabdfabb 100644 --- a/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/auto_follow_pattern_edit.test.js +++ b/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/auto_follow_pattern_edit.test.js @@ -95,7 +95,7 @@ describe('Edit Auto-follow pattern', () => { const error = find('notConnectedError'); expect(error.length).toBe(1); - expect(error.find('.euiCallOutHeader__title').text()).toBe( + expect(error.find('.euiCallOutHeader__title').last().text()).toBe( `Can't edit auto-follow pattern because remote cluster '${AUTO_FOLLOW_PATTERN_EDIT.remoteCluster}' is not connected` ); expect(exists('notConnectedError.editButton')).toBe(true); diff --git a/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/follower_index_edit.test.js b/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/follower_index_edit.test.js index 31350601f6232..abb082e038eb7 100644 --- a/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/follower_index_edit.test.js +++ b/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/follower_index_edit.test.js @@ -166,7 +166,7 @@ describe('Edit follower index', () => { const error = find('remoteClusterFormField.notConnectedError'); expect(error.length).toBe(1); - expect(error.find('.euiCallOutHeader__title').text()).toBe( + expect(error.find('.euiCallOutHeader__title').last().text()).toBe( `Can't edit follower index because remote cluster '${FOLLOWER_INDEX_EDIT.remoteCluster}' is not connected` ); expect(exists('remoteClusterFormField.notConnectedError.editButton')).toBe(true); diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/import_progress/import_progress.tsx b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/import_progress/import_progress.tsx index e286142765d87..f480a7ec69edc 100644 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/import_progress/import_progress.tsx +++ b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/import_progress/import_progress.tsx @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React, { FC } from 'react'; -import { EuiStepsHorizontal, EuiProgress, EuiSpacer } from '@elastic/eui'; +import { EuiStepsHorizontal, EuiStepStatus, EuiProgress, EuiSpacer } from '@elastic/eui'; export enum IMPORT_STATUS { INCOMPLETE = 'incomplete', @@ -230,27 +230,29 @@ export const ImportProgress: FC<{ statuses: Statuses }> = ({ statuses }) => { const steps = [ { title: processFileTitle, - isSelected: true, - isComplete: - readStatus === IMPORT_STATUS.COMPLETE && parseJSONStatus === IMPORT_STATUS.COMPLETE, - status: parseJSONStatus === IMPORT_STATUS.FAILED ? parseJSONStatus : readStatus, // if JSON parsing failed, fail the first step + status: (parseJSONStatus === IMPORT_STATUS.FAILED // if JSON parsing failed, fail the first step + ? parseJSONStatus + : readStatus === IMPORT_STATUS.COMPLETE && parseJSONStatus === IMPORT_STATUS.COMPLETE + ? 'complete' + : 'selected') as EuiStepStatus, onClick: () => {}, }, { title: createIndexTitle, - isSelected: readStatus === IMPORT_STATUS.COMPLETE, - isComplete: indexCreatedStatus === IMPORT_STATUS.COMPLETE, - status: indexCreatedStatus, + status: (indexCreatedStatus !== IMPORT_STATUS.INCOMPLETE // Show failure/completed states first + ? indexCreatedStatus + : completedStep === 1 // Then show selected/incomplete states + ? 'selected' + : 'incomplete') as EuiStepStatus, onClick: () => {}, }, { title: uploadingDataTitle, - isSelected: - indexCreatedStatus === IMPORT_STATUS.COMPLETE && - (createPipeline === false || - (createPipeline === true && ingestPipelineCreatedStatus === IMPORT_STATUS.COMPLETE)), - isComplete: uploadStatus === IMPORT_STATUS.COMPLETE, - status: uploadStatus, + status: (uploadStatus !== IMPORT_STATUS.INCOMPLETE // Show failure/completed states first + ? uploadStatus + : completedStep === 3 // Then show selected/incomplete states + ? 'selected' + : 'incomplete') as EuiStepStatus, onClick: () => {}, }, ]; @@ -258,9 +260,11 @@ export const ImportProgress: FC<{ statuses: Statuses }> = ({ statuses }) => { if (createPipeline === true) { steps.splice(2, 0, { title: createIngestPipelineTitle, - isSelected: indexCreatedStatus === IMPORT_STATUS.COMPLETE, - isComplete: ingestPipelineCreatedStatus === IMPORT_STATUS.COMPLETE, - status: ingestPipelineCreatedStatus, + status: (ingestPipelineCreatedStatus !== IMPORT_STATUS.INCOMPLETE // Show failure/completed states first + ? ingestPipelineCreatedStatus + : completedStep === 2 // Then show selected/incomplete states + ? 'selected' + : 'incomplete') as EuiStepStatus, onClick: () => {}, }); } @@ -268,9 +272,11 @@ export const ImportProgress: FC<{ statuses: Statuses }> = ({ statuses }) => { if (createDataView === true) { steps.push({ title: createDataViewTitle, - isSelected: uploadStatus === IMPORT_STATUS.COMPLETE, - isComplete: dataViewCreatedStatus === IMPORT_STATUS.COMPLETE, - status: dataViewCreatedStatus, + status: (dataViewCreatedStatus !== IMPORT_STATUS.INCOMPLETE // Show failure/completed states first + ? dataViewCreatedStatus + : completedStep === 4 // Then show selected/incomplete states + ? 'selected' + : 'incomplete') as EuiStepStatus, onClick: () => {}, }); } diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/components/log_retention_callout.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/components/log_retention_callout.test.tsx index 2cbcf54748661..1e54d4cdff51f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/components/log_retention_callout.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/components/log_retention_callout.test.tsx @@ -37,11 +37,13 @@ describe('LogRetentionCallout', () => { const wrapper = mountWithIntl(); expect(wrapper.find(EuiCallOut)).toHaveLength(1); - expect(wrapper.find('.euiCallOutHeader__title').text()).toEqual( + expect(wrapper.find('.euiCallOutHeader__title').last().text()).toEqual( 'Analytics have been disabled since January 1, 1970.' ); expect(wrapper.find(EuiLink)).toHaveLength(1); - expect(wrapper.find('p').text()).toEqual('To manage analytics & logging, visit your settings.'); + expect(wrapper.find('p').last().text()).toEqual( + 'To manage analytics & logging, visit your settings.' + ); }); it('renders an API callout', () => { @@ -49,11 +51,13 @@ describe('LogRetentionCallout', () => { const wrapper = mountWithIntl(); expect(wrapper.find(EuiCallOut)).toHaveLength(1); - expect(wrapper.find('.euiCallOutHeader__title').text()).toEqual( + expect(wrapper.find('.euiCallOutHeader__title').last().text()).toEqual( 'API Logs have been disabled since January 1, 1970.' ); expect(wrapper.find(EuiLink)).toHaveLength(1); - expect(wrapper.find('p').text()).toEqual('To manage analytics & logging, visit your settings.'); + expect(wrapper.find('p').last().text()).toEqual( + 'To manage analytics & logging, visit your settings.' + ); }); it('renders a generic title if no disabled date is present', () => { @@ -61,7 +65,9 @@ describe('LogRetentionCallout', () => { const wrapper = mountWithIntl(); expect(wrapper.find(EuiCallOut)).toHaveLength(1); - expect(wrapper.find('.euiCallOutHeader__title').text()).toEqual('API Logs have been disabled.'); + expect(wrapper.find('.euiCallOutHeader__title').last().text()).toEqual( + 'API Logs have been disabled.' + ); }); it('does not render if log retention is enabled', () => { diff --git a/x-pack/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.tsx.snap b/x-pack/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.tsx.snap index 6b54e1d3f43f5..13888c1d1d597 100644 --- a/x-pack/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.tsx.snap +++ b/x-pack/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.tsx.snap @@ -97,33 +97,29 @@ Array [ exports[`extend index management ilm summary extension should return extension when index has lifecycle error 1`] = ` Array [

Index lifecycle management

,
,
-
+ Index lifecycle error +

,
,
@@ -236,7 +232,7 @@ Array [ class="euiPopover__anchor" >
"`; +exports[`RevertToBasic component should display when license is about to expire 1`] = `"
Revert to Basic license

You’ll revert to our free features and lose access to machine learning, advanced security, and other subscription featuresExternal link(opens in a new tab or window).

"`; -exports[`RevertToBasic component should display when license is expired 1`] = `"
Revert to Basic license

You’ll revert to our free features and lose access to machine learning, advanced security, and other subscription featuresExternal link(opens in a new tab or window).

"`; +exports[`RevertToBasic component should display when license is expired 1`] = `"
Revert to Basic license

You’ll revert to our free features and lose access to machine learning, advanced security, and other subscription featuresExternal link(opens in a new tab or window).

"`; -exports[`RevertToBasic component should display when trial is active 1`] = `"
Revert to Basic license

You’ll revert to our free features and lose access to machine learning, advanced security, and other subscription featuresExternal link(opens in a new tab or window).

"`; +exports[`RevertToBasic component should display when trial is active 1`] = `"
Revert to Basic license

You’ll revert to our free features and lose access to machine learning, advanced security, and other subscription featuresExternal link(opens in a new tab or window).

"`; diff --git a/x-pack/plugins/license_management/__jest__/__snapshots__/start_trial.test.js.snap b/x-pack/plugins/license_management/__jest__/__snapshots__/start_trial.test.js.snap index 0880eddcc1683..52f1597fd1aca 100644 --- a/x-pack/plugins/license_management/__jest__/__snapshots__/start_trial.test.js.snap +++ b/x-pack/plugins/license_management/__jest__/__snapshots__/start_trial.test.js.snap @@ -1,9 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`StartTrial component when trial is allowed display for basic license 1`] = `"
Start a 30-day trial

Experience what machine learning, advanced security, and all our other subscription featuresExternal link(opens in a new tab or window) have to offer.

"`; +exports[`StartTrial component when trial is allowed display for basic license 1`] = `"
Start a 30-day trial

Experience what machine learning, advanced security, and all our other subscription featuresExternal link(opens in a new tab or window) have to offer.

"`; -exports[`StartTrial component when trial is allowed should display for expired enterprise license 1`] = `"
Start a 30-day trial

Experience what machine learning, advanced security, and all our other subscription featuresExternal link(opens in a new tab or window) have to offer.

"`; +exports[`StartTrial component when trial is allowed should display for expired enterprise license 1`] = `"
Start a 30-day trial

Experience what machine learning, advanced security, and all our other subscription featuresExternal link(opens in a new tab or window) have to offer.

"`; -exports[`StartTrial component when trial is allowed should display for expired platinum license 1`] = `"
Start a 30-day trial

Experience what machine learning, advanced security, and all our other subscription featuresExternal link(opens in a new tab or window) have to offer.

"`; +exports[`StartTrial component when trial is allowed should display for expired platinum license 1`] = `"
Start a 30-day trial

Experience what machine learning, advanced security, and all our other subscription featuresExternal link(opens in a new tab or window) have to offer.

"`; -exports[`StartTrial component when trial is allowed should display for gold license 1`] = `"
Start a 30-day trial

Experience what machine learning, advanced security, and all our other subscription featuresExternal link(opens in a new tab or window) have to offer.

"`; +exports[`StartTrial component when trial is allowed should display for gold license 1`] = `"
Start a 30-day trial

Experience what machine learning, advanced security, and all our other subscription featuresExternal link(opens in a new tab or window) have to offer.

"`; diff --git a/x-pack/plugins/license_management/__jest__/__snapshots__/upload_license.test.tsx.snap b/x-pack/plugins/license_management/__jest__/__snapshots__/upload_license.test.tsx.snap index 76964fc5270b3..301585a0ab914 100644 --- a/x-pack/plugins/license_management/__jest__/__snapshots__/upload_license.test.tsx.snap +++ b/x-pack/plugins/license_management/__jest__/__snapshots__/upload_license.test.tsx.snap @@ -9,12 +9,12 @@ exports[`UploadLicense should display a modal when license requires acknowledgem class="euiPageContentBody" >

Upload your license

Upload your license