Try to make tests more stable on CI

wait.forAngular in replacePreference