import { fireEvent , screen } from '@testing-library/react' ; import { StepFunction } from '../../lib/step' ; export const CheckNavigationButton = async ( { id , tooltip } ) => { const navigationBtn = screen . getByTestId ( id ) ; /** Tooltips */ expect ( screen . queryByText ( tooltip ) ) . toBeNull ( ) ; fireEvent . mouseEnter ( navigationBtn ) ; const tooltipItem = await screen . findByText ( tooltip ) ; expect ( tooltipItem ) . not . toBeNull ( ) ; } ;