Commit Graph

43 Commits

Author SHA1 Message Date
Sihua Ma
73c766d75d Migrate responsive tests to multivalent
Test: atest NexusLauncherRoboTests
Test: SysUI studio
Flag: TEST_ONLY
Fix: 325088640
Change-Id: I32cce09ff7ef070b6c86b6440723006b5cb503cf
2024-06-13 09:48:09 +00:00
Treehugger Robot
e8638f4eb2 Merge "Run UiThreadTest in LauncherMultivalentJUnit" into main 2024-06-05 17:02:46 +00:00
Sihua Ma
3b2a136272 Run UiThreadTest in LauncherMultivalentJUnit
Additionally migrating DisplayControllerTest to multivalent

Flag: TEST_ONLY
Test: atest NexusLauncherRoboTests
Test: SysUI studio
Change-Id: I9ff89218947b32f79b39bb0e6dd4beabec3b7369
2024-05-30 23:11:29 +00:00
Sihua Ma
9d093d5b57 Replace verifyZeroInteractions with verifyNoMoreInteractions
Also migrating LockedUserStateTest and AbstractFloatingViewHelperTest
to multivalent

Test: atest NexusLauncherRoboTests
Test: SysUI studio
Flag: TEST_ONLY
Bug: 297950111
Change-Id: Ic476de791109e7892c86bf5ae77727fc0506f0b9
2024-05-29 22:03:43 +00:00
Sihua Ma
1159c2546f Reapply "Move widget picker tests to Robolectric"
This reverts commit 97ee134acc.

Reason for revert: Fixed an issue with UI_HELPER_EXECUTOR that caused the flakiness

Test: atest NexusLauncherRoboTests
Test: SysUI studio
Flag: None Test migration
Fix: 325088642
Fix: 325088805
Fix: 325089116
Fix: 325088960

Change-Id: I2f50c30d2c861e3bba8a8fa3ec547ca2ade6153a
2024-05-22 19:41:11 +00:00
Uwais Ashraf
fe2107c59d Merge "Revert "Move widget picker tests to Robolectric"" into main 2024-05-21 23:05:12 +00:00
Uwais Ashraf
97ee134acc Revert "Move widget picker tests to Robolectric"
This reverts commit efc24f9251.

Reason for revert: Potential cause for flakiness https://android-build.corp.google.com/test_investigate/?invocationId=I07000010279081631&testResultId=TR32129311605132927

Change-Id: I4f0154bc101b6bc840c11ff0b6bf42f4ebc5ed03
2024-05-21 19:44:41 +00:00
Uwais Ashraf
784b4f28b0 Fix some compile errors occurring as a result of robo enablement
Fix: 297950111
Test: :NexusLauncher.Robo:testGoogleWithQuickstepDebugUnitTest
Test: atest NexusLauncherRoboTests
Flag: NA
Change-Id: Ic9b09fff630d274558d09b7031d12ec28f10fbc7
2024-05-21 18:56:52 +00:00
Sihua Ma
efc24f9251 Move widget picker tests to Robolectric
Test: atest Launcher3RoboTests
Test: atest NexusLauncherRoboTests
Test: SysUI studio
Flag: NONE test migration
Bug: 297950111
Change-Id: I9124d4f45feb0ded74ffe2e0aabffdf98459ff4f
2024-05-20 21:20:32 +00:00
Sunny Goyal
25f5e29418 Adding support for importing/exporting launcher layout
Bug: 338282246
Flag: None
Test: Manual, developer feature
      atest AutoInstallsLayoutTest
Change-Id: I8a5674080f3c156d97bc6118c51532c2fe8177d5
2024-05-16 15:24:41 -07:00
Sunny Goyal
0f4bc92653 Creating a custom runner for multivalent tests with Launcher specific features
Bug: 338128923
Test: Verified by modifying a test
Flag: None
Change-Id: I1f04e28847ff9c0f7af3c0d952038ad24d03c17e
2024-05-06 12:10:21 -07:00
Sunny Goyal
86145f49fb Adding a special runner to run simulate multiple devices when running robo tests
Bug: 338128923
Test: Verrified by modifying a test
Flag: None
Change-Id: I133842d68e437b971da39e2081c8859515463cd3
2024-05-03 15:54:40 -07:00
Sunny Goyal
993893895c Converting ModelTask to an interface instead of an abstract class
This allows extensibility and better use of lambdas

Bug: 338282246
Test: Presubmit
Flag: None

