Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5461d5f4 authored by Nataniel Borges's avatar Nataniel Borges
Browse files

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
parent ad2f5e70
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -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.helpers.setRotation
import com.android.server.wm.flicker.startRotation
import com.android.server.wm.flicker.startRotation
import com.android.server.wm.flicker.dsl.FlickerBuilder
import com.android.server.wm.flicker.dsl.FlickerBuilder
import com.android.server.wm.traces.common.WindowManagerConditionsFactory
import org.junit.FixMethodOrder
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runner.RunWith
@@ -78,6 +79,11 @@ class OpenAppFromOverviewTest(testSpec: FlickerTestParameter) : OpenAppTransitio
            }
            }
            transitions {
            transitions {
                device.reopenAppFromOverview(wmHelper)
                device.reopenAppFromOverview(wmHelper)
                wmHelper.waitFor(
                        WindowManagerConditionsFactory.hasLayersAnimating().negate(),
                        WindowManagerConditionsFactory.isWMStateComplete(),
                        WindowManagerConditionsFactory.isHomeActivityVisible().negate()
                )
                wmHelper.waitForFullScreenApp(testApp.component)
                wmHelper.waitForFullScreenApp(testApp.component)
            }
            }
        }
        }