Commit Graph

32 Commits

Author SHA1 Message Date
Vadim Tryshev
84f51ec03e Revert "Prevent some leaks from leaking to the next test"
This reverts commit d17a270b31.

Reason for revert: Perhaps, caused failures like: Launcher internal state didn't switch to Home, https://android-build.corp.google.com/test_investigate/?invocationId=I32700010190010056&testResultId=TR70828881289196802

Change-Id: I1c7afb75785aac6b02f451b9d5b74de7833abfed
2023-08-22 18:30:48 +00:00
Vadim Tryshev
d17a270b31 Prevent some leaks from leaking to the next test
Now when exiting the test, we finish Launcher activity and force the leak check.
I've seen this helping one of the leaks to stay within the test that caused it instead of failing the next test.

Bug: 187761685
Flag: N/A
Test: presubmit, local
Change-Id: I7eac26f749433c37a6880a2f035ab1ba9c5fef6e
2023-08-18 18:55:11 -07:00
Sunny Goyal
cd5d3d0c31 Merge "Removing LauncherActivityRule as it can be flaky based on when the rule was initialized" into udc-qpr-dev 2023-07-17 16:58:20 +00:00
Pat Manning
f351e515f7 Merge "Show tooltips on cursor hover of taskbar icons." into udc-qpr-dev 2023-07-17 10:15:46 +00:00
Sunny Goyal
f6b79f7caf Removing LauncherActivityRule as it can be flaky based on when
the rule was initialized

Bug: 289161193
Test: Presubmit and PostSubmit
Flag: N/A
Change-Id: I0e1e9c6f932d2a98a2f1e47bd1665e26f2db9eb4
2023-07-14 10:29:55 -07:00
Pat Manning
da69661add Show tooltips on cursor hover of taskbar icons.
Fix: 250092437
Test: TaskbarHoverToolTipControllerTest
Flag: ENABLE_CURSOR_HOVER_STATES
Change-Id: Ia0463518d13b313b354328078685930215fb7636
2023-07-14 13:42:30 +01:00
Vadim Tryshev
baef466f61 Enabling view capture analysis in Launcher tests.
For now, only Alpha Jumps detector is implemented. The test will fail if
an alpha jump is detected.

The ignore-list for alpha jump detection ended up being uncomfortably
long, I plan dealing with this immediately after landing this CL.

Bug: 286251603
Test: presubmit, forrest
Flag: N/A
Change-Id: I3f44b02015e2ce93eb8b4071becbc44b36416459
2023-07-13 17:34:57 -07:00
Vadim Tryshev
2ba42ef94d Removing ViewCaptureAnalysisRule
Bug: 286251603
Test: presubmit
Flag: N/A
Change-Id: I0123ed3892bbfd6d0e880141ace878b6204dbd81
2023-06-27 22:12:45 +00:00
vadimt
de54cb8fa5 Adding a rule for analyzing view capture data
For now, the rule is basically empty, to start with. In the following CLs it will
invoke the search for anomalies in the data collected by ViewCaptureRule
after the test succeeds and fail the test if an anomaly is found.

Bug: 286251603
Test: presubmit
Flag: N/A
Change-Id: I373ea0d7ee85206101fb15584889ea5933e7d7b8
2023-06-07 17:39:54 -07:00
Stefan Andonian
fa8091661a Added ViewCapture to all tests which implement AbstractLauncherUiTest.
This enables developers to watch failed tests in classes like
TaplTestsQuickstep in the go/web-hv tool.

Bug: 242867462
Test: Failed a test and verified that the TimeLapse bugreport entry
showed up properly in the go/web-hv tool.

Change-Id: Ic89af2a0e7102db52c52ddc668607a81c4809ed6
2023-05-12 21:15:14 +00:00
Sunny Goyal
348e518b2c Merge "Using a runtime generated layout for tests instead of defining xml" into udc-dev 2023-04-14 18:12:57 +00:00
Sebastian Franco
e7c3d3d4ce Parsing test boards from text files to be able to add more and bigger tests
It also adds an assets folder inside of Launcher3 tests.