Change-Id: Ia41067f0068b3b631eeb4faf877dc77f8587e1f6
2024-05-01 15:43:26 -07:00
Sunny Goyal
fdae170684 Fixing robolectric tests not running on UI thread after changing looper mode
Bug: 297950111
Flag: None
Test: Presubmit
Change-Id: I9351474ba4d377e8e9539f9b3d22d5ba15ac6a44
2024-04-24 16:42:30 -07:00
Sunny Goyal
10fa016352 Fixing MainThreadInitializedObject
> Making SafeCloseable implementation mandatory, to prevent leaks during test and preview
> Removing getNoCreate method and defining executeIfCreated to avoid null pointer exceptions
> Fixing sandbox value leaking into main, by Checking sandbox against App context
> Converting sanbox to an interface instead a class

Bug: 335280439
Test: Presubmit
Flag: None
Change-Id: I951dcde871898e745ff6490a1c4f8fd1512888f5
2024-04-22 17:04:33 -07:00
Sunny Goyal
4a22ed81ea Using resource overrides for PluginManager instead of code-swap
Bug: 330920490
Test: Presubmit
Flag: None
Change-Id: Ib1cd50f95873928b9ce104e8e95d21f1dca9c6e3
2024-04-12 11:38:32 -07:00
Sunny Goyal
8049369af8 Freezing legacy feature flags
Legacy feature flags will be locked to their current values in code.
All new feature development should use aconfig flags

Bug: 332588958
Flag: None
Test: Presubmit
Change-Id: Ie72dd8276b7135620de279835d6721a34f82ede4
2024-04-09 15:26:07 -07:00
Sunny Goyal
8ecbaa422f Merge "Moving various nav-bar configs out of feature flags" into main 2024-04-09 05:45:21 +00:00
Sunny Goyal
89931316a2 Moving various nav-bar configs out of feature flags
Bug: 332588958
Test: Presubmit
Flag: None
Change-Id: Ia4dc5b69bcf4d461e3444b9e37bb7334bb74aae4
2024-04-08 16:54:04 -07:00
Vadim Tryshev
785da8d60a Restoring the full set of combinations in testDragShortcutToMultipleWorkspaceCells in presubmit
Bug: 187761685
Test: presubmit
Flag: N/A
Change-Id: Ib345c94c79c7dda72283eb03515cd254e31e7c0b
2024-04-01 18:01:54 -07:00
Sunny Goyal
5ca50490a3 Making some classess accessible in multivalent tests
Bug: 297950111
Flag: None
Test: Presubmit
Change-Id: I2e4b18fc279cb96b3f68d64f95703c11bb885b2a
2024-03-20 13:30:40 -07:00
Uwais Ashraf
cf70589921 Merge "Enable tests which do not require any modification" into main 2024-03-13 15:42:07 +00:00
Uwais Ashraf
4ee1701fd1 Enable tests which do not require any modification
Fix: 329052420
Flag: NA
Test: Presubmits + :NexusLauncher:testGoogleWithQuickstepDebugUnitTest
Change-Id: I27e847c923076e4e978fd7359c9c62745d4f5f0a
2024-03-13 12:27:46 +00:00
Sebastián Franco
ad46eb75f4 Revert^4 "Removing all restored backups except one so we don't have old backups"
To prevent the error I introduce the method restorePreviousState().

This reverts commit 1234090589.

Reason for revert: Fixing presubmit breaks

Bug: 325285743
Flag:  ACONFIG narrow_grid_restore disabled
Test: BackupAndRestoreDBSelectionTest
Change-Id: I63666c29eb91dada4243af019ab0538c40bc0f78
2024-03-12 11:01:26 -07:00
Sebastián Franco
8a5dd1b3cf Merge "Revert^3 "Removing all restored backups except one so we don't have old backups"" into main 2024-03-11 20:17:43 +00:00
Sebastián Franco
1234090589 Revert^3 "Removing all restored backups except one so we don't have old backups"
This reverts commit 4b960d1f11.

Reason for revert: Breaking presubmit, no bug number yet 

Change-Id: I0bafad8bf63fae1d9408b65c6c18c79ab5d40d05
2024-03-11 20:15:24 +00:00
Sebastián Franco
37e9aa2504 Merge "Revert^2 "Removing all restored backups except one so we don't have old backups"" into main 2024-03-11 17:09:21 +00:00
Sebastián Franco
4b960d1f11 Revert^2 "Removing all restored backups except one so we don't have old backups"
This reverts commit 3306fa5325.

Reason for revert: Fixing issue that caused b/328782012

Change-Id: Ib6a1bbfeedf608f5f77ac6be500271e811320f32
2024-03-08 18:53:57 +00:00
Sebastián Franco
0f0c1dd30b Merge "Revert "Removing all restored backups except one so we don't have old backups"" into main 2024-03-08 18:45:17 +00:00
Sebastián Franco
3306fa5325 Revert "Removing all restored backups except one so we don't have old backups"
This reverts commit bd43b9344f.

