Loading libs/WindowManager/Shell/tests/flicker/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,8 @@ android_test { "app-helpers-core", "launcher-helper-lib", "launcher-aosp-tapl", "systemui-tapl", "systemui-helper", "wm-flicker-common-assertions", "wm-flicker-common-app-helpers", "platform-test-annotations", Loading libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/bubble/LaunchBubbleFromLockScreen.kt +12 −7 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.wm.shell.flicker.bubble import android.platform.systemui_tapl.controller.LockscreenController import android.platform.test.annotations.FlakyTest import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.Presubmit Loading Loading @@ -46,18 +47,23 @@ import org.junit.runners.Parameterized @Group4 class LaunchBubbleFromLockScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen(testSpec) { private val lockScreen = LockscreenController.get() /** {@inheritDoc} */ override val transition: FlickerBuilder.() -> Unit get() = buildTransition { setup { test { lockScreen.setUnlockSwipe() } eachRun { val addBubbleBtn = waitAndGetAddBubbleBtn() addBubbleBtn?.click() ?: error("Bubble widget not found") device.sleep() lockScreen.lockScreen() wmHelper.StateSyncBuilder() .withoutTopVisibleAppWindows() .withKeyguardShowing() .waitForAndVerify() device.wakeUp() lockScreen.turnScreenOn() } } transitions { Loading @@ -70,8 +76,7 @@ class LaunchBubbleFromLockScreen(testSpec: FlickerTestParameter) : BaseBubbleScr or WindowInsets.Type.displayCutout() ) device.swipe(100, insets.top + 100, 100, device.displayHeight / 2, 4) device.waitForIdle(2000) instrumentation.uiAutomation.syncInputTransactions() wmHelper.StateSyncBuilder().withAppTransitionIdle().waitForAndVerify() val notification = device.wait( Until.findObject( Loading @@ -79,14 +84,14 @@ class LaunchBubbleFromLockScreen(testSpec: FlickerTestParameter) : BaseBubbleScr ), FIND_OBJECT_TIMEOUT ) notification?.click() ?: error("Notification not found") instrumentation.uiAutomation.syncInputTransactions() wmHelper.StateSyncBuilder().withAppTransitionIdle().waitForAndVerify() val showBubble = device.wait( Until.findObject( By.res("com.android.systemui", "bubble_view") ), FIND_OBJECT_TIMEOUT ) showBubble?.click() ?: error("Bubble notify not found") instrumentation.uiAutomation.syncInputTransactions() wmHelper.StateSyncBuilder().withAppTransitionIdle().waitForAndVerify() val cancelAllBtn = waitAndGetCancelAllBtn() cancelAllBtn?.click() ?: error("Cancel widget not found") } Loading tests/FlickerTests/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,8 @@ android_test { "truth-prebuilt", "launcher-helper-lib", "launcher-aosp-tapl", "systemui-tapl", "systemui-helper", "platform-test-annotations", "wm-flicker-window-extensions", ], Loading tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromLockNotificationCold.kt +6 −3 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.server.wm.flicker.launch import android.platform.systemui_tapl.controller.LockscreenController import android.platform.test.annotations.FlakyTest import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.RequiresDevice Loading Loading @@ -50,6 +51,8 @@ import org.junit.runners.Parameterized open class OpenAppFromLockNotificationCold(testSpec: FlickerTestParameter) : OpenAppFromNotificationCold(testSpec) { private val lockScreen = LockscreenController.get() override val openingNotificationsFromLockScreen = true override val transition: FlickerBuilder.() -> Unit Loading @@ -57,7 +60,7 @@ open class OpenAppFromLockNotificationCold(testSpec: FlickerTestParameter) : // Needs to run at start of transition, // so before the transition defined in super.transition transitions { device.wakeUp() lockScreen.turnScreenOn() } super.transition(this) Loading @@ -65,9 +68,9 @@ open class OpenAppFromLockNotificationCold(testSpec: FlickerTestParameter) : // Needs to run at the end of the setup, so after the setup defined in super.transition setup { eachRun { device.sleep() lockScreen.lockScreen() wmHelper.StateSyncBuilder() .withoutTopVisibleAppWindows() .withKeyguardShowing() .waitForAndVerify() } } Loading tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromLockNotificationWarm.kt +7 −5 Original line number Diff line number Diff line Loading @@ -16,9 +16,9 @@ package com.android.server.wm.flicker.launch import android.platform.systemui_tapl.controller.LockscreenController import android.platform.test.annotations.FlakyTest import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.Presubmit import android.platform.test.annotations.RequiresDevice import com.android.server.wm.flicker.FlickerParametersRunnerFactory import com.android.server.wm.flicker.FlickerTestParameter Loading Loading @@ -52,6 +52,8 @@ import org.junit.runners.Parameterized open class OpenAppFromLockNotificationWarm(testSpec: FlickerTestParameter) : OpenAppFromNotificationWarm(testSpec) { private val lockScreen = LockscreenController.get() override val openingNotificationsFromLockScreen = true override val transition: FlickerBuilder.() -> Unit Loading @@ -59,7 +61,7 @@ open class OpenAppFromLockNotificationWarm(testSpec: FlickerTestParameter) : // Needs to run at start of transition, // so before the transition defined in super.transition transitions { device.wakeUp() lockScreen.turnScreenOn() } super.transition(this) Loading @@ -67,9 +69,9 @@ open class OpenAppFromLockNotificationWarm(testSpec: FlickerTestParameter) : // Needs to run at the end of the setup, so after the setup defined in super.transition setup { eachRun { device.sleep() lockScreen.lockScreen() wmHelper.StateSyncBuilder() .withoutTopVisibleAppWindows() .withKeyguardShowing() .waitForAndVerify() } } Loading Loading @@ -193,7 +195,7 @@ open class OpenAppFromLockNotificationWarm(testSpec: FlickerTestParameter) : super.appWindowIsTopWindowAtEnd() /** {@inheritDoc} */ @Presubmit @Postsubmit @Test override fun appWindowBecomesTopWindow_ShellTransit() = super.appWindowBecomesTopWindow_ShellTransit() Loading Loading
libs/WindowManager/Shell/tests/flicker/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,8 @@ android_test { "app-helpers-core", "launcher-helper-lib", "launcher-aosp-tapl", "systemui-tapl", "systemui-helper", "wm-flicker-common-assertions", "wm-flicker-common-app-helpers", "platform-test-annotations", Loading
libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/bubble/LaunchBubbleFromLockScreen.kt +12 −7 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.wm.shell.flicker.bubble import android.platform.systemui_tapl.controller.LockscreenController import android.platform.test.annotations.FlakyTest import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.Presubmit Loading Loading @@ -46,18 +47,23 @@ import org.junit.runners.Parameterized @Group4 class LaunchBubbleFromLockScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen(testSpec) { private val lockScreen = LockscreenController.get() /** {@inheritDoc} */ override val transition: FlickerBuilder.() -> Unit get() = buildTransition { setup { test { lockScreen.setUnlockSwipe() } eachRun { val addBubbleBtn = waitAndGetAddBubbleBtn() addBubbleBtn?.click() ?: error("Bubble widget not found") device.sleep() lockScreen.lockScreen() wmHelper.StateSyncBuilder() .withoutTopVisibleAppWindows() .withKeyguardShowing() .waitForAndVerify() device.wakeUp() lockScreen.turnScreenOn() } } transitions { Loading @@ -70,8 +76,7 @@ class LaunchBubbleFromLockScreen(testSpec: FlickerTestParameter) : BaseBubbleScr or WindowInsets.Type.displayCutout() ) device.swipe(100, insets.top + 100, 100, device.displayHeight / 2, 4) device.waitForIdle(2000) instrumentation.uiAutomation.syncInputTransactions() wmHelper.StateSyncBuilder().withAppTransitionIdle().waitForAndVerify() val notification = device.wait( Until.findObject( Loading @@ -79,14 +84,14 @@ class LaunchBubbleFromLockScreen(testSpec: FlickerTestParameter) : BaseBubbleScr ), FIND_OBJECT_TIMEOUT ) notification?.click() ?: error("Notification not found") instrumentation.uiAutomation.syncInputTransactions() wmHelper.StateSyncBuilder().withAppTransitionIdle().waitForAndVerify() val showBubble = device.wait( Until.findObject( By.res("com.android.systemui", "bubble_view") ), FIND_OBJECT_TIMEOUT ) showBubble?.click() ?: error("Bubble notify not found") instrumentation.uiAutomation.syncInputTransactions() wmHelper.StateSyncBuilder().withAppTransitionIdle().waitForAndVerify() val cancelAllBtn = waitAndGetCancelAllBtn() cancelAllBtn?.click() ?: error("Cancel widget not found") } Loading
tests/FlickerTests/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,8 @@ android_test { "truth-prebuilt", "launcher-helper-lib", "launcher-aosp-tapl", "systemui-tapl", "systemui-helper", "platform-test-annotations", "wm-flicker-window-extensions", ], Loading
tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromLockNotificationCold.kt +6 −3 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.server.wm.flicker.launch import android.platform.systemui_tapl.controller.LockscreenController import android.platform.test.annotations.FlakyTest import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.RequiresDevice Loading Loading @@ -50,6 +51,8 @@ import org.junit.runners.Parameterized open class OpenAppFromLockNotificationCold(testSpec: FlickerTestParameter) : OpenAppFromNotificationCold(testSpec) { private val lockScreen = LockscreenController.get() override val openingNotificationsFromLockScreen = true override val transition: FlickerBuilder.() -> Unit Loading @@ -57,7 +60,7 @@ open class OpenAppFromLockNotificationCold(testSpec: FlickerTestParameter) : // Needs to run at start of transition, // so before the transition defined in super.transition transitions { device.wakeUp() lockScreen.turnScreenOn() } super.transition(this) Loading @@ -65,9 +68,9 @@ open class OpenAppFromLockNotificationCold(testSpec: FlickerTestParameter) : // Needs to run at the end of the setup, so after the setup defined in super.transition setup { eachRun { device.sleep() lockScreen.lockScreen() wmHelper.StateSyncBuilder() .withoutTopVisibleAppWindows() .withKeyguardShowing() .waitForAndVerify() } } Loading
tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromLockNotificationWarm.kt +7 −5 Original line number Diff line number Diff line Loading @@ -16,9 +16,9 @@ package com.android.server.wm.flicker.launch import android.platform.systemui_tapl.controller.LockscreenController import android.platform.test.annotations.FlakyTest import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.Presubmit import android.platform.test.annotations.RequiresDevice import com.android.server.wm.flicker.FlickerParametersRunnerFactory import com.android.server.wm.flicker.FlickerTestParameter Loading Loading @@ -52,6 +52,8 @@ import org.junit.runners.Parameterized open class OpenAppFromLockNotificationWarm(testSpec: FlickerTestParameter) : OpenAppFromNotificationWarm(testSpec) { private val lockScreen = LockscreenController.get() override val openingNotificationsFromLockScreen = true override val transition: FlickerBuilder.() -> Unit Loading @@ -59,7 +61,7 @@ open class OpenAppFromLockNotificationWarm(testSpec: FlickerTestParameter) : // Needs to run at start of transition, // so before the transition defined in super.transition transitions { device.wakeUp() lockScreen.turnScreenOn() } super.transition(this) Loading @@ -67,9 +69,9 @@ open class OpenAppFromLockNotificationWarm(testSpec: FlickerTestParameter) : // Needs to run at the end of the setup, so after the setup defined in super.transition setup { eachRun { device.sleep() lockScreen.lockScreen() wmHelper.StateSyncBuilder() .withoutTopVisibleAppWindows() .withKeyguardShowing() .waitForAndVerify() } } Loading Loading @@ -193,7 +195,7 @@ open class OpenAppFromLockNotificationWarm(testSpec: FlickerTestParameter) : super.appWindowIsTopWindowAtEnd() /** {@inheritDoc} */ @Presubmit @Postsubmit @Test override fun appWindowBecomesTopWindow_ShellTransit() = super.appWindowBecomesTopWindow_ShellTransit() Loading