Commit Graph

26 Commits

Author SHA1 Message Date
vadimt
137f5b62ac Improve diags when system errors cause failing Launcher tests
Now, for example, we won't diagnose a locked phone as a
"home button not showing in 3-button mode", even though it's technically
correct.

Change-Id: Ibdfa0741af7ff8545a811f6702dda74dc6c31c2e
2019-11-04 14:50:22 -08:00
vadimt
8c2efd0de0 Enabling some tests in landscape mode
Bug: 121280703
Change-Id: I285638d832594d5fed26ee812737a4356b110899
2019-09-04 17:33:52 -07:00
vadimt
d91cec72fe Simplifying switching to home for some tests
Change-Id: I696d0267a2c36a18080396657bed07f7b1654a7d
2019-07-12 12:26:08 -07:00
vadimt
2d4b05f295 Converting more tests to TAPL
Bug: 131116002
Bug: 115582915
Change-Id: I3346f96ddba3224eb4b92b15344d71b8ed6e32e0
2019-06-26 11:23:23 -07:00
vadimt
3a6eedc61b Converting some widget tests to TAPL
Bug: 115582915
Change-Id: I07c6ca5ef712cf1a85d81e7d4b4bda3604777ac8
2019-06-25 18:34:48 -07:00
vadimt
6346451bd6 Tests: fixing expected package name for AOSP tests
Change-Id: Id7a57d4bfcbed23ba20ca11846680fa1341e8a99
2019-06-21 10:58:03 -07:00
vadimt
d11b604e19 Converting some tests to TAPL
Change-Id: I1b67f80d9d61792d5795f9638bf9d19919f36d39
2019-06-20 17:53:05 -07:00
vadimt
06d30e54d5 Enabling tests in landscape mode
Bug: 121280703
Change-Id: I3245ca8d0b0496035658ce2a602882a62942f3f1
2019-06-17 15:13:25 -07:00
vadimt
c7bb8479e9 Fix pinning tests on android virtual device
Change-Id: I90a8753975538ab9864591a37a7d366e1222f2d8
2019-05-16 16:32:25 -07:00
vadimt
1bdb0f4046 Enable BindWidgetTest, RequestPinItemTest
Comparing only widget provider class names, as package names (sometimes)
switch to the test package, not to the ones in Launcher.

Bug: 131116593
Change-Id: Ieeed69432303a86fcefb194d509cdaf9d4513f3a
2019-05-03 13:49:52 -07:00
vadimt
677abe2117 Annotating ignored tests with requests to enable them
Bug: 117106893
Change-Id: Ib8e578913ceebee44a507b5e333e7da07c6120d0
2019-04-22 17:34:29 -07:00
Sunny Goyal
9589916418 ShortcutInfo renamed to WorkspaceItemInfo
Will get rid of ShortcutInfoCompat in a follow up cl

Change-Id: I7d7d9c938635f59b216290ba28bea9d0e0721a7d
2019-04-16 00:08:24 -07:00
Vadim Tryshev
34b6f9f106 Supporting OOP tests
AbstractLauncherUiTest was modified to compile and work both in- and
out- of proc.

Bug: 113056917
Test: was in Nexus branch
2018-10-13 01:13:45 +00:00
Sunny Goyal
4470344529 Fixing BindWidgetTest failing on Launcher3
Bug: 117616326
Change-Id: I3d08defc735498305cf982b214f6c0fae1508bd9
2018-10-11 16:06:52 -07:00
Vadim Tryshev
14c6c8cee4 Improving tests to fix testBindNormalWidget_withoutConfig, and beyond
1. Make waitXXX methods fail if the condition diesn’t turn true.
2. Waiting for loading to complete in tearDown instead of reloading the
 model
3. Avoiding waiting for load-complete where loading didn’t start
4. Disabling last test in AddConfigWidgetTest
5. Waiting for loading to complete inside setupAndVerifyContents(), not
 outside
6. Unifying how we wait for loader to complete
7. Adding more logging

Bug: 117332845
Test: running all Nexus tests
Change-Id: I3070e1ac2b9161179cc3e0800b0cd8162807389a
2018-10-09 18:47:42 -07:00
Sunny Goyal
4ed58d6c03 Adding tests for fallback recents when a 3rd party launcher is installed
Change-Id: I1d4da13cc779f49832008b12b9628d01631faffe
2018-10-09 14:25:01 -07:00
Vadim Tryshev
0a9f3ab4a6 Converting tests to Androidx
Bug: 112610679
Change-Id: I712826e668f1fbeb4e47cc541d4f5296d8eb74c0
2018-08-21 15:04:48 -04:00
TreeHugger Robot
a950d40d09 Merge "Started converting Launcher to be gesture-stable" into ub-launcher3-master 2018-08-14 19:18:46 +00:00
Vadim Tryshev
dc755e718d Started converting Launcher to be gesture-stable
All tests keep passing.

