Commit Graph

1165 Commits

Author SHA1 Message Date
Sunny Goyal 43b01b9900 Cleaning up temporary interfaces which were created for refactoring
Bug: 366237794
Test: Presubmit
Flag: EXEMPT refactor
Change-Id: Ic2c69bcdde1429c787903c24f0e19ea26b91d314
2024-10-11 11:03:47 -07:00
Jagrut Desai 85a8898402 Remove unused TestProtocol
Test: Presubmit
Bug: 319501259
Flag: TEST_ONLY
Change-Id: Ibe261ec8820f5d6e8415f5085c21a0adfef37462
2024-10-01 09:24:38 -07:00
Sukesh Ram e297bc0c0e Cleanup for TAPL Debugging
Cleaning up leftover log statements.

Flag: EXEMPT bugfix
Bug: 326908466
Test: Manual
Change-Id: I01dadc884929a8946f408997ddbcbd0ac4c820ec
2024-09-26 19:44:55 +00:00
Schneider Victor-tulias b3983db5e4 Merge "Update goToOverviewUnchecked to account for desktop task visiblity" into main 2024-09-24 19:31:43 +00:00
Schneider Victor-Tulias 38deee2508 Update goToOverviewUnchecked to account for desktop task visiblity
Flag: com.android.launcher3.enable_desktop_task_alpha_animation
Fixes: 367646122
Test: SwitchToOverviewFromDesktopTest#switchToOverview
Change-Id: I600dfcd8507d2e24f5bfccf78164b6eec3ec80b1
2024-09-24 10:47:38 -04:00
Vaibhav Devmurari 21f06911aa Fix NumberFormatException in LauncherTests
If the key event flags contain 0x80000000 then it causes number
format exception during parsing to Integer

Bug: 358569822
Test: atest NexusLauncherTests
Flag: EXEMPT TEST_ONLY
Change-Id: I6371ab7b9d5d5e356d7199830543177daeda3eea
2024-09-19 13:17:50 +00:00
Treehugger Robot d60904d573 Merge "Add perfetto traces to LauncherInstrumentation" into main 2024-09-17 17:12:21 +00:00
Treehugger Robot 545440327d Merge "Update out-of-date TODO comment" into main 2024-09-17 16:25:49 +00:00
Schneider Victor-Tulias 0a815eae39 Update out-of-date TODO comment
These TODO comments will be adressed by b/342627272, so b/326565120 should be closed.

Flag: EXEMPT comment update
Bug: 326565120
Bug: 342627272
Test: none needed, comment update
Change-Id: I75637e1494a1abba5c542a292a8a1e8881cbedfc
2024-09-17 10:13:16 -04:00
Nicolo' Mazzucato 2e3d304273 Add perfetto traces to LauncherInstrumentation
This will help understanding what's taking time in those tests, and optimize the runtime to add more perfromance tests to presubmits.

Bug: 332823157
Test: perfetto trace
Flag: NONE adding traces
Change-Id: I806c2cd103ff58a4467e48b3da5e95f7f51743f3
2024-09-17 08:06:38 +00:00
Mykola Podolian 5feb4a969a Merge "Fix falling tapl tests" into main 2024-09-09 17:19:12 +00:00
Nick Chameyev 02cc26f055 Merge "Capture Launcher icon positions by reusing UiObject2" into main 2024-09-09 10:43:10 +00:00
mpodolian 39383dd5b3 Fix falling tapl tests
Fix the root cause of falling tests.

Bug: 359277238
Flag: TEST_ONLY
Test: TaplTestsQuickstep,TaplTestPersistentTaskbar
Change-Id: I1e3138e26d0ab253dff7a64cbb3253c220a7db1a
2024-09-07 09:13:53 -07:00
Nick Chameyev 11c0ebcd57 Capture Launcher icon positions by reusing UiObject2
Reuse the same UiObject2/HomeAppIcon objects
when capturing Launcher icon positions.

When invoking 'launcher.workspace.allWorkspaceIcons'
we wait for the animation to finish which makes
the test fail as we expect to capture icon positions
midway through the animation.

Test: atest LauncherFoldAnimationTest
Bug: 315163608
Bug: 296991492
Flag: EXEMPT bugfix
Change-Id: I668d15165e4c777b3be24d66ad3f7888eaca2fea
2024-09-06 14:13:36 +00:00
vinayjoglekar 3359fa7f32 Fix talkback in split mode
1. Announce description of both snapshot in GroupedTaskView.
2. Announce them in correct order.

After setting right content description for both the apps in split mode, announcement order was reverse. Seems that order of the node tree which android sees was wrong. Also order did not change even in RTL mode.

see here https://paste.googleplex.com/6492038621298688.

