diff --git a/package.json b/package.json index 391f9d307a67e..dc26a2313d09b 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,7 @@ "@elastic/ecs": "^8.11.1", "@elastic/elasticsearch": "^8.15.0", "@elastic/ems-client": "8.5.3", - "@elastic/eui": "96.1.0", + "@elastic/eui": "97.0.0", "@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 23a5239116c98..bd50f4ffe0e44 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 @@ -140,8 +140,8 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiDisplaySelector.rowHeightLabel": "Row height", "euiDualRange.sliderScreenReaderInstructions": "You are in a custom range slider. Use the Up and Down arrow keys to change the minimum value. Press Tab to interact with the maximum value.", "euiErrorBoundary.error": "Error", - "euiExternalLinkIcon.ariaLabel": "External link", - "euiExternalLinkIcon.newTarget.screenReaderOnlyText": "(opens in a new tab or window)", + "euiExternalLinkIcon.externalTarget.screenReaderOnlyText": "(external)", + "euiExternalLinkIcon.newTarget.screenReaderOnlyText": "(external, opens in a new tab or window)", "euiFieldPassword.maskPassword": "Mask password", "euiFieldPassword.showPassword": "Show password as plain text. Note: this will visually expose your password on the screen.", "euiFieldSearch.clearSearchButtonLabel": "Clear search input", 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 3fa687fddd9da..ad1ba505dc6f2 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 @@ -860,13 +860,16 @@ export const getEuiContextMapping = (): EuiTokensObject => { 'core.euiInlineEditForm.saveButtonAriaLabel', { defaultMessage: 'Save edit' } ), - 'euiExternalLinkIcon.ariaLabel': i18n.translate('core.euiExternalLinkIcon.ariaLabel', { - defaultMessage: 'External link', - }), + 'euiExternalLinkIcon.externalTarget.screenReaderOnlyText': i18n.translate( + 'core.euiExternalLinkIcon.externalTarget.screenReaderOnlyText', + { + defaultMessage: '(external)', + } + ), 'euiExternalLinkIcon.newTarget.screenReaderOnlyText': i18n.translate( 'core.euiExternalLinkIcon.newTarget.screenReaderOnlyText', { - defaultMessage: '(opens in a new tab or window)', + defaultMessage: '(external, opens in a new tab or window)', } ), 'euiLoadingStrings.ariaLabel': i18n.translate('core.euiLoadingStrings.ariaLabel', { diff --git a/packages/kbn-securitysolution-io-ts-utils/src/test_utils/index.ts b/packages/kbn-securitysolution-io-ts-utils/src/test_utils/index.ts index 2dd31d37414f1..c96b575f439c4 100644 --- a/packages/kbn-securitysolution-io-ts-utils/src/test_utils/index.ts +++ b/packages/kbn-securitysolution-io-ts-utils/src/test_utils/index.ts @@ -53,5 +53,4 @@ export const getPaths = (validation: t.Validation): string[] => { /** * Convenience utility to remove text appended to links by EUI */ -export const removeExternalLinkText = (str: string) => - str.replace(/\(opens in a new tab or window\)/g, ''); +export const removeExternalLinkText = (str: string) => str.replace(/\(external[^)]*\)/g, ''); diff --git a/packages/kbn-unified-data-table/src/utils/get_render_cell_value.test.tsx b/packages/kbn-unified-data-table/src/utils/get_render_cell_value.test.tsx index 7775b35ba5f68..11636b9d1f761 100644 --- a/packages/kbn-unified-data-table/src/utils/get_render_cell_value.test.tsx +++ b/packages/kbn-unified-data-table/src/utils/get_render_cell_value.test.tsx @@ -157,7 +157,7 @@ describe('Unified data table cell rendering', function () { /> ); expect(component.html()).toMatchInlineSnapshot( - `"
100
"` + `"
100
"` ); }); @@ -184,7 +184,7 @@ describe('Unified data table cell rendering', function () { /> ); expect(component.html()).toMatchInlineSnapshot( - `"
100
"` + `"
100
"` ); findTestSubject(component, 'docTableClosePopover').simulate('click'); expect(closePopoverMockFn).toHaveBeenCalledTimes(1); diff --git a/src/dev/license_checker/config.ts b/src/dev/license_checker/config.ts index c4d5357ceefb1..ce399520cbc12 100644 --- a/src/dev/license_checker/config.ts +++ b/src/dev/license_checker/config.ts @@ -87,7 +87,7 @@ 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.5.3': ['Elastic License 2.0'], - '@elastic/eui@96.1.0': ['Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0'], + '@elastic/eui@97.0.0': ['Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0'], 'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry 'buffers@0.1.1': ['MIT'], // license in importing module https://www.npmjs.com/package/binary '@bufbuild/protobuf@1.2.1': ['Apache-2.0'], // license (Apache-2.0 AND BSD-3-Clause) diff --git a/src/plugins/data_view_field_editor/public/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap b/src/plugins/data_view_field_editor/public/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap index 1780ae7a8ced8..6d6ac340f6322 100644 --- a/src/plugins/data_view_field_editor/public/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap +++ b/src/plugins/data_view_field_editor/public/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap @@ -170,13 +170,12 @@ exports[`UrlFormatEditor should render normally 1`] = ` - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window)
@@ -231,13 +230,12 @@ exports[`UrlFormatEditor should render normally 1`] = ` - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) diff --git a/src/plugins/embeddable/public/lib/embeddables/error_embeddable.test.tsx b/src/plugins/embeddable/public/lib/embeddables/error_embeddable.test.tsx index db9b322c077cd..77ed3a1bc2f1d 100644 --- a/src/plugins/embeddable/public/lib/embeddables/error_embeddable.test.tsx +++ b/src/plugins/embeddable/public/lib/embeddables/error_embeddable.test.tsx @@ -42,13 +42,12 @@ test('ErrorEmbeddable renders an embeddable with markdown message', async () => - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) `); diff --git a/src/plugins/links/public/components/dashboard_link/dashboard_link_component.test.tsx b/src/plugins/links/public/components/dashboard_link/dashboard_link_component.test.tsx index d60ba248d14fc..b245870a8757a 100644 --- a/src/plugins/links/public/components/dashboard_link/dashboard_link_component.test.tsx +++ b/src/plugins/links/public/components/dashboard_link/dashboard_link_component.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { DEFAULT_DASHBOARD_DRILLDOWN_OPTIONS } from '@kbn/presentation-util-plugin/public'; -import { createEvent, fireEvent, render, screen, within } from '@testing-library/react'; +import { createEvent, fireEvent, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { LINKS_VERTICAL_LAYOUT } from '../../../common/content_management'; @@ -75,7 +75,7 @@ describe('Dashboard link component', () => { expect(link).toHaveTextContent('Dashboard 1'); // does not render external link icon - const externalIcon = within(link).queryByText('External link'); + const externalIcon = link.querySelector('[data-euiicon-type="popout"]'); expect(externalIcon).toBeNull(); // calls `navigate` on click @@ -122,8 +122,8 @@ describe('Dashboard link component', () => { const link = screen.getByTestId('dashboardLink--foo'); expect(link).toBeInTheDocument(); // external link icon is rendered - const externalIcon = within(link).getByText('External link'); - expect(externalIcon?.getAttribute('data-euiicon-type')).toBe('popout'); + const externalIcon = link.querySelector('[data-euiicon-type="popout"]'); + expect(externalIcon).toBeInTheDocument(); // calls `window.open` await userEvent.click(link); diff --git a/src/plugins/links/public/components/external_link/external_link_component.test.tsx b/src/plugins/links/public/components/external_link/external_link_component.test.tsx index 4230e28b702e7..b80cf30e89f39 100644 --- a/src/plugins/links/public/components/external_link/external_link_component.test.tsx +++ b/src/plugins/links/public/components/external_link/external_link_component.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import userEvent from '@testing-library/user-event'; -import { createEvent, fireEvent, render, screen, within } from '@testing-library/react'; +import { createEvent, fireEvent, render, screen } from '@testing-library/react'; import { LINKS_VERTICAL_LAYOUT } from '../../../common/content_management'; import { ExternalLinkComponent } from './external_link_component'; import { coreServices } from '../../services/kibana_services'; @@ -39,8 +39,8 @@ describe('external link component', () => { const link = await screen.findByTestId('externalLink--foo'); expect(link).toBeInTheDocument(); - const externalIcon = within(link).getByText('External link'); - expect(externalIcon.getAttribute('data-euiicon-type')).toBe('popout'); + const externalIcon = link.querySelector('[data-euiicon-type="popout"]'); + expect(externalIcon).toBeInTheDocument(); await userEvent.click(link); expect(window.open).toHaveBeenCalledWith('https://example.com', '_blank'); }); @@ -52,8 +52,8 @@ describe('external link component', () => { }; render(); const link = await screen.findByTestId('externalLink--foo'); - const externalIcon = within(link).getByText('External link'); - expect(externalIcon?.getAttribute('data-euiicon-type')).toBe('popout'); + const externalIcon = link.querySelector('[data-euiicon-type="popout"]'); + expect(externalIcon).toBeInTheDocument(); }); test('modified click does not trigger event.preventDefault', async () => { 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 829472941701c..0c5045a1c8662 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 @@ -37,13 +37,12 @@ exports[`NotFoundErrors component renders correctly for index-pattern type 1`] = - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) to fix it — otherwise click the delete button above. @@ -89,13 +88,12 @@ exports[`NotFoundErrors component renders correctly for index-pattern-field type - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) to fix it — otherwise click the delete button above. @@ -141,13 +139,12 @@ exports[`NotFoundErrors component renders correctly for search type 1`] = ` - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) to fix it — otherwise click the delete button above. @@ -191,13 +188,12 @@ exports[`NotFoundErrors component renders correctly for unknown type 1`] = ` - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) to fix it — otherwise click the delete button above. 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 72604fbda1fc3..41919c9172e56 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 @@ -26,7 +26,7 @@ describe('NotFoundErrors component', () => { const callOut = mounted.find('EuiCallOut'); 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."` + `"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 APIs(external, opens in a new tab or window) to fix it — otherwise click the delete button above."` ); }); @@ -35,7 +35,7 @@ describe('NotFoundErrors component', () => { const callOut = mounted.find('EuiCallOut'); 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."` + `"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 APIs(external, opens in a new tab or window) to fix it — otherwise click the delete button above."` ); }); @@ -44,7 +44,7 @@ describe('NotFoundErrors component', () => { const callOut = mounted.find('EuiCallOut'); 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."` + `"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 APIs(external, opens in a new tab or window) to fix it — otherwise click the delete button above."` ); }); @@ -53,7 +53,7 @@ describe('NotFoundErrors component', () => { const callOut = mounted.find('EuiCallOut'); 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."` + `"There is a problem with this saved objectIf you know what this error means, you can use the Saved objects APIs(external, opens in a new tab or window) to fix it — otherwise click the delete button above."` ); }); }); diff --git a/src/plugins/vis_types/vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap b/src/plugins/vis_types/vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap index 05da269b239b0..c9a3c41edca93 100644 --- a/src/plugins/vis_types/vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap +++ b/src/plugins/vis_types/vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap @@ -2,4 +2,4 @@ exports[`VisLegend Component Legend closed should match the snapshot 1`] = `"
"`; -exports[`VisLegend Component Legend open should match the snapshot 1`] = `"
"`; +exports[`VisLegend Component Legend open should match the snapshot 1`] = `"
"`; diff --git a/x-pack/plugins/canvas/shareable_runtime/components/__snapshots__/app.test.tsx.snap b/x-pack/plugins/canvas/shareable_runtime/components/__snapshots__/app.test.tsx.snap index 4aa379aa194bc..447771435a1dc 100644 --- a/x-pack/plugins/canvas/shareable_runtime/components/__snapshots__/app.test.tsx.snap +++ b/x-pack/plugins/canvas/shareable_runtime/components/__snapshots__/app.test.tsx.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[` App renders properly 1`] = `"
markdown mock
markdown mock

Page level controls

My Canvas Workpad

There is a new region landmark with page level controls at the end of the document.

"`; +exports[` App renders properly 1`] = `"
markdown mock
markdown mock

Page level controls

My Canvas Workpad

There is a new region landmark with page level controls at the end of the document.

"`; diff --git a/x-pack/plugins/cases/public/common/test_utils.tsx b/x-pack/plugins/cases/public/common/test_utils.tsx index 0028d79019f2a..1cbf5e2a5d454 100644 --- a/x-pack/plugins/cases/public/common/test_utils.tsx +++ b/x-pack/plugins/cases/public/common/test_utils.tsx @@ -18,7 +18,7 @@ import { EuiButton } from '@elastic/eui'; * Convenience utility to remove text appended to links by EUI */ export const removeExternalLinkText = (str: string | null) => - str?.replace(/\(opens in a new tab or window\)/g, ''); + str?.replace(/\(external[^)]*\)/g, ''); export async function waitForComponentToPaint

(wrapper: ReactWrapper

, amount = 0) { await act(async () => { 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 31555edfad65f..ff8d0f4d7caa2 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 @@ -132,13 +132,12 @@ exports[`extend index management ilm summary extension should render a phase def - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) @@ -303,13 +302,12 @@ exports[`extend index management ilm summary extension should render a step info - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) @@ -470,13 +468,12 @@ exports[`extend index management ilm summary extension should render an error pa - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) @@ -638,13 +635,12 @@ exports[`extend index management ilm summary extension should render the tab whe - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) diff --git a/x-pack/plugins/license_management/__jest__/__snapshots__/request_trial_extension.test.js.snap b/x-pack/plugins/license_management/__jest__/__snapshots__/request_trial_extension.test.js.snap index 9456222eca7aa..4cc6917e1e87e 100644 --- a/x-pack/plugins/license_management/__jest__/__snapshots__/request_trial_extension.test.js.snap +++ b/x-pack/plugins/license_management/__jest__/__snapshots__/request_trial_extension.test.js.snap @@ -40,13 +40,12 @@ exports[`RequestTrialExtension component should display when enterprise license - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) , request an extension now. @@ -116,13 +115,12 @@ exports[`RequestTrialExtension component should display when license is active a - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) , request an extension now. @@ -192,13 +190,12 @@ exports[`RequestTrialExtension component should display when license is not acti - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) , request an extension now. @@ -268,13 +265,12 @@ exports[`RequestTrialExtension component should display when platinum license is - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) , request an extension now. diff --git a/x-pack/plugins/license_management/__jest__/__snapshots__/revert_to_basic.test.js.snap b/x-pack/plugins/license_management/__jest__/__snapshots__/revert_to_basic.test.js.snap index f1e5a50a309c8..9ea24982c655c 100644 --- a/x-pack/plugins/license_management/__jest__/__snapshots__/revert_to_basic.test.js.snap +++ b/x-pack/plugins/license_management/__jest__/__snapshots__/revert_to_basic.test.js.snap @@ -40,13 +40,12 @@ exports[`RevertToBasic component should display when license is about to expire - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) . @@ -114,13 +113,12 @@ exports[`RevertToBasic component should display when license is expired 1`] = ` - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) . @@ -188,13 +186,12 @@ exports[`RevertToBasic component should display when trial is active 1`] = ` - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, 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 64221ba1d1d5c..5dee5efbe89f0 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 @@ -40,13 +40,12 @@ exports[`StartTrial component when trial is allowed display for basic license 1` - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) have to offer. @@ -114,13 +113,12 @@ exports[`StartTrial component when trial is allowed should display for expired e - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) have to offer. @@ -188,13 +186,12 @@ exports[`StartTrial component when trial is allowed should display for expired p - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) have to offer. @@ -262,13 +259,12 @@ exports[`StartTrial component when trial is allowed should display for gold lice - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) have to offer. diff --git a/x-pack/plugins/monitoring/public/components/no_data/explanations/exporters/__snapshots__/exporters.test.js.snap b/x-pack/plugins/monitoring/public/components/no_data/explanations/exporters/__snapshots__/exporters.test.js.snap index 10b8e5f0733d9..58c596b063bad 100644 --- a/x-pack/plugins/monitoring/public/components/no_data/explanations/exporters/__snapshots__/exporters.test.js.snap +++ b/x-pack/plugins/monitoring/public/components/no_data/explanations/exporters/__snapshots__/exporters.test.js.snap @@ -89,13 +89,12 @@ Array [ - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) Go to @@ -109,13 +108,12 @@ Array [ - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) section for a deployment to configure monitoring. For more information visit @@ -129,13 +127,12 @@ Array [ - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window)

diff --git a/x-pack/plugins/monitoring/public/components/no_data/reasons/__snapshots__/reason_found.test.js.snap b/x-pack/plugins/monitoring/public/components/no_data/reasons/__snapshots__/reason_found.test.js.snap index 749620c85bea5..bc30f206fe479 100644 --- a/x-pack/plugins/monitoring/public/components/no_data/reasons/__snapshots__/reason_found.test.js.snap +++ b/x-pack/plugins/monitoring/public/components/no_data/reasons/__snapshots__/reason_found.test.js.snap @@ -156,13 +156,12 @@ Array [ - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) Go to @@ -176,13 +175,12 @@ Array [ - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) section for a deployment to configure monitoring. For more information visit @@ -196,13 +194,12 @@ Array [ - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window)

diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/link_preview.test.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/link_preview.test.tsx index 560620f27a2f8..29307a0d32e58 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/link_preview.test.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/link_preview.test.tsx @@ -12,8 +12,7 @@ import * as stories from './link_preview.stories'; const { Example } = composeStories(stories); -export const removeExternalLinkText = (str: string) => - str.replace(/\(opens in a new tab or window\)/g, ''); +export const removeExternalLinkText = (str: string) => str.replace(/\(external[^)]*\)/g, ''); describe('LinkPreview', () => { const getElementValue = (container: HTMLElement, id: string) => diff --git a/x-pack/plugins/observability_solution/synthetics/e2e/synthetics/journeys/alerting_default.journey.ts b/x-pack/plugins/observability_solution/synthetics/e2e/synthetics/journeys/alerting_default.journey.ts index 42c9894da9a8b..d2e495e0cc17a 100644 --- a/x-pack/plugins/observability_solution/synthetics/e2e/synthetics/journeys/alerting_default.journey.ts +++ b/x-pack/plugins/observability_solution/synthetics/e2e/synthetics/journeys/alerting_default.journey.ts @@ -43,13 +43,13 @@ journey('AlertingDefaults', async ({ page, params }) => { await page.press('input[type="text"]', 'Tab'); }); step( - 'Fill text=Webhook URLCreate a Slack Webhook URL(opens in a new tab or window) >> input[type="text"]', + 'Fill text=Webhook URLCreate a Slack Webhook URL(external, opens in a new tab or window) >> input[type="text"]', async () => { if (await page.isVisible(byTestId('webhookButton'))) { await page.click(byTestId('webhookButton')); } await page.fill( - 'text=Webhook URLCreate a Slack Webhook URL(opens in a new tab or window) >> input[type="text"]', + 'text=Webhook URLCreate a Slack Webhook URL(external, opens in a new tab or window) >> input[type="text"]', 'https://www.slack.com' ); await page.click('button:has-text("Save")'); @@ -74,10 +74,10 @@ journey('AlertingDefaults', async ({ page, params }) => { await page.fill('input[type="password"]', 'changeme'); await page.click('button:has-text("Save")'); await page.click( - 'text=Sender is required.Configure email accounts(opens in a new tab or window) >> input[type="text"]' + 'text=Sender is required.Configure email accounts(external, opens in a new tab or window) >> input[type="text"]' ); await page.fill( - 'text=Sender is required.Configure email accounts(opens in a new tab or window) >> input[type="text"]', + 'text=Sender is required.Configure email accounts(external, opens in a new tab or window) >> input[type="text"]', 'test@gmail.com' ); await page.click('button:has-text("Save")'); diff --git a/x-pack/plugins/observability_solution/synthetics/e2e/synthetics/journeys/data_retention.journey.ts b/x-pack/plugins/observability_solution/synthetics/e2e/synthetics/journeys/data_retention.journey.ts index 7f7a395b09b36..1dd2fe3a44aed 100644 --- a/x-pack/plugins/observability_solution/synthetics/e2e/synthetics/journeys/data_retention.journey.ts +++ b/x-pack/plugins/observability_solution/synthetics/e2e/synthetics/journeys/data_retention.journey.ts @@ -36,7 +36,7 @@ journey(`DataRetentionPage`, async ({ page, params }) => { await page.click(':nth-match(:text("365 days + rollover"), 2)'); await page.click(':nth-match(:text("365 days + rollover"), 3)'); await page.click(':nth-match(:text("365 days + rollover"), 4)'); - await page.click('tbody div:has-text("synthetics(opens in a new tab or window)")'); + await page.click('tbody div:has-text("synthetics(external, opens in a new tab or window)")'); }); step('validate data sizes', async () => { @@ -60,7 +60,7 @@ journey(`DataRetentionPage`, async ({ page, params }) => { [page1] = await Promise.all([ page.waitForEvent('popup'), page.click( - 'tbody div:has-text("synthetics-synthetics.browser-default_policy(opens in a new tab or window)")' + 'tbody div:has-text("synthetics-synthetics.browser-default_policy(external, opens in a new tab or window)")' ), ]); recordVideo(page1, 'data_retention_policy_change'); @@ -98,7 +98,7 @@ journey(`DataRetentionPage`, async ({ page, params }) => { await page.reload(); - await page.click('tbody div:has-text("synthetics(opens in a new tab or window)")'); + await page.click('tbody div:has-text("synthetics(external, opens in a new tab or window)")'); await page1.close(); await assertText({ page, text: '10000 days + rollover' }); diff --git a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/monitor/ping_list/__snapshots__/expanded_row.test.tsx.snap b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/monitor/ping_list/__snapshots__/expanded_row.test.tsx.snap index b4b7a53c69909..925167cc8db39 100644 --- a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/monitor/ping_list/__snapshots__/expanded_row.test.tsx.snap +++ b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/monitor/ping_list/__snapshots__/expanded_row.test.tsx.snap @@ -180,13 +180,12 @@ exports[`PingListExpandedRow renders link to docs if body is not recorded but it - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) for more information on recording response bodies. diff --git a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/monitor/ping_list/doc_link_body.test.tsx b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/monitor/ping_list/doc_link_body.test.tsx index a3698904eb366..69069b1bd74da 100644 --- a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/monitor/ping_list/doc_link_body.test.tsx +++ b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/monitor/ping_list/doc_link_body.test.tsx @@ -16,7 +16,7 @@ describe('PingListExpandedRow', () => { expect(screen.getByText(/Body not recorded. Read our/)); expect( - screen.getByRole('link', { name: 'docs External link (opens in a new tab or window)' }) + screen.getByRole('link', { name: 'docs (external, opens in a new tab or window)' }) ).toBeInTheDocument(); expect(screen.getByText(/for more information on recording response bodies./)); }); diff --git a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/monitor/status_details/__snapshots__/monitor_status.bar.test.tsx.snap b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/monitor/status_details/__snapshots__/monitor_status.bar.test.tsx.snap index 380070d4d173e..d8acb8a3cd715 100644 --- a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/monitor/status_details/__snapshots__/monitor_status.bar.test.tsx.snap +++ b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/monitor/status_details/__snapshots__/monitor_status.bar.test.tsx.snap @@ -67,13 +67,12 @@ Array [ - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) diff --git a/x-pack/plugins/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap b/x-pack/plugins/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap index 2466a01112102..80a7e7a24e1e9 100644 --- a/x-pack/plugins/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap +++ b/x-pack/plugins/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`UnauthenticatedPage renders as expected 1`] = `"ElasticMockedFonts

We hit an authentication error

Try logging in again, and if the problem persists, contact your system administrator.

"`; +exports[`UnauthenticatedPage renders as expected 1`] = `"ElasticMockedFonts

We hit an authentication error

Try logging in again, and if the problem persists, contact your system administrator.

"`; -exports[`UnauthenticatedPage renders as expected with custom title 1`] = `"My Company NameMockedFonts

We hit an authentication error

Try logging in again, and if the problem persists, contact your system administrator.

"`; +exports[`UnauthenticatedPage renders as expected with custom title 1`] = `"My Company NameMockedFonts

We hit an authentication error

Try logging in again, and if the problem persists, contact your system administrator.

"`; diff --git a/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap b/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap index f851cb9139ebd..e7a902015afa7 100644 --- a/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap +++ b/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -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.

"`; +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.

"`; -exports[`ResetSessionPage renders as expected with custom page title 1`] = `"My Company NameMockedFonts

You do not have permission to access the requested page

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

"`; +exports[`ResetSessionPage renders as expected with custom page title 1`] = `"My Company NameMockedFonts

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/public/flyout/document_details/left/components/investigation_guide.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/investigation_guide.test.tsx index fc0e140a73d9f..8a71b115071a8 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/investigation_guide.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/investigation_guide.test.tsx @@ -17,7 +17,7 @@ import { useInvestigationGuide } from '../../shared/hooks/use_investigation_guid jest.mock('../../shared/hooks/use_investigation_guide'); const NO_DATA_TEXT = - "There's no investigation guide for this rule. Edit the rule's settingsExternal link(opens in a new tab or window) to add one."; + "There's no investigation guide for this rule. Edit the rule's settings(external, opens in a new tab or window) to add one."; const PREVIEW_MESSAGE = 'Investigation guide is not available in alert preview.'; const renderInvestigationGuide = (context: DocumentDetailsContext = mockContextValue) => ( diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/response_details.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/response_details.test.tsx index 9b11ccbb516ba..4d7de6e109165 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/response_details.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/response_details.test.tsx @@ -59,7 +59,7 @@ jest.mock('../../../../common/lib/kibana', () => { }); const NO_DATA_MESSAGE = - "There are no response actions defined for this event. To add some, edit the rule's settings and set up response actionsExternal link(opens in a new tab or window)."; + "There are no response actions defined for this event. To add some, edit the rule's settings and set up response actions(external, opens in a new tab or window)."; const PREVIEW_MESSAGE = 'Response is not available in alert preview.'; const defaultContextValue = { diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/session_view.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/session_view.test.tsx index 29d12721c3ef7..6db3c4fb4a90d 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/session_view.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/session_view.test.tsx @@ -31,7 +31,7 @@ jest.mock('../../../../common/hooks/use_license'); jest.mock('../../../../sourcerer/containers'); const NO_DATA_MESSAGE = - 'You can only view Linux session details if you’ve enabled the Include session data setting in your Elastic Defend integration policy. Refer to Enable Session View dataExternal link(opens in a new tab or window) for more information.'; + 'You can only view Linux session details if you’ve enabled the Include session data setting in your Elastic Defend integration policy. Refer to Enable Session View data(external, opens in a new tab or window) for more information.'; const UPSELL_TEXT = 'This feature requires an Enterprise subscription'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/analyzer_preview_container.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/analyzer_preview_container.test.tsx index 9c743f2b1bc9d..f9179cecc6b5a 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/analyzer_preview_container.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/analyzer_preview_container.test.tsx @@ -68,7 +68,7 @@ jest.mock('@kbn/kibana-react-plugin/public', () => { }); const NO_ANALYZER_MESSAGE = - 'You can only visualize events triggered by hosts configured with the Elastic Defend integration or any sysmon data from winlogbeat. Refer to Visual event analyzerExternal link(opens in a new tab or window) for more information.'; + 'You can only visualize events triggered by hosts configured with the Elastic Defend integration or any sysmon data from winlogbeat. Refer to Visual event analyzer(external, opens in a new tab or window) for more information.'; const renderAnalyzerPreview = (context = mockContextValue) => render( diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/session_preview_container.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/session_preview_container.test.tsx index 4d4c20787ce1a..db7f60938c0c3 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/session_preview_container.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/session_preview_container.test.tsx @@ -40,7 +40,7 @@ jest.mock('@kbn/kibana-react-plugin/public', () => { }); const NO_DATA_MESSAGE = - 'You can only view Linux session details if you’ve enabled the Include session data setting in your Elastic Defend integration policy. Refer to Enable Session View dataExternal link(opens in a new tab or window) for more information.'; + 'You can only view Linux session details if you’ve enabled the Include session data setting in your Elastic Defend integration policy. Refer to Enable Session View data(external, opens in a new tab or window) for more information.'; const UPSELL_TEXT = 'This feature requires an Enterprise subscription'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/session_view_no_data_message.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/session_view_no_data_message.test.tsx index 49f0056c50c0a..e5153e24c1519 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/session_view_no_data_message.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/session_view_no_data_message.test.tsx @@ -13,7 +13,7 @@ import { SESSION_VIEW_UPSELL_TEST_ID, SESSION_VIEW_NO_DATA_TEST_ID } from './tes import { SessionViewNoDataMessage } from './session_view_no_data_message'; const NO_DATA_MESSAGE = - 'You can only view Linux session details if you’ve enabled the Include session data setting in your Elastic Defend integration policy. Refer to Enable Session View dataExternal link(opens in a new tab or window) for more information.'; + 'You can only view Linux session details if you’ve enabled the Include session data setting in your Elastic Defend integration policy. Refer to Enable Session View data(external, opens in a new tab or window) for more information.'; const UPSELL_TEXT = 'This feature requires an Enterprise subscription'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_list.test.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/command_list.test.tsx index b3a4a1d9ab14e..62ef40ec27668 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_list.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_list.test.tsx @@ -69,7 +69,7 @@ describe('When rendering the command list (help output)', () => { expect(renderResult.getByTestId('test-commandList-helpfulTips')).toHaveTextContent( 'Helpful tips:You can enter consecutive response actions — no need to wait for previous ' + 'actions to complete.Leaving the response console does not terminate any actions that have ' + - 'been submitted.Learn moreExternal link(opens in a new tab or window) about response actions ' + + 'been submitted.Learn more(external, opens in a new tab or window) about response actions ' + 'and using the console.' ); diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/related_detection_rules_callout.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/related_detection_rules_callout.test.tsx index 0044e29af60cf..d742f27b2fc18 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/related_detection_rules_callout.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/related_detection_rules_callout.test.tsx @@ -29,7 +29,7 @@ describe('Policy form RelatedDetectionRulesCallout component', () => { expect(renderResult.getByTestId('test')).toHaveTextContent( exactMatchText( - 'The Endpoint Security detection rule is enabled automatically with Elastic Defend. This rule must remain enabled to receive Endpoint alerts. Learn MoreExternal link(opens in a new tab or window).' + 'The Endpoint Security detection rule is enabled automatically with Elastic Defend. This rule must remain enabled to receive Endpoint alerts. Learn More(external, opens in a new tab or window).' ) ); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/setting_locked_card.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/setting_locked_card.test.tsx index 37327121e5a4b..91e74d1f35d5a 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/setting_locked_card.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/setting_locked_card.test.tsx @@ -41,7 +41,7 @@ describe('Policy form SettingLockedCard component', () => { 'To turn on this protection, you must upgrade your license to Platinum, start a free 30-day ' + 'trial, or spin up a ' + 'cloud deployment' + - 'External link(opens in a new tab or window) ' + + '(external, opens in a new tab or window) ' + 'on AWS, GCP, or Azure.Platinum' ) ); diff --git a/x-pack/plugins/security_solution/public/timelines/components/field_renderers/__snapshots__/field_renderers.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/__snapshots__/field_renderers.test.tsx.snap index 17ae6d1941be8..06650bf2734bd 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/field_renderers/__snapshots__/field_renderers.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/__snapshots__/field_renderers.test.tsx.snap @@ -276,13 +276,12 @@ exports[`Field Renderers #whoisRenderer it renders correctly against snapshot 1` - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) diff --git a/x-pack/plugins/security_solution/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap index cbefd017dfbda..e881d9d5d1ce1 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap @@ -1012,13 +1012,12 @@ tr:hover .c3:focus::before { - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) @@ -1755,13 +1754,12 @@ tr:hover .c3:focus::before { - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) @@ -2135,13 +2133,12 @@ tr:hover .c3:focus::before { - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) @@ -2221,13 +2218,12 @@ tr:hover .c3:focus::before { - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) @@ -2307,13 +2303,12 @@ tr:hover .c3:focus::before { - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap index a5cd1d996a007..d99d87ffb6981 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap @@ -1202,13 +1202,12 @@ tr:hover .c5:focus::before { - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) @@ -2106,13 +2105,12 @@ tr:hover .c5:focus::before { - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) @@ -2556,13 +2554,12 @@ tr:hover .c5:focus::before { - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) @@ -2652,13 +2649,12 @@ tr:hover .c5:focus::before { - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) @@ -2748,13 +2744,12 @@ tr:hover .c5:focus::before { - External link - + role="presentation" + /> - (opens in a new tab or window) + (external, opens in a new tab or window) diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/custom_timeline_data_grid_body.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/custom_timeline_data_grid_body.test.tsx index e93b9014785f4..b6d7f52f2d92f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/custom_timeline_data_grid_body.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/custom_timeline_data_grid_body.test.tsx @@ -46,6 +46,9 @@ const defaultProps: CustomTimelineDataGridBodyProps = { enabledRowRenderers: [], setCustomGridBodyProps: jest.fn(), visibleColumns: mockVisibleColumns, + headerRow: <>, + footerRow: null, + gridWidth: 0, }; const renderTestComponents = (props?: CustomTimelineDataGridBodyProps) => { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/custom_timeline_data_grid_body.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/custom_timeline_data_grid_body.tsx index fdf46c50a55f4..559dcbf10c4e6 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/custom_timeline_data_grid_body.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/custom_timeline_data_grid_body.tsx @@ -42,8 +42,17 @@ const DEFAULT_UDT_ROW_HEIGHT = 34; * */ export const CustomTimelineDataGridBody: FC = memo( function CustomTimelineDataGridBody(props) { - const { Cell, visibleColumns, visibleRowData, rows, rowHeight, enabledRowRenderers, refetch } = - props; + const { + Cell, + headerRow, + footerRow, + visibleColumns, + visibleRowData, + rows, + rowHeight, + enabledRowRenderers, + refetch, + } = props; const visibleRows = useMemo( () => (rows ?? []).slice(visibleRowData.startRow, visibleRowData.endRow), @@ -52,6 +61,7 @@ export const CustomTimelineDataGridBody: FC = m return ( <> + {headerRow} {visibleRows.map((row, rowIndex) => { return ( = m /> ); })} + {footerRow} ); } diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/index.tsx index 0b629788b7691..e4862fe8d72f6 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/index.tsx @@ -331,15 +331,21 @@ export const TimelineDataTableComponent: React.FC = memo( visibleRowData, visibleColumns, setCustomGridBodyProps, + gridWidth, + headerRow, + footerRow, }: EuiDataGridCustomBodyProps) => ( ), diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 5067788690757..52b0b3747d7a3 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -720,7 +720,6 @@ "core.euiDisplaySelector.rowHeightLabel": "Hauteur de la ligne", "core.euiDualRange.sliderScreenReaderInstructions": "Vous êtes dans un curseur de plage personnalisé. Utilisez les flèches vers le haut et vers le bas pour modifier la valeur minimale. Appuyez sur Tabulation pour interagir avec la valeur maximale.", "core.euiErrorBoundary.error": "Erreur", - "core.euiExternalLinkIcon.ariaLabel": "Lien externe", "core.euiExternalLinkIcon.newTarget.screenReaderOnlyText": "(s’ouvre dans un nouvel onglet ou une nouvelle fenêtre)", "core.euiFieldPassword.maskPassword": "Masquer le mot de passe", "core.euiFieldPassword.showPassword": "Afficher le mot de passe en texte brut. Remarque : votre mot de passe sera visible à l'écran.", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 76eb343a5f3d5..5b6a279f9b502 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -721,7 +721,6 @@ "core.euiDisplaySelector.rowHeightLabel": "行高さ", "core.euiDualRange.sliderScreenReaderInstructions": "カスタム範囲スライダーを操作しています。上下矢印キーを使用すると、最小値を変更できます。Tabを押すと、最大値を操作できます。", "core.euiErrorBoundary.error": "エラー", - "core.euiExternalLinkIcon.ariaLabel": "外部リンク", "core.euiExternalLinkIcon.newTarget.screenReaderOnlyText": "(新しいタブまたはウィンドウで開く)", "core.euiFieldPassword.maskPassword": "パスワードをマスク", "core.euiFieldPassword.showPassword": "プレーンテキストとしてパスワードを表示します。注記:パスワードは画面上に見えるように表示されます。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 72bc857e7a9be..61d582ed050b2 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -720,7 +720,6 @@ "core.euiDisplaySelector.rowHeightLabel": "行高", "core.euiDualRange.sliderScreenReaderInstructions": "您正使用定制范围滑块。使用向上和向下箭头键可更改最小值。按 Tab 键与最大值进行交互。", "core.euiErrorBoundary.error": "错误", - "core.euiExternalLinkIcon.ariaLabel": "外部链接", "core.euiExternalLinkIcon.newTarget.screenReaderOnlyText": "(在新选项卡或窗口中打开)", "core.euiFieldPassword.maskPassword": "屏蔽密码", "core.euiFieldPassword.showPassword": "将密码显示为纯文本。注意:这会将您的密码暴露在屏幕上。", diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/health_check.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/components/health_check.test.tsx index 4259c62fe0f50..4108233c4bf29 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/health_check.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/health_check.test.tsx @@ -115,11 +115,11 @@ describe('health check', () => { const [action] = queryAllByText(/Learn more/i); expect(description.textContent).toMatchInlineSnapshot( - `"You must enable API keys to use Alerting. Learn more.External link(opens in a new tab or window)"` + `"You must enable API keys to use Alerting. Learn more.(external, opens in a new tab or window)"` ); expect(action.textContent).toMatchInlineSnapshot( - `"Learn more.External link(opens in a new tab or window)"` + `"Learn more.(external, opens in a new tab or window)"` ); expect(action.getAttribute('href')).toMatchInlineSnapshot( @@ -153,12 +153,12 @@ describe('health check', () => { const description = queryByRole(/banner/i); expect(description!.textContent).toMatchInlineSnapshot( - `"You must configure an encryption key to use Alerting. Learn more.External link(opens in a new tab or window)"` + `"You must configure an encryption key to use Alerting. Learn more.(external, opens in a new tab or window)"` ); const action = queryByText(/Learn/i); expect(action!.textContent).toMatchInlineSnapshot( - `"Learn more.External link(opens in a new tab or window)"` + `"Learn more.(external, opens in a new tab or window)"` ); expect(action!.getAttribute('href')).toMatchInlineSnapshot( `"https://www.elastic.co/guide/en/kibana/mocked-test-branch/alert-action-settings-kb.html#general-alert-action-settings"` @@ -193,12 +193,12 @@ describe('health check', () => { const description = queryByText(/You must enable/i); expect(description!.textContent).toMatchInlineSnapshot( - `"You must enable API keys and configure an encryption key to use Alerting. Learn more.External link(opens in a new tab or window)"` + `"You must enable API keys and configure an encryption key to use Alerting. Learn more.(external, opens in a new tab or window)"` ); const action = queryByText(/Learn/i); expect(action!.textContent).toMatchInlineSnapshot( - `"Learn more.External link(opens in a new tab or window)"` + `"Learn more.(external, opens in a new tab or window)"` ); expect(action!.getAttribute('href')).toMatchInlineSnapshot( `"https://www.elastic.co/guide/en/kibana/mocked-test-branch/alerting-setup.html#alerting-prerequisites"` diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/alerts_table.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/alerts_table.tsx index 5fc3def2adc81..617b0f9c70a0a 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/alerts_table.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/alerts_table.tsx @@ -683,17 +683,21 @@ const AlertsTable: React.FunctionComponent = memo((props: Aler }, [props.gridStyle, mergedGridStyle]); const renderCustomGridBody = useCallback>( - ({ visibleColumns: _visibleColumns, Cell }) => ( - + ({ visibleColumns: _visibleColumns, Cell, headerRow, footerRow }) => ( + <> + {headerRow} + + {footerRow} + ), [actualGridStyle, oldAlertsData, pageIndex, pageSize, isLoading, props.gridStyle?.stripes] ); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_response_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_response_tab.cy.ts index 2a5966c4c2b34..97935eabd626e 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_response_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_response_tab.cy.ts @@ -45,7 +45,7 @@ describe( cy.get(DOCUMENT_DETAILS_FLYOUT_RESPONSE_EMPTY).and( 'contain.text', - "There are no response actions defined for this event. To add some, edit the rule's settings and set up response actions(opens in a new tab or window)." + "There are no response actions defined for this event. To add some, edit the rule's settings and set up response actions(external, opens in a new tab or window)." ); }); } diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel_overview_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel_overview_tab.cy.ts index d243e3f51cd2e..debc4181294a0 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel_overview_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel_overview_tab.cy.ts @@ -163,7 +163,7 @@ describe( cy.get(DOCUMENT_DETAILS_FLYOUT_OVERVIEW_TAB_SESSION_PREVIEW_CONTAINER).should( 'contain.text', - 'You can only view Linux session details if you’ve enabled the Include session data setting in your Elastic Defend integration policy. Refer to Enable Session View data(opens in a new tab or window) for more information.' + 'You can only view Linux session details if you’ve enabled the Include session data setting in your Elastic Defend integration policy. Refer to Enable Session View data(external, opens in a new tab or window) for more information.' ); cy.log('analyzer graph preview'); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/notes_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/notes_tab.cy.ts index c9ff65129bfe1..13a4c73f149de 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/notes_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/notes_tab.cy.ts @@ -72,7 +72,9 @@ describe('Timeline notes tab', { tags: ['@ess', '@serverless'] }, () => { it('should be able to render a link', () => { addNotesToTimeline(`[${author}](${link})`); - cy.get(NOTES_LINK).last().should('have.text', `${author}(opens in a new tab or window)`); + cy.get(NOTES_LINK) + .last() + .should('have.text', `${author}(external, opens in a new tab or window)`); cy.get(NOTES_LINK).last().click(); }); diff --git a/x-pack/test/security_solution_cypress/cypress/screens/rule_details.ts b/x-pack/test/security_solution_cypress/cypress/screens/rule_details.ts index 5909f1655eb86..e5d6711b7d16e 100644 --- a/x-pack/test/security_solution_cypress/cypress/screens/rule_details.ts +++ b/x-pack/test/security_solution_cypress/cypress/screens/rule_details.ts @@ -138,8 +138,7 @@ export const TIMELINE_FIELD = (field: string) => { return `[data-test-subj="formatted-field-${field}"]`; }; -export const removeExternalLinkText = (str: string) => - str.replace(/\(opens in a new tab or window\)/g, ''); +export const removeExternalLinkText = (str: string) => str.replace(/\(external[^)]*\)/g, ''); export const DEFINE_RULE_PANEL_PROGRESS = '[data-test-subj="defineRule"] [data-test-subj="stepPanelProgress"]'; diff --git a/yarn.lock b/yarn.lock index d4c80914c12b1..591bcd87bb2c6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1753,10 +1753,10 @@ resolved "https://registry.yarnpkg.com/@elastic/eslint-plugin-eui/-/eslint-plugin-eui-0.0.2.tgz#56b9ef03984a05cc213772ae3713ea8ef47b0314" integrity sha512-IoxURM5zraoQ7C8f+mJb9HYSENiZGgRVcG4tLQxE61yHNNRDXtGDWTZh8N1KIHcsqN1CEPETjuzBXkJYF/fDiQ== -"@elastic/eui@96.1.0": - version "96.1.0" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-96.1.0.tgz#cd75f2a7a2ca07df6fb8f9af985dff3f05172fb6" - integrity sha512-LmB92xr704Dfth9UnxCOm4b63lghb/7svXsnd0zcbSQA/BPqktUm1evZjWYIWFIek5D4JI4dmM+ygXLWdKSM+Q== +"@elastic/eui@97.0.0": + version "97.0.0" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-97.0.0.tgz#b7828b8818de1328e47b4c47024d8455a5795f23" + integrity sha512-ha7oer/0ou0MnZMgwZzqKE97tx/IPhQtb04nNLZvwOiBAH+ANtUqohYSM/3VxLuJT13cxbsLC2CLT0Ktcibo4w== dependencies: "@hello-pangea/dnd" "^16.6.0" "@types/lodash" "^4.14.202"