Commit Graph

47 Commits

Author SHA1 Message Date
Sebastián Franco
bad922f50f Merge "Moving testWidgets from TaplTestsLauncher3 to it's own test TaplWidgetPickerTest" into main 2023-10-03 03:05:15 +00:00
Vadim Tryshev
b57e25127e Verifying that workspace looks correct at the end of the test.
I hope that this will lock bugs like b/298114205 in the test that created the bad condition, not the next one.

Bug: 298114205
Test: presubmit
Flag: N/A
Change-Id: If9b48fb5159fc35948607a99f87199d5a32e64d6
2023-09-29 18:31:04 -07:00
Sebastian Franco
7ab324a503 Moving testWidgets from TaplTestsLauncher3 to it's own test TaplWidgetPickerTest
Bug: 298234173
Test: atest TaplWidgetPickerTest
Change-Id: Ia19469d2021cb833b5c1d9d176425b9d6d352797
2023-09-29 20:55:36 +00:00
Sebastián Franco
770559cb6e Merge "Moving test related to the app icon menu to their own file" into main 2023-09-29 20:46:17 +00:00
Sebastian Franco
894c2d970d Moving test related to the app icon menu to their own file
Bug: 298234173
Test: atest TaplAppIconMenuTest
Change-Id: Ifa3422a835d87163a16895b0c011e118dde40044
2023-09-29 11:15:44 -07:00
Vinit Nayak
df751430bc Revert "Verifying that workspace looks correct at the end of the test."
This reverts commit 62e3b162ba.

Reason for revert: Possible culprit for b/301966780

Change-Id: Ice6babe404feeddf9f8b13ce2a6288005402c9cd
2023-09-26 15:19:20 -07:00
Sebastian Franco
4fffab9d85 Moving test related to Uninstalling and removing to their own class
Bug: 298234173
Test: atest OopTaplUninstallRemove
Change-Id: I9b51bea7c1f3130b70296f945bef9b903ac34342
2023-09-21 21:17:38 +00:00
Sebastián Franco
8171e2fb84 Merge "Moving test related to Dragging to their own class from TaplTestsLauncher3" into main 2023-09-20 22:08:03 +00:00
Sebastian Franco
6b059deea6 Moving test related to Dragging to their own class from TaplTestsLauncher3
Renaming the following test names:
 - testDragAppIconToWorkspaceCell to testDragAppIconToMultipleWorkspaceCells
 - testDragShortcutToMultipleWoCells to testDragShortcutToMultipleWorkspaceCells

Bug: 298234173
Test: atest OopTaplDragTest
Change-Id: I16707e0a882164c7a5acec6a4197bd0bea8514a7
2023-09-20 18:56:13 +00:00
Vadim Tryshev
62e3b162ba Verifying that workspace looks correct at the end of the test.
I hope that this will lock bugs like b/298114205 in the test that created the bad condition, not the next one.

Bug: 298114205
Test: presubmit
Flag: N/A
Change-Id: I6ad3598fb675d8b24ec0f273d255b7f2464dc53f
2023-09-14 10:11:25 -07:00
Sebastian Franco
1a02891d66 Moving TaplTestsLauncher3 to it's own class
Bug: 298234173
Test: atest TAPLOpenCloseAllApps
Change-Id: If827c5962e258ec5fe930b0d71e183e0191f2b11
2023-09-06 13:29:02 -07:00
Anushree Ganjam
2a14b978c6 Remove the test aconfig lib.
zhidou@ from ACE team is working on AConfigFakelib which will be useful
to set fake flag values in both unit tests and UI automator tests.
Meanwhile, we will mock the flag values for unit tests and UI automator
tests will have all flags values defaulted to false.

testAConfigLib with "test:true" doesn't generate fake flags values and
forces us to set the flag values using "SetFlagsRule". "SetFlagsRule"
doesn't work with Out Of Proc tests and hence doesn't serve the purpose
for us. AConfigFakelib and FakeFlagTargetPreparer should use for Out Of
Proc tests.

testAConfigLib with "test:true" is suitable for java host tests where
there is no device involved. Launcher tests are instrumentation tests and tests run on actual
devices. So we can use the production version of the AConfig lib and device
config flag values will be fetched for UI Automator tests.

Also migrating "enable_twoline_allapps" to trunk stable. Unit tests is
using mockito to mock the flag value as false. The owner of
"enable_twoline_allapps" can mock the value to true in unit tests as
next step.

Bug: 294913042
Test: Local studio build and soong build
Flag: enable_twoline_allapps

Change-Id: Iea42bf18197832a9ecbddc1c3aaa8c9e36169131
2023-08-30 15:20:51 -07:00
Anushree Ganjam
8a6b74e51b Move aconfig files to aconfig folder
- Set packageName as com.android.launcher3
- Follow folder structure as per go/sysui-aconfig-structure

Bug: 294913042

Test: adb shell device_config put launcher com.android.launcher3.enable_all_apps_rv_preinflation true

Flag: enable_all_apps_rv_preinflation

Change-Id: Ib45a24d9100b657e7776c6120bdf9625533e9ed7
2023-08-28 18:27:11 -07:00
Anushree Ganjam
94efd7a80c Update test build rules to support mocking AConfig methods.
- Add mockito-inline-extended to allow mocking static methods.
- Add StaticMockitoRule to help mock static methods.
This helps in unit tests with mocking the trunk stable flags.

Bug: 294913042
Test: NA
Flag: NA
Change-Id: If53ae1d1bc68a5c6b1824b6c7060cbc14e095b1b
2023-08-25 17:10:15 -07:00
Anushree Ganjam
d1a28fe08d Add Launcher aconfig.
Use `enable_expanding_pause_work_button` as an example.

See go/trunk-stable-launcher for implementation details

Bug: 294913042

Test: adb shell device_config put launcher com.google.android.platform.launcher.aconfig.flags.enable_expanding_pause_work_button true

Flag: enable_expanding_pause_work_button
Change-Id: I732722c8b219c023adf5bf31f132ce9da72fc4d5
2023-08-24 11:11:02 -07:00
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