The correct order is manually set using addChildrenForAccessibility in GroupedTaskView. (similarly being used in RecentsView since we use reverse order for overview). Also considered RTL.
See order after fix here
https://paste.googleplex.com/6492038621298688

https://drive.google.com/file/d/1BA1YKkcNsovEu4us9cvq5xOdXviTR1OV/view?usp=drive_link

Other alternatives tried were fixing order using android:accessibilityTraversalAfter and android:accessibilityTraversalBefore, both in layout and programatically which doesn't seem to work.

Test: Manual - Using Node tree debugging of talkback developer options.(Print and filter by tag TreeDebug)
BUG: 330424779
Flag: EXEMPT bugfix
Change-Id: If3c360277bd951d2d2b223bab7844e078e9c7d27
2024-09-03 15:22:30 +01:00
Alex Chau fdbfd3410b Clean-up debug logs
Fix: 336660988
Test: presubmit
Flag: TEST_ONLY
Change-Id: Ie66a34134881e4333f610d8979b2ac443d54a1cb
2024-08-20 19:01:19 +01:00
Alex Chau 6d00b4b014 Read task size info from RecentsView directly
- Automatically determine the Overivew component to use the correct RecentsViewContainer
- Also added log on both pre-computed taskSize and newly calculated task size

Bug: 336660988
Test: presubmit
Flag: TEST_ONLY
Change-Id: Ic0adfba35af513e731007241416fc85760135f07
2024-08-20 10:56:52 +01:00
Alex Chau d326e17fe2 Add logs for getFocusedTaskHeightForTablet
Bug: 336660988
Bug: 360724626
Test: presubmit
Flag: TEST_ONLY
Change-Id: I67d4fc8211f24b77566bd24525d23054dfdded6e
2024-08-19 20:39:41 +01:00
Alex Chau 1ceac5ddfe Implement e2e test for desktop windowing
Code changes:
- TaskView, GroupedTaskView and DesktopTaskView now uses different resId, so it can be differentiated by TAPL
- Extracted result handling of icon loading, so we can override in DesktopTaskView
- DesktopTaskView now load icons, so titleDescription can be loaded. When icons are loaded, contentDescription are applied to respective snapshotViews; icon unloading is ignored
- Track launchDesktopFromRecents and composeRecentsLaunchAnimator in TAPL events so we can test if the TaskView launch path is correct

Test changes:
- Added TaplTestsOverviewDesktop that move 2 TestActivities into Desktop, and launch the DesktopTaskView as static and live tile
- TaplTestsOverviewDesktop is limited to Tangor/cf_tablet only, and added LimitDeviceRule to AbstractLauncherUiTest to enable @AllowedDevices and @IgnoreLimit

TAPL changes (2 APIs added/modified):
- Changed TaskView matcher to use id/task_view_* to match all TaskView types
- When Overview is launcehd from Background, mark the currentTask after the launch as liveTile. When an OverviewTask has the same accessibility node as the liveTile, it'll expect different event when launching.
- [API change] BaseOverview.getTestActivityTask can now matches mutiple test activiites, useful for matching GroupedTaskView and DesktopTaskView; Fix a bug that getTestActivityTask wrongly use `getParent()` which is RecentsView to match activityName.
- In OverviewTask.open, we'll expect different events based on TaskView types and whether it's a live tile. Launching DesktopTaskView will in additional verify Desktop header is present on screen.
- [API change] In OverviewTaskMenu, support tapping Desktop menu and verify Desktop header is present on screen.
- Removed unused OverviewTaskMenuItem

Fix: 320313527
Test: TaplTestsOverviewDesktop
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: I89261c787364901320f3acb18f01ddad5f62d17c
2024-08-08 10:37:40 +01:00
Treehugger Robot 6a8f5ecced Merge "Revert "Add debug logs to BaseOverview#isActionsViewVisible"" into main 2024-07-30 17:07:14 +00:00
Schneider Victor-tulias 533e1d2753 Revert "Add debug logs to BaseOverview#isActionsViewVisible"
This reverts commit 11eaec69f4.

Reason for revert: debug logs no longer needed

Change-Id: If0b2f33c63c86483e4d28df79086e80103fdb001
2024-07-30 14:44:46 +00:00
Tracy Zhou 8a4213b786 Fix tapl test failures from enabling task bar on the phones
https://android-build.corp.google.com/test_investigate/?invocationId=I33800010300127205&testResultId=TR49729385401905444

