Commit Graph

73 Commits

Author SHA1 Message Date
Sebastian Franco
2d8be10856 Adding unit test to makeSpaceForHotseatMigration
Flag: NA
Bug: 318417510
Test: atest HotseatReorderUnitTest
Change-Id: If4fe388d00138b2d43693df0cf79abb16f354291
2024-02-01 17:08:52 +00:00
Colin Cross
f156b6bc7c Set use_resource_processor: false
These modules fail to compile when use_resource_processor is enabled
by default, disable them explicitly for now.

Bug: 319712088
Test: m javac-check
Flag: NA
Change-Id: I0f7ee108aab802ee1882f8017ea4b47346e38683
2024-01-24 15:52:06 -08:00
Uwais Ashraf
77b97c0729 Replace existing Robolectric test task with functioning one.
This CL does the following:
- Creates a dir for multivalentTests
- Creates symlinks for the dir to keep Android Studio happy
- Moves many files to the multivalentTests dir
- Adjusts gradle and soong build files to use the new dir as part of
their source sets.

Test: ./gradlew :NexusLauncher:testGoogleWithQuickstepDebugUnitTest
Test: atest Launcher3RoboTests
Fix: 316553886
Bug: 316553889
Flag: NA
Change-Id: Iae28fd0c0191b3ecf9bd2950800875950cca2622
2024-01-19 21:39:23 +00:00
Uwais Ashraf
861f2fdc81 Create Launcher3RoboTests and enable Robolectric on small set of tests
Test: atest Launcher3RoboTests
Bug: 316551909
Flag: NA
Change-Id: Ib1bbaf49e3e608f8c67005c129e090711df1e99c
2023-12-21 15:06:12 +00:00
Uwais Ashraf
e0a4feb664 Rename Tapl tests that do not match *Test.(kt|java) for easier groups
Test: presubmits passing
Bug: 316551909
Flag: NA
Change-Id: Ib2070d7610927777376acf0ddefcbc90e582e6f6
2023-12-19 11:54:10 +00:00
Sebastian Franco
d30100eaa9 Move classes inside of CellLayoutBoard to their own file
Previous step for adding unit testing for MultipageCellLayout.

Flag: LEGACY FOLDABLE_SINGLE_PAGE DISABLED
Bug: 270395274
Test: ReorderAlgorithmUnitTest
Change-Id: Ia5ca0b10481d7a21883594434b3406fb3a5ccf0b
2023-11-20 17:58:24 -06:00
Uwais Ashraf
aa7fa886d6 Add margins to top and bottom when grid only overview enabled
Fix: 299100244
Test: OverviewImageTest and dump tests
Flag: ACONFIG com.android.launcher3.enable_grid_only_overview TEAMFOOD
Change-Id: I22ebced5bf1e27974036d6e2ef72d2b8d63df824
2023-10-24 16:15:39 +00:00
Jordan Silva
4d95f79db5 Merge "Create a new test suite for screenshot tests" into main 2023-10-23 22:46:11 +00:00
Jordan Silva
e5fb55cf88 Create a new test suite for screenshot tests
Adding a new test suite NexusLauncherScreenshotTests to run the screenshot tests separate from the Launcher tests.

Bug: 303224992
Flag: N/A - tests
Test: atest NexusLauncherScreenshotTests
Change-Id: Ie4c328b829402f23fc22876481d66fc414aede3c
2023-10-23 15:22:16 +00:00
Pat Manning
954e3b8dee Move overview tests to quickstep package.
Fix: 305394234
Test: TaplOverviewIconAppChipMenuTest, TaplOverviewIconTest
Flag: ACONFIG com.android.launcher3.enable_overview_icon_menu DEVELOPMENT
Change-Id: Ib39e2ec7f53de0c4b557558776c7ad428e4cab22
2023-10-23 16:15:33 +01:00
Pat Manning
24cec69361 Revert "Revert "Combine icon app tests to allow overriding flag ..."
Revert submission 25032768-revert-25007147-tapl-flag-SBORVHYDTI

Reason for revert: Resubmitting for b/304470271

Reverted changes: /q/submissionid:25032768-revert-25007147-tapl-flag-SBORVHYDTI

