diff --git a/package.json b/package.json index e4da92af2e821..72921ae70a652 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "@elastic/ecs": "^8.11.1", "@elastic/elasticsearch": "^8.14.0", "@elastic/ems-client": "8.5.3", - "@elastic/eui": "95.3.0", + "@elastic/eui": "95.4.0", "@elastic/filesaver": "1.1.2", "@elastic/node-crypto": "1.2.1", "@elastic/numeral": "^2.5.1", diff --git a/src/dev/license_checker/config.ts b/src/dev/license_checker/config.ts index 6bc2f6cdfff2b..b241cc96b8a83 100644 --- a/src/dev/license_checker/config.ts +++ b/src/dev/license_checker/config.ts @@ -86,7 +86,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@95.3.0': ['SSPL-1.0 OR Elastic License 2.0'], + '@elastic/eui@95.4.0': ['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 '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/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/summary_table/helpers.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/summary_table/helpers.test.tsx index f79c64ab0387c..814f0b234b63c 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/summary_table/helpers.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/summary_table/helpers.test.tsx @@ -452,7 +452,7 @@ describe('helpers', () => { ); - expect(screen.getByTestId('incompatibleStat')).toHaveTextContent('-- --'); // the euiScreenReaderOnly content renders an additional set of -- + expect(screen.getByTestId('incompatibleStat')).toHaveTextContent('--'); }); }); diff --git a/x-pack/plugins/ml/public/application/components/job_messages/job_messages.tsx b/x-pack/plugins/ml/public/application/components/job_messages/job_messages.tsx index 6fb19c7b64290..44a9d4f860ecd 100644 --- a/x-pack/plugins/ml/public/application/components/job_messages/job_messages.tsx +++ b/x-pack/plugins/ml/public/application/components/job_messages/job_messages.tsx @@ -8,7 +8,7 @@ import type { FC } from 'react'; import React, { useMemo } from 'react'; -import type { EuiBasicTableColumn } from '@elastic/eui'; +import { type EuiBasicTableColumn, useEuiTheme } from '@elastic/eui'; import { EuiSpacer, EuiInMemoryTable, EuiButtonIcon, EuiToolTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -41,6 +41,7 @@ export const JobMessages: FC = ({ refreshMessage, actionHandler, }) => { + const { euiTheme } = useEuiTheme(); const { showNodeInfo } = useEnabledFeatures(); const columns: Array> = useMemo(() => { const cols: Array> = [ @@ -65,7 +66,7 @@ export const JobMessages: FC = ({ '' ), render: (message: JobMessage) => , - width: '6%', + width: `${euiTheme.size.l}`, }, { field: 'timestamp', @@ -130,7 +131,7 @@ export const JobMessages: FC = ({ } return cols; - }, [showNodeInfo, refreshMessage, actionHandler]); + }, [showNodeInfo, refreshMessage, actionHandler, euiTheme]); const defaultSorting = { sort: { diff --git a/x-pack/plugins/monitoring/public/components/summary_status/__snapshots__/summary_status.test.js.snap b/x-pack/plugins/monitoring/public/components/summary_status/__snapshots__/summary_status.test.js.snap index 8cb9d4f657347..8c6dc9bd29ee5 100644 --- a/x-pack/plugins/monitoring/public/components/summary_status/__snapshots__/summary_status.test.js.snap +++ b/x-pack/plugins/monitoring/public/components/summary_status/__snapshots__/summary_status.test.js.snap @@ -18,14 +18,11 @@ exports[`Summary Status Component should allow label to be optional 1`] = `
-

Status

-

-

- 127.0.0.1:9300 -

-

Documents

-

- Documents 24.8k -

@@ -123,23 +104,15 @@ exports[`Summary Status Component should allow status to be optional 1`] = `
-

Free Disk Space

-

- Free Disk Space 173.9 GB -

-

Documents

-

- Documents 24.8k -

@@ -194,14 +159,11 @@ exports[`Summary Status Component should render metrics in a summary bar 1`] = `
-

Status

-

Free Disk Space

-

- Free Disk Space 173.9 GB -

-

Documents

-

- Documents 24.8k -