It also fixes a bug in fullReorder.

Test: atest ReorderWidgets
Flag: none
Bug: 229292911
Change-Id: I7dadd42a3057d353326691163bb7db71a2e9dcc4
2023-04-13 17:14:51 +00:00
Sunny Goyal
ab2f808196 Using a runtime generated layout for tests instead of defining xml
This allows support for easily setting up default layouts

Bug: 277345535
Test: Presubmit
Flag: N/A
Change-Id: I1c089d60ac3f8add8d7e1060d343e04d30afe094
2023-04-12 22:54:14 +00:00
Vadim Tryshev
990a32e7cf Making Launcher3Tests "abtd atest"-compatible
Test: labtest
Bug: 187761685

Change-Id: I3e7ed63eb8cfa0d634d720a692e050deb8736906
2023-03-02 23:06:37 +00:00
Sebastian Franco
0451d239ed Binding tests to TouchInteractionService to preventing it from getting destroyed
Fix: 257514573
Bug: 266716173
Test: atest MemoryTests
Test: atest TaplTestsLauncher3#testDragAppIcon
Change-Id: Ib53bf11f45f9e05bf55116d52f3406f45dfaf6c2
2023-02-22 10:14:29 -08:00
Nicolo' Mazzucato
e8ee34ad8a Move Launcher classes shared between tests and prod in a separate lib
This is necessary because otherwise those are included in several gradle projects. Gradle doesn't support the same files imported in different projects, and it removes them from a random one if it happens, resulting in missing symbols.

This extracts the shared files in a new target, and adds it as dep of the original target.

Test: Build launcher + execute a few tests manually with gradle + verify that Launcher.java can resolve all symbols with gradle config
Bug: 262267728
Change-Id: Ida5b25c45320d517603834112f4699e4d3344c03
2023-02-07 12:03:10 +00:00
Ming-Shin Lu
4d4f62ac77 TAPL: add setIgnoreTaskbarVisibility in LauncherInstrumentation
As now FlickerTests is leveraging TAPL to interact devices CUJs,
we realized in LauncherInstrumentation will verify task bar visibility
automatically to expect it always visible when quick-switch, which is
not always reliable since the task bar may be hidden by manual or
when the activity requests to show IME.

Add setIgnoreTaskbarVisibility in LauncherInstrumentation for the caller
to ignore taskbar visibility if the test does not need to verify it.

Bug: 228012334
Bug: 240306344
Test: atest FlickerTests:SwitchImeWindowsFromGestureNavTest
      in tablet device
Test: atest NexusLauncherOutOfProcTests:com.android.quickstep.\
       TaplTestsQuickstep#testQuickSwitchToPreviousAppForTablet

Change-Id: Id0a35561523d733b8434acb702ec7dcaa466a1c2
2022-10-05 11:37:37 +08:00
Thales Lima
9938c2f791 Calculate hotseat width based on available width
Navigation buttons take space on the hotseat, so hotseat width (qsb width and border space between icons) should be calculated instead of having a coded value.

Bug: 223724516
Bug: 228998463
Test: manual, changing display size
Test: manual, changing hotseatBarEndOffset value
Test: HotseatWidthCalculationTest
Change-Id: Ibd4f5ff2e06afda8e7420fb744db049d2e418e14
2022-08-04 15:21:06 +01:00
vadimt
25fbd5b0bb Sampling too long Launcher tests
A test that takes > 3 min will generate an artifact file containing stacks of all threads of the test process taken every 3 sec. This artifact will be also generated if the test process is killed, for example, by timeout.

This artifact should help EngProd's effort to speed up presubmits.

Bug: 225186335
Test: local runs
Change-Id: I721779bfbe5bc6289315998ed2660f5f46165611
2022-04-19 18:02:56 -07:00
vadimt
13839e4cc6 Preparing to using "platform-test-rules" library from Launcher tests
I want to include some stuff (like android.platform.test.rule.CrashDetector) but I want to land just the dependency part and see if I get postsubmit build problems that sometimes appear in obscure AOSP targets.

