Commit Graph

727 Commits

Author SHA1 Message Date
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
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
Pat Manning ee01176810 Fix launcher scroll distance for TAPL tests.
Test is passing correctly but for the wrong reasons. If we attempted to use a different distance it would have failed.

Bug: 197630182
Test: manual
Change-Id: Ib275b89c86cdb9f75d40b9d25c8c498098b543b7
2021-12-22 09:55:53 +00:00
Ling Wo 06119c9c6a Merge "delete appIcon from workspace via TAPL" into sc-v2-dev am: 361d8286cc am: 7f389d6317
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16189765

Change-Id: I4d2d76c92933e45dab99566e460c4f59804f59e7
2021-12-14 02:55:17 +00:00
Ling WO 85336c23fb delete appIcon from workspace via TAPL
1. Create a new class for DropBar icon.
2. Implement function to delete appIcon from workspace.
3. Add testDeleteFromWorkspace to TaplTestsLauncher3.

Bug: 205593009
Test: Launcher3Tests:com.android.launcher3.ui.TaplTestsLauncher3#testDeleteFromWorkspace

Change-Id: I259b909aebcdcc1c73af63a9970db43dab3e86eb
2021-12-10 18:14:41 -08:00
András Klöczl 0722fb1b2a Merge "Add TAPL tests for two panel workspace" into sc-v2-dev am: f4a161eef3 am: f5ee9c87b8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16357467

Change-Id: I5e29e4e23a1a49e2c6ba9322a700d675040e5ca6
2021-12-06 14:46:54 +00:00
Andras Kloczl c820151a4c Add TAPL tests for two panel workspace
- Add test for icon dragging
- Add test for page pairing
- Add test for empty page removal
- Add dragIcon helper method

Test: TwoPanelWorkspaceTest
Bug: 197631877
Change-Id: I7ce2dd88e183626feac49b34254d00a589473944
2021-12-02 16:44:26 +00:00
Prabir Pradhan 13bdf056b1 Merge "Tapl Widgets: Don't use container width as gesture margin" into sc-v2-dev am: 79350ef1bc am: 60bbc7c74f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16365181

Change-Id: Id7249c0341f36ec5f19e86b4dea47c9f14f4a884
2021-12-01 12:07:14 +00:00
Prabir Pradhan 53ae5d85a6 Tapl Widgets: Don't use container width as gesture margin
The test used margin that was equal to the width of the container when
injecting a backward swipe. This means the swipe was injected at an x
value of 0 in the View's local coordinates. When injecting such events
into the system, the coordinates will undergo several transformations,
at which point floating point precision errors could accumulate. This
could result in the event being dispatched outside the boundary of the
view.

Change the injection margin so that the swipe is injected in the middle
of the View instead of at its edge.

Bug: 201777251
Bug: 207146693
Test: atest TaplTestsLauncher3
Change-Id: I4082c2845aef033a6fbe41070061866d6048e21d
2021-11-30 15:06:42 +00:00
Alex Chau eab71ab652 Merge "Fix tapl tests for overview actions in fallback recents." into sc-v2-dev am: 22d7524f53 am: eb6be24779
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16182391

Change-Id: I54cf9c8d25be9a3393c122d0bf4135c051d11975
2021-11-25 18:28:10 +00:00
Alex Chau 22d7524f53 Merge "Fix tapl tests for overview actions in fallback recents." into sc-v2-dev 2021-11-25 17:58:02 +00:00
Pat Manning 4433db800c Fix tapl tests for overview actions in fallback recents.
Note: fallback recents test may still fail manual testing if using flag SEPARATE_RECENTS_ACTIVITY

Test: FallbackRecentsTest.java
Bug: 197630182
Change-Id: Id18184e1f6271337adceacc9bac583d84e83afed
2021-11-25 15:39:47 +00:00
vadimt 499e2055a6 Logging the stack trace for system anomaly messages
With these system anomalies, you are never sure that the system/tests will be able to normally bubble up the error.

Bug: 203416429
Test: presubmit

Change-Id: Ie1d3d183cf6e56778d5c052ef7b8e0541bbc6255
(cherry picked from commit 37542c8c0e)
2021-11-22 18:08:00 +00:00