Skip to content

Commit

Permalink
test: fix delay show test
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieljablonski committed Feb 18, 2024
1 parent 2afd043 commit aed9d32
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/tooltip-props.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('tooltip props', () => {
expect(container).toMatchSnapshot()
})

test('tooltip with delay show', async () => {
test.only('tooltip with delay show', async () => {
const { container } = render(
<TooltipProps id="example-delay-show" content="Hello World!" delayShow={300} />,
)
Expand All @@ -111,10 +111,10 @@ describe('tooltip props', () => {
expect(screen.queryByRole('tooltip')).not.toBeInTheDocument()
})

const tooltip = await screen.findByRole('tooltip')
expect(tooltip).toHaveAttribute('style')
await waitFor(() => {
expect(screen.queryByRole('tooltip')).toHaveClass('react-tooltip__show')
})

expect(tooltip).toBeInTheDocument()
expect(container).toMatchSnapshot()
})

Expand Down

0 comments on commit aed9d32

Please sign in to comment.