I have some e2e tests written in Protractor. Some of my tests execute stuff that causes an alert to show (uib-alert). The tests run fine and can find and verify the alerts, but if I use the tag dismiss-on-timeout from uib-alert, the tests fail because protractor waits for the timeout before doing the asserts.
Issues: https://github.com/angular-ui/bootstrap/pull/2798 and https://github.com/angular/protractor/issues/169
So, I want to create my alerts without the dismiss-on-timeout tag when running protractor.
My alerts are created by a Service like this:
angular.module('MyApp').factory("AlertService", function (...
How can I override this on Protractor? I am trying to use browser.addMockModule('AlertService', mock) but that doesn't work...