Wait 5 seconds instead of 2 for the overlay to close. We should try to get rid of a static timeout, not sure this is possible though.
Try to make test a bit more robust.