Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b69e294 authored by Jeremie Boulic's avatar Jeremie Boulic
Browse files

[DocsUI] Fix UiBot action bar race condition

In functional tests, when selecting an action through the 3-dot menu,
the action label was clicked immediately after the menu was shown,
which was sometimes flaky. `waitForIdle` make these actions reliable.

Bug: 382163274
Flag: TEST_ONLY
Test: Observing a slight and consistent delay between the click to
show the action menu, and the click on the the action label
Test: DocumentsUIGoogleTests:com.android.documentsui.peek.PeekUiTest
passes consistently

Change-Id: I9218f29db2f403e21f73f14a07385b91b0c91ec3
parent c6c97f12
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -238,6 +238,7 @@ public class UiBot extends Bots.BaseBot {
        } else {
            onView(ACTIONBAR_OVERFLOW).perform(click());
        }
        mDevice.waitForIdle();
        // Click the item by label, since Espresso doesn't support lookup by id on overflow.
        onView(withText(label)).perform(click());
    }