Commit Graph

738 Commits

Author SHA1 Message Date
Winson Chung 8bd458b518 Extend accessibility timeout indefinitely before overview screenshot
Test: atest TaplTestsQuickstep#testOverviewActions
Bug: 236730000
Change-Id: I4db9fc01aaa048cead47e14c34df609bb43f3906
2022-07-12 16:31:57 +00:00
Tony Wickham 0c8ceda6e7 Merge "Move TEST_HARNESS_TRIGGER_TIMEOUT to MotionPauseDetector directly" into tm-qpr-dev 2022-07-06 16:25:03 +00:00
Tony Wickham 539c2703ea Move TEST_HARNESS_TRIGGER_TIMEOUT to MotionPauseDetector directly
- Removed TestProtocol.sForcePauseTimeout and
  TestProtocol.REQUEST_SET_FORCE_PAUSE_TIMEOUT
- Instead, add MotionPauseDetector.TEST_HARNESS_TRIGGER_TIMEOUT, which
  is used when Utilities.IS_RUNNING_IN_TEST_HARNESS.

Test: unbundled/launcher/launcher3_test_platform
Fixes: 232548865
Change-Id: I224e99042b41375cab6bffd555434217518958c5
2022-06-30 12:16:08 -07:00
TreeHugger Robot 72c5f330bf Merge "Add TAPL API for adding app icon to hotseat" into tm-qpr-dev 2022-06-30 05:28:14 +00:00
Chilun Huang 7662dae663 Add TAPL API for adding app icon to hotseat
Please refer to go/tapl-add-icon-to-hotseat for more details.

Bug: 231400119
Test: atest NexusLauncherTests:TaplTestsQuickstep#testAddDeleteShortcutOnHotseat
Change-Id: I8cadecbe742413e3ce35ff269c0f78057331532c
Merged-In: I8cadecbe742413e3ce35ff269c0f78057331532c
2022-06-27 11:10:21 +08:00
Alex Chau d936273b1f Add test to dismiss AllApps bottom sheet
- http://docs/document/d/1ITZDMchoMndfa0nMuOTXbhKhK2aMDz0AT9dgusgxEro

Bug: 236360930
Test: TaplTestsLauncher3.testAllAppsDeadzoneForTablet
Test: TaplTestsNexus.testSearchDeadzoneForTablet
Change-Id: I62adb1d6ef237f9bca3812b8cdce9e5a8383158f
2022-06-24 18:29:43 +01:00
Sebastián Franco 9ffbbf8f2c Merge "Cherrypick needed for merge conflict with ag/18875278" into tm-qpr-dev 2022-06-23 21:54:13 +00:00
vadimt a18e9f2637 Reducing max timeout in TAPL
Lab presubmits now have a limit 60 sec per test, so failing to find an expected view will result in a cryptic "Test did not run due to instrumentation issue. Run level error reported reason: 'Instrumentation did not output anything for the configured timeout. ddmlib reported error: Failed to receive adb shell test output within 600000 ms. Test may have timed out, or adb connection to device became unresponsive.'"

Reducing the timeout to get better messages.

Bug: 236308045
Test: presubmit
Change-Id: I09e7fa02a12f4e2d0900d29b0029686337a381b0
2022-06-21 20:14:08 +00:00
Ling WO 9a8964b122 Cherrypick needed for merge conflict with ag/18875278
Support move to a specific location on workspace for all workspaceDragSource, so other workspaceDragSource such as HomeAppIconMenuItem can be moved to a fixed location during testing to avoid ui-diff flakiess

Design doc:
https://docs.google.com/document/d/1tZWbfsv86O6UAKtHJrDBGecu-x3ac51qmWvARDg057M

Test: atest
Bug: 216189838

Change-Id: Ia6ef7338beb257d0313be17a53a9fc59ae39fdb6
(cherry picked from commit fe8fb4d137)
2022-06-15 22:38:04 +00:00
Schneider Victor-tulias 8c8b35c368 Merge "Add screen recording to drag to splitscreen taskbar tests to help with debugging." into tm-dev am: 467f30dbb7 am: b210664095
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18529596