WorkTabTest.workTabExists was made gesture-stable. There is no need to
use TAPL, as the point is not to check answering to gestures, but to
check presence of tabs, which is better to do using launcher internal
state. (It still fails if run as a part of all tests, presumably,
because after Launcher's start, changes in user configuration are not
recognized, so I've commented the failing part)

Bug: 110103162
Test: Run all tests
Change-Id: Ic30b8e8475d16cee3880332f12311a44ddfa26cb
2018-08-14 10:29:57 -07:00
Sunny Goyal
6edb1b84bf Changing Condition to an interface to allow using lambdas
Change-Id: Ib7ad6a45d2ce556f843cd3a9767001904707dced
2018-08-14 10:27:48 -07:00
Jon Miranda
ca02f00eb1 Add @Test and @Ignore to untested test methods in RequestPinItemTest.
Error prone complains when trying to merge launcher3 code to platform pi-dev.

"This looks like a test method but is not run; please add @Test and @Ignore,
or, if this is a helper method, reduce its visibility."

Output:

Executing tasks: [:assembleGoogleDebug, :assembleGoogleDebugAndroidTest]
Gradle build finished in 1s 631ms
Tests Ignored: 1 passed, 4 ignored

Bug: 78589564
Change-Id: Icde57fd8307e1ef409822d1417f629cd1aaa57ba
2018-06-21 17:20:23 -07:00
Hyunyoung Song
3efd037e63 Fix the Launcher3Tests
Bug: 78589564

$ adb shell am instrument -w com.android.launcher3.tests/android.support.test.runner.AndroidJUnitRunner

com.android.launcher3.allapps.search.DefaultAppSearchAlgorithmTest:..
com.android.launcher3.logging.FileLogTest:..
com.android.launcher3.model.AddWorkspaceItemsTaskTest:....
com.android.launcher3.model.CacheDataUpdatedTaskTest:...
com.android.launcher3.model.DbDowngradeHelperTest:....
com.android.launcher3.model.GridSizeMigrationTaskTest:...........
com.android.launcher3.model.LoaderCursorTest:........
com.android.launcher3.model.PackageInstallStateChangedTaskTest:...
com.android.launcher3.popup.PopupPopulatorTest:..
com.android.launcher3.provider.RestoreDbTaskTest:..
com.android.launcher3.touch.SwipeDetectorTest:.....
com.android.launcher3.ui.AllAppsAppLaunchTest:..
com.android.launcher3.ui.AllAppsIconToHomeTest:..
com.android.launcher3.ui.ShortcutsLaunchTest:..
com.android.launcher3.ui.ShortcutsToHomeTest:..
com.android.launcher3.ui.WorkTabTest:.
com.android.launcher3.ui.widget.AddConfigWidgetTest:....
com.android.launcher3.ui.widget.AddWidgetTest:..
com.android.launcher3.ui.widget.BindWidgetTest:......
com.android.launcher3.ui.widget.RequestPinItemTest:.
com.android.launcher3.util.GridOccupancyTest:..
com.android.launcher3.widget.WidgetsListAdapterTest:......

Time: 180.363
OK (76 test)

Change-Id: I4a50581bc8d06a030467ac9fec3e1ef668745214
2018-06-19 14:13:13 -07:00
Hyunyoung Song
e24cb63b81 WallpaperManagerCompat should target correct platform
Also replace Utilities.isAtLeastO() to static final constant.
Bug: 65544683

Change-Id: I39fbea66939d72c31702748716c4e65b4f9bee6a
2017-09-11 12:17:09 -07:00
Sunny Goyal
1d7f45d8f8 Fixing various tests
> Migrating UI tests to AndroidJUnit4 for better support
> Removing obsolete RotationPreference test
> Fixing broken FileLogTest and AndroidJUnit4
> Removing InvariantDeviceProfileTest as it does not work well with
  resource overlays

Change-Id: I0abb1df6765d76d86c1c6c84e8ac35eb9a6bcdaa
2017-07-31 11:03:54 -07:00
Sunny Goyal
c65a0085d7 Adding support for showing the widget preview based on the provided RemoteViews
Bug: 35811129
Change-Id: I336e48cd00cfec2e617ac73bd8a81419b0944aa7
2017-03-17 11:25:29 -07:00
Sunny Goyal
d9843357d0 Adding some tests for request pin shortcut/widget flow
Bug: 33584624
Change-Id: I49df36f60d2ae071b9d2c77c9c3300e010cd3bb9
2017-02-22 15:46:40 -08:00