File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ describe('tooltip props', () => {
99
99
expect ( container ) . toMatchSnapshot ( )
100
100
} )
101
101
102
- test ( 'tooltip with delay show' , async ( ) => {
102
+ test . only ( 'tooltip with delay show' , async ( ) => {
103
103
const { container } = render (
104
104
< TooltipProps id = "example-delay-show" content = "Hello World!" delayShow = { 300 } /> ,
105
105
)
@@ -111,10 +111,10 @@ describe('tooltip props', () => {
111
111
expect ( screen . queryByRole ( 'tooltip' ) ) . not . toBeInTheDocument ( )
112
112
} )
113
113
114
- const tooltip = await screen . findByRole ( 'tooltip' )
115
- expect ( tooltip ) . toHaveAttribute ( 'style' )
114
+ await waitFor ( ( ) => {
115
+ expect ( screen . queryByRole ( 'tooltip' ) ) . toHaveClass ( 'react-tooltip__show' )
116
+ } )
116
117
117
- expect ( tooltip ) . toBeInTheDocument ( )
118
118
expect ( container ) . toMatchSnapshot ( )
119
119
} )
120
120
You can’t perform that action at this time.
0 commit comments