diff options
author | 2025-03-19 04:09:59 +0000 | |
---|---|---|
committer | 2025-03-18 21:11:55 -0700 | |
commit | 8d4432f9bc6477c8f10c50f7513b99fc4a2f528b (patch) | |
tree | 4cf8f48d2bea7cf47b6c891be63557b8fadfc473 | |
parent | 5e1e9d112b6fb533a3d41f0feaf91b2781e319f8 (diff) |
[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
-rw-r--r-- | tests/common/com/android/documentsui/bots/DirectoryListBot.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/common/com/android/documentsui/bots/DirectoryListBot.java b/tests/common/com/android/documentsui/bots/DirectoryListBot.java index 314013e53..8884bf0f2 100644 --- a/tests/common/com/android/documentsui/bots/DirectoryListBot.java +++ b/tests/common/com/android/documentsui/bots/DirectoryListBot.java @@ -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 { |