Commit Graph

324 Commits

Author SHA1 Message Date
vadimt
d8827bad12 Verifying that Launcher didn't crash in TaplTestsQuickstep
TaplTestsLauncher3 already do this

Change-Id: I17fe638b81cbef4cf5230a6bd49b165e4f9e7855
2020-01-16 17:28:43 -08:00
vadimt
252d012ed0 TAPL: Verifying some interactions with system
Investigation of TAPL failures, especially flakes is complex, partially
because it’s hard to tell whether it’s Launcher who is wrong or the
system.

We need to introduce a framework that looks at Launcher interaction with
the system and reports when interactions deviate from the expected
course, and who made the first wrong step.

This is first, proof-of-concept CL.

It analyzes long-press events. We had multiple cases when long-presses
didn’t happen or happened unexpectedly.

Launcher registers the events, TAPL retrieves and compares against the
sequence of expected regular expressions. This diagnostic is used when
something fails and at the end of public methods.

Change-Id: I07aa3a027267c03422c99c73ccd8808445c55fe8
2020-01-15 13:31:18 -08:00
Tracy Zhou
b8e78bf4e6 Merging from ub-launcher3-master @ build 6094789
Test: manual, presubmit on the source branch
http://x20/teams/android-launcher/merge/ub-launcher3-master_6094789.html

Change-Id: Iebd789eadfae2930807cc28373c2e1765f70e481
2019-12-23 12:24:35 -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
165a507a35 Disabling fallback tests
Improving state events accounting hasn't completely solved flakiness.
I've noticed that swiping up in 0-button mode sometimes doesn't open
Overview.

Bug: 143488140
Change-Id: I660885ed556aa2953c17d491fde267734b95890b
2019-12-10 02:06:16 +00:00
vadimt
bdaa179b92 Consistently checking state change messages
Checking for events whenever Launcher sends them.
Checking for correct events (final events, not for events from
intermediate state changes).

This should simplify diagnosing of bugs involving TAPL.
This is also supposed to fix Fallback overview tests.

Bug: 143488140
Change-Id: If053ed808ec71bf2b652ab680be5bdfe9ff8cbb9
2019-12-09 12:33:39 -08:00
Hyunyoung Song
e2fe62eea8 Merging from ub-launcher3-master @ build 6048063
Test: manual, presubmit on the source branch
http://x20/teams/android-launcher/merge/ub-launcher3-master_6048063.html

Change-Id: Ieee38cc301364f96cf252b2387142b0aa1b75317
2019-12-04 00:42:32 -08:00
vadimt
7410808085 Removing a workaround to make NevigationModeSwitchRule pass on CF
Change-Id: I7b7cabc098f17c99406032e186a4ee363273f0a9
2019-11-19 18:04:13 -08:00
Hyunyoung Song
73b84ce47f Merging from ub-launcher3-master @ build 6018909
Test: manual, presubmit on the source branch
http://x20/teams/android-launcher/merge/ub-launcher3-master_6018909.html

Change-Id: I8a1e20d0b175f03a1a05c81749f07ab5314e872a
2019-11-19 17:12:13 -08:00
vadimt
cbc9bffd7e Disabling FallbackRecents tests
Even though they don't block presubmit, the fact that they are failing:
1. Causes sheriffs no not notice other issues;
2. Would block switching to 24hr fix-it policy and Quarterdeck.

Bug: 143488140
Change-Id: I95e3e15b69e0487946919f3f6889e286a1fae141
2019-11-14 17:23:52 -08:00
TreeHugger Robot
dc0c224030 Merge "Reattributing disabled tests to a more relevant bug" into ub-launcher3-master 2019-11-13 01:30:15 +00:00
vadimt
b0a14e96ae Removing temporary tweaks to make tests pass in presubmit
Now that we have a more reliable build of CF

Bug: 142828227
Change-Id: Ib385443048b6ccd9e1eb3372dc39947536f948bd
2019-11-11 09:23:28 -08:00
vadimt
3435f69d1a Reattributing disabled tests to a more relevant bug
Bug: 143488140
Change-Id: I8af35c66293517a3ba7cae583e5c3bff883865d7
2019-11-08 14:50:57 -08:00
vadimt
272a541ab9 Disable failing test testQuickSwitchFromApp
Bug: 143285809
Change-Id: I7df5a1deb74aabf0f874e969a57aba471902747f
2019-11-05 18:26:29 -08:00
vadimt
09ce192b4e Not treating "Screen is empty" as an anomaly in NavigationModeSwitchRule
It's an acceptable state when Launcher just starts under
 instrumentation.

