From 5edd864c8ddbd3b05ae049cc40a84d8599535820 Mon Sep 17 00:00:00 2001 From: Jeremy Sim Date: Tue, 7 Feb 2023 13:47:47 +0800 Subject: [PATCH] Improve resilience of testSplitFromOverview() This patch makes it so that TaplTestsQuickstep#testSplitFromOverview() is less flaky. Previously, this test worked by tapping the center of a Overview tile to confirm split select. However, sometimes the tile would be halfway offscreen, so it would accidentally tap an overlapping UI element (the staged first app) instead, causing the test to fail. Fixed by using getCurrentTask() to always select an Overview tile that is fully onscreen. Fixes: 267794149 Test: Manual on phone, confirmed test passing Change-Id: I8b89509bb53a16e45aea4545562989e2e964de2d --- .../tests/src/com/android/quickstep/TaplTestsQuickstep.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java index 9f34775761..bc5fa19ce1 100644 --- a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java +++ b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java @@ -191,7 +191,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { mLauncher.goHome().switchToOverview().getCurrentTask() .tapMenu() .tapSplitMenuItem() - .getTestActivityTask(2) + .getCurrentTask() .open(); }