Change-Id: If00b8b6ff429556e7860089b855bac390983c37d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 21:59:30 +00:00
Schneider Victor-tulias 467f30dbb7 Merge "Add screen recording to drag to splitscreen taskbar tests to help with debugging." into tm-dev 2022-05-25 21:03:04 +00:00
Schneider Victor-tulias aa5ae621c5 Add screen recording to drag to splitscreen taskbar tests to help with debugging.
Test: presubmit and local
Bug: 231615831
Change-Id: I87ea5eb30eaf9ec1f4f96572c78bc9daf976a589
2022-05-24 11:46:31 -07:00
Nicolo' Mazzucato 25b36f7716 Fix flakiness in getIconPosition test
After uninstalling the app, it was disappearing after some time. For this reason, tryGetWorkspaceAppIcon was still returning it after the uninstall.

Fixes: 232009313
Test: atest TaplTestsLauncher3
Change-Id: I62e3a8f9a481e9786a136b6c00051c1025ab5b32
2022-05-24 09:42:24 +00:00
Tracy Zhou 3438c92334 Add drag icon to folder use case back
Test: presubmit
Fixes: 232417717
Change-Id: Idca54eb8b1fec10e8c9d7e5cb338e179b733850b
2022-05-17 02:41:30 +00:00
Tracy Zhou f14d58dfda Merge "Tune dragToFolder test so that it works with the new nav bar height" into tm-dev 2022-05-12 18:17:19 +00:00
Tracy Zhou 001b547499 Tune dragToFolder test so that it works with the new nav bar height
And add screen record in case there is some flakiness

Fixes: 200310506
Test: presubmit
Change-Id: I7716698fe2fb600bf34fe603e4a98bb20fc6018d
2022-05-11 23:38:52 -07:00
Schneider Victor-tulias 8a01f6af3e Removing redundant waiting for window change event and adding debug logging for dragging and dropping.
Also removing unused TAPL object.

Bug: 231615831
Test: Ran TaplTestsTaskbar with invalid package names and with delays
Change-Id: I9f21c9e263240ccf734993083a5e90f0442314ad
2022-05-11 15:49:50 -07:00
Abhilasha Chahal 997a757661 Check if launcher has touch interaction service when registering touch events
Bug: 228014625
Test: Refactoring change

Change-Id: I3b94f4f7fabf7cb2964eefd5cf1e099d2bb80ca6
2022-05-06 16:21:48 +00:00
Becky Qiu 6183c4dd74 [Toast] Create one search tapl tests for opening qsb and calculator app.
Test design doc: https://docs.google.com/document/d/1aPtMvegzn4hdwC0CNuIkfkalqG7v0FNCfyoO7qIOfN4/edit?usp=sharing&resourcekey=0-71oNHp1KKOdDKxr7Vd4dGQ

Bug: 225935921
Bug: 225935929
Test: ran test in android studio
Change-Id: I74197a9d81fc75a44269ab3bc1bba910de5e17fe
2022-05-05 18:47:34 -07:00
Nicolo' Mazzucato f67536e1eb Allow workspace to provide icon positions in tests
This is needed in order to implement a test for the unfold animation.
getWorkspaceAndHotseatIconsPositions returns map that associate icon name with its center on the screen

Test: atest TaplTestsLauncher3
Bug: 220087235
Change-Id: I254aa0c146edf4cae1c2bf5c09dec000993eb4d8
2022-05-04 20:27:11 +00:00
Andras Kloczl 015d44aee3 Cleanup tapl test workaround
There was a bug in the framework (b/219711163) so
we needed a workaround to make the tapl test pass.

Test: Run TAPL tests
Bug: 219919285
Change-Id: I3eb4ca8c5b1d24f38330ad41b58c31c81eb01501
2022-04-27 12:24:43 +01:00
vadimt 3a60866b70 Trying to remove waiting for broadcasts
Way back we suspected that this would prevent Launcher restarts while the test runs, but later we seem to have found another solution.

Now the tests can sit for, like, 90 sec in this call.

So let's remove it and see what happens.

Test: presubmit
Bug: 187761685
Change-Id: I4baa174b48151151d657e833f121b2e6daa27453
2022-04-18 14:42:36 -07:00
Benno Lin edb576fba8 Merge "Enable pressback tests" into tm-dev 2022-04-07 23:39:20 +00:00
vadimt bda5f6b3e5 Moving away from obsolete Display#getRealSize().
Step 2 (final): stopping using old API

