import { fireEvent , screen , waitForElementToBeRemoved , } from '@testing-library/react' ; import { StepFunction } from '../../../lib/step' ; export const CheckInfoTooltip = async ( { tooltipContent } ) => { const infoIcon = document . querySelector ( '[data-sign="callSettingInfo"] span' ) ; expect ( infoIcon ) . toBeInTheDocument ( ) ; fireEvent . mouseEnter ( infoIcon ) ; expect ( await screen . findByRole ( 'tooltip' ) ) . toHaveTextContent ( tooltipContent ) ; fireEvent . mouseLeave ( infoIcon ) ; await waitForElementToBeRemoved ( ( ) => screen . getByRole ( 'tooltip' ) ) ; } ;