diff --git a/src/test/__snapshots__/tooltip-props.spec.js.snap b/src/test/__snapshots__/tooltip-props.spec.js.snap index face6e5c..9dc8d750 100644 --- a/src/test/__snapshots__/tooltip-props.spec.js.snap +++ b/src/test/__snapshots__/tooltip-props.spec.js.snap @@ -100,6 +100,28 @@ exports[`tooltip props tooltip with delay show 1`] = ` `; +exports[`tooltip props tooltip with disableTooltip return false 1`] = ` +
+ + Lorem Ipsum + + +`; + exports[`tooltip props tooltip with float 1`] = `
{ expect(tooltip).toBeInTheDocument() expect(container).toMatchSnapshot() }) + + test('tooltip with disableTooltip return true', async () => { + render( + true} + />, + ) + const anchorElement = screen.getByText('Lorem Ipsum') + await userEvent.hover(anchorElement) + + expect(screen.queryByRole('tooltip')).not.toBeInTheDocument() + }) + + test('tooltip with disableTooltip return false', async () => { + const { container } = render( + false} + />, + ) + const anchorElement = screen.getByText('Lorem Ipsum') + await userEvent.hover(anchorElement) + + const tooltip = await screen.findByRole('tooltip') + + expect(tooltip).toBeInTheDocument() + expect(container).toMatchSnapshot() + }) })