Change-Id: Ia6eb2550effbd9236bb955e0c0e04416fc5fa506
2019-11-05 11:30:35 -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
Tony Wickham
bc42d64c85 Fix testQuickSwitchFromApp
Instead of starting getAppPackageName() and relying on it being our Test
Pin Item activity, instead launch our own test activities with the
FLAG_ACTIVITY_MULTIPLE_TASK and FLAG_ACTIVITY_NEW_DOCUMENT flags.

Test:
- Locally run testQuickSwitchFromApp() from Android Studio
- flake -oop -t com.android.quickstep.TaplTestsQuickstep#testQuickSwitchFromApp

Bug: 140252765
Change-Id: Ie137261ce65bfd3dd39df78d57784854a026e967
2019-10-23 23:42:19 +00:00
vadimt
ad81b816f0 Step 4 from the plan below:
1. Skip all tests that fail in inproc mode on CF (this CL)
2. Observe postsubmit and make sure no inproc tests are failing or too
flaky on CF
3. Enable presubmit
4. Switch to skipping tests from step 1 only for inproc presubmit;
they'll start failing in postsubmit
5. Gradually make all tests pass and not flaky and enable them back on
presubmit

Bug: 142828227
Change-Id: I0092d6b92b0358866f8cbf9e00dbe3fabe23703d
2019-10-17 17:52:29 -07:00
Tracy Zhou
b6af1d0efc Merging ub-launcher3-master, build 5945220
Test: Manual
Bug:123904290 P2 Remove magic constants from TAPL
Bug:130294785 P3 Can no longer long press to open settings in hotseat area
Bug:131115553 P2 Enable CacheDataUpdatedTaskTest tests
Bug:134712476 P4 Add Duo contact to home screen, icon froze and vanished while over home screen
Bug:136278866 P2 Temporary workarounds to make tests pass on Cuttlefish
Bug:136829198 P2 Scrolling Overview During Quickswitch causes switch with weird animation
Bug:137568159 P4 Refactor LauncherCallback to support multiple clients
Bug:137777105 P1 Make clearcut launcher logging feature parity with westworld logging
Bug:137851409 P4 Jank during swipe up due to inflation
Bug:138620399 P1 Quick switch flicker / artifacts
Bug:139016518 P2 [PinnedStackController] Move shelf offset into sysui
Bug:139137636 P2 Create memory tests for Launcher
Bug:139258979 P2 Switch to the screenshot mode when then system passes ThumbnailData back upon RecentsAnimation cancelation
Bug:139259253 P2 Transform multiple app surfaces during app open animation from overview
Bug:139439373 P2 Live tile should switch to screenshot before finishing recents animation
Bug:139828243 P2 Create a prototype for Overview screenshot actions with a SystemUI plugin
Bug:139888225 P2 Convert custom widget into plugins
Bug:139913027 P2 [a11y] App title in Widget list shouldn't be actionable by a11y methods. (It would cause Pixel launcher crash.)
Bug:139917483 P1 [B1C1][Dec19_QPR][CTS_Verifier_10_r1]Pixel launcher crash observed in Device owner test-> Lock Task UI
Bug:139941530 P2 Lab-only Flake: Launcher switches to All Apps after pressing Recents button
Bug:140212732 P2 [PO Cable] Strange launcher behavior after restore
Bug:140242324 P2 Cache shortcutInfo icons in Launcher
Bug:140246642 P4 Add binder tests for launcher interactions
Bug:140311911 P2 Flake in Launcher tests: java.lang.AssertionError: Stable state != state: OverviewState, LauncherState
Bug:140406263 P2 [a11y] Unable to scroll to the left of the main Home screen to Display google app by Voice access or Switch access.
Bug:140539007 P3 After apply the wallpaper on wallpaper picker, the screen will stay on wallpaper picker about 2 second
Bug:140626334 P4 Pass wallpaper SC to launcher for animation during launch and swipe up
Bug:140635319 P1 [Flaky test] testPromiseIcon_addedFromEligibleSession failing due to NPE on Launcher#getStateManager
Bug:140786694 P2 [A11y]No talkback feedback when long pressing on an app at home screen
Bug:140935140 P1 Launcher force close observed while accessing app info shortcuts.
Bug:141260670 P3 Drag and drop preview doesn't match the destination grid size
Bug:141262820 P3 [Grid] icon badge size should scale as the grid size changes
Bug:141265063 P2 Long press on homescreen in between icons doesn't bring up home settings
Bug:141275518 P2 Test WellbeingTests.testPauseAppFromOverview flakes on Cuttlefish
Bug:141315387 P1 [Failing test] 3P launchers + 2 button mode: failed goToOverviewFromHome and goToOverviewFromApp
Bug:141376165 P2 Remove static initializations in Launcher
Bug:141390432 P1 [Failing test] TaplTestsLauncher3 in 2-button mode
Bug:141517004 P1 FallbackRecentsTest.goToOverviewFromHome Failure
Bug:141522764 P1 DefaultLayoutProviderTest failures
Bug:141523101 P1 TaplTestsQuickstep#testAllAppsFromHome,testAllAppsFromOverview failures
Bug:141524555 P1 FallbackRecentsTest.testOverview flake
Bug:141576561 P2 Fix FlagOverrideSampleTest inside robolectric test
Bug:141576665 P2 AddWorkspaceItemsTaskTest broken
Bug:141577881 P2 FileLogTest broken
Bug:141579810 P1 ViewInflationDuringSwipeUp test failures
Bug:141580748 P2 FallbackRecentsTest#testOverview failure
Bug:141697444 P1 TaplTestsLauncher3#testWidgets test failure
Bug:141770616 P2 Flake: Can't find a launcher object; selector: BySelector [RES='\Qcom.google.android.apps.nexuslauncher:id/deep_shortcuts_container\E'] (visible state: AllApps),
Bug:141772190 P2 Flake: Context menu is still visible afterswiping up to home
Bug:141864547 P2 calendar-stable sometimes fails dialog dismissal on cuttlefish
Bug:141886704 P2 Use app targets to determine input consumer instead of launcher state
Bug:141934188 P2 Automation Test for adding widget automatically
Bug:141939911 P3 Clean up SwipeDetector
Bug:141986013 P2 Update all apps fade interpolators
Bug:142068081 P1 Quick Switch touch swipe dropped, flicker ensues
Bug:142120338 P2 Gmail app (work profile) icon not drawing
Bug:142148773 P2 grid size should not affect widget padding in WidgetsRecyclerView
Bug:142351228 P1 public void testSwipeUp_with_list_widgets() is failing for merge CL
Bug:79868152 P3 Fade out caret with workspace and back in when in Overview
Bug:136282913 P1 Swipe up from Assistant Fulfillment Card Jank
Bug:138473688 P4 Home settings can't be dismissed by swipe up
Bug:140252765 P2 Audit Gesture Nav tests (including Back and Quick Switch)
Bug:141568904 P1 NPE: Pixel launcher crash is observed when adding Directions widget
Bug:142514365 P1 Failing test AddWidgetTest.testDragIcon
Bug:142803200 P1 Broken binder tests

