diff --git a/package.json b/package.json index d567ef68148871..8784848260ec12 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 299e0a961bd3fe..dbdb652a10c1fd 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 bb4849450e7bb2..0028d505e9187e 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 d579a83c8ee72c..238aaa9c020cf8 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 9e68c1b787b76a..958025649b1072 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 777611fb0e110b..ed7bd6f8d2a4a8 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 37bb37a21c201a..48e70a03d7fbbc 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 3682629bf64d7d..29d51087c3d674 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 fccbbe3a9e8eee..d3eba0a505674b 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 26ff23b50d87b3..a5e9a0a62c9483 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 ab1d0988e0c94a..f0ca2221d207b8 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 d3285511c5c278..07ded7c92e2839 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 61fda642153010..1359375f2143df 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 a8d67792b86252..3de78d474570aa 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 b776068ab9c493..208eefe941528c 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 f7dbd4c484fbac..e1e9cec25e15a0 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 d807091f454385..cdbaab8e73abf4 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 49e87d067e63a4..38ea65195ee1c9 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 a868d023ec1353..88d6d0fb78ea28 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 4761744ae67779..ef33fd6a49b7fc 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 d081dffd219b07..61ee76f0f24501 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 2370e01bb9b373..376ec3d276644d 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 e5432e0b6a9f48..7ddbed7421052d 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 fbab31e5c8c5b5..015072abca8429 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 ae33ce42e0ee5b..425a5311c74f99 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 64619ad1379507..e17eb11e42aa5f 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 e04cbb836157fd..7dee4fcac57f4a 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 c72893473860d6..ec4a1fabdfabb1 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 31350601f62328..abb082e038eb7e 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 e286142765d87c..f480a7ec69edc6 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 2cbcf547486613..1e54d4cdff51f6 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 6b54e1d3f43f50..13888c1d1d5979 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 0880eddcc1683e..52f1597fd1acae 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 76964fc5270b31..301585a0ab914b 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