Skip to content

Commit

Permalink
Add test for display=block
Browse files Browse the repository at this point in the history
  • Loading branch information
Katie Hughes authored and Katie Hughes committed Oct 19, 2020
1 parent 09efa0f commit 8f15f3a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
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"
Expand Down
15 changes: 15 additions & 0 deletions src/components/tool_tip/tool_tip.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,19 @@ describe('EuiToolTip', () => {
await sleep(260); // wait for showToolTip setTimout
expect(takeMountedSnapshot(component)).toMatchSnapshot();
});

test('applies our block stylings', async () => {
const component = render(
<EuiToolTip
title="title"
id="id"
content="content"
{...requiredProps}
display="block">
<button>Trigger</button>
</EuiToolTip>
);

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

0 comments on commit 8f15f3a

Please sign in to comment.