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', () => {
9999 expect ( container ) . toMatchSnapshot ( )
100100 } )
101101
102- test ( 'tooltip with delay show' , async ( ) => {
102+ test . only ( 'tooltip with delay show' , async ( ) => {
103103 const { container } = render (
104104 < TooltipProps id = "example-delay-show" content = "Hello World!" delayShow = { 300 } /> ,
105105 )
@@ -111,10 +111,10 @@ describe('tooltip props', () => {
111111 expect ( screen . queryByRole ( 'tooltip' ) ) . not . toBeInTheDocument ( )
112112 } )
113113
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+ } )
116117
117- expect ( tooltip ) . toBeInTheDocument ( )
118118 expect ( container ) . toMatchSnapshot ( )
119119 } )
120120
You can’t perform that action at this time.
0 commit comments