Use waitWithTimeout in frontend test