Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds display prop to EuiTooltip for common display block needs #4148

Merged
merged 11 commits into from
Oct 21, 2020
Prev Previous commit
Next Next commit
Add test for display=block
  • Loading branch information
glitteringkatie committed Oct 20, 2020
commit 70507aeb4ff4fa2380e96f59a8995df52c8abde1
10 changes: 10 additions & 0 deletions src/components/tool_tip/__snapshots__/tool_tip.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`EuiToolTip applies our block stylings 1`] = `
<span
class="euiToolTipAnchor eui-displayBlock"
>
<button>
Trigger
</button>
</span>
`;

exports[`EuiToolTip is rendered 1`] = `
<span
class="euiToolTipAnchor"
15 changes: 15 additions & 0 deletions src/components/tool_tip/tool_tip.test.tsx
Original file line number Diff line number Diff line change
@@ -54,4 +54,19 @@ describe('EuiToolTip', () => {
await sleep(260); // wait for showToolTip setTimout
expect(takeMountedSnapshot(component)).toMatchSnapshot();
});

test('applies our block stylings', async () => {
snide marked this conversation as resolved.
Show resolved Hide resolved
const component = render(
<EuiToolTip
title="title"
id="id"
content="content"
{...requiredProps}
display="block">
<button>Trigger</button>
</EuiToolTip>
);

expect(component).toMatchSnapshot();
});
});