Test: presubmit
Bug: 187761685
Change-Id: I334b9f1029edbe8621df940900f43d0c5059373e
Merged-In: I334b9f1029edbe8621df940900f43d0c5059373e
2022-02-22 21:39:35 +00:00
TreeHugger Robot
0acf93b251 Merge "Fix licenses and license texts." 2022-02-01 19:02:06 +00:00
Bob Badour
a7548b5871 Fix licenses and license texts.
Entire package is 1p.

Bug: 210912771

Test: m nothing

Change-Id: Id941d93786882aca78f214ac692433a353b84ed3
2022-02-01 17:26:39 +00:00
Pat Manning
30c28a0a22 Reenable tablet tests for OOP TAPL tests.
Bug: 210158657
Test: TaplTestsQuickstep.java
Change-Id: Ib604642be6819065cde4167f3705d43ced3b2fda
2022-01-31 18:49:20 +00:00
Thales Lima
a1012904bb Make hotseat fit one line on tablets
When running on tablets in landscape, the QSB should inline with the hotseat icons. This does that and fixes small bugs that didn't account for the new hotseatBorderSpace.

Bug: 210118169
Test: atest Launcher3Tests:DeviceProfileTest
Test: visual, using HSV and Window
Change-Id: I5a89c5449bf59fde736618151eceaacca443ef67
2022-01-21 17:42:48 +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
Alex Chau
4075f17c2d Revert "Migrate workspace item adding tests to kotlin"
This reverts commit e77eafc263.

Reason for revert: b/207684378
Bug: 207684378
Bug: 199160559

Change-Id: I4a35fea423f1cd7afae4603fd1185150763f8bf0
2021-11-25 11:54:26 +00:00
Andras Kloczl
e77eafc263 Migrate workspace item adding tests to kotlin
In a former CL (http://ag/16064580) I've tried to
do the same but presubmit was constantly failing,
probably because the test is in kotlin.

Test: AddWorkspaceItemsTaskTest.kt
Bug: 199160559
Change-Id: Ie1bc4fcd4f94cd7cb0601c21bbdf273452b9dd1f
2021-11-23 18:32:12 +00:00
vadimt
5ade8e890d Moving activity tracker to Launcher process
This will improve diagnostics for OOP tests,
like we now have a list of leaked activity classes.

Also some cleanups.

Bug: 187761685
Test: local runs
Change-Id: I8b5711ac727874fd826cfef9c742ea97048763e0
2021-09-27 17:36:14 +00:00
Sunny Goyal
177785eccf Moving all widget picker tests to instrumentation tests
Bug: 196825541
Test: Presubmit
Change-Id: I946f29baedb2e6b29044f8df1bc73b74e9999efe
2021-08-18 15:06:53 -07:00
Sunny Goyal
4af8cf9269 Updating test build rules
> Moving definition to bp files
> Adding mokito-inline to allow mocking final classes
> Moving src_common to src to avoid unnecessary code split

Bug: 196825541
Test: Presubmit
Change-Id: Ib6879cda6aee74f5b9050a16eb6ca94ed3b7e28c
2021-08-18 10:22:52 -07:00
Bob Badour
390b27e46c [LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Launcher3
Added SPDX-license-identifier-Apache-2.0 to:
  quickstep/Android.bp
  robolectric_tests/Android.bp
  tests/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I699e0796410f691ae7cf4802c41987d79e4e486d
2021-03-19 04:22:23 -07:00
Sunny Goyal
f5c42ea6aa Adding some build rules in Launcher3
Bug: 182502086
Test: Presubmit
Change-Id: Ib2c18f1e252b3382030293fd3b873e840320301a
Merged-In: Ib2c18f1e252b3382030293fd3b873e840320301a
2021-03-18 01:26:36 +00:00