Open cee-dee opened 2 years ago
Same problem
@cee-dee @AlexeyRybakov what do you mean under "long-loading items"? If it some view what related on async calls - you may use IdleResources for it. Otherwise it those views is "long-loaded" because of device performance it should't be a problem because it will block UI thread.
@Unlimity please leave you comments
If your RecyclerView's adapter and layout manager cannot layout all children in a single layout pass - there is not much Espresso and Kakao can do for you. You either need to optimize your RecyclerView to be able to layout all items in adapter as it is expected by the system, or use your own extension or try/catch with retry blocks in the test itself. This is a very specific corner case and is not system expected behavior, so I don't see a lot of value into supporting it as part of the library.
Steps to reproduce:
scrollToEnd()
in a UI testObserved Results:
The code
throws a
NullPointerException
becauselastView
isnull
.Expected Results:
I expected the RecyclerView just to scroll down to have the last item fully visible.
Relevant Code:
Workaround:
I've created an extension function to still be able to do what I'd like to do:
While this does what it's supposed to do, I think, there must be a better solution using interceptors which fit's more naturally into Kakaos concepts, i.e. making the
repetions
parameter superfluous.