Bug: 355971327
Test: run tapl tests
Flag: com.android.wm.shell.enable_taskbar_on_phones
Change-Id: Iab463b0a439efd3e707384ca4c6588a1de28d7b9
2024-07-28 10:18:19 -07:00
Johannes Gallmann 35f77be929 Merge "Fix onUserInteraction not called with 3-button-nav and enableOnBackInvokedCallback=true" into main 2024-07-19 09:46:51 +00:00
Andrew Cole 940917b92e Merge "Test Week - Deleting NexusTestInformationHandler" into main 2024-07-17 22:33:47 +00:00
Treehugger Robot 5d4587f04d Merge "Update comment to remove todo" into main 2024-07-17 20:28:05 +00:00
Winson Chung abdbc75801 Update comment to remove todo
Fixes: 197326121
Flag: EXEMPT bugfix
Test: N/a
Change-Id: I66c07a29dda128e14a0e6ff1755546bbda48ba55
2024-07-17 18:50:44 +00:00
Jagrut Desai 6276f1797b Remove getWorkspaceIconsPositions()
This cl addresses
	- removing of getWorkspaceIconsPositions()
	- addition of getWorkspaceIconPosition()

getWorkspaceIconsPositions() was not reliable as it was getting any icon selector and not actually waiting for the icon of intereset.
now we wait for specific icon of interest and tests are change accordingly.

Test: Presubmit
Bug: 319501259
Flag: TEST_ONLY

Change-Id: Ia65b9d51520763a7fbbb8d5cd3bc129496e443cc
2024-07-16 13:48:27 -07:00
Andrew Cole d798e6d1f9 Test Week - Deleting NexusTestInformationHandler
NexusTestInformationHandler only relied on one boolean switch that is not currently used so I am deleting it.

Bug: 353303621
Test: TAPL
Flag: TEST_ONLY
Change-Id: I6181d47561b318d1eb1bd632d4ae042e126cfdb9
2024-07-15 11:57:47 -07:00
Johannes Gallmann 82f7b5ad44 Fix onUserInteraction not called with 3-button-nav and enableOnBackInvokedCallback=true
We should ignore KeyEvents with the FLAG_CANCELED flag in log analysis for Launcher tests as these KeyEvents should not have any effect.

Bug: 346943119
Flag: com.android.window.flags.predictive_back_system_anims
Test: atest BackNavigationTests
Test: atest OnBackInvokedCallbackGestureTest
Test: Manual, i.e. verifying in a test app that onUserInteraction is called when pressing back key in 3-button-nav and when enableOnBackInvokedCallback=true
Change-Id: Icff47009757c49cdd8998244dd3e9459cc6ee085
2024-07-11 08:25:13 +00:00
Anushree Ganjam c8ecd62615 Merge "Use BySelector to search for text in search results." into main 2024-06-14 01:46:13 +00:00
Anushree Ganjam 4d404d9f8b Use BySelector to search for text in search results.
Verify the text after it's collected. I ran the test 20 times and
couldn't find the stale object exception being thrown.

Bug: 340341450
Bug: 339737008
Test: Manual
Flag: com.google.android.apps.nexuslauncher.enable_inject_private_space_tile

Change-Id: Ib153205db36cdd8b5fba4734b8b68930857659ff
2024-06-13 15:56:25 -07:00
Jagrut Desai b09b1a73a2 Merge "Fixing TaplUninstallRemoveTest#uninstallWorkspaceIcon" into main 2024-06-13 18:38:05 +00:00
Jagrut Desai 1c794082a7 Fixing TaplUninstallRemoveTest#uninstallWorkspaceIcon
Test: Presubmit
Bug: 319501259
Flag: TEST_ONLY
Change-Id: I69d64ac8a0a496c947acf7fdce142a37005aeedc
2024-06-13 09:30:55 -07:00
Schneider Victor-tulias 11eaec69f4 Add debug logs to BaseOverview#isActionsViewVisible
Flag: NONE debug logs
Bug: 336660988
Test: TaplTestsQuickstep#testQuickSwitchFromHome
Change-Id: If241cd732cfce83d4799895f5e43048d775d72ed
2024-06-12 15:43:16 +00:00
Jeremy Sim c1470021c8 Fix flaky test
Attempts to fix a flaky test by ensuring that recents is always cleared before creating a split pair (so the split pair under test is always the same).

Bug: 340935208
Test: testSaveAppPairMenuItemOrActionExistsOnSplitPair(), testSplitTaskTapBothIconMenus()
Flag: TEST_ONLY
Change-Id: Ibc81b90fac531f0e78e93a494ff59073ab5e52cf
2024-06-10 14:51:53 -07:00
Tracy Zhou acb4a3d1e8 Support trackpad tapl tests in 3-button mode
Currently we have logic to only enable input monitor when a trackpad is connected. Tapl tests need to have infrastructure to override that logic

