The DrawWidgetTest and SignatureWidgetTest appear to be failing on most runs on Test Lab but not in a predictable manner. The actual failure appears to be:
androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: with id: org.odk.collect.android:id/jumpEndButton
I'm pretty sure the problem is related to orientation changes...
in those tests, we use DrawActivity which works in landscape mode. When a user returns from that activity to DrawWidget/SignatureWidget a rotation will take place landscape->portrait. It might take some time and probably it's the cause.
What do you think about calling waitForIdleSync every time we get back from that activity to wait for the rotation end?
@grzesiek2010 my impression is that Espresso should be doing that for us but it's definitely worth a try. I hadn't thought about the screen rotations and it wouldn't surprise me if that messes with Espresso...
@seadowg so maybe let's try it https://github.com/opendatakit/collect/pull/3277
@grzesiek2010 do you think it's worth merging in #3276 first as a temporary measure or are you pretty close with #3277?
Hello @grzesiek2010, you claimed this issue to work on it, but this issue and any referenced pull requests haven't been updated for 10 days. Are you still working on this issue?
If so, please update this issue by leaving a comment on this issue to let me know that you're still working on it. Otherwise, I'll automatically remove you from this issue in 5 days.
If you've decided to work on something else, simply comment @opendatakit-bot unclaim so that someone else can claim it and continue from where you left off.
Thank you for your valuable contributions to Open Data Kit!
Sorry I should have closed this with #3276.
Most helpful comment
I'm pretty sure the problem is related to orientation changes...
in those tests, we use DrawActivity which works in landscape mode. When a user returns from that activity to DrawWidget/SignatureWidget a rotation will take place landscape->portrait. It might take some time and probably it's the cause.
What do you think about calling waitForIdleSync every time we get back from that activity to wait for the rotation end?
https://stackoverflow.com/a/38860384