Using window.location to get url in js tests