Bug: 335146977
Test: presubmit
Change-Id: Ib7f80c828760f8b5abd7ed2788b246e47fca6e34
2024-05-29 21:58:20 -07:00
Vadim Tryshev d3ef050bc3 Merge "Removing high-level events mismatch diagnostics." into main 2024-05-29 18:42:47 +00:00
Vadim Tryshev 314c35c410 Removing high-level events mismatch diagnostics.
They hide actual sequences, are not necessary for Tigers who are power users and require maintenance.

Bug: 187761685
Test: presubmit
Flag: NONE for test
Change-Id: I5d4b3d80a916845fcf8c08a0ecd135527466fa5a
2024-05-28 13:36:19 -07:00
Jeremy Sim 1ab32a7942 Address jank and memory issues with OverviewActionsView
Attempt to improve jank and memory regressions by simplifying the view layout of OverviewActionsView.

Bug: 339688091
Bug: 339853741
Test: testSaveAppPairMenuItemOrActionExistsOnSplitPair()
Flag: EXEMPT bugfix
Change-Id: Ib4a7c5a813b221c0a083144e7fb1e1c5f3fedb1c
2024-05-28 13:16:52 -07:00
Holly Sun 897791a9e7 [PS] Add TAPL test for tile injection.
Bug: 330892261
Test: tapl
Flag: aconfig com.google.android.apps.nexuslauncher.enable_inject_private_space_tile nextfood

Change-Id: I4cfaefa26a81a1026d62d4206d90881f323bffd3
2024-05-08 16:51:16 -07:00
Jeremy Sim 7d69804e4e Merge "Fix bug with double-relayout of Overview Actions View" into main 2024-05-08 20:24:21 +00:00
Federico Baron b09442e16a Merge "Reduce steps for goHome()" into main 2024-05-08 17:58:38 +00:00
fbaron 39e1d52c1b Reduce steps for goHome()
The goHome gesture is slow enough sometimes that it gets confused with an overview gesture. Reducing the step count should resolve this (verified in atest and haven't had it fail after changing this)

Flag: NONE
Bug: 336606166
Test: TaplTestsTrackpad#switchToOverview
Change-Id: I7ad388968205addb363cfd9ff4b7eefece170d1b
2024-05-07 20:48:30 -07:00
Holly Jiuyu Sun 8834a6c450 Merge "[PS] Update Install button string." into main 2024-05-07 21:35:02 +00:00
Jeremy Sim 41eadd1a91 Fix bug with double-relayout of Overview Actions View
This CL refactors Overview Actions View so that a separate view, R.id.group_action_buttons, is used for buttons related to grouped tasks. This also changes the way visibility is handled with actions buttons -- instead of all buttons living on one bar and being toggled on and off, sometimes the whole bar is toggled on and off (to change from single task actions to group actions and vice versa).

This prevents the same view from having its visibility changed twice in in one layout and causing the wrong visibility to be rendered.

Fixes: 333844287
Test: Manual
Flag: ACONFIG com.android.wm.shell.enable_app_pairs NEXTFOOD
Change-Id: I1b6be4637ac8c8d424e7633c437fca376ecdd757
2024-05-07 11:18:24 -07:00
Holly Sun 64f36f3679 [PS] Update Install button string.
Screenshot: https://screenshot.googleplex.com/B6UrJt92QMMgSuG

Bug: 338357091
Test: manual
Flag: aconfig com.android.launcher3.private_space_app_installer_button nextfood
Change-Id: Ia408ccfa20ea3c142bd22c326954d278fa571815
2024-05-06 20:35:01 -07:00
Himanshu Gupta bf51b4882e Adding Tapl test for locking/unlocking Private Space
In this test:
1. Private Space is created.
2. Lock Button is clicked, locked view is verified.
3. Unlock Button is clicked, unlocked view is verified.
4. Private Space is removed.

Doc: go/private-space-tapl

Bug: 322882655
Test: TaplPrivateSpaceTest
Flag: NA
Change-Id: I1c399a96ea14a4464113576d31eed8db1caf1f2a
2024-05-06 20:03:23 +01:00
Treehugger Robot f7ed35fc87 Merge "Locking the All Apps view before asserting PS components." into main 2024-05-02 19:02:42 +00:00
Himanshu Gupta 3a0f024044 Locking the All Apps view before asserting PS components.
Bug: 334946529
Test: NA
Flag: NA
Change-Id: Id8895a993f61ee22fcef1ba562aaa8baf156d6d7
2024-05-01 18:52:32 +01:00
Vadim Tryshev edfa8480a9 Merge "Saving test artifacts in TAPL when the failure is diagnosed" into main 2024-04-29 20:49:15 +00:00