{"action":"opened","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/14118","repository_url":"https://api.github.com/repos/angular/angular.js","labels_url":"https://api.github.com/repos/angular/angular.js/issues/14118/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/14118/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/14118/events","html_url":"https://github.com/angular/angular.js/issues/14118","id":135875054,"number":14118,"title":"Consider allowing e2e test to ignore certain timeouts","user":{"login":"juliemr","id":2081709,"avatar_url":"https://avatars.githubusercontent.com/u/2081709?v=3","gravatar_id":"","url":"https://api.github.com/users/juliemr","html_url":"https://github.com/juliemr","followers_url":"https://api.github.com/users/juliemr/followers","following_url":"https://api.github.com/users/juliemr/following{/other_user}","gists_url":"https://api.github.com/users/juliemr/gists{/gist_id}","starred_url":"https://api.github.com/users/juliemr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliemr/subscriptions","organizations_url":"https://api.github.com/users/juliemr/orgs","repos_url":"https://api.github.com/users/juliemr/repos","events_url":"https://api.github.com/users/juliemr/events{/privacy}","received_events_url":"https://api.github.com/users/juliemr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-23T21:41:41Z","updated_at":"2016-02-23T21:41:41Z","closed_at":null,"body":"Based on a discussion we had about https://github.com/angular/protractor/issues/2950. Since this feature would require changes to Angular.js, moving discussion here.\r\n\r\nThe basic problem is that sometimes, apps have a long-running or repeating `$timeout` call for some reason. Protractor waits for all timeouts to finish before reporting stable, so this causes it fail for any tests on that page.\r\n\r\nAn example use case would be a page using a widget that they don't necessarily control the code for, which has a long running `$timeout`. Ideally, they'd be able to ignore this timeout without changing the code for the widget.\r\n\r\nMitigating, currently available solutions:\r\n - you can always turn off *all* waiting for Protractor using `browser.ignoreSynchronization = true` or by directly using `browser.driver.<method>`\r\n - If you control the offending app code, use `$interval` instead of `$timeout`\r\n\r\nPotential solutions that would require changes to angular:\r\n - Instead of waiting for there to be 0 timeouts, the test writer could pass in a number X, and we could wait for there to be `<= X`.\r\n - We could add yet another parameter to `$timeout` telling angular to ignore it for reporting stability\r\n - We could add some ability to name your timeouts, and let protractor pass in a list of timeouts it should ignore. Concerns here: name conflicts, names getting minified."}}