My angularJS application using event-steaming and it keeps open the http event-steam request and listening server events. So my problem is when protractor start testing of my angularJS application, it keeps wait to complete event-stream request as i am using ignoreSynchronization=false so protractor waits until it gets timeout as event-stream http request never going to finish. So i would like to teach my protractor to ignore such event-stream $http tasks and proceed testing of my application. These event-stream is implemented throughout of my application so every time there is event-stream request then protractor getting timeout.
The following error i am getting when its timeout: Failed: Timed out waiting for asynchronous Angular tasks to finish after 300 seconds. This may be because the current page is not an Angular application. Please see the FAQ for more details: https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular. The following tasks were pending: - $http: https://example.com/custom/xxx/sse
Can anyone please help me to get rid of this issue?
Thanks @quirimmo for your valuable response.
We can achieve timeout issue without using mocked backend calls by simply modifying http request and setting timeout to http request so that protractor waits till the request get timeout which we already set(Timeout will close the long running http requests) and executes further statements.