Having an app based on firebase DB - where items are loaded asynchronously (e.g. into RecyclerView) via Firebase callbacks - how would we define Espresso check?
Using a custom IdlingResource
seems problematic, because ChildEventListener
's onChildAdded
callback, does not tell us whether a given child is the last one (or does it?).
Is there a way to tell when Firebase is "idle"?
Is it perhaps against the spirit of Firebase to consider it "idle" at any time?
Then perhaps we can define "locally idle"? Meaning no locally initiated request callbacks (to fetch initial items) are pending... (as opposed to new stuff that can come from the network at any time).