diff --git a/packages/react-core/src/components/Tooltip/__tests__/Generated/TooltipArrow.test.tsx b/packages/react-core/src/components/Tooltip/__tests__/Generated/TooltipArrow.test.tsx
deleted file mode 100644
index f287f2e83a6..00000000000
--- a/packages/react-core/src/components/Tooltip/__tests__/Generated/TooltipArrow.test.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * This test was generated
- */
-import * as React from 'react';
-import { render } from '@testing-library/react';
-import { TooltipArrow } from '../../TooltipArrow';
-// any missing imports can usually be resolved by adding them here
-import {} from '../..';
-
-it('TooltipArrow should match snapshot (auto-generated)', () => {
- const { asFragment } = render();
- expect(asFragment()).toMatchSnapshot();
-});
diff --git a/packages/react-core/src/components/Tooltip/__tests__/Generated/TooltipContent.test.tsx b/packages/react-core/src/components/Tooltip/__tests__/Generated/TooltipContent.test.tsx
deleted file mode 100644
index 7eb9dee9bc8..00000000000
--- a/packages/react-core/src/components/Tooltip/__tests__/Generated/TooltipContent.test.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * This test was generated
- */
-import * as React from 'react';
-import { render } from '@testing-library/react';
-import { TooltipContent } from '../../TooltipContent';
-// any missing imports can usually be resolved by adding them here
-import {} from '../..';
-
-it('TooltipContent should match snapshot (auto-generated)', () => {
- const { asFragment } = render(
- ReactNode
} isLeftAligned={true} />
- );
- expect(asFragment()).toMatchSnapshot();
-});
diff --git a/packages/react-core/src/components/Tooltip/__tests__/Generated/__snapshots__/TooltipArrow.test.tsx.snap b/packages/react-core/src/components/Tooltip/__tests__/Generated/__snapshots__/TooltipArrow.test.tsx.snap
deleted file mode 100644
index be054814faa..00000000000
--- a/packages/react-core/src/components/Tooltip/__tests__/Generated/__snapshots__/TooltipArrow.test.tsx.snap
+++ /dev/null
@@ -1,9 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`TooltipArrow should match snapshot (auto-generated) 1`] = `
-
-
-
-`;
diff --git a/packages/react-core/src/components/Tooltip/__tests__/Generated/__snapshots__/TooltipContent.test.tsx.snap b/packages/react-core/src/components/Tooltip/__tests__/Generated/__snapshots__/TooltipContent.test.tsx.snap
deleted file mode 100644
index f4aa189e4f9..00000000000
--- a/packages/react-core/src/components/Tooltip/__tests__/Generated/__snapshots__/TooltipContent.test.tsx.snap
+++ /dev/null
@@ -1,13 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`TooltipContent should match snapshot (auto-generated) 1`] = `
-
-
-
- ReactNode
-
-
-
-`;
diff --git a/packages/react-core/src/components/Tooltip/__tests__/Tooltip.test.tsx b/packages/react-core/src/components/Tooltip/__tests__/Tooltip.test.tsx
index 5b8ff267fe1..d090f6ca5b9 100644
--- a/packages/react-core/src/components/Tooltip/__tests__/Tooltip.test.tsx
+++ b/packages/react-core/src/components/Tooltip/__tests__/Tooltip.test.tsx
@@ -1,43 +1,206 @@
-import * as React from 'react';
-import { render } from '@testing-library/react';
+import React from 'react';
+import { render, screen } from '@testing-library/react';
import { Tooltip } from '../Tooltip';
+import userEvent from '@testing-library/user-event';
+import styles from '@patternfly/react-styles/css/components/Tooltip/tooltip';
-test('tooltip renders', () => {
- const ref = React.createRef();
- const { asFragment } = render(
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id feugiat augue, nec fringilla turpis.
-
- }
- >
-
Toggle tooltip
+jest.mock('../../../helpers/Popper/Popper');
+
+test('Renders with class name pf-v5-c-tooltip by default', async () => {
+ render();
+
+ const tooltip = await screen.findByRole('tooltip');
+ expect(tooltip).toHaveClass(styles.tooltip);
+});
+
+test('Renders with custom class names provided via prop', async () => {
+ render();
+
+ const tooltip = await screen.findByRole('tooltip');
+ expect(tooltip).toHaveClass('test-class');
+});
+
+test('Renders with aria-live of off by default when triggerRef is not passed', async () => {
+ render();
+
+ const tooltip = await screen.findByRole('tooltip');
+ expect(tooltip).toHaveAttribute('aria-live', 'off');
+});
+
+test('Renders with aria-live of polite by default when triggerRef is passed', async () => {
+ const triggerRef = React.createRef();
+ render();
+
+ const tooltip = await screen.findByRole('tooltip');
+ expect(tooltip).toHaveAttribute('aria-live', 'polite');
+});
+
+test('Renders with value passed to aria-live prop', async () => {
+ render();
+
+ const tooltip = await screen.findByRole('tooltip');
+ expect(tooltip).toHaveAttribute('aria-live', 'polite');
+});
+
+test('Renders with value passed to id prop', async () => {
+ render();
+
+ const tooltip = await screen.findByRole('tooltip');
+ expect(tooltip).toHaveAttribute('id', 'custom-id');
+});
+
+test('Renders with maxWidth styling applied when maxWidth is passed', async () => {
+ render();
+
+ const tooltip = await screen.findByRole('tooltip');
+ expect(tooltip).toHaveStyle('max-width: 100px');
+});
+
+test('Renders with aria-describedby on trigger by default', async () => {
+ render(
+
+
+
+ );
+
+ await screen.findByRole('tooltip');
+ expect(screen.getByRole('button')).toHaveAccessibleDescription('Test content');
+});
+
+test('Renders with aria-labelledby on trigger when aria="labelledby" is passed', async () => {
+ render(
+
+
);
- expect(asFragment()).toMatchSnapshot();
-});
-
-test('tooltip renders in strict mode', () => {
- const consoleError = jest.spyOn(console, 'error');
- const ref = React.createRef();
- const { asFragment } = render(
-
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id feugiat augue, nec fringilla turpis.
-