-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use Protractor at all; tests hang if database.list()
is called
#779
Comments
database.list()
is calleddatabase.list()
is called
@sdebaun From what I understand, Protractor doesn't work great with Web Sockets and therefore the Firebase SDK. Your best option right now is ignoring synchronization. I've spoken with the team about improving things but nothing is planned at the moment. Since this has been awhile, is there anything you have discovered? |
The problem is that the firebase sdk is setting up some long running intervals and timeouts. The database client for example sends a heartbeat every 45 seconds, which you can see in the frames of the WebSocket connection in the network tab of your browser. But just calling |
I'm experiencing the same problem. After having spent an entire day trying to figure out why all my Protractor test were failing, I realised that either removing my Firebase service from the project or ignoring synchronization fixed the issue. |
Another solution not to loose the Angular integration with Protractor, is to extend the timeout limit. Here my
|
Closing for now as it's not a angularfire2 issue. If there's something the Firebase JS SDK can do to make things more testable please open an issue there. |
@jamesdaniels is it possible to run firebase outside of the angular zone? http://www.protractortest.org/#/timeouts#angular Seems like blaugold/firebase-rxjs is doing something of the sort. I'm not sure if it should or can be a part of angularfire2, or if it should be a part of the SDK. Should be related to firebase/firebase-js-sdk#119 |
Any updates on this. Being able to run firebase outside of the angular zone would solve so many issues with automation |
Protractor tests hang if
database.list()
is calledAdded a comment to #225 but that issue is closed and im not sure if my comment will get it noticed. Apologies for double-posting.
Version info
Angular: latest released
Firebase: latest released
AngularFire: latest released
How to reproduce these conditions
Minimal repro in this repo:
https://github.com/sdebaun/af-protractor-test
Steps to set up and reproduce
ng new
npm install --save angularfire2 firebase
import
AngularFireModule
inAppModule
add constructor with AngularFire to
app.component.ts
ng serve
andng e2e
, y voila!Expected behavior
To not have the test timeout waiting for angular
Actual behavior
It times out waiting for angular
The text was updated successfully, but these errors were encountered: