From 5461d5f4e8e4f1574fa515e1f735d3f2c91891a2 Mon Sep 17 00:00:00 2001 From: Nataniel Borges Date: Tue, 5 Oct 2021 12:33:13 +0000 Subject: [PATCH] Wait until the animation is complete before finishing the transition This test is flaky because sometimes it stops in the middle of the animation, before the app layer occludes the launche Bug: 202128862 Test: atest FlickerTests Change-Id: If8c07db37be9df4c19cf6e3137bd18f3afa851fd --- .../server/wm/flicker/launch/OpenAppFromOverviewTest.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromOverviewTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromOverviewTest.kt index 3678f33aa46ec..663af703f76d8 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromOverviewTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromOverviewTest.kt @@ -27,6 +27,7 @@ import com.android.server.wm.flicker.helpers.reopenAppFromOverview import com.android.server.wm.flicker.helpers.setRotation import com.android.server.wm.flicker.startRotation import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.traces.common.WindowManagerConditionsFactory import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -78,6 +79,11 @@ class OpenAppFromOverviewTest(testSpec: FlickerTestParameter) : OpenAppTransitio } transitions { device.reopenAppFromOverview(wmHelper) + wmHelper.waitFor( + WindowManagerConditionsFactory.hasLayersAnimating().negate(), + WindowManagerConditionsFactory.isWMStateComplete(), + WindowManagerConditionsFactory.isHomeActivityVisible().negate() + ) wmHelper.waitForFullScreenApp(testApp.component) } }