Reason for revert: b/328782012

Change-Id: I1666fbd63d82da06ed8c3d9ce58b5ed6b298618b
2024-03-08 18:42:30 +00:00
Sebastián Franco
acdcaa21a0 Merge "Removing all restored backups except one so we don't have old backups" into main 2024-03-08 14:16:14 +00:00
Sebastian Franco
bd43b9344f Removing all restored backups except one so we don't have old backups
Adding test to make sure this is the case.

Bug: 325285743
Flag:  ACONFIG narrow_grid_restore disabled
Test: BackupAndRestoreDBSelectionTest
Change-Id: I84c3a92f40598137d5c5c52d34af7583b384122c
2024-03-07 11:23:55 -06:00
Uwais Ashraf
9c2f5a4c62 Remove classes related to E2E testing from deviceless test classpath
Fix: 327187136
Flag: NA
Test: gradlew :NexusLauncher:testGoogleWithQuickstepDebugUnitTest
Test: atest Launcher3RoboTests
Test: presubmits passing
Change-Id: I4f05524bdc55d8473f3b5115cc239eb8cc48a856
2024-03-04 13:45:32 +00:00
Sunny Goyal
cc1dad0cae Merging multiple implementations of CancellableTask
Bug: 318539160
Flag: None
Test: Manual
Change-Id: Ie855427c2676e0ce76655e4dd67472c0b5e435d8
2024-02-15 13:01:10 -08:00
Vadim Tryshev
e2c07182ed Merge "Removing FilteredLogcat files" into main 2024-02-08 02:16:23 +00:00
Vadim Tryshev
1e038e4c16 Removing FilteredLogcat files
We don't use them

Bug: 187761685
Flag: N/A
Test: presubmit
Change-Id: I236f3c8e8cc7372e371d9a5bc1ff37889e1ab87b
2024-02-06 18:47:36 -08:00
Anushree Ganjam
9858a3e0f4 Add Unit tests for System Shortcut.
Update SystemShortcut<T extends ActivityContext> and remove dependency on Launcher so we can write unit tests.

Introduce TestSandboxModelContextWrapper , wrapper around SandboxModelContext and ActivityContext.

Use SandboxModelContext for testing since we need UserCache, AllAppsContainerView, AllAppsStore to be spied and verified for function calls.

StatsLogManager is not verified in this cl, We can do as follow up.

Bug: 319250810
Test: Manual.
Flag: aconfig com.android.launcher3.enable_private_space TEAMFOOD

Change-Id: If767128a502e40d2016a331db4a342f20f24c588
2024-02-05 10:59:52 -08:00
Cliff Wang
dd2222749b Merge "Revert "Make sure TAPL waits for Launcher activity to stop each time it stops"" into main 2024-02-05 08:21:54 +00:00
Cliff Wang
ac82e995ca Revert "Make sure TAPL waits for Launcher activity to stop each time it stops"
This reverts commit dd33b64a64.

Reason for revert: “DroidMonitor: Potential culprit for Bug b/323619378 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.”.

Bug:323619378
Change-Id: Iadaa80f2cc51f39ae3ab73cdd49a98d05835506e
2024-02-05 04:46:17 +00:00
Vadim Tryshev
f9eced5768 Merge "Make sure TAPL waits for Launcher activity to stop each time it stops" into main 2024-02-03 02:33:53 +00:00
Vadim Tryshev
dd33b64a64 Make sure TAPL waits for Launcher activity to stop each time it stops
This helps to ensure that the test doesn't proceed while the activity is
still stopping and it's state hasn't settled.

We introduce a count of STOP events and make sure it's 0 except for
cases where stops are safe to ignore or we have waited for them.

Bug: 313926097
Flag: N/A
Test: presubmit
Change-Id: I51c73c89854fcaa390d47a57389da18b2ce0ee6c
2024-02-02 15:21:20 -08:00
fbaron
9a16ca5215 Fix testDragToFolder test
The issue seems to be that when we begin drag we enter spring loaded mode which triggers the 'app swap' interaction, leading us to getting the wrong position for the app icon we're trying to drag into. Using photos app instead of gmail should make it so that we don't enter the app swap operation with playstore, meaning we would get the correct position for play store and we will drag the app there

Fix: 320484402
Flag: NONE
Test: TaplDragTest#testDragToFolder
Change-Id: Id6f09be997046e7c450a2760ee95cc5735ad5673
2024-01-25 10:55:27 -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