Bug: 202567877, 227307209
Test: presubmit
Change-Id: Ic32740723a517b28f92dbdd32fc53e27831441cc
2022-03-31 10:56:03 -07:00
Benno Lin 264d9a67de Enable pressback tests
Bug: 205027405
Test: Manual
Change-Id: I5bb41fc27db17e95d7a7c91cec2bbf85f33d6dad
(cherry picked from commit b5b70930e9)
2022-03-30 10:36:38 +00:00
vadimt c8aada4433 Moving away from obsolete Display#getRealSize().
Step 1: use both new and old APIs and make sure they return the same values.

Bug: 202567877, 227307209
Test: presubmit
Change-Id: I86fbb0ca089a88b5ff787a5c353664a192fb7e79
2022-03-29 16:58:25 +00:00
TreeHugger Robot 8cb2364c1a Merge "Renaming LauncherInstrumentation.pressHome to goHome" into tm-dev 2022-03-14 20:37:06 +00:00
vadimt 41c0b52cd9 Renaming LauncherInstrumentation.pressHome to goHome
This is a better name now that we have gestural nav.

Renaming will happen in stages, the first one being having 2 names side-by-side.

Test: presubmit
Bug: 187761685
Change-Id: Ifb15c838cc0e161d852cf6df025687e3f92d6124
2022-03-14 18:13:47 +00:00
Schneider Victor-tulias fb252e7ce1 Add taskbar TAPL tests
- Added TAPL objects to support TAPL tests for taskbar features
- Added tests for major taskbar features: hiding/showing the taskbar, opening all apps, lauching apps and app deep shortcuts from the taskbar/all apps page, launching apps and app deep shortcuts in splitscreen
- These tests should only run for large devices

Design: go/taskbar-tapl-tests
Test: ran tests locally with invalid configurations and remotely
Bug: 215218813
Change-Id: I3c28c339707467414aa47fa633f87fa0c1fdee57
2022-03-10 13:02:35 -08:00
Benno Lin 894984299f Fix Tapl drag to folder issue on S5 and R3
Bug: 205015793
Bug: 205014516
Test: atest Launcher3Tests
Test: https://android-build.googleplex.com/builds/abtd/run/L47800000953216369
Test: https://android-build.googleplex.com/builds/abtd/run/L63300000953213948
Change-Id: If481d2b6503e8d47953b00c102719c447f43da41
2022-03-04 00:58:33 +00:00
András Klöczl a29eed894f Merge "Fix two panel tapl test dragging issue" 2022-02-16 22:47:47 +00:00
Andras Kloczl 659cfbe1f6 Fix two panel tapl test dragging issue
It seems if the dragging target position's X coordinate is 0
then there is a weird bug in portrait mode.

Test: atest TwoPanelWorkspaceTest
Bug: 197631877
Change-Id: I7d8702b06e5ed396814339080f8e814e9f8a6a65
2022-02-16 13:47:50 +00:00
Schneider Victor-tulias d6279ae641 Update TAPL object hierarchy in preparation for Taskbar TAPL tests
See design at: go/taskbar-tapl-tests

Test: Ran tests remotely
Bug: 215218813
Change-Id: I1c2ceac8954973ea3ae5b2f797fdfb96ba7a6ec4
2022-02-15 13:33:26 -08:00
Benno Lin 978d646864 Merge "Implemnet methods to drag a icon to given Workspace cell" 2022-02-15 01:49:21 +00:00
Benno Lin 7738cac424 Implemnet methods to drag a icon to given Workspace cell
The CL implements public methods to drag an Icon from AllApps to a
given cell in the workspace.

Bug: 199120092
Test: Launcher3Tests:com.android.launcher3.ui.TaplTestsLauncher3#testDragAppIconToWorkspaceCell
Test: https://android-build.googleplex.com/builds/abtd/run/L89300000953052361
Test: https://android-build.googleplex.com/builds/abtd/run/L44500000953013792
Change-Id: Ife16d1f1b55b809763dd40f5afee6711049a4729
2022-02-15 01:48:45 +00:00
vadimt 2dd23a0466 Not postponing expecting Pilfer when swiping to overview.
TAPL was expecting pilfer upon UP in the swipe-pause-to-overview gesture.
Actual Pilfer happens earlier, which resulted in wrong sequence-mismatch diags if the gesture fails before UP.
Now expecting Pilfer earlier.

Also fixing a problem that sneaked through earlier reviews when even down time was passed incorrectly.