Change-Id: I811537cc8d406f0acd9fa45daddae4da79ffff12
2019-10-16 22:46:01 -07:00
vadimt
3680357a67 Preparing to enabling Inproc launcher tests as presubmit
The plan:
1. Skip all tests that fail in inproc mode on CF (this CL)
2. Observe postsubmit and make sure no inproc tests are failing or too
flaky on CF
3. Enable presubmit
4. Switch to skipping tests from step 1 only for inproc presubmit;
they'll start failing in postsubmit
5. Gradually make all tests pass and not flaky and enable them back on
presubmit

Bug: 142828227
Change-Id: I6ea3d53771503e8fd968555bb2e4cb1be10d83ef
2019-10-16 17:35:18 -07:00
Tony Wickham
6b62f28ef9 Fix quick switch test gesture in landscape 2-button mode
am: a0f77c4449

Change-Id: I998081a53a94ff3b1559a7e77d4d470056cfab00
2019-10-15 21:20:24 -07:00
Tony Wickham
a0f77c4449 Fix quick switch test gesture in landscape 2-button mode
It should swipe from the bottom right to top right when the nav bar is
on the right, rather than from the bottom left to bottom right.

For now, disable testQuickSwitchFromApp() because it seems to have
other failures as well.

Bug: 140252765
Change-Id: I1f4989f3ea5456c18bb9cbf42ea4b157cee500d7
2019-10-15 17:30:47 -07:00
Tracy Zhou
b67a15ddd9 Revert "Merging ub-launcher3-master, build 5938524"
This reverts commit 7cb721fa81.

