chore: Expand withTooltip unit tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2023-04-20 09:01:21 -04:00
1 parent 4f4c7e7b56
commit 4bb37df1cd
2 files changed
+146 -37

No files matched your search

@@ -10,32 +10,85 @@ exports[`withTooltip tests does not render a tooltip when not specified 1`] = `
</body>
`;
exports[`withTooltip tests renders a tooltip when specified 1`] = `
<body>
<div>
<div>
foobar
</div>
</div>
</body>
`;
exports[`withTooltip tests renders a tooltip when specified via tooltip props 1`] = `
<body>
<div>
<div>
foobar
</div>
</div>
</body>
`;
exports[`withTooltip tests renders a tooltip when specified without id 1`] = `
<body>
<div>
<div>
<div
id="tooltip_target_2"
>
foobar
<div />
</div>
</div>
</body>
`;
exports[`withTooltip tests when a tooltip ReactNode and id is specified renders 1`] = `
<body>
<div>
<div
data-testid="my-test-id"
id="bat"
>
foobar
<div />
</div>
</div>
</body>
`;
exports[`withTooltip tests when a tooltip ReactNode and id is specified when hovering the component renders 1`] = `
<body>
<div>
<div
data-testid="my-test-id"
id="bat"
>
foobar
<div />
</div>
</div>
<div
class="Tooltip narrow right formatter"
role="tooltip"
style="left: 10px; top: 0px;"
>
my-tooltip
</div>
</body>
`;
exports[`withTooltip tests when a tooltip via props and id is specified renders 1`] = `
<body>
<div>
<div
data-testid="my-test-id"
id="bat"
>
foobar
<div />
</div>
</div>
</body>
`;
exports[`withTooltip tests when a tooltip via props and id is specified when hovering the component renders 1`] = `
<body>
<div>
<div
data-testid="my-test-id"
id="bat"
>
foobar
<div />
</div>
</div>
<div
class="Tooltip narrow right formatter"
role="tooltip"
style="left: 10px; top: 0px;"
>
my-tooltip
</div>
</body>
`;