From 341e5598b5338ce67cea1091679ded82096ff0fe Mon Sep 17 00:00:00 2001 From: Vadim Tryshev Date: Tue, 7 Nov 2023 12:33:21 -0800 Subject: [PATCH] Workarounding setup wizard non-disappearance only in presubmit In postsubmit, we want to see the actual behavior to be aware of real e2e issues. Bug: 309008042 Test: presubmit Flag: N/A Change-Id: Icedf381545dda32ea1dbdd8d215581265627bf3f --- .../com/android/launcher3/ui/AbstractLauncherUiTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java index 9bfafcfddb..a68e4cb5de 100644 --- a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java +++ b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java @@ -321,7 +321,9 @@ public abstract class AbstractLauncherUiTest { // TODO(309471958) Productize killing/dismissal of setup wizard. /** Waits for setup wizard to go away. */ public static void waitForSetupWizardDismissal() { - if (sFirstTimeWaitingForWizard && TestStabilityRule.isPresubmit()) { + if (!TestStabilityRule.isPresubmit()) return; + + if (sFirstTimeWaitingForWizard) { try { UiDevice.getInstance(getInstrumentation()).executeShellCommand( "am force-stop com.google.android.setupwizard"); @@ -334,9 +336,7 @@ public abstract class AbstractLauncherUiTest { Until.gone(By.pkg("com.google.android.setupwizard").depth(0)), sFirstTimeWaitingForWizard ? 120000 : 0); sFirstTimeWaitingForWizard = false; - // b/309496273 -// Assert.assertTrue("Setup wizard is still visible", -// wizardDismissed); + Assert.assertTrue("Setup wizard is still visible", wizardDismissed); } public static void verifyKeyguardInvisible() {