Reason for revert: <INSERT REASONING HERE>

Change-Id: I10ebd177cc98be896282147df481b05f28241758
2019-10-15 20:51:51 +00:00
TreeHugger Robot
6c12641bee Merge "Unifying various tracing calls" into ub-launcher3-master 2019-10-14 22:29:59 +00:00
Sunny Goyal
17c72fbb60 Unifying various tracing calls
Change-Id: Iedf6662ad1d7281b850bdc43b3a1e373ce535ac6
2019-10-14 14:23:19 -07:00
Tony Wickham
2f767469ae Merge "Add tests for quick switch from an app and home" into ub-launcher3-qt-future-dev
am: 7a2076e3ab

Change-Id: Id525dae6616757688ccf0e203fefeb9bd6ef08ff
2019-10-14 12:20:37 -07:00
Tony Wickham
1e73e320b7 Add tests for quick switch from an app and home
Bug: 140252765
Change-Id: I5621b614ae2d8cd3db03cae818cf8b8c1c6cb20f
2019-10-14 11:51:19 -07:00
TreeHugger Robot
d2b03972f5 Merge "Suppress ViewInflationDuringSwipeUp test." into ub-launcher3-master 2019-10-14 18:10:34 +00:00
Zak Cohen
eb27edffc2 Suppress ViewInflationDuringSwipeUp test.
Test is failing and blocking drop.
Only failing on TH, passing locally.
Tracked in b/141579810

Bug:141579810
Change-Id: Iadf8098cad22835b026984c0a9ea5122054b484b
2019-10-14 10:55:15 -07:00
Winson Chung
c062580b5a Wait for the task to be in recents before validation
- There are two issues:
  1) Currently the system does not add the task to the task list until
     the activity starting the task has been resumed (to be fixed in a
     follow up platform CL). When the three activities are started in
     sequence, it's possible for one of the activities to not reach the
     resumed state leading to an unexpected number of recent tasks the
     next time it's fetched.
  2) When swiping up, it may take time for getTasks to return and call
     applyLoadPlan, so try and wait until the task views have had a
     chance to be applied before continuing.
  3) Use the launcher activity tracker instead of activity rule since it
     will return the same activity even after the activity is destroyed
- Move the margin handling to the caller instead of the scroll method

Bug: 141580748
Change-Id: I2b7634f5ac6869ba4b369b3bd60e0f63747c0f0b
2019-10-11 17:10:38 -07:00
Winson Chung
c039634c25 Workaround for failing test & fix scrolling in tests
- Workaround issue where instrumentation will fail to finish an activity
  causing the activity to linger longer than expected (leading to issues
  with ordering of static resources like the app widget host registration)
- Fix calculation for scrolling the screen, the previous calculation
  would result in the gesture starting at the left gesture margin due
  to rounding which can trigger a back action instead of the desired
  scroll

Bug: 142351228
Change-Id: I34bdb471030518d2b983cac2badd4d8b0e7d571b
2019-10-10 17:31:38 -07:00
TreeHugger Robot
f31dab5e02 Merge "Removing static instance of LauncherAppsCompat and unnecessary wrapper classes" into ub-launcher3-master 2019-10-08 18:49:36 +00:00
vadimt
7f791a868d Increasing wait time for navigation mode switch. am: d230af4e09
am: 4f56803bd0

Change-Id: I0dfc2072d6ea810cb023b61ac5a4e8f29786d261
2019-10-04 18:10:56 -07:00
vadimt
4f56803bd0 Increasing wait time for navigation mode switch.
am: d230af4e09

Change-Id: Ia5150735244249dd76c1993ff588036e4f18402b
2019-10-04 18:03:17 -07:00
vadimt
d230af4e09 Increasing wait time for navigation mode switch.
Sometimes this fails in Cuttlefish.

