All the content props (headerContent, bodyContent, footerContent) can take a function which the Popover
diff --git a/packages/react-core/src/components/Progress/__tests__/Progress.test.tsx b/packages/react-core/src/components/Progress/__tests__/Progress.test.tsx
index 1d666155b1a..24194cb6e7b 100644
--- a/packages/react-core/src/components/Progress/__tests__/Progress.test.tsx
+++ b/packages/react-core/src/components/Progress/__tests__/Progress.test.tsx
@@ -49,7 +49,7 @@ test('value scaled between minValue and maxValue', () => {
});
describe('Progress size', () => {
- Object.keys(ProgressSize).forEach(oneSize => {
+ Object.keys(ProgressSize).forEach((oneSize) => {
test(oneSize, () => {
const { asFragment } = render(
);
expect(asFragment()).toMatchSnapshot();
@@ -58,7 +58,7 @@ describe('Progress size', () => {
});
describe('Progress variant', () => {
- Object.keys(ProgressVariant).forEach(oneVariant => {
+ Object.keys(ProgressVariant).forEach((oneVariant) => {
test(oneVariant, () => {
const { asFragment } = render(
@@ -69,7 +69,7 @@ describe('Progress variant', () => {
});
describe('Progress measure location', () => {
- Object.keys(ProgressMeasureLocation).forEach(oneLocation => {
+ Object.keys(ProgressMeasureLocation).forEach((oneLocation) => {
test(oneLocation, () => {
const { asFragment } = render(
@@ -99,10 +99,10 @@ test('progress component generates console warning when no accessible name is pr
});
test('Does not render helper text by default', () => {
- render(
);
+ render(
);
expect(screen.queryByText('Test helper text')).not.toBeInTheDocument();
-})
+});
test('Renders passed helper text', () => {
render(
);
diff --git a/packages/react-core/src/components/ProgressStepper/__tests__/ProgressStep.test.tsx b/packages/react-core/src/components/ProgressStepper/__tests__/ProgressStep.test.tsx
index a493d3d2d5a..1fb64297dee 100644
--- a/packages/react-core/src/components/ProgressStepper/__tests__/ProgressStep.test.tsx
+++ b/packages/react-core/src/components/ProgressStepper/__tests__/ProgressStep.test.tsx
@@ -150,7 +150,7 @@ test('Does not renders with aria-labelledBy by default on Component element', ()
test('Renders with an accessible name that matches children', () => {
render(
-
Popover content
} id="test-id" titleId="title-id">
+ Popover content
} id="test-id" titleId="title-id">
Test
);
diff --git a/packages/react-core/src/components/SearchInput/__tests__/SearchInput.test.tsx b/packages/react-core/src/components/SearchInput/__tests__/SearchInput.test.tsx
index df074772b64..b60eb19d9a8 100644
--- a/packages/react-core/src/components/SearchInput/__tests__/SearchInput.test.tsx
+++ b/packages/react-core/src/components/SearchInput/__tests__/SearchInput.test.tsx
@@ -6,10 +6,12 @@ import userEvent from '@testing-library/user-event';
import { SearchInput } from '../SearchInput';
import { FormGroup } from '../../Form';
import { Button } from '../../Button';
-import { ExternalLinkSquareAltIcon } from '@patternfly/react-icons';
+import ExternalLinkSquareAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-square-alt-icon';
import badgeStyles from '@patternfly/react-styles/css/components/Badge/badge';
import textInputGroupStyles from '@patternfly/react-styles/css/components/TextInputGroup/text-input-group';
+jest.mock('../../../helpers/OUIA/ouia');
+
const props = {
onChange: jest.fn(),
value: 'test input',
@@ -80,9 +82,9 @@ describe('SearchInput', () => {
});
test('hide clear button', () => {
- const { onClear, ...testProps } = props;
-
- render();
+ render(
+
+ );
expect(screen.queryByRole('button', { name: 'Reset' })).not.toBeInTheDocument();
});
@@ -146,9 +148,7 @@ describe('SearchInput', () => {
test('advanced search with custom attributes and appendTo="inline', async () => {
const user = userEvent.setup();
- const { container } = render(
-
- );
+ render();
await user.click(screen.getByRole('button', { name: 'Open advanced search' }));
@@ -158,7 +158,7 @@ describe('SearchInput', () => {
test('advanced search with custom attributes and appendTo external DOM element', async () => {
const user = userEvent.setup();
- const { container } = render(
+ render(
);
@@ -252,9 +252,6 @@ test('toggleAriaLabel is applied to the expandable toggle', () => {
});
test('Utilities are rendered when areUtilitiesDisplayed is set', () => {
- render(
-
- );
+ render();
expect(screen.getByLabelText('test-util-display')).toBeVisible();
});
-
diff --git a/packages/react-core/src/components/SearchInput/__tests__/__snapshots__/SearchInput.test.tsx.snap b/packages/react-core/src/components/SearchInput/__tests__/__snapshots__/SearchInput.test.tsx.snap
index 24719463b95..2a687388f8f 100644
--- a/packages/react-core/src/components/SearchInput/__tests__/__snapshots__/SearchInput.test.tsx.snap
+++ b/packages/react-core/src/components/SearchInput/__tests__/__snapshots__/SearchInput.test.tsx.snap
@@ -52,9 +52,6 @@ exports[`SearchInput advanced search 1`] = `
aria-disabled="false"
aria-label="Reset"
class="pf-v5-c-button pf-m-plain"
- data-ouia-component-id="OUIA-Generated-Button-plain-17"
- data-ouia-component-type="PF5/Button"
- data-ouia-safe="true"
type="button"
>