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
This commit is contained in:
Nataniel Borges
2021-10-05 12:33:13 +00:00
parent ad2f5e70eb
commit 5461d5f4e8

View File

@@ -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)
}
}