From 1c1b130a4b14055ca9ac7bf70d68ab20a9bd658e Mon Sep 17 00:00:00 2001 From: Federico Baron Date: Mon, 3 Feb 2025 23:05:51 +0000 Subject: [PATCH] Fix attempt for testAddAndDeletePageAndFling it looks like the issue is that the layout has a widget on the second page leading the page count to be different than expected Bug: 381918059 Test: TaplWorkspaceTest#testAddAndDeletePageAndFling Flag: TEST_ONLY Change-Id: I19e475450494a5580e8fd04d02692624c086807c --- .../android/launcher3/ui/workspace/TaplWorkspaceTest.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/src/com/android/launcher3/ui/workspace/TaplWorkspaceTest.java b/tests/src/com/android/launcher3/ui/workspace/TaplWorkspaceTest.java index cb04e1391f..cab1ebee23 100644 --- a/tests/src/com/android/launcher3/ui/workspace/TaplWorkspaceTest.java +++ b/tests/src/com/android/launcher3/ui/workspace/TaplWorkspaceTest.java @@ -116,7 +116,13 @@ public class TaplWorkspaceTest extends AbstractLauncherUiTest { */ @ScreenRecord // b/381918059 @Test - public void testAddAndDeletePageAndFling() { + public void testAddAndDeletePageAndFling() throws Exception { + // Set workspace that includes the chrome Activity app icon on the hotseat. + LauncherLayoutBuilder builder = new LauncherLayoutBuilder() + .atHotseat(0).putApp("com.android.chrome", "com.google.android.apps.chrome.Main"); + mLauncherLayout = TestUtil.setLauncherDefaultLayout(mTargetContext, builder); + reinitializeLauncherData(); + Workspace workspace = mLauncher.getWorkspace(); // Get the first app from the hotseat HomeAppIcon hotSeatIcon = workspace.getHotseatAppIcon(0);