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

Commit 8d4432f9 authored by Jeremie Boulic's avatar Jeremie Boulic
Browse files

[DocsUI M3] Fix DirectoryListBot when M3 enabled

The DirectoryListBot implements "selectDocument" for functional test,
relying on the document's icon as a click location. Update the icon
ID based on the changes made in ag/31870100.

The icon_wrapper that we now rely on is also available in list mode,
when M3 is enabled.

Flag: com.android.documentsui.flags.use_material3
Test: com.android.documentsui.*UiTest
Bug: 381962394
Change-Id: I2d835857ac7431b8a68491ba7d05bb27f7567f52
parent 5e1e9d11
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.documentsui.bots;

import static com.android.documentsui.util.FlagUtils.isUseMaterial3FlagEnabled;

import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertNotNull;
@@ -71,7 +73,7 @@ public class DirectoryListBot extends Bots.BaseBot {
        mDirListId = mTargetPackage + ":id/dir_list";
        mItemRootId = mTargetPackage + ":id/item_root";
        mPreviewId = mTargetPackage + ":id/preview_icon";
        mIconId = mTargetPackage + ":id/icon";
        mIconId = mTargetPackage + (isUseMaterial3FlagEnabled() ? ":id/icon_wrapper" : ":id/icon");
    }

    public void assertDocumentsCount(int count) throws UiObjectNotFoundException {