diff --git a/x-pack/plugins/observability_solution/observability/public/pages/overview/components/sections/apm/apm_section.test.tsx b/x-pack/plugins/observability_solution/observability/public/pages/overview/components/sections/apm/apm_section.test.tsx index 683d6bd4d9107..a7297d5ff170e 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/overview/components/sections/apm/apm_section.test.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/overview/components/sections/apm/apm_section.test.tsx @@ -7,6 +7,7 @@ import React from 'react'; import * as fetcherHook from '@kbn/observability-shared-plugin/public/hooks/use_fetcher'; +import { screen } from '@elastic/eui/lib/test/rtl'; import { render, data as dataMock } from '../../../../../utils/test_helper'; import { CoreStart } from '@kbn/core/public'; import { ConfigSchema, ObservabilityPublicPluginsStart } from '../../../../../plugin'; @@ -31,6 +32,14 @@ jest.mock('react-router-dom', () => ({ const { ObservabilityAIAssistantContextualInsight } = observabilityAIAssistantPluginMock.createStartContract(); +const assertServiceStat = (description: string, stat: string) => { + const serviceStat = screen.getByTestSubject('apmServiceStat'); + + expect(serviceStat).toBeInTheDocument(); + expect(serviceStat!.children[0]).toHaveTextContent(description); + expect(serviceStat!.children[1]).toHaveTextContent(stat); +}; + describe('APMSection', () => { const bucketSize = { intervalString: '60s', bucketSize: 60, dateFormat: 'YYYY-MM-DD HH:mm' }; @@ -90,7 +99,7 @@ describe('APMSection', () => { expect(getByRole('heading')).toHaveTextContent('Services'); expect(getByText('Show service inventory')).toBeInTheDocument(); - expect(getByText('Services 11')).toBeInTheDocument(); + assertServiceStat('Services', '11'); expect(getByText('900.0 tpm')).toBeInTheDocument(); expect(queryAllByTestId('loading')).toEqual([]); }); @@ -107,7 +116,7 @@ describe('APMSection', () => { expect(getByRole('heading')).toHaveTextContent('Services'); expect(getByText('Show service inventory')).toBeInTheDocument(); - expect(getByText('Services 11')).toBeInTheDocument(); + assertServiceStat('Services', '11'); expect(getByText('312.00k tpm')).toBeInTheDocument(); expect(queryAllByTestId('loading')).toEqual([]); }); @@ -117,14 +126,14 @@ describe('APMSection', () => { status: fetcherHook.FETCH_STATUS.LOADING, refetch: jest.fn(), }); - const { getByRole, queryAllByText, getByTestId } = render( + const { getByRole, queryAllByText, getByTestId, getAllByLabelText } = render( ); expect(getByRole('heading')).toHaveTextContent('Services'); expect(getByTestId('loading')).toBeInTheDocument(); expect(queryAllByText('Show service inventory')).toEqual([]); - expect(queryAllByText('Services 11')).toEqual([]); + expect(getAllByLabelText('Statistic is loading').length).toEqual(2); expect(queryAllByText('312.00k tpm')).toEqual([]); }); }); diff --git a/x-pack/plugins/observability_solution/observability/public/pages/overview/components/sections/apm/apm_section.tsx b/x-pack/plugins/observability_solution/observability/public/pages/overview/components/sections/apm/apm_section.tsx index ed6f55006c5e7..2535dc07ef234 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/overview/components/sections/apm/apm_section.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/overview/components/sections/apm/apm_section.tsx @@ -114,6 +114,7 @@ export function APMSection({ bucketSize }: Props) { defaultMessage: 'Services', })} isLoading={isLoading} + data-test-subj="apmServiceStat" /> diff --git a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.tsx b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.tsx index 549023a95732d..08806dbeb0818 100644 --- a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.tsx +++ b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.tsx @@ -8,7 +8,7 @@ import React, { type FC } from 'react'; import { css } from '@emotion/react'; -import { useEuiTheme, EuiTabbedContent } from '@elastic/eui'; +import { EuiTabbedContent } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { stringHash } from '@kbn/ml-string-hash'; @@ -30,7 +30,6 @@ interface Props { } export const ExpandedRow: FC = ({ item, onAlertEdit }) => { - const { euiTheme } = useEuiTheme(); const tabId = stringHash(item.id); const tabs = [ @@ -113,8 +112,7 @@ export const ExpandedRow: FC = ({ item, onAlertEdit }) => { onTabClick={() => {}} expand={false} css={css` - margin-left: -${euiTheme.size.xl}; - width: calce(100% + ${euiTheme.size.xl}); + width: 100%; .euiTable { background-color: transparent; diff --git a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row_messages_pane.tsx b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row_messages_pane.tsx index 48077414ffabb..21304b92666dc 100644 --- a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row_messages_pane.tsx +++ b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row_messages_pane.tsx @@ -81,7 +81,7 @@ export const ExpandedRowMessagesPane: FC = ({ tran '' ), render: (message: TransformMessage) => ( -
+
), diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_table_status_cell.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_table_status_cell.test.tsx index c4cd31cd4b07a..1361cf8792bea 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_table_status_cell.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_table_status_cell.test.tsx @@ -121,7 +121,7 @@ describe('RulesListTableStatusCell', () => { }); it('should render loading indicator for new rules', async () => { - const { getByText } = render( + const { getByLabelText } = render( { /> ); - expect(getByText('Statistic is loading')).not.toBe(null); + expect(getByLabelText('Statistic is loading')).not.toBe(null); }); it('should render rule with no last run', async () => { diff --git a/yarn.lock b/yarn.lock index 8c9ff0a045d8e..43d32f1443551 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1752,10 +1752,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@95.3.0": - version "95.3.0" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-95.3.0.tgz#b880012120f748e71bc2c1e4dbcf5acd514f043e" - integrity sha512-KKe2Yuswm0pnOpEnFdWjnekOqFQpN1rlWLp4MPLQwHTc9hMIujiRfOo66RGgc4K3p8qWhyRl/DxbxXC+NnsKiQ== +"@elastic/eui@95.4.0": + version "95.4.0" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-95.4.0.tgz#57ac111c2a3e8125db244928a95787bbb2f318c8" + integrity sha512-UXmn+xgJj4pwq6MV7xMjM79GN+taTv7LBfrtRfurGwhkmvXJrOjMXWq+mfR8rU44lOS2R4AwzH5gcCBjAafLsA== dependencies: "@hello-pangea/dnd" "^16.6.0" "@types/lodash" "^4.14.202"