Add view waiting function as test util
The added function |waitForView| repeatedly checks all views in a group until either a view was found that matches the given matcher. If this doesn't happen within a certain time or multiple views are matched, it fails the test. This simplifies UI tests by: - reducing flakiness, e.g. introduced due to animations - removing the need for sleeps or other timers. - reducing code duplication due to providing a central implementation Upcoming CLs that would benefit greatly from this: https://crrev.com/c/951588 and https://crrev.com/c/951764 Change-Id: Ibb6a0dcd2eb688467c4af1eaa82341f84e7e8bc6 Reviewed-on: https://chromium-review.googlesource.com/951688 Commit-Queue: Friedrich Horschig <fhorschig@chromium.org> Reviewed-by:Bernhard Bauer <bauerb@chromium.org> Cr-Commit-Position: refs/heads/master@{#542172}
Showing
Please register or sign in to comment