Avoid Protractor Test Synchronization Timeouts During Long Polling
Angularjs recently introduced $ interval, an analogue of setInterval, to avoid cases where Protractor thought the page was still loading when it was actually polled.
However, this fix does not help in lengthy polling scenarios where the connection is open for x milliseconds and then closed by the server. Is there a workaround so Protractor will run the tests correctly?
+3
source to share
1 answer
Why is it wrong?
$interval(function () {
MySrvc.pollServer();
}, 1000 * 60 * 3, 1);
If you're only interested in doing it once, then just say it in the third argumentcount
. Then your tests will pass as usual without the scary thing browser.ignoreSynchronization
.
+2
source to share