Bug: 187761685
Test: presubmit
Change-Id: If4289a011247bf7801405ecaac8befa8461e8a37
2022-02-12 01:57:13 +00:00
Alex Chau 449cd7226d Merge "Use less steps for home gesture" 2022-02-08 10:51:38 +00:00
Thales Lima f7bad2c880 Use less steps for home gesture
Needed because when running tests in virtual devices is very slow. The previous number of steps was also greater than the default timeout for home gesture.

Fixes 215673732
Test: atest Launcher3Tests:RequestPinItemTest

Change-Id: I9b13d97deb158222ba0ebf3f6a536c5a7ae632cf
2022-02-04 19:00:23 +00:00
Alex Chau f7f4f4d7ed Don't start dragging widget below bottom gesture margin
Bug: 215672979
Test: AddConfigWidgetTest
Change-Id: I8121c0662249ec019f4f47a402f7f78655a6b930
2022-01-25 15:18:12 +00:00
Alex Chau d58ae513b2 Don't treat object from test package as system anomaly dialog
- OOP test activity has an alertTitle and shouldn't be treated as system anomaly dialog

Fix: 214558538
Test: NexusLauncherOutOfProcTests / MemoryTests
Change-Id: Ia9c330c3c3f48b43fbada40a3410ccc9fb8bfbb8
2022-01-17 12:32:25 +00:00
TreeHugger Robot 29004de0d1 Merge "Limit home gesture distance to half of screen height" 2022-01-14 00:18:18 +00:00
Alex Chau a472190c8a Limit home gesture distance to half of screen height
- Somehow when home gesture's travel distance is above certain number (~2560px in the bug's case), the touch will wrongly go to the 3P launcher instead of staying in quickstep launcehr only. As it's unusal for home gesture to be so long, limiting it to half of screen height.

Bug: 214279686
Test: presbumit and TaplTestsLauncher3#testWidgets on cf_tablet
Change-Id: I1107074556aea3011b186ba34dc830dbb1445517
2022-01-13 22:08:40 +00:00
Vadim Tryshev d55a139843 Merge "Removing 2-button support from tests" 2022-01-13 17:59:57 +00:00
vadimt 1ac72db930 Removing 2-button support from tests
Bug: 187761685
Test: presubmit
Change-Id: I932dd8cbc7524732e3ff83a35d7034b3e5ff75d9
2022-01-12 10:37:50 -08:00
Ling Wo 7802ec4f25 Merge "Uninstall an app from workspace via TAPL" 2022-01-11 01:57:50 +00:00
My Name 5b59e75f4a Uninstall an app from workspace via TAPL
1. Implement function to uninstall app from appIcon.
2. Add test uninstall to TaplTestsLauncher3.

Bug: 210927656
Test: Launcher3Tests:com.android.launcher3.ui.TaplTestsLauncher3#testTryUninstallFromWorkspace
Change-Id: Iedd3bd3a46bc626fc414fd8c5bd07ebc0fa235bb
2022-01-07 21:52:07 -05:00
vadimt 672f2fc24a Generate bugreports for ANRs and other anomalies
Bug: 211907395
Test: a similar approach was implemented for SysUI tests
Change-Id: I04770e73e6adf6bda63a8362976ec550434df6f3
2022-01-07 16:05:46 -08:00
Andras Kloczl 3d8cfd22a1 Two panel workspace TAPL follow up CL
- TODO: enable test in portrait

Test: TwoPanelWorkspaceTest
Former CL: http://ag/16357467
Bug: 197631877

Change-Id: I35c326b7a6c612d2fb66c8b94b810f5131fd58d8
2022-01-07 11:27:38 +00:00
TreeHugger Robot 720762f65b Merge "Ensure to inject events outside of the insets region for right margin" 2021-12-29 05:44:38 +00:00
Prabir Pradhan 00308cfd57 Ensure to inject events outside of the insets region for right margin
The display's x-coordinates for input are in the range:
  [0, displayWidth).

Injecting input at the point (displayWidth, 0) is technically outside
of the display. After accounting for insets, the x-coordinate range for
the display is:

  [leftInset, displayWidth - rightInset).

An input event injected at x = (displayWidth - rightInset) would be
outside of this range, and would be within the right insets region.

To account for this, use a one pixel buffer when calculating the
right gesture start margin.

A similar one pixel buffer is already used for the bottom margin
calculation.


Test: atest NexusLauncherTests:
com.android.quickstep.TaplTestsQuickstep
Bug: 208849306

Change-Id: I9d5a6429cd55fdfcbf2c849e27e3d3a0a7faaa47
2021-12-24 13:14:41 +00:00