import { screen , waitFor } from '@testing-library/react' ; import { StepFunction } from '../../../lib/step' ; export const CheckAlertAutoDismiss = async ( { ttl = 5000 , } = { } ) => { await waitFor ( ( ) => { expect ( screen . queryAllByTestId ( 'alert' ) . length ) . toBe ( 0 ) ; } , { timeout : ttl + 1000 } ) ; } ;