import { screen } from '@testing-library/react' ; import { formatContactPhoneNumber } from '../../../../modules/ContactDetailsUI' ; import { StepFunction } from '../../../lib/step' ; export const CheckContactNumberExist = ( { number } , { phone } ) => { const formatNumber = formatContactPhoneNumber ( number , phone . regionSettings . countryCode , phone . extensionInfo . isMultipleSiteEnabled , phone . extensionInfo . site ?. code ) ; const numberItem = screen . queryByTitle ( formatNumber ) ; expect ( numberItem ) . toBeInTheDocument ( ) ; } ;