From 3759f1428b5fc3b294b5e748447461bcfec8e5ce Mon Sep 17 00:00:00 2001 From: Brandon Dayauon Date: Mon, 14 Apr 2025 10:38:10 -0700 Subject: [PATCH] Update Tapl test for Private Space Add button See artifact: https://android-build.corp.google.com/test_investigate/invocation/I00100010386298382/test/TR74629693245670294/?itab=tests&ttab=artifacts When aconfig flag is moved to staging the button is now "Add" rather than "Install" which will need to fix. bug: 360313403 Test: presubmit Flag: android.multiuser.enable_moving_content_into_private_space Change-Id: I3a3e658d1a9d2b9d0795b5cef5d062ddfbe2b8ba --- .../com/android/launcher3/tapl/PrivateSpaceContainer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/tapl/com/android/launcher3/tapl/PrivateSpaceContainer.java b/tests/tapl/com/android/launcher3/tapl/PrivateSpaceContainer.java index a2814f0302..c33b928c33 100644 --- a/tests/tapl/com/android/launcher3/tapl/PrivateSpaceContainer.java +++ b/tests/tapl/com/android/launcher3/tapl/PrivateSpaceContainer.java @@ -17,6 +17,7 @@ package com.android.launcher3.tapl; import android.graphics.Point; +import android.multiuser.Flags; import androidx.test.uiautomator.UiObject2; @@ -26,6 +27,7 @@ import androidx.test.uiautomator.UiObject2; public class PrivateSpaceContainer { private static final String PS_HEADER_RES_ID = "ps_header_layout"; private static final String INSTALL_APP_TITLE = "Install"; + private static final String ADD_APP_TITLE = "Add"; private static final String DIVIDER_RES_ID = "private_space_divider"; private final LauncherInstrumentation mLauncher; @@ -62,7 +64,8 @@ public class PrivateSpaceContainer { // Assert Install App Item is present in view. private void verifyInstallAppButtonIsPresent() { - mAppList.getAppIcon(INSTALL_APP_TITLE); + mAppList.getAppIcon(Flags.enableMovingContentIntoPrivateSpace() ? ADD_APP_TITLE : + INSTALL_APP_TITLE); } // Assert Install App Item is not present in view.