Fix tests around urls opened with window.open