Change-Id: Ifa2ffed5165625d51441fc3b203185fc55f7d53f
2019-10-04 17:12:26 -07:00
Sunny Goyal
e7b00128c7 Removing static instance of LauncherAppsCompat and unnecessary wrapper classes
Bug: 141376165
Change-Id: I8c1f1ab7d83ec50fe9c7bf39960ef9c360025ec7
2019-10-02 16:20:22 -07:00
Vadim Tryshev
6254e5e246 Merge "Deprecating LauncherInstrumentation constructor with parameter" into ub-launcher3-qt-qpr1-dev am: dd079691c1
am: 1430f132f3

Change-Id: If494e30957893c4e3414ebdbd274601d16a66a98
2019-09-27 13:28:18 -07:00
Vadim Tryshev
1430f132f3 Merge "Deprecating LauncherInstrumentation constructor with parameter" into ub-launcher3-qt-qpr1-dev
am: dd079691c1

Change-Id: I7419be6416f26274bf03abfd84eedef20fd6f084
2019-09-27 13:21:46 -07:00
vadimt
2611d79f69 Deprecating LauncherInstrumentation constructor with parameter
Change-Id: I779b4a8fde2db73cced8133f12d1356ad0b8729e
2019-09-27 12:00:09 -07:00
Vadim Tryshev
c86abf0ed0 Merge "Removing temporary checks that tests are running on AVD" into ub-launcher3-qt-qpr1-dev am: 6929199c8a
am: ec1ae481d4

Change-Id: I3cf67561ae50575486db5360d0139ff916c5dfaf
2019-09-24 18:24:50 -07:00
Vadim Tryshev
ec1ae481d4 Merge "Removing temporary checks that tests are running on AVD" into ub-launcher3-qt-qpr1-dev
am: 6929199c8a

Change-Id: Iaa6200f0371a4deca630194ac8ecfcfc04313750
2019-09-24 18:18:19 -07:00
Vadim Tryshev
6929199c8a Merge "Removing temporary checks that tests are running on AVD" into ub-launcher3-qt-qpr1-dev 2019-09-25 00:56:05 +00:00
vadimt
926e29f8b6 Removing temporary checks that tests are running on AVD
Bug: 136278866
Change-Id: I2b7b63b7745936ea84b7cba599e21d954b682ba5
2019-09-24 17:19:51 -07:00
Sunny Goyal
599e95bdde Fixing some tests
> Adding retry to fallback recents tests
> Fixing provider test after provider name change
> Fixing AllApps icon detection when there is no more scroll available

Bug: 141390432
Bug: 141523101
Bug: 141517004
Bug: 141524555
Bug: 141522764
Change-Id: I425638d20c053206134835dabde819f16160f035
2019-09-24 15:10:06 -07:00
vadimt
bba8c98de3 Removing "Failed to get system health diags" message from fallback tests
am: 9b1c168273

Change-Id: I4528370073f0258e5f0276dfb1d71dae9816ddea
2019-09-24 13:13:12 -07:00
vadimt
9b1c168273 Removing "Failed to get system health diags" message from fallback tests
Now getting diags though the test process that has right permissions.

This doesn't fix other failures in fallback tests.

Bug: 141517004
Change-Id: Ibba5f0471a83525a64544c62dbe82ab3e11712cd
Merged-in: Ibba5f0471a83525a64544c62dbe82ab3e11712cd
2019-09-24 19:31:35 +00:00
vadimt
6096451dbf Removing "Failed to get system health diags" message from fallback tests
Now getting diags though the test process that has right permissions.

This doesn't fix other failures in fallback tests.

Bug: 141517004
Change-Id: Ibba5f0471a83525a64544c62dbe82ab3e11712cd
2019-09-24 19:30:02 +00:00
Sunny Goyal
8f90d5da8a Adding test to check view inflation during swipe up
Bug: 137851409
Change-Id: Ic8e6f0b3c667051b921d1d4fad03c94122ee92e9
2019-09-20 15:36:02 -07:00
Sunny Goyal
3d56046ff8 Fixing some tests for 2-button mode
Bug: 141315387
Change-Id: I66db3e790f5fbe6bc30999ed599cce03874509be
2019-09-20 10:40:14 -07:00
Sunny Goyal
ed83cf6df0 Adding recents test for 3P Launcher
Bug: 140749967
Change-Id: I3644822accfd229d1e46ca5e43ad827aef776787
2019-09-17 13:41:10 -07:00