import { waitForRenderReady } from '@ringcentral-integration/test-utils/lib/test-utils' ; import { fireEvent , screen } from '@testing-library/react' ; import { StepFunction } from '../../../lib/step' ; export const SearchContacts = async ( { content , } ) => { const searchInput = screen . getByTestId ( 'contactsSearchInput' ) ; jest . useFakeTimers ( ) ; fireEvent . change ( searchInput , { target : { value : content } } ) ; expect ( searchInput ) . toHaveAttribute ( 'value' , content ) ; await waitForRenderReady ( ) ; jest . runOnlyPendingTimers ( ) ; jest . useRealTimers ( ) ; await waitForRenderReady ( ) ; } ;