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

Commit 2b137d89 authored by Cassy Chun-Crogan's avatar Cassy Chun-Crogan
Browse files

[DocsUI] Clear selection properly in tests

Follow up to ag/33285246 which finds the cancel/clear selection
button within the now selection_bar rather than the toolbar.

Bug: 412895530
Test: atest FileCopyUiTest
Test: atest FilesActivityUiTest
Test: atest InternalStorageUiTest
Test: atest PeekUiTest
Test: atest SearchViewUiTest
Flag: com.android.documentsui.flags.use_material3
Change-Id: I557463a4b45f26905b720d53875132c343205feb
parent 89bd1404
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -244,8 +244,9 @@ 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("Cancel"),
                isDescendantOfA(withId(R.id.toolbar)))).perform(click());
                isDescendantOfA(withId(parentId)))).perform(click());
    }

    public void pasteFilesFromClipboard() {