atecarlos / protractor-http-mock

A library designed to work alongside Protractor for setting up mocks for your HTTP ajax requests.
MIT License
173 stars 70 forks source link

Incompatibility with angular-loading-bar #112

Closed barroudjo closed 7 years ago

barroudjo commented 7 years ago

Using all the latest versions, if I attempt to use angular-loading-bar and protractor-http-mock still results in the impossibility to make protractor work. More precisely, once both libraries have been used, it seems protractor loses control over the browser. When in protractor repl, even a simple browser.getTitle() results in a timeout.

Any idea on this issue ? BTW here's the repo created by someone else to highlight the problem: https://github.com/Crevil/Test-protractor-mock-loading-bar.

atecarlos commented 7 years ago

Hi @barroudjo . I apologize I haven't had the time to look into this. Have you been able to make any progress in figuring out a potential solution?

barroudjo commented 7 years ago

The solution that I used was to "mock-out" angular-loading-bar on protractor tests (by using the possibility to add angular modules from protractor). It's a workaround though, not a real solution. If you found a way to keep the loading bar it'd be great !

atecarlos commented 7 years ago

@barroudjo is this the error you are getting?

Failures: 1) angular-loading-bar and protractor-http-mock should resolve data with loading bar Message: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. Stack: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5)

atecarlos commented 7 years ago

@barroudjo this PR addresses an issue with angular loading bar. Hopefully this solves the problem once and for all once it's merged in.

https://github.com/atecarlos/protractor-http-mock/pull/121