diff --git a/src/platform/plugins/shared/controls/public/controls/data_controls/options_list_control/components/options_list_control.tsx b/src/platform/plugins/shared/controls/public/controls/data_controls/options_list_control/components/options_list_control.tsx
index 1536e7f21e336..aae335cd1f5b1 100644
--- a/src/platform/plugins/shared/controls/public/controls/data_controls/options_list_control/components/options_list_control.tsx
+++ b/src/platform/plugins/shared/controls/public/controls/data_controls/options_list_control/components/options_list_control.tsx
@@ -183,7 +183,6 @@ export const OptionsListControl = ({
customStrings?.invalidSelectionsLabel ??
OptionsListStrings.control.getInvalidSelectionWarningLabel(invalidSelections.size)
}
- delay="long"
>
= ({
>
),
diff --git a/src/platform/plugins/shared/discover/public/application/main/components/layout/cascaded_documents/blocks/use_table_header_components.test.tsx b/src/platform/plugins/shared/discover/public/application/main/components/layout/cascaded_documents/blocks/use_table_header_components.test.tsx
index c3e0b28cca060..2398a3d41acb2 100644
--- a/src/platform/plugins/shared/discover/public/application/main/components/layout/cascaded_documents/blocks/use_table_header_components.test.tsx
+++ b/src/platform/plugins/shared/discover/public/application/main/components/layout/cascaded_documents/blocks/use_table_header_components.test.tsx
@@ -12,7 +12,7 @@ import { renderHook, render, screen, waitFor } from '@testing-library/react';
import { I18nProvider } from '@kbn/i18n-react';
import { EuiThemeProvider } from '@elastic/eui';
import userEvent from '@testing-library/user-event';
-import { waitForEuiPopoverOpen, waitForEuiToolTipVisible } from '@elastic/eui/lib/test/rtl';
+import { waitForEuiPopoverOpen } from '@elastic/eui/lib/test/rtl';
import { useGetGroupBySelectorRenderer } from './use_table_header_components';
describe('useTableHeaderComponents', () => {
@@ -125,8 +125,6 @@ describe('useTableHeaderComponents', () => {
await user.hover(groupSelectionButton);
- await waitForEuiToolTipVisible();
-
expect(screen.getByText('Grouped results (technical preview)')).toBeInTheDocument();
expect(screen.getByText('Results are grouped when running a Stats BY')).toBeInTheDocument();
});
diff --git a/src/platform/plugins/shared/discover/public/application/main/components/layout/save_discover_table_button.tsx b/src/platform/plugins/shared/discover/public/application/main/components/layout/save_discover_table_button.tsx
index 787d21e95c901..747e2d899e6b6 100644
--- a/src/platform/plugins/shared/discover/public/application/main/components/layout/save_discover_table_button.tsx
+++ b/src/platform/plugins/shared/discover/public/application/main/components/layout/save_discover_table_button.tsx
@@ -63,7 +63,7 @@ export function SaveDiscoverTableButton() {
return (
<>
-
+
) : (
-
+
{/* eslint-disable-next-line @elastic/eui/href-or-on-click */}
+
{notificationComponent}
);
@@ -447,7 +447,6 @@ export const PresentationPanelHoverActions = ({
size="m"
title={!hideTitle ? title || undefined : undefined}
content={description}
- delay="regular"
position="top"
data-test-subj="embeddablePanelDescriptionTooltip"
type="info"
diff --git a/src/platform/plugins/shared/embeddable/public/react_embeddable_system/panel_component/panel_header/presentation_panel_title.tsx b/src/platform/plugins/shared/embeddable/public/react_embeddable_system/panel_component/panel_header/presentation_panel_title.tsx
index 4f5efe2f3408a..ddf0ca99d3498 100644
--- a/src/platform/plugins/shared/embeddable/public/react_embeddable_system/panel_component/panel_header/presentation_panel_title.tsx
+++ b/src/platform/plugins/shared/embeddable/public/react_embeddable_system/panel_component/panel_header/presentation_panel_title.tsx
@@ -106,7 +106,6 @@ export const PresentationPanelTitle = ({
+
{notificationComponent}
);
diff --git a/src/platform/plugins/shared/navigation/public/top_nav_menu/__snapshots__/top_nav_menu_item.test.tsx.snap b/src/platform/plugins/shared/navigation/public/top_nav_menu/__snapshots__/top_nav_menu_item.test.tsx.snap
index 4c443b51f9d5c..a2b688410c663 100644
--- a/src/platform/plugins/shared/navigation/public/top_nav_menu/__snapshots__/top_nav_menu_item.test.tsx.snap
+++ b/src/platform/plugins/shared/navigation/public/top_nav_menu/__snapshots__/top_nav_menu_item.test.tsx.snap
@@ -3,9 +3,6 @@
exports[`TopNavMenu Should render an icon-only item 1`] = `
;
+ return ;
} else if (objectNamespaceType === 'agnostic') {
return (
-
+
= React.memo(({ row, onToggl
overflow: hidden;
`}
>
-
+
= () => {
useFilterBarContext();
const themeContext = useEuiTheme();
const styles = toggleStyles(themeContext);
-
- // TODO Workaround for https://github.com/elastic/eui/issues/9520
- const expandTooltipRef = useRef(null);
const buttonRef = useRef(null);
- const [buttonInFocusNotVisible, setButtonInFocusNotVisible] = useState(false);
- const onTooltipMouseOut = useCallback(() => {
- if (buttonInFocusNotVisible) {
- expandTooltipRef.current?.hideToolTip();
- }
- }, [buttonInFocusNotVisible]);
- const onButtonFocus = useCallback(() => {
- if (document.querySelector('button:focus-visible') !== buttonRef.current) {
- setButtonInFocusNotVisible(true);
- }
- }, []);
- const onButtonBlur = useCallback(() => setButtonInFocusNotVisible(false), []);
- // TODO End workaround, delete above block when EUI fixes this issue
return (
-
+
= () => {
css={styles.filterButtonStyle}
size="s"
data-test-subj="filterBarToggleButton"
- onFocus={/* TODO Workaround for https://github.com/elastic/eui/issues/9520 */ onButtonFocus}
- onBlur={/* TODO Workaround for https://github.com/elastic/eui/issues/9520 */ onButtonBlur}
>
diff --git a/src/platform/plugins/shared/unified_search/public/filters_builder/filter_item/tooltip.tsx b/src/platform/plugins/shared/unified_search/public/filters_builder/filter_item/tooltip.tsx
index c6645fb1aecd9..966d06125a7cb 100644
--- a/src/platform/plugins/shared/unified_search/public/filters_builder/filter_item/tooltip.tsx
+++ b/src/platform/plugins/shared/unified_search/public/filters_builder/filter_item/tooltip.tsx
@@ -19,7 +19,7 @@ export type TooltipProps = Partial> & {
export const Tooltip: React.FC = ({ children, show, content, ...tooltipProps }) => (
<>
{show ? (
-
+
<>{children}>
) : (
diff --git a/src/platform/plugins/shared/unified_search/public/query_string_input/add_filter_popover.tsx b/src/platform/plugins/shared/unified_search/public/query_string_input/add_filter_popover.tsx
index b97eecd9414a8..60445477b061c 100644
--- a/src/platform/plugins/shared/unified_search/public/query_string_input/add_filter_popover.tsx
+++ b/src/platform/plugins/shared/unified_search/public/query_string_input/add_filter_popover.tsx
@@ -58,7 +58,7 @@ const AddFilterPopoverComponent = React.memo(function AddFilterPopover({
const [showAddFilterPopover, setShowAddFilterPopover] = useState(false);
const button = (
-
+
+
diff --git a/src/platform/plugins/shared/workflows_management/public/widgets/workflow_yaml_editor/ui/editor_settings_popover.tsx b/src/platform/plugins/shared/workflows_management/public/widgets/workflow_yaml_editor/ui/editor_settings_popover.tsx
index 5e7a070f7a453..f20c41a96b730 100644
--- a/src/platform/plugins/shared/workflows_management/public/widgets/workflow_yaml_editor/ui/editor_settings_popover.tsx
+++ b/src/platform/plugins/shared/workflows_management/public/widgets/workflow_yaml_editor/ui/editor_settings_popover.tsx
@@ -72,7 +72,7 @@ export function EditorSettingsPopover({ editorRef }: EditorSettingsPopoverProps)
anchorPosition="upRight"
panelPaddingSize="none"
button={
-
+
+
-1 ? samplingIndex : values.length - 1;
return (
-
+
= ({
onSendMessage,
promptValue,
}) => {
- const submitTooltipRef = useRef(null);
-
- const closeTooltip = useCallback(() => {
- submitTooltipRef?.current?.hideToolTip();
- }, []);
-
return (
{
} = useAssistantContext();
const buttonRef = useRef(null);
- const tooltipRef = useRef(null);
+ const tooltipRef = useRef(null);
const [tooltipVisible, setTooltipVisible] = useState(true);
useEffect(() => {
diff --git a/x-pack/platform/packages/shared/kbn-elastic-assistant/impl/connectorland/connector_selector/index.test.tsx b/x-pack/platform/packages/shared/kbn-elastic-assistant/impl/connectorland/connector_selector/index.test.tsx
index a3f15dca5d95e..255d76c587769 100644
--- a/x-pack/platform/packages/shared/kbn-elastic-assistant/impl/connectorland/connector_selector/index.test.tsx
+++ b/x-pack/platform/packages/shared/kbn-elastic-assistant/impl/connectorland/connector_selector/index.test.tsx
@@ -7,7 +7,7 @@
import React from 'react';
import { ConnectorSelector } from '.';
-import { act, fireEvent, render, screen } from '@testing-library/react';
+import { fireEvent, render, screen, waitFor } from '@testing-library/react';
import { mockAssistantAvailability, TestProviders } from '../../mock/test_providers/test_providers';
import { mockActionTypes, mockConnectors } from '../../mock/connectors';
import * as i18n from '../translations';
@@ -139,8 +139,7 @@ describe('Connector selector', () => {
expect(addButton).toBeDisabled();
});
- it('shows tooltip with missing privileges message when hovering disabled add connector button', () => {
- jest.useFakeTimers();
+ it('shows tooltip with missing privileges message when hovering disabled add connector button', async () => {
jest.mocked(useLoadConnectors).mockReturnValue(
createMockUseLoadConnectorsResult({
data: [],
@@ -168,14 +167,12 @@ describe('Connector selector', () => {
expect(addButton).toBeDisabled();
fireEvent.mouseOver(addButton);
- act(() => {
- jest.runAllTimers();
- });
- expect(screen.getByRole('tooltip')).toHaveTextContent(
- i18n.ADD_CONNECTOR_MISSING_PRIVILEGES_DESCRIPTION
- );
- jest.useRealTimers();
+ await waitFor(() => {
+ expect(screen.getByRole('tooltip', { hidden: true })).toHaveTextContent(
+ i18n.ADD_CONNECTOR_MISSING_PRIVILEGES_DESCRIPTION
+ );
+ });
});
it('renders add new connector button if no selected connector is provided', () => {
diff --git a/x-pack/platform/packages/shared/kbn-search-index-documents/components/result/result.tsx b/x-pack/platform/packages/shared/kbn-search-index-documents/components/result/result.tsx
index 8b0b3a27e0658..c3ed2e8758d28 100644
--- a/x-pack/platform/packages/shared/kbn-search-index-documents/components/result/result.tsx
+++ b/x-pack/platform/packages/shared/kbn-search-index-documents/components/result/result.tsx
@@ -15,6 +15,7 @@ import {
EuiSpacer,
EuiSplitPanel,
EuiToolTip,
+ type EuiToolTipRef,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
@@ -67,7 +68,7 @@ export const Result: React.FC = ({
const showResultsFields = isExpanded ? fields.length > 0 : defaultVisibleFields > 0;
- const tooltipRef = useRef(null);
+ const tooltipRef = useRef(null);
return (
<>
diff --git a/x-pack/platform/plugins/private/monitoring/public/alerts/lib/__snapshots__/get_alert_panels_by_category.test.tsx.snap b/x-pack/platform/plugins/private/monitoring/public/alerts/lib/__snapshots__/get_alert_panels_by_category.test.tsx.snap
index b71248f15e90f..c068780a695d0 100644
--- a/x-pack/platform/plugins/private/monitoring/public/alerts/lib/__snapshots__/get_alert_panels_by_category.test.tsx.snap
+++ b/x-pack/platform/plugins/private/monitoring/public/alerts/lib/__snapshots__/get_alert_panels_by_category.test.tsx.snap
@@ -41,9 +41,6 @@ Array [
"name":
{
);
return (
-
+
{
);
return (
-
+
{(removeCluster) => (
{
{ defaultMessage: 'Edit' }
);
return (
-
+
{
{ defaultMessage: 'Delete' }
);
return (
-
+
{
// Can use default action if this proposal is implemented: https://github.com/elastic/eui/discussions/8735
render: (agent) => {
return (
-
+
(null);
- const tooltipRef = useRef(null);
+ const tooltipRef = useRef(null);
const [isSidebarOpen, setIsSidebarOpen] = useState(false);
const [tooltipVisible, setTooltipVisible] = useState(true);
diff --git a/x-pack/platform/plugins/shared/alerting_v2/public/pages/alert_episodes_list_page/components/episode_assignee_cell.tsx b/x-pack/platform/plugins/shared/alerting_v2/public/pages/alert_episodes_list_page/components/episode_assignee_cell.tsx
index e36cd97bcfb5f..d8142a0742bc1 100644
--- a/x-pack/platform/plugins/shared/alerting_v2/public/pages/alert_episodes_list_page/components/episode_assignee_cell.tsx
+++ b/x-pack/platform/plugins/shared/alerting_v2/public/pages/alert_episodes_list_page/components/episode_assignee_cell.tsx
@@ -67,7 +67,7 @@ export function EpisodeAssigneeCell({ assigneeUid, userProfile }: EpisodeAssigne
const avatar = profile.data?.avatar;
return (
-
+
=
;
-// EuiToolTip has a 250ms delay for "long" - we need fake timers
-const TOOLTIP_DELAY_MS = 300;
-
describe('IntegrationCountBadge', () => {
const renderBadge = (cloudConnectorId: string, count: number) => {
return render(
@@ -36,7 +33,6 @@ describe('IntegrationCountBadge', () => {
beforeEach(() => {
jest.clearAllMocks();
- jest.useFakeTimers();
mockUseCloudConnectorUsage.mockReturnValue({
data: undefined,
isLoading: false,
@@ -44,10 +40,6 @@ describe('IntegrationCountBadge', () => {
} as unknown as ReturnType);
});
- afterEach(() => {
- jest.useRealTimers();
- });
-
describe('badge rendering', () => {
it('renders badge with singular text for count of 1', () => {
renderBadge('connector-1', 1);
@@ -99,16 +91,9 @@ describe('IntegrationCountBadge', () => {
const badge = container.querySelector('.euiBadge');
expect(badge).toBeInTheDocument();
- // Trigger hover on the tooltip anchor (EuiToolTip's wrapper)
- const tooltipAnchor = container.querySelector('.euiToolTipAnchor');
- fireEvent.mouseOver(tooltipAnchor!);
-
- // Advance past the tooltip delay
- act(() => {
- jest.advanceTimersByTime(TOOLTIP_DELAY_MS);
- });
+ fireEvent.mouseEnter(container.firstChild as HTMLElement);
+ fireEvent.mouseOver(container.querySelector('.euiToolTipAnchor')!);
- // Wait for tooltip to appear
await waitFor(() => {
expect(screen.getByText('Policy 1')).toBeInTheDocument();
});
@@ -125,14 +110,8 @@ describe('IntegrationCountBadge', () => {
const { container } = renderBadge('connector-1', 2);
- // Trigger hover on the tooltip anchor
- const tooltipAnchor = container.querySelector('.euiToolTipAnchor');
- fireEvent.mouseOver(tooltipAnchor!);
-
- // Advance past the tooltip delay
- act(() => {
- jest.advanceTimersByTime(TOOLTIP_DELAY_MS);
- });
+ fireEvent.mouseEnter(container.firstChild as HTMLElement);
+ fireEvent.mouseOver(container.querySelector('.euiToolTipAnchor')!);
await waitFor(() => {
expect(screen.getByText('Loading...')).toBeInTheDocument();
@@ -148,14 +127,8 @@ describe('IntegrationCountBadge', () => {
const { container } = renderBadge('connector-1', 2);
- // Trigger hover on the tooltip anchor
- const tooltipAnchor = container.querySelector('.euiToolTipAnchor');
- fireEvent.mouseOver(tooltipAnchor!);
-
- // Advance past the tooltip delay
- act(() => {
- jest.advanceTimersByTime(TOOLTIP_DELAY_MS);
- });
+ fireEvent.mouseEnter(container.firstChild as HTMLElement);
+ fireEvent.mouseOver(container.querySelector('.euiToolTipAnchor')!);
await waitFor(() => {
expect(screen.getByText('Failed to load integrations')).toBeInTheDocument();
@@ -191,14 +164,8 @@ describe('IntegrationCountBadge', () => {
const { container } = renderBadge('connector-1', 2);
- // Trigger hover on the tooltip anchor
- const tooltipAnchor = container.querySelector('.euiToolTipAnchor');
- fireEvent.mouseOver(tooltipAnchor!);
-
- // Advance past the tooltip delay
- act(() => {
- jest.advanceTimersByTime(TOOLTIP_DELAY_MS);
- });
+ fireEvent.mouseEnter(container.firstChild as HTMLElement);
+ fireEvent.mouseOver(container.querySelector('.euiToolTipAnchor')!);
await waitFor(() => {
expect(screen.getByText('CSPM Policy')).toBeInTheDocument();
@@ -228,14 +195,8 @@ describe('IntegrationCountBadge', () => {
const { container } = renderBadge('connector-1', 15);
- // Trigger hover on the tooltip anchor
- const tooltipAnchor = container.querySelector('.euiToolTipAnchor');
- fireEvent.mouseOver(tooltipAnchor!);
-
- // Advance past the tooltip delay
- act(() => {
- jest.advanceTimersByTime(TOOLTIP_DELAY_MS);
- });
+ fireEvent.mouseEnter(container.firstChild as HTMLElement);
+ fireEvent.mouseOver(container.querySelector('.euiToolTipAnchor')!);
await waitFor(() => {
expect(screen.getByText('+5 more')).toBeInTheDocument();
@@ -266,17 +227,10 @@ describe('IntegrationCountBadge', () => {
const { container } = renderBadge('connector-123', 1);
- // Trigger hover on the tooltip anchor
- const tooltipAnchor = container.querySelector('.euiToolTipAnchor');
- fireEvent.mouseOver(tooltipAnchor!);
-
- // Advance past the tooltip delay
- act(() => {
- jest.advanceTimersByTime(TOOLTIP_DELAY_MS);
- });
+ fireEvent.mouseEnter(container.firstChild as HTMLElement);
+ fireEvent.mouseOver(container.querySelector('.euiToolTipAnchor')!);
await waitFor(() => {
- // Verify the hook is called with the correct parameters including staleTime: 0
expect(mockUseCloudConnectorUsage).toHaveBeenCalledWith('connector-123', 1, 10, {
staleTime: 0,
});
diff --git a/x-pack/platform/plugins/shared/fleet/public/components/cloud_connector/components/integration_count_badge.tsx b/x-pack/platform/plugins/shared/fleet/public/components/cloud_connector/components/integration_count_badge.tsx
index 6520450abc75a..c4b36a41239e9 100644
--- a/x-pack/platform/plugins/shared/fleet/public/components/cloud_connector/components/integration_count_badge.tsx
+++ b/x-pack/platform/plugins/shared/fleet/public/components/cloud_connector/components/integration_count_badge.tsx
@@ -116,7 +116,6 @@ export const IntegrationCountBadge: React.FC = ({
return (
: null
diff --git a/x-pack/platform/plugins/shared/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/relations_parameter.tsx b/x-pack/platform/plugins/shared/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/relations_parameter.tsx
index 3431848cbe806..80d0201fa5454 100644
--- a/x-pack/platform/plugins/shared/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/relations_parameter.tsx
+++ b/x-pack/platform/plugins/shared/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/relations_parameter.tsx
@@ -203,7 +203,7 @@ export const RelationsParameter = () => {
}
);
return (
-
+