Change-Id: Ib0bd13a5c2a366160b185a2c6409c607ed7525a1
2023-10-17 15:56:48 +00:00
Sebastián Franco
87d482cd3e Merge "Unifying constant app names used in Tests" into main 2023-10-13 18:28:38 +00:00
Tyler Freeman
22781d97d9 Merge "Revert "Combine icon app tests to allow overriding flag for new ..."" into main 2023-10-12 20:06:56 +00:00
Tyler Freeman
1468467706 Revert "Combine icon app tests to allow overriding flag for new ..."
Revert submission 25007147-tapl-flag

Reason for revert: Breaks build: https://b.corp.google.com/issues/305033049

Reverted changes: /q/submissionid:25007147-tapl-flag

Change-Id: I99b5883e64ae25476394a4207c5d6a4d22fc27dc
2023-10-12 18:04:05 +00:00
Pat Manning
654c05837e Merge "Combine icon app tests to allow overriding flag for new icon app chip menu testing as well." into main 2023-10-12 15:59:17 +00:00
Pat Manning
236e738907 Combine icon app tests to allow overriding flag for new icon app chip menu testing as well.
Platinum exlude cl update: cl/572225659

Test: TaplOverviewAppIconMenuTest
Test: TaplAppIconAppChipMenuTest
Bug: 303329286
Bug: 303266562
Fix: 304470271
Change-Id: I4ca163401d6a42961e8955e06c164af0254b1231
2023-10-12 14:53:08 +01:00
Jeremy Sim
271fc9540c Merge "Set up to use aconfig flags from WM Shell" into main 2023-10-11 19:21:00 +00:00
Krzysztof Kosiński
c1d05a7101 Merge "Clean up obsolete aliases for Truth." into main am: a4bc505d01 am: 6247399c9b am: f56d690e22 am: 42c39649a7 am: b085f9e819
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/2778094

Change-Id: Id239979be76a11ce08d564c13f174aa5d02deb3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-11 00:16:49 +00:00
Jeremy Sim
9e44e378bb Set up to use aconfig flags from WM Shell
This CL allows Launcher and Launcher test files to use aconfig flags from WM Shell.

Bug: 304597782
Test: N/A
Change-Id: I291b744207ec07d5955814879987c15f4aa13140
2023-10-10 15:16:53 -07:00
Krzysztof Kosiński
b085f9e819 Merge "Clean up obsolete aliases for Truth." into main am: a4bc505d01 am: 6247399c9b am: f56d690e22 am: 42c39649a7
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/2778094

Change-Id: Idc45788d21959e1569e0fd33686536a9675442ae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 21:50:07 +00:00
Krzysztof Kosiński
6e3b7a6943 Clean up obsolete aliases for Truth.
Bug: 255714762
Test: presubmit
Change-Id: Idd56488c129096c520e4e69f175778f10156a569
2023-10-10 06:50:28 +00:00
Sebastian Franco
02a4fb41c7 Unifying constant app names used in Tests
Bug: 298234173
Test: No-op changes, all test should pass
Change-Id: I3cd4854b150d827393bff6eada7aa9a9201dadaa
2023-10-09 14:25:49 -07:00
Brian Isganitis
96224ef755 Merge "Migrate Kotlin tests to use mockito-kotlin2." into main 2023-10-06 17:54:56 +00:00
Sebastian Franco
547ddd4830 Moving tests form TaplTestsLauncher3 to TaplTestsAllAppsIconsWorking
Removing testGetAppIconName since that behaviour is already tested.

I'm also using this change to remove the TISBinder rule since it's not
needed.

Bug: 302869930
Test: atest TaplTestsAllAppsIconsWorking
Change-Id: Ie6b4f801254ca69b2485fe574914a73f947fc434
2023-10-04 16:43:19 -07:00
Sebastian Franco
fd96b78d14 Moving testWidgets from TaplTestsLauncher3 to TaplWorkspaceTest
Also, I'm taking advange of this change to update the name of
OopTaplOpenCloseAllApps to follow the standard TaplOpenCloseAllApps
and I'm also moving testPressBack to TaplOpenCloseAllApps since is
similar to the other methods in that class.

Bug: 298234173
Test: atest TaplWorkspaceTest

Change-Id: Ie933828baedf48b45e55f20853e238ecc6a594bd
2023-10-04 10:21:43 -07:00
Brian Isganitis
06139e079c Migrate Kotlin tests to use mockito-kotlin2.
Test: atest
Bug: 300509464
Flag: No
Change-Id: I5e0d0f1f29d51cdbfacd51f7229afddf8bd66f7e
2023-10-03 16:04:19 -04:00
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