Commit Graph

45 Commits

Author SHA1 Message Date
Yogisha Dixit
b9a1ac47b8 Remove press home command from AddConfigWidgetTest.
Context: b/192406323#comment4

Bug: 192406323
Test: AddConfigWidgetTest
Change-Id: I2741358de93f75ef7ed73ee97964020162542756
2021-07-14 10:38:31 +01:00
Yogisha Dixit
037a5362d8 Show resize frame when widget is added.
I referenced the code in Workspace.java that updates the widget view's
layout params before showing the resize frame.

Test: manual, AddWidgetTest and AddConfigWidgetTest tapl tests
Bug: 183437963
Change-Id: I6655917878fa22d6084b4bf39fc0661e7278d6f9
2021-06-29 18:25:38 +01:00
Yogisha Dixit
741fae9ea2 Move widget files into widget folder + add tests.
I will use the newly created LauncherAppWidgetProviderInfoTest in a follow-up CL to add tests for the newly added widget sizing APIs.

Test: Automatic: Ran all robolectric tests in launcher3,
      Manual: Added a widget, edited the widget, removed the widget
Bug: 179807199
Change-Id: I540b2dbe284c6eb5aa2466a1d13a9581ee59425b
2021-03-01 13:59:52 +00:00
Steven Ng
e92bc55d12 Make all widgets collapsed in the full widget picker by default
Changes:
1. Add a WidgetListHeader view for showing icon, app name and a subtitle.
2. Only WidgetListHeaders are always visible to users in the full widget
   picker.
3. Only one widgets list from an app is visible in the full widget picker
   at any one time.

Test: Auto: run add robolectric tests under widget/picker
      Manual: Open full widgets picker. Then, expand and collapse apps.
      Video: https://drive.google.com/file/d/1gzfeEm5IOAu0qHsO77OTS2eMfU7CHJiL/view?usp=sharing

Bug: 179797520
Change-Id: Idac58be23dfeafcb79b3c61b4972d3addb462de1
2021-02-15 17:46:38 +00:00
vadimt
cf275c1bd7 Choosing better points to output "start" events for TAPL
Now doing this before branching points, thus avoiding flakes when the
execution can go to an unexpected branch and not produce an event.

Bug: 153824894
Change-Id: If117da0498eaf2d94c9610552724981be34c6569
2020-04-15 12:45:11 -07:00
Sunny Goyal
e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07:00
vadimt
0dd1bd1113 TAPL: Verifying activity start/stop events
It also turned out that Pilfer event seems to come in a
non-deterministic order relative to the events from the Main and TIS
sequences. So I moved it to its own sequence.

Change-Id: Ie4ea5865afd900bebbd8287dad2372c94dce8ad5
2020-03-27 10:23:33 -07:00
vadimt
3abc8511a5 Enabling widget config tests after fixing flakiness
Bug: 148867106
Change-Id: I8bbd9ef9b1ca574f79f3f76869051495b59734ce
2020-03-05 15:01:38 -08:00
Vadim Tryshev
f450b2500c Revert "Enabling flaky tests per our new flaky test policy"
This reverts commit 983145c594.

Reason for revert: Too flaky

Change-Id: Ifabb638d6ce0a539518bc0b6b667a9783b6ca29d
2020-02-28 21:33:16 +00:00
vadimt
983145c594 Enabling flaky tests per our new flaky test policy
I'll check whether the tests are still flaky and assign to the test
owner if they are.

Bug: 148867106
Change-Id: Ic850abc862b0f266b100aa6bfff4e89b3802e50d
2020-02-27 17:59:32 -08:00
vadimt
6a1cb09890 Disable testWidgetConfig
Bug: 148867106
Change-Id: I3957f03d2f30f340cc3e90626927f7d62624c120
2020-02-06 10:41:42 -08:00
vadimt
9702355d71 Disable failing test testConfigCancelled
Bug: 148867106
Change-Id: Ia1f4b7ef43ddde6de85d3c6852b3d3960090dd09
2020-02-05 11:12:54 -08:00
Sunny Goyal
fc86a9c75c Removing unnecessary method from tests
Change-Id: I28b180b0e63b277b1bf2b206a848fc6ff14a2722
2020-01-28 10:45:48 -08:00
vadimt
2eb48498b4 Improving navigation mode switch rule and around
Logging assertion failures.
Modifying waits for condition to avoid timing out the whole test if the
iteration takes too long in favor of failing with an actionable diag.

