Add waitUntilTypesRefreshed(...)
Fix test