fixed #2400 - autoAcceptAlerts. Added tests