Skip to content

Commit eb0989d

Browse files
committed
cleanup
Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>
1 parent e0b9d9d commit eb0989d

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

packages/react-core/src/components/Truncate/__tests__/Truncate.test.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import styles from '@patternfly/react-styles/css/components/Truncate/truncate';
44
import '@testing-library/jest-dom';
55

66
jest.mock('../../Tooltip', () => ({
7-
Tooltip: ({ content, position, children, triggerRef, trigger, isVisible, ...props }) => (
8-
<div data-testid="Tooltip-mock" data-trigger-ref={triggerRef ? 'true' : 'false'} {...props}>
9-
<div data-testid="Tooltip-mock-content-container">Test {content}</div>
7+
Tooltip: ({ content, position, children, triggerRef, ...props }) => (
8+
<div data-testid="Tooltip-mock" {...props}>
9+
<div>Test {content}</div>
1010
<p>{`position: ${position}`}</p>
1111
{children}
1212
</div>
@@ -250,7 +250,6 @@ test('Tooltip appears on keyboard focus when external triggerRef is provided (Cl
250250
<Truncate
251251
content="This is a very long piece of content that should be truncated when the container is too small"
252252
tooltipProps={{ triggerRef: mockTriggerRef }}
253-
data-testid="truncate-element"
254253
/>
255254
);
256255

packages/react-core/src/components/Truncate/__tests__/__snapshots__/Truncate.test.tsx.snap

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@ exports[`Truncation with maxCharsDisplayed Matches snapshot with default positio
44
<DocumentFragment>
55
<div
66
data-testid="Tooltip-mock"
7-
data-trigger-ref="true"
87
>
9-
<div
10-
data-testid="Tooltip-mock-content-container"
11-
>
8+
<div>
129
Test Test truncation content
1310
</div>
1411
<p>
@@ -43,11 +40,8 @@ exports[`renders default truncation 1`] = `
4340
<DocumentFragment>
4441
<div
4542
data-testid="Tooltip-mock"
46-
data-trigger-ref="true"
4743
>
48-
<div
49-
data-testid="Tooltip-mock-content-container"
50-
>
44+
<div>
5145
Test Vestibulum interdum risus et enim faucibus, sit amet molestie est accumsan.
5246
</div>
5347
<p>
@@ -71,11 +65,8 @@ exports[`renders start truncation with &lrm; at start and end 1`] = `
7165
<DocumentFragment>
7266
<div
7367
data-testid="Tooltip-mock"
74-
data-trigger-ref="true"
7568
>
76-
<div
77-
data-testid="Tooltip-mock-content-container"
78-
>
69+
<div>
7970
Test Vestibulum interdum risus et enim faucibus, sit amet molestie est accumsan.
8071
</div>
8172
<p>

0 commit comments

Comments
 (0)