From 7b11420ee9fbf4ad2347819d1f597acaebd618e3 Mon Sep 17 00:00:00 2001 From: Constance Date: Fri, 12 Aug 2022 16:40:58 -0700 Subject: [PATCH] Upgrade EUI to v62.0.3 (#138351) * Upgrade to v62.0.3 * Update EUI i18n tokens * Update html string snapshots - Emotion CSS hash changed * [EuiIcon] Update instances of `keyboardShortcut` icons to `keyboard` * [EuiErrorBoundary] Update snapshots from Emotion conversion * [EuiImage] Update snapshots, tests, and CSS to account for Emotion conversion * [EuiImage][RTL] Fix test failures caused by EuiImage changes * [EuiCommentList] Deprecate EuiCommentProps.type * [EuiCommentList] Rename `timelineIcon` prop to `timelineAvatar` - see https://github.com/elastic/eui/pull/6071 * [EuiCommentList] Fix selectors deprecated by Emotion conversion * [EuiPopover][EuiCommentEvent][Enzyme] Fix mounted test failures caused by Emotion conversions - Mounting displays the Emotion wrapper with the data-test-subj on them - we need to specify the output div renders in order for text assertions to be correct * [EuiPopover] Deprecate `initialFocus={false}` as an option see https://github.com/elastic/eui/pull/6044 * [EuiPopover] Rename `display=inlineBlock` to `inline-block` - see https://github.com/elastic/eui/pull/5977 * [EuiPopover] Update snapshots from Emotion conversion * [EuiPopover] Replace deprecated `.euiPopover__panel-isOpen` class with new `[data-popover-open]` attribute * [EuiPopover][RTL] Fix test failures caused by not waiting for EuiPopover animation/transition * Skip failing a11y tests - test w/ similar error already skipped in another test above - requires closing the popover for next test to pass - not sure why delete action is no longer available * Fix failing Security Cypress tests * Attempt to squash flaky FTR tests around Add Filter popover Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Jonathan Budzenski --- package.json | 2 +- .../__snapshots__/i18n_service.test.tsx.snap | 12 +- .../src/i18n_eui_mapping.tsx | 50 +- .../sample_data_card.test.tsx.snap | 4 +- .../__snapshots__/view_button.test.tsx.snap | 8 +- .../src/user_profiles_popover.test.tsx | 2 +- .../__snapshots__/popover.test.tsx.snap | 404 +-- .../src/popover/popover.test.tsx | 2 +- .../__snapshots__/no_data_card.test.tsx.snap | 20 +- .../header/__snapshots__/header.test.tsx.snap | 2883 +---------------- .../public/chrome/ui/header/header.test.tsx | 2 +- src/dev/license_checker/config.ts | 2 +- .../dashboard_empty_screen.test.tsx.snap | 8 +- .../search_session_indicator.test.tsx | 4 + .../__snapshots__/data_view.test.tsx.snap | 28 +- .../__snapshots__/indices_list.test.tsx.snap | 10 +- .../lib/embeddables/error_embeddable.test.tsx | 4 +- .../inspector_panel.test.tsx.snap | 4 +- .../__snapshots__/table.test.tsx.snap | 4 +- .../dataview_picker/change_dataview.tsx | 2 +- .../query_string_input/add_filter_popover.tsx | 3 +- .../public/components/sidebar/controls.tsx | 2 +- .../switch_mode_popover.tsx | 1 - .../legend/__snapshots__/legend.test.tsx.snap | 2 +- test/functional/page_objects/settings_page.ts | 2 +- test/functional/page_objects/time_picker.ts | 2 +- test/functional/services/filter_bar.ts | 52 +- .../power_user/rules/error_count.spec.ts | 2 +- .../app/service_map/popover/index.tsx | 1 - .../transaction_action_menu.test.tsx.snap | 4 +- .../time_filter.stories.storyshot | 56 +- .../__snapshots__/palette.stories.storyshot | 4 +- .../__snapshots__/asset.stories.storyshot | 10 +- .../asset_manager.stories.storyshot | 10 +- .../color_picker_popover.stories.storyshot | 16 +- .../font_picker.stories.storyshot | 8 +- .../help_menu/help_menu.component.tsx | 2 +- .../workpad_table.stories.storyshot | 8 +- .../palette_picker.stories.storyshot | 12 +- .../shape_picker_popover.stories.storyshot | 12 +- .../text_style_picker.stories.storyshot | 16 +- .../__snapshots__/edit_var.stories.storyshot | 16 +- .../__snapshots__/edit_menu.stories.storyshot | 24 +- .../editor_menu.stories.storyshot | 8 +- .../element_menu.stories.storyshot | 4 +- .../share_menu.stories.storyshot | 8 +- .../__snapshots__/view_menu.stories.storyshot | 16 +- .../extended_template.stories.storyshot | 24 +- .../simple_template.stories.storyshot | 8 +- .../plugins/canvas/public/style/hackery.scss | 2 +- .../api/__snapshots__/shareable.test.tsx.snap | 20 +- .../__snapshots__/canvas.stories.storyshot | 12 +- .../__snapshots__/footer.stories.storyshot | 8 +- .../__snapshots__/settings.test.tsx.snap | 27 +- .../__snapshots__/settings.stories.storyshot | 8 +- .../client/attachment_framework/types.ts | 5 +- .../all_cases/all_cases_list.test.tsx | 11 + .../all_cases/severity_filter.test.tsx | 3 + .../all_cases/table_filters.test.tsx | 6 +- .../case_view/case_view_page.test.tsx | 5 +- .../components/create/form_context.test.tsx | 5 +- .../components/create/severity.test.tsx | 2 + .../components/edit_connector/index.test.tsx | 3 + .../components/severity/selector.test.tsx | 4 +- .../user_actions/comment/actions.tsx | 2 +- .../components/user_actions/comment/alert.tsx | 6 +- .../user_actions/comment/comment.test.tsx | 10 +- .../comment/registered_attachments.tsx | 2 +- .../components/user_actions/comment/user.tsx | 2 +- .../public/components/user_actions/common.tsx | 5 +- .../components/user_actions/description.tsx | 2 +- .../public/components/user_actions/index.tsx | 4 +- .../user_actions/property_actions.test.tsx | 22 +- .../public/components/user_actions/pushed.tsx | 6 +- .../plugins/cases/public/containers/mock.ts | 6 +- .../extend_index_management.test.tsx.snap | 4 +- .../definitions/filters/filters.test.tsx | 6 +- .../add_tooltip_field_popover.test.tsx.snap | 4 +- .../metrics_expression.test.tsx.snap | 4 +- .../tooltip_popover.test.tsx.snap | 4 +- .../toc_entry_actions_popover.test.tsx.snap | 12 +- .../__snapshots__/tools_control.test.tsx.snap | 4 +- .../full_time_range_selector.test.tsx.snap | 2 +- .../condition_expression.test.js.snap | 8 +- .../scope_expression.test.js.snap | 6 +- .../add_item_popover.test.js.snap | 6 +- .../edit_description_popover.test.js.snap | 6 +- .../filter_list_usage_popover.test.js.snap | 6 +- .../nodes/__snapshots__/cells.test.js.snap | 8 +- .../columns/series_actions.test.tsx | 4 +- .../osquery/public/packs/packs_table.tsx | 7 +- .../nav_control/nav_control_service.test.ts | 4 +- .../__snapshots__/prompt_page.test.tsx.snap | 4 +- .../unauthenticated_page.test.tsx.snap | 2 +- .../reset_session_page.test.tsx.snap | 2 +- .../cases/attach_alert_to_case.spec.ts | 3 +- .../cypress/screens/case_details.ts | 2 +- .../cypress/tasks/timeline.ts | 2 +- .../authentications_host_table.test.tsx.snap | 4 +- .../authentications_user_table.test.tsx.snap | 4 +- .../__snapshots__/index.test.tsx.snap | 4 +- .../overview/status_popover_button.test.tsx | 2 + .../components/exceptions/helpers.test.tsx | 2 +- .../common/components/exceptions/helpers.tsx | 2 +- .../__snapshots__/anomaly_score.test.tsx.snap | 2 +- .../groups_filter_popover.test.tsx.snap | 2 +- .../public/common/components/page/index.tsx | 10 +- .../__snapshots__/index.test.tsx.snap | 2 +- .../components/popover_items/index.test.tsx | 7 +- .../__snapshots__/index.test.tsx.snap | 2 +- .../chart_context_menu/index.test.tsx | 10 +- .../chart_panels/chart_select/index.test.tsx | 4 +- .../utils/get_formatted_comments.tsx | 2 +- .../response_actions_list.test.tsx | 4 + .../policies_selector.test.tsx | 20 +- .../view/components/blocklist_form.test.tsx | 7 +- .../view/components/form.test.tsx | 4 +- .../field_renderers.test.tsx.snap | 24 +- .../flyout/__snapshots__/index.test.tsx.snap | 8 +- .../flyout/add_timeline_button/index.test.tsx | 11 +- .../flyout/add_to_case_button/index.test.tsx | 5 + .../netflow/__snapshots__/index.test.tsx.snap | 120 +- .../delete_timeline_modal/index.tsx | 2 +- .../note_previews/index.test.tsx | 6 +- .../open_timeline/note_previews/index.tsx | 4 +- .../netflow_row_renderer.test.tsx.snap | 128 +- .../detail_panel_alert_actions/index.test.tsx | 5 +- .../components/resolve_all_conflicts.test.tsx | 2 +- .../nav_control_popover.test.tsx.snap | 2 +- .../entity_by_expression.test.tsx.snap | 4 +- .../__snapshots__/chart_wrapper.test.tsx.snap | 8 +- .../ml_integerations.test.tsx.snap | 4 +- .../monitor/ml/ml_manage_job.test.tsx | 3 + .../step_image_popover.test.tsx | 14 +- .../ping_timestamp/step_image_popover.tsx | 2 +- .../action_bar/action_bar.tsx | 1 - .../monitor_list/monitor_list.test.tsx | 4 +- .../down_number_select.test.tsx.snap | 4 +- .../time_expression_select.test.tsx.snap | 8 +- .../add_filter_btn.test.tsx | 6 +- .../toggle_alert_flyout_button.test.tsx | 3 + .../agg_label_form.test.tsx.snap | 2 +- .../group_by_label_form.test.tsx.snap | 6 +- .../translations/translations/fr-FR.json | 2 - .../translations/translations/ja-JP.json | 2 - .../translations/translations/zh-CN.json | 2 - .../alerts_table/alerts_table.test.tsx | 2 + .../bulk_actions/bulk_actions.test.tsx | 5 +- .../categories_selector.test.tsx | 11 +- .../field_table/field_table_header.test.tsx | 8 +- .../field_browser/field_browser.test.tsx | 4 +- .../common/expression_items/for_the_last.tsx | 2 +- .../common/expression_items/group_by_over.tsx | 2 +- .../public/common/expression_items/of.tsx | 2 +- .../common/expression_items/threshold.tsx | 2 +- .../public/common/expression_items/value.tsx | 2 +- .../public/common/expression_items/when.tsx | 2 +- .../__snapshots__/map_tooltip.test.tsx.snap | 2 +- .../accessibility/apps/search_sessions.ts | 7 +- .../public/attachments/external_reference.tsx | 3 +- .../public/attachments/persistable_state.tsx | 3 +- yarn.lock | 8 +- 162 files changed, 901 insertions(+), 3736 deletions(-) diff --git a/package.json b/package.json index 3906ff723236b8..8e8bdcedc01c18 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "@elastic/datemath": "5.0.3", "@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.3.0-canary.1", "@elastic/ems-client": "8.3.3", - "@elastic/eui": "60.3.0", + "@elastic/eui": "62.0.3", "@elastic/filesaver": "1.1.2", "@elastic/node-crypto": "1.2.1", "@elastic/numeral": "^2.5.1", diff --git a/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap b/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap index 58ef0d67aa8a2c..a75ef5540fd896 100644 --- a/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap +++ b/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap @@ -88,7 +88,13 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiDataGridCell.position": [Function], "euiDataGridCellActions.expandButtonTitle": "Click or hit enter to interact with cell content", "euiDataGridHeaderCell.actionsPopoverScreenReaderText": "To navigate through the list of column actions, press the Tab or Up and Down arrow keys.", - "euiDataGridHeaderCell.headerActions": "Header actions", + "euiDataGridHeaderCell.headerActions": "Click to view column header actions", + "euiDataGridHeaderCell.sortedByAscendingFirst": [Function], + "euiDataGridHeaderCell.sortedByAscendingMultiple": [Function], + "euiDataGridHeaderCell.sortedByAscendingSingle": "Sorted ascending", + "euiDataGridHeaderCell.sortedByDescendingFirst": [Function], + "euiDataGridHeaderCell.sortedByDescendingMultiple": [Function], + "euiDataGridHeaderCell.sortedByDescendingSingle": "Sorted descending", "euiDataGridPagination.detailedPaginationLabel": [Function], "euiDataGridPagination.paginationLabel": "Pagination for preceding grid", "euiDataGridSchema.booleanSortTextAsc": "False-True", @@ -139,8 +145,8 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiHeaderLinks.appNavigation": "App menu", "euiHeaderLinks.openNavigationMenu": "Open menu", "euiHue.label": "Select the HSV color mode \\"hue\\" value", - "euiImage.closeImage": [Function], - "euiImage.openImage": [Function], + "euiImageButton.closeFullScreen": "Press Escape or click to close image fullscreen mode", + "euiImageButton.openFullScreen": "Click to open this image in fullscreen mode", "euiLink.external.ariaLabel": "External link", "euiLink.newTarget.screenReaderOnlyText": "(opens in a new tab or window)", "euiLoadingChart.ariaLabel": "Loading", diff --git a/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx b/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx index f4e3c2b2d72025..93e73d5272d5d1 100644 --- a/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx +++ b/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx @@ -415,9 +415,41 @@ export const getEuiContextMapping = (): EuiTokensObject => { 'euiDataGridHeaderCell.headerActions': i18n.translate( 'core.euiDataGridHeaderCell.headerActions', { - defaultMessage: 'Header actions', + defaultMessage: 'Click to view column header actions', } ), + 'euiDataGridHeaderCell.sortedByAscendingSingle': i18n.translate( + 'core.euiDataGridHeaderCell.sortedByAscendingSingle', + { + defaultMessage: 'Sorted ascending', + } + ), + 'euiDataGridHeaderCell.sortedByDescendingSingle': i18n.translate( + 'core.euiDataGridHeaderCell.sortedByDescendingSingle', + { + defaultMessage: 'Sorted descending', + } + ), + 'euiDataGridHeaderCell.sortedByAscendingFirst': ({ columnId }: EuiValues) => + i18n.translate('core.euiDataGridHeaderCell.sortedByAscendingFirst', { + defaultMessage: 'Sorted by {columnId}, ascending', + values: { columnId }, + }), + 'euiDataGridHeaderCell.sortedByDescendingFirst': ({ columnId }: EuiValues) => + i18n.translate('core.euiDataGridHeaderCell.sortedByDescendingFirst', { + defaultMessage: 'Sorted by {columnId}, descending', + values: { columnId }, + }), + 'euiDataGridHeaderCell.sortedByAscendingMultiple': ({ columnId }: EuiValues) => + i18n.translate('core.euiDataGridHeaderCell.sortedByAscendingMultiple', { + defaultMessage: ', then sorted by {columnId}, ascending', + values: { columnId }, + }), + 'euiDataGridHeaderCell.sortedByDescendingMultiple': ({ columnId }: EuiValues) => + i18n.translate('core.euiDataGridHeaderCell.sortedByDescendingMultiple', { + defaultMessage: ', then sorted by {columnId}, descending', + values: { columnId }, + }), 'euiDataGridHeaderCell.actionsPopoverScreenReaderText': i18n.translate( 'core.euiDataGridHeaderCell.actionsPopoverScreenReaderText', { @@ -612,16 +644,12 @@ export const getEuiContextMapping = (): EuiTokensObject => { 'euiHue.label': i18n.translate('core.euiHue.label', { defaultMessage: 'Select the HSV color mode "hue" value', }), - 'euiImage.closeImage': ({ alt }: EuiValues) => - i18n.translate('core.euiImage.closeImage', { - defaultMessage: 'Close fullscreen {alt} image', - values: { alt }, - }), - 'euiImage.openImage': ({ alt }: EuiValues) => - i18n.translate('core.euiImage.openImage', { - defaultMessage: 'Open fullscreen {alt} image', - values: { alt }, - }), + 'euiImageButton.openFullScreen': i18n.translate('core.euiImageButton.openFullScreen', { + defaultMessage: 'Click to open this image in fullscreen mode', + }), + 'euiImageButton.closeFullScreen': i18n.translate('core.euiImageButton.closeFullScreen', { + defaultMessage: 'Press Escape or click to close image fullscreen mode', + }), 'euiLink.external.ariaLabel': i18n.translate('core.euiLink.external.ariaLabel', { defaultMessage: 'External link', }), diff --git a/packages/home/sample_data_card/src/__snapshots__/sample_data_card.test.tsx.snap b/packages/home/sample_data_card/src/__snapshots__/sample_data_card.test.tsx.snap index 460e7a79618668..0e1f5bc5b45f18 100644 --- a/packages/home/sample_data_card/src/__snapshots__/sample_data_card.test.tsx.snap +++ b/packages/home/sample_data_card/src/__snapshots__/sample_data_card.test.tsx.snap @@ -76,12 +76,12 @@ exports[`SampleDataCard installed renders with app links 1`] = ` class="euiFlexItem euiFlexItem--flexGrowZero" >
} closePopover={[MockFunction]} - display="inlineBlock" + display="inline-block" hasArrow={true} isOpen={false} ownFocus={true} diff --git a/packages/shared-ux/button_toolbar/src/popover/__snapshots__/popover.test.tsx.snap b/packages/shared-ux/button_toolbar/src/popover/__snapshots__/popover.test.tsx.snap index 112e4336fdcbb4..319ea90381f9ed 100644 --- a/packages/shared-ux/button_toolbar/src/popover/__snapshots__/popover.test.tsx.snap +++ b/packages/shared-ux/button_toolbar/src/popover/__snapshots__/popover.test.tsx.snap @@ -1,395 +1,27 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[` is rendered 1`] = ` - - - } - closePopover={[Function]} - display="inlineBlock" - hasArrow={true} - intl={ - Object { - "defaultFormats": Object {}, - "defaultLocale": "en", - "formatDate": [Function], - "formatHTMLMessage": [Function], - "formatMessage": [Function], - "formatNumber": [Function], - "formatPlural": [Function], - "formatRelative": [Function], - "formatTime": [Function], - "formats": Object { - "date": Object { - "full": Object { - "day": "numeric", - "month": "long", - "weekday": "long", - "year": "numeric", - }, - "long": Object { - "day": "numeric", - "month": "long", - "year": "numeric", - }, - "medium": Object { - "day": "numeric", - "month": "short", - "year": "numeric", - }, - "short": Object { - "day": "numeric", - "month": "numeric", - "year": "2-digit", - }, - }, - "number": Object { - "currency": Object { - "style": "currency", - }, - "percent": Object { - "style": "percent", - }, - }, - "relative": Object { - "days": Object { - "units": "day", - }, - "hours": Object { - "units": "hour", - }, - "minutes": Object { - "units": "minute", - }, - "months": Object { - "units": "month", - }, - "seconds": Object { - "units": "second", - }, - "years": Object { - "units": "year", - }, - }, - "time": Object { - "full": Object { - "hour": "numeric", - "minute": "numeric", - "second": "numeric", - "timeZoneName": "short", - }, - "long": Object { - "hour": "numeric", - "minute": "numeric", - "second": "numeric", - "timeZoneName": "short", - }, - "medium": Object { - "hour": "numeric", - "minute": "numeric", - "second": "numeric", - }, - "short": Object { - "hour": "numeric", - "minute": "numeric", - }, - }, - }, - "formatters": Object { - "getDateTimeFormat": [Function], - "getMessageFormat": [Function], - "getNumberFormat": [Function], - "getPluralFormat": [Function], - "getRelativeFormat": [Function], - }, - "locale": "en", - "messages": Object {}, - "now": [Function], - "onError": [Function], - "textComponent": Symbol(react.fragment), - "timeZone": null, - } - } - isOpen={false} - ownFocus={true} - panelPaddingSize="m" +
-
-
- - - - - - - -
-
- - + test + + + +
+
`; diff --git a/packages/shared-ux/button_toolbar/src/popover/popover.test.tsx b/packages/shared-ux/button_toolbar/src/popover/popover.test.tsx index 022ab3fe56f511..afdf0007f88831 100644 --- a/packages/shared-ux/button_toolbar/src/popover/popover.test.tsx +++ b/packages/shared-ux/button_toolbar/src/popover/popover.test.tsx @@ -16,7 +16,7 @@ describe('', () => { const isOpen = true; const component = mountWithIntl( !isOpen} />); - expect(component).toMatchSnapshot(); + expect(component.render()).toMatchSnapshot(); }); test('accepts an onClick handler', () => { diff --git a/packages/shared-ux/card/no_data/impl/src/__snapshots__/no_data_card.test.tsx.snap b/packages/shared-ux/card/no_data/impl/src/__snapshots__/no_data_card.test.tsx.snap index a9f42dbf152969..949570f3e8b5af 100644 --- a/packages/shared-ux/card/no_data/impl/src/__snapshots__/no_data_card.test.tsx.snap +++ b/packages/shared-ux/card/no_data/impl/src/__snapshots__/no_data_card.test.tsx.snap @@ -12,11 +12,11 @@ exports[`NoDataCard props button 1`] = ` class="euiCard__image" >
@@ -86,11 +86,11 @@ exports[`NoDataCard props extends EuiCardProps 1`] = ` class="euiCard__image" >
@@ -160,11 +160,11 @@ exports[`NoDataCard props href 1`] = ` class="euiCard__image" >
@@ -234,11 +234,11 @@ exports[`NoDataCard props no access to Fleet 1`] = ` class="euiCard__image" >
@@ -293,11 +293,11 @@ exports[`NoDataCard renders 1`] = ` class="euiCard__image" >
diff --git a/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap b/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap index 98b117c17bb2ac..ac0743939d75af 100644 --- a/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap +++ b/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap @@ -1,2773 +1,182 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Header renders 1`] = ` -
- -
- , - ], - }, - Object { - "borders": "none", - "items": Array [ - - - , - ], - }, - Object { - "borders": "none", - "items": Array [ - - - , - , - , - ], - }, - ] - } - theme="dark" +
- - -
+
- - - -
- -
-
- + + + +
+
+
+
+
+
+
+
+
- - -
- - - - - } - closePopover={[Function]} - data-test-subj="helpMenuButton" - display="inlineBlock" - hasArrow={true} - id="headerHelpMenu" - isOpen={false} - ownFocus={true} - panelPaddingSize="m" - repositionOnScroll={true} + -
-
- - - - - - - - - - , - } - } - className="euiHeaderSectionItemButton" - color="text" - onClick={[Function]} - > - - - -
-
-
-
-
-
- -
- -
-
+ + + + +
- +
- - +
+
+
+
- - + + + + +
+
+ +
+
+
- -
- -
- -
- -
- -
-
- +
-
-
+
+ `; diff --git a/src/core/public/chrome/ui/header/header.test.tsx b/src/core/public/chrome/ui/header/header.test.tsx index 682cadf1e51724..10cca7ad9cd9ad 100644 --- a/src/core/public/chrome/ui/header/header.test.tsx +++ b/src/core/public/chrome/ui/header/header.test.tsx @@ -96,7 +96,7 @@ describe('Header', () => { act(() => isLocked$.next(true)); component.update(); expect(component.find('[data-test-subj="collapsibleNav"]').exists()).toBeTruthy(); - expect(component).toMatchSnapshot(); + expect(component.render()).toMatchSnapshot(); act(() => breadcrumbsAppendExtension$.next({ diff --git a/src/dev/license_checker/config.ts b/src/dev/license_checker/config.ts index 6e26bf1f2af638..02649c2fc5b881 100644 --- a/src/dev/license_checker/config.ts +++ b/src/dev/license_checker/config.ts @@ -83,6 +83,6 @@ export const LICENSE_OVERRIDES = { 'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts '@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint '@elastic/ems-client@8.3.3': ['Elastic License 2.0'], - '@elastic/eui@60.3.0': ['SSPL-1.0 OR Elastic License 2.0'], + '@elastic/eui@62.0.3': ['SSPL-1.0 OR Elastic License 2.0'], 'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry }; diff --git a/src/plugins/dashboard/public/application/embeddable/empty_screen/__snapshots__/dashboard_empty_screen.test.tsx.snap b/src/plugins/dashboard/public/application/embeddable/empty_screen/__snapshots__/dashboard_empty_screen.test.tsx.snap index 544cdb7ae9bfb1..b075e079466be7 100644 --- a/src/plugins/dashboard/public/application/embeddable/empty_screen/__snapshots__/dashboard_empty_screen.test.tsx.snap +++ b/src/plugins/dashboard/public/application/embeddable/empty_screen/__snapshots__/dashboard_empty_screen.test.tsx.snap @@ -44,11 +44,11 @@ exports[`DashboardEmptyScreen renders correctly with readonly mode 1`] = ` role="main" >
@@ -85,11 +85,11 @@ exports[`DashboardEmptyScreen renders correctly with view mode 1`] = ` role="main" >
diff --git a/src/plugins/data/public/search/session/session_indicator/search_session_indicator/search_session_indicator.test.tsx b/src/plugins/data/public/search/session/session_indicator/search_session_indicator/search_session_indicator.test.tsx index 3fe0e1172487cf..6c9dad6651c471 100644 --- a/src/plugins/data/public/search/session/session_indicator/search_session_indicator/search_session_indicator.test.tsx +++ b/src/plugins/data/public/search/session/session_indicator/search_session_indicator/search_session_indicator.test.tsx @@ -9,6 +9,7 @@ import React, { ReactNode } from 'react'; import { screen, render } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; +import { waitForEuiPopoverOpen } from '@elastic/eui/lib/test/rtl'; import { SearchSessionIndicator } from './search_session_indicator'; import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; import { SearchSessionState } from '../../../..'; @@ -26,6 +27,7 @@ test('Loading state', async () => { ); await userEvent.click(screen.getByLabelText('Search session loading')); + await waitForEuiPopoverOpen(); await userEvent.click(screen.getByText('Stop session')); expect(onCancel).toBeCalled(); @@ -40,6 +42,7 @@ test('Completed state', async () => { ); await userEvent.click(screen.getByLabelText('Search session complete')); + await waitForEuiPopoverOpen(); await userEvent.click(screen.getByText('Save session')); expect(onSave).toBeCalled(); @@ -54,6 +57,7 @@ test('Loading in the background state', async () => { ); await userEvent.click(screen.getByLabelText(/Saved session in progress/)); + await waitForEuiPopoverOpen(); await userEvent.click(screen.getByText('Stop session')); expect(onCancel).toBeCalled(); diff --git a/src/plugins/data/public/utils/table_inspector_view/components/__snapshots__/data_view.test.tsx.snap b/src/plugins/data/public/utils/table_inspector_view/components/__snapshots__/data_view.test.tsx.snap index 803d7de517752f..4f40db7c07141d 100644 --- a/src/plugins/data/public/utils/table_inspector_view/components/__snapshots__/data_view.test.tsx.snap +++ b/src/plugins/data/public/utils/table_inspector_view/components/__snapshots__/data_view.test.tsx.snap @@ -176,11 +176,11 @@ Array [ class="euiFlexItem euiFlexItem--flexGrowZero" >
"`; -exports[`VisLegend Component Legend open should match the snapshot 1`] = `"
"`; +exports[`VisLegend Component Legend open should match the snapshot 1`] = `"
"`; diff --git a/test/functional/page_objects/settings_page.ts b/test/functional/page_objects/settings_page.ts index 0d6549b2e46b37..2ed64330f4b1c6 100644 --- a/test/functional/page_objects/settings_page.ts +++ b/test/functional/page_objects/settings_page.ts @@ -345,7 +345,7 @@ export class SettingsPageObject extends FtrService { async setScriptedFieldLanguageFilter(language: string) { await this.retry.try(async () => { await this.testSubjects.clickWhenNotDisabled('scriptedFieldLanguageFilterDropdown'); - return await this.find.byCssSelector('div.euiPopover__panel-isOpen'); + return await this.find.byCssSelector('div.euiPopover__panel[data-popover-open]'); }); await this.testSubjects.existOrFail('scriptedFieldLanguageFilterDropdown-popover'); await this.testSubjects.existOrFail(`scriptedFieldLanguageFilterDropdown-option-${language}`); diff --git a/test/functional/page_objects/time_picker.ts b/test/functional/page_objects/time_picker.ts index 5c3c0d81890dde..47cc89f10ce3c5 100644 --- a/test/functional/page_objects/time_picker.ts +++ b/test/functional/page_objects/time_picker.ts @@ -71,7 +71,7 @@ export class TimePickerPageObject extends FtrService { private async getTimePickerPanel() { return await this.retry.try(async () => { - return await this.find.byCssSelector('div.euiPopover__panel-isOpen'); + return await this.find.byCssSelector('div.euiPopover__panel[data-popover-open]'); }); } diff --git a/test/functional/services/filter_bar.ts b/test/functional/services/filter_bar.ts index 7178013d5b9fd6..ab020a1ae943d8 100644 --- a/test/functional/services/filter_bar.ts +++ b/test/functional/services/filter_bar.ts @@ -14,6 +14,7 @@ export class FilterBarService extends FtrService { private readonly testSubjects = this.ctx.getService('testSubjects'); private readonly common = this.ctx.getPageObject('common'); private readonly header = this.ctx.getPageObject('header'); + private readonly retry = this.ctx.getService('retry'); /** * Checks if specified filter exists @@ -127,32 +128,37 @@ export class FilterBarService extends FtrService { * filterBar.addFilter('extension', 'is one of', ['jpg', 'png']); */ public async addFilter(field: string, operator: string, ...values: any): Promise { - await this.testSubjects.click('addFilter'); - await this.comboBox.set('filterFieldSuggestionList', field); - await this.comboBox.set('filterOperatorList', operator); - const params = await this.testSubjects.find('filterParams'); - const paramsComboBoxes = await params.findAllByCssSelector( - '[data-test-subj~="filterParamsComboBox"]', - 1000 - ); - const paramFields = await params.findAllByTagName('input', 1000); - for (let i = 0; i < values.length; i++) { - let fieldValues = values[i]; - if (!Array.isArray(fieldValues)) { - fieldValues = [fieldValues]; - } - - if (paramsComboBoxes && paramsComboBoxes.length > 0) { - for (let j = 0; j < fieldValues.length; j++) { - await this.comboBox.setElement(paramsComboBoxes[i], fieldValues[j]); + await this.retry.try(async () => { + await this.testSubjects.click('addFilter'); + await this.testSubjects.existOrFail('addFilterPopover'); + + await this.comboBox.set('filterFieldSuggestionList', field); + await this.comboBox.set('filterOperatorList', operator); + const params = await this.testSubjects.find('filterParams'); + const paramsComboBoxes = await params.findAllByCssSelector( + '[data-test-subj~="filterParamsComboBox"]', + 1000 + ); + const paramFields = await params.findAllByTagName('input', 1000); + for (let i = 0; i < values.length; i++) { + let fieldValues = values[i]; + if (!Array.isArray(fieldValues)) { + fieldValues = [fieldValues]; } - } else if (paramFields && paramFields.length > 0) { - for (let j = 0; j < fieldValues.length; j++) { - await paramFields[i].type(fieldValues[j]); + + if (paramsComboBoxes && paramsComboBoxes.length > 0) { + for (let j = 0; j < fieldValues.length; j++) { + await this.comboBox.setElement(paramsComboBoxes[i], fieldValues[j]); + } + } else if (paramFields && paramFields.length > 0) { + for (let j = 0; j < fieldValues.length; j++) { + await paramFields[i].type(fieldValues[j]); + } } } - } - await this.testSubjects.click('saveFilter'); + + await this.testSubjects.clickWhenNotDisabled('saveFilter'); + }); await this.header.awaitGlobalLoadingIndicatorHidden(); } diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/integration/power_user/rules/error_count.spec.ts b/x-pack/plugins/apm/ftr_e2e/cypress/integration/power_user/rules/error_count.spec.ts index a9ad367e566199..b145369535225c 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/integration/power_user/rules/error_count.spec.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/integration/power_user/rules/error_count.spec.ts @@ -30,7 +30,7 @@ describe('Rules', () => { describe('Error count', () => { const ruleName = 'Error count threshold'; const comboBoxInputSelector = - '.euiPopover__panel-isOpen [data-test-subj=comboBoxSearchInput]'; + '[data-popover-open] [data-test-subj=comboBoxSearchInput]'; const confirmModalButtonSelector = '.euiModal button[data-test-subj=confirmModalConfirmButton]'; diff --git a/x-pack/plugins/apm/public/components/app/service_map/popover/index.tsx b/x-pack/plugins/apm/public/components/app/service_map/popover/index.tsx index de00aa906b1419..64d750a70b8057 100644 --- a/x-pack/plugins/apm/public/components/app/service_map/popover/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_map/popover/index.tsx @@ -200,7 +200,6 @@ export function Popover({ isOpen={isOpen} ref={popoverRef} style={popoverStyle} - initialFocus={false} >
@@ -205,13 +204,12 @@ exports[`Storyshots components/Assets/Asset marker 1`] = ` className="canvasAsset__thumb canvasCheckered" >
Asset thumbnail
diff --git a/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset_manager.stories.storyshot b/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset_manager.stories.storyshot index eff6eb18580f05..841f5de8f2a9f0 100644 --- a/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset_manager.stories.storyshot +++ b/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset_manager.stories.storyshot @@ -319,13 +319,12 @@ exports[`Storyshots components/Assets/AssetManager two assets 1`] = ` className="canvasAsset__thumb canvasCheckered" >
Asset thumbnail
@@ -495,13 +494,12 @@ exports[`Storyshots components/Assets/AssetManager two assets 1`] = ` className="canvasAsset__thumb canvasCheckered" >
Asset thumbnail
diff --git a/x-pack/plugins/canvas/public/components/color_picker_popover/__stories__/__snapshots__/color_picker_popover.stories.storyshot b/x-pack/plugins/canvas/public/components/color_picker_popover/__stories__/__snapshots__/color_picker_popover.stories.storyshot index 1adcd661b5c4d5..ae5781984be2e0 100644 --- a/x-pack/plugins/canvas/public/components/color_picker_popover/__stories__/__snapshots__/color_picker_popover.stories.storyshot +++ b/x-pack/plugins/canvas/public/components/color_picker_popover/__stories__/__snapshots__/color_picker_popover.stories.storyshot @@ -3,11 +3,11 @@ exports[`Storyshots components/Color/ColorPickerPopover interactive 1`] = `
"`; +exports[`ResetSessionPage renders as expected 1`] = `"ElasticMockedFonts

You do not have permission to access the requested page

Either go back to the previous page or log in as a different user.

"`; diff --git a/x-pack/plugins/security_solution/cypress/integration/cases/attach_alert_to_case.spec.ts b/x-pack/plugins/security_solution/cypress/integration/cases/attach_alert_to_case.spec.ts index cac79b2114dd75..8a6d3d9a5fed11 100644 --- a/x-pack/plugins/security_solution/cypress/integration/cases/attach_alert_to_case.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/cases/attach_alert_to_case.spec.ts @@ -16,6 +16,7 @@ import { login, visit, waitForPageWithoutDateRange } from '../../tasks/login'; import { ALERTS_URL } from '../../urls/navigation'; import { ATTACH_ALERT_TO_CASE_BUTTON, TIMELINE_CONTEXT_MENU_BTN } from '../../screens/alerts'; +import { LOADING_INDICATOR } from '../../screens/security_header'; const loadDetectionsPage = (role: ROLES) => { waitForPageWithoutDateRange(ALERTS_URL, role); @@ -49,7 +50,7 @@ describe('Alerts timeline', () => { beforeEach(() => { login(ROLES.platform_engineer); loadDetectionsPage(ROLES.platform_engineer); - waitForPageToBeLoaded(); + cy.get(LOADING_INDICATOR).should('not.exist'); // on CI, waitForPageToBeLoaded fails because the loading icon can't be found }); it('should allow a user with crud privileges to attach alerts to cases', () => { diff --git a/x-pack/plugins/security_solution/cypress/screens/case_details.ts b/x-pack/plugins/security_solution/cypress/screens/case_details.ts index 8e785cdc10ef76..84224ac4b64dff 100644 --- a/x-pack/plugins/security_solution/cypress/screens/case_details.ts +++ b/x-pack/plugins/security_solution/cypress/screens/case_details.ts @@ -31,7 +31,7 @@ export const CASE_DETAILS_USER_ACTION_DESCRIPTION_USERNAME = export const CASE_DETAILS_USERNAMES = '[data-test-subj="case-view-username"]'; -export const CASE_EVENT_UPDATE = '.euiCommentEvent--update'; +export const CASE_EVENT_UPDATE = '.euiCommentEvent[data-type="update"]'; export const CASE_IN_PROGRESS_STATUS = '[data-test-subj="status-badge-in-progress"]'; diff --git a/x-pack/plugins/security_solution/cypress/tasks/timeline.ts b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts index 01d10c627af85f..72ab78bf452b8d 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/timeline.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts @@ -168,7 +168,7 @@ export const addFilter = (filter: TimelineFilter): Cypress.Chainable> => { cy.get(TIMELINE_ADD_FIELD_BUTTON).click(); cy.get(LOADING_INDICATOR).should('not.exist'); - cy.focused().should('have.class', 'euiPopover__panel'); + cy.get('[data-popover-open]').should('exist'); cy.get(TIMELINE_DATA_PROVIDER_FIELD).click(); cy.get(TIMELINE_DATA_PROVIDER_FIELD) .find(TIMELINE_DATA_PROVIDER_FIELD_INPUT) diff --git a/x-pack/plugins/security_solution/public/common/components/authentication/__snapshots__/authentications_host_table.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/authentication/__snapshots__/authentications_host_table.test.tsx.snap index 3445bc360b5215..864c8cd1aa1dcd 100644 --- a/x-pack/plugins/security_solution/public/common/components/authentication/__snapshots__/authentications_host_table.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/authentication/__snapshots__/authentications_host_table.test.tsx.snap @@ -376,12 +376,12 @@ exports[`Authentication Host Table Component rendering it renders the host authe class="euiFlexItem" >