summaryrefslogtreecommitdiff
path: root/tests/FlickerTests
diff options
context:
space:
mode:
author dakinola <dakinola@google.com> 2024-10-21 17:17:00 +0000
committer dakinola <dakinola@google.com> 2024-10-22 10:46:52 +0000
commitc7cc1450a54cb1a64e5e7273592ec4462f5079da (patch)
treef8e315991bb59e391319ce38f1fae25e4cdf8503 /tests/FlickerTests
parent5d8ea5670c7371d2ed2d7a88000c77520ff37aaa (diff)
Fix Resizing Flicker Tests - Transitions
* MaximizeApp flicker tests sometimes has problems finding the associated transition, so changing the scenario extractor to specifically look for the toggle resize transition which occurs which each maximize * SnapResize Right tests sometimes break because dragging all the way to the right edge fails as an action, so instead we drag a few dp shy of the actual edge of the screen Bug: 366201230 Bug: 371986068 Test: atest MaxmizeAppLandscape Test: atest SnapResizeAppWindowRightWithDrag Flag: TEST_ONLY Change-Id: I9f555afd525e796eb23d8f068637e59d3c4b7498
Diffstat (limited to 'tests/FlickerTests')
-rw-r--r--tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt b/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt
index c77413b6a55a..8c15dc935f0b 100644
--- a/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt
+++ b/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt
@@ -280,7 +280,11 @@ open class DesktopModeAppHelper(private val innerHelper: IStandardAppHelper) :
val displayRect = getDisplayRect(wmHelper)
- val endX = if (isLeft) displayRect.left else displayRect.right
+ val endX = if (isLeft) {
+ displayRect.left + SNAP_RESIZE_DRAG_INSET
+ } else {
+ displayRect.right - SNAP_RESIZE_DRAG_INSET
+ }
val endY = displayRect.centerY() / 2
// drag the window to snap resize
@@ -386,6 +390,7 @@ open class DesktopModeAppHelper(private val innerHelper: IStandardAppHelper) :
private companion object {
val TIMEOUT: Duration = Duration.ofSeconds(3)
+ const val SNAP_RESIZE_DRAG_INSET: Int = 5 // inset to avoid dragging to display edge
const val CAPTION: String = "desktop_mode_caption"
const val MAXIMIZE_BUTTON_VIEW: String = "maximize_button_view"
const val MAXIMIZE_MENU: String = "maximize_menu"