I have a simple service for displaying flash messages https://github.com/lucassus/mongo_browser/blob/master/app/assets/javascripts/app/services.js.coffee#L31 and I'm trying to test it in e2e specs https://github.com/lucassus/mongo_browser/blob/master/spec/javascripts/e2e/databases_scenario.js.coffee#L66 I use $timeout service to hide a flash message after 3 seconds.
I noticed that e2e scenario runner blocks until the timeout flushes and I'm not able to check whether the flash message has been shown.
How to test features with $timeout in e2e specs? Is it possible to test this kind of behavior without injecting mock services into the real application?
testmode I'm injecting a service without a timeout.