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
diff --git a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
index 9bfafcf..a68e4cb 100644
--- a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
+++ b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
@@ -321,7 +321,9 @@
// 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 @@
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() {