Bug: 145985438
Change-Id: Ie32d93e1548ce6ec64c38449eb1be1287ff9cf56
2019-12-12 15:10:52 -08:00
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
aca7e6da5b Removing magic constants from TAPL/Widgets
Bug: 123904290
Change-Id: I8abc6cde6be8a51b38782f5c94749fe0c33384c1
2019-09-26 13:45:42 -07:00
vadimt
b1ccbd9def Fully qualifying @Ignore
Strangely, @Ignore-s won't be recognized in ub-launcher-master

Bug: 140837771
Change-Id: Ie5e4911d4812d396826b50024943c14c6bfe3376
2019-09-12 17:46:17 -07:00
vadimt
b59f65d2d8 Disable failing widget tests
Bug: 140837771
Change-Id: Ibba7769543e682315ea23640f68416defa85f365
2019-09-12 17:05:39 -07:00
vadimt
599b1fc4d3 Reenabling some widget tests
Bug: 140837771
Change-Id: I437f39b4a7f4b518551a157858c9b1a4812ee65d
2019-09-10 18:37:28 -07:00
vadimt
d81f60f324 Disable currently failing widget tests
Change-Id: I2009b9c6f11a698bcf12a0b5ba97f98262fcee54
2019-09-10 13:58:22 -07: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
0b20a11d66 Converting even more tests to TAPL
Bug: 131116002
Bug: 115582915
Change-Id: Id36fca232b5aff5f6692142ce4a0c937d0531f4e
2019-06-27 18:38:09 +00:00
Vadim Tryshev
007e7e94b3 Revert "Converting even more tests to TAPL"
This reverts commit 406d49bdd7.

Reason for revert: Breaks tests on Crosshatch

Change-Id: I95ff541dfe8f6f1d7e1913d209b53abfbebe5336
2019-06-27 00:03:14 +00:00
vadimt
406d49bdd7 Converting even more tests to TAPL
Bug: 131116002
Bug: 115582915
Change-Id: I08587e7a50420e57970ed8feec4524111145dc31
2019-06-26 13:58:33 -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
0b927428d6 Enabling portrait widgets tests without converting to TAPL
Bug: 131116002
Change-Id: I61e3277d4ff7aec12c8e532ce8ed68d8cd2032e9
2019-05-02 15:18:01 -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
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
TreeHugger Robot
02e900c3c9 Merge "Adding tests for fallback recents when a 3rd party launcher is installed" into ub-launcher3-master 2018-10-09 21:32:19 +00: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
2d5713634e Ignoring more tests
Bug: 117106893
Test: will see on TAP
Change-Id: Ic031cc6756473552fc11186f666bcb9debfcecb5
2018-10-09 10:31:33 -07:00
Vadim Tryshev
b769edec46 Ignoring more tests
Bug: 117106893
Test: will see on TAP
Change-Id: I992edaff5e40e8c16188033b5cbda6b0228fc2b6
2018-10-08 16:05:11 -07:00
TreeHugger Robot
b609c7970a Merge "Disabling testConfigCancelled_rotate" into ub-launcher3-master 2018-10-03 23:20:13 +00:00
Vadim Tryshev
7662701ee9 Disabling testConfigCancelled_rotate
It's flaky

Bug: 117106893
Test: will see on TAP
Change-Id: I452af39b0b3401d1ef875aee3c49eedd298a1cd3
2018-10-03 10:37:16 -07:00
Vadim Tryshev
6ffb2c8faa Make @QuickstepOnOff and @PortraitLandscape available to all UI tests.
Also, fix rotation as Portrait as starting poin for all tests, to avoid
tests running in unexpected configuration.

Bug: 115645301
Test: run all Nexus tests
Change-Id: I3ab0e91db111eeefda77af2960c43962a119de0c
2018-10-02 17:32: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
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
d9843357d0 Adding some tests for request pin shortcut/widget flow
Bug: 33584624
Change-Id: I49df36f60d2ae071b9d2c77c9c3300e010cd3bb9
2017-02-22 15:46:40 -08:00
Sunny Goyal
658058b960 Adding some widget addition flow tests
> Added two dummy widget providers: with config and without config
> Added tests for verify widget config flow

Change-Id: I4577f085abe8f8b82047b644c71cc9065358153a
2017-01-23 15:28:25 -08:00