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

Commit 5ea0ea7d authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[DocsUI] Update clearSelection() method to use "Cancel" text too" into main

parents a256c847 b743bc0f
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -243,8 +243,11 @@ public class DirectoryListBot extends Bots.BaseBot {
     * Clicks the "X" cancel selection button.
     */
    public void clearSelection() {
        int parentId = isUseMaterial3FlagEnabled() ? R.id.selection_bar : R.id.toolbar;
        onView(allOf(withContentDescription(R.string.clear_selection),
        int parentId = isUseMaterial3FlagEnabled()
                ? R.id.selection_bar : androidx.appcompat.R.id.action_mode_bar;
        int contentDescription = isUseMaterial3FlagEnabled()
                ? R.string.clear_selection : android.R.string.cancel;
        onView(allOf(withContentDescription(contentDescription),
                isDescendantOfA(withId(parentId)))).perform(click());
    }