[Autofill Assistant] Fix flaky/failing UI tests.
This CL fixes two bugs that caused flaky AA tests involving the bottom sheet: - First, the tests were waiting for |isDisplayed()| and then immediately calling |perform(click())|. This is flaky, because |isDisplayed()| succeeds with widets that are >= 50% on screen, but |perform(click))| requires >= 90%. During the initial bottom sheet animation, it was possible to click the button before it was completely visible. - Second, and more importantly, |waitUntilViewMatchesCondition| did not correctly wait for the full duration. Rather, if a matching view exists that did not fulfill the specified condition, it would erroneously return, because the thrown exception in that case was an |AssertionError| rather than a |NoMatchingViewException|. b/142317318 Bug: 990118 Change-Id: I0c47e92ac8e77ae804eff5f05ac2c80ce9d77082 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1848372Reviewed-by:Stephane Zermatten <szermatt@chromium.org> Commit-Queue: Clemens Arbesser <arbesser@google.com> Cr-Commit-Position: refs/heads/master@{#704122}
Showing
Please register or sign in to comment