Commit Graph

2686 Commits

Author SHA1 Message Date
Brandon Dayauon
df4dfdba4d Update tests for ENABLE_TWOLINE_ALLAPPS and ENABLE_TWOLINE_DEVICESEARCH
PM said we can enable ENABLE_TWOLINE_ALLAPPS and ENABLE_TWOLINE_DEVICESEARCH flags.

Since I am enabling two-line text for all apps, it's possible that the text would have other texts within the app name itself. For example, if a title of an app is long for example "Amazon Shopping" the title can now be like "Amazon\nShopping". For tests to recognize its "Amazon shopping", I am resorting to identifying the app title based on the content description.

Turn on the two feature flags in another CL

bug: 287307252
test: manual
Change-Id: I8bdc3db710514c9098ccb5d9781a100ac9b35eab
2023-07-21 20:15:19 +00:00
TreeHugger Robot
fee828cd6c Merge "Enabling view capture analysis in Launcher tests." into udc-qpr-dev 2023-07-14 17:23:05 +00: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
Tracy Zhou
d7496cb52b Merge "Fix testAllAppsFromHome failure" into udc-qpr-dev 2023-07-13 20:18:56 +00:00
Tracy Zhou
29deae51ee Fix testAllAppsFromHome failure
Fixes: 291072758
Test: presubmit
Change-Id: If2cd0d5d67ab5b2b4b6ca918b6e7a8777ee9f030
2023-07-13 09:52:42 -07:00
Sunny Goyal
fc681dbe09 Merge "Adding some utility test rules" into udc-qpr-dev 2023-07-13 15:30:50 +00:00
Tracy Zhou
666c3b231d Merge "Introduce multi finger trackpad gestures to tapl tests" into udc-qpr-dev 2023-07-13 06:11:26 +00:00
Tracy Zhou
db476c3921 Introduce multi finger trackpad gestures to tapl tests
- Add tests to go to overview from home and all apps

Bug: 281732733
Test: presubmit
Change-Id: Ief6d72d7293ca7dff935e764362aa5ab271fd36b
2023-07-12 19:52:04 -07:00
Schneider Victor-tulias
19c22c20b2 Merge "Add debug tracing Launcher's lifecycle callbacks" into udc-qpr-dev 2023-07-11 22:35:53 +00:00
Andrew Cole
0b5cc64ec2 Merge "Removing screen record from test" into udc-qpr-dev 2023-07-10 20:00:55 +00:00
Sunny Goyal
2cf183d14c Adding some utility test rules
> LasyActivityRule to be used by ActivityScenario
> Utility rule to easily override feature flags

Bug: 284202543
Test: Presubmit
flag: N/A
Change-Id: I95ae19bfb1d67a55941e7b8e5c47516a351b0d24
2023-07-10 10:02:44 -07:00
Andrew Cole
0ce5977375 Removing screen record from test
The test is no longer flakey so we can remove the screen recording to save time during automated testing

Bug: b/258071914
Test: atest testUninstallFromAllApps
Change-Id: I6b044ad87b63e5035c2a88dc4f0181989e82f3b2
2023-07-06 14:25:39 -07:00
Schneider Victor-tulias
84c66b69ff Add debug tracing Launcher's lifecycle callbacks
It is possible that SimpleActivityRule is not being properly notified of Launcher's creation in Platinum tests.

Flag: not needed
Bug: 289161193
Test: AddWidgetTest
Change-Id: I09947e7202129d9335f737dcd626f706de6dbf00
2023-07-06 10:44:16 -07:00
Vinit Nayak
f6f192853d Cleanup WorkProfileTest logs
Fixes: 243688989
Change-Id: Ic3f143062c1a1383d1e79959dae59c45743547e9
2023-07-05 16:27:11 -07:00
Tracy Zhou
323958007d Add initial trackpad tapl tests
- go home

Bug: 281732733
Test: presubmit
Change-Id: I538d63bde2bf427a02c2bc355eab71546d667bf9
2023-07-03 10:50:54 -07:00
Schneider Victor-tulias
720d0cf4c4 Merge "Update TestProtocol.REQUEST_CLEAR_DATA to properly clear the workspace" into udc-qpr-dev 2023-06-30 16:54:30 +00:00
Federico Baron
25f5fc2470 Merge "Add WidgetPicker screenshot tests" into udc-qpr-dev 2023-06-30 02:34:30 +00:00
Treehugger Robot
c243875235 Merge "Fix ReorderAlgorithmUnitTest not restoring numRows properly" into udc-qpr-dev 2023-06-30 02:15:34 +00:00
Brandon Dayauon
f2ea399ec6 Fix prediction row title consistency
There's an inconsistency with prediction row in 0-state and all apps page.
This happens because we change the number of lines (to 1 line) after calculating and rendering the two lines.
Which is why if you look at the photos, in all apps, Amazon app just shows "Amazon" instead of "Amazon Sh.."

Instead of changing the number of lines after processing, just set a separate display to the prediction app row

bug:288811197
Flag: teamfood
Test: manual - locally added test BubbleTextView
before 0-state: https://screenshot.googleplex.com/5q9iYypgwwtDa8b
before allapps prediction row: https://screenshot.googleplex.com/BVxGMTT43stDzZ9
after allapps prediction row: https://screenshot.googleplex.com/BfNTFPXwf4FHuRN

Change-Id: Ifefe6dc8dd4a117be7b63f92ff837d0467a51f8b
2023-06-28 14:45:07 -07:00
TreeHugger Robot
c84ecc0f67 Merge "Removing ViewCaptureAnalysisRule" into udc-qpr-dev 2023-06-28 20:08:23 +00:00
Alex Chau
f63ceebadd Merge "Decrease the padding between app icon and label" into udc-qpr-dev 2023-06-28 19:51:44 +00:00
Vadim Tryshev
a7a27fd4ca Merge "View capture analyzer tree walker + Alpha jump detector V1" into udc-qpr-dev 2023-06-28 18:59:45 +00:00
Alex Chau
36c3880b6b Fix ReorderAlgorithmUnitTest not restoring numRows properly
Fix: 289191222
Test: ReorderAlgorithmUnitTest
Change-Id: I4e8a8afc6bd043c3983b19220bca0e50c26eab69
2023-06-28 18:44:59 +00:00
Schneider Victor-tulias
67ca528591 Update TestProtocol.REQUEST_CLEAR_DATA to properly clear the workspace
Flag: not needed
Fixes: 287097473
Test: TaplTestsLauncher3
Change-Id: I980a68dff8b475ce8f7b86284663f697b7bc2b57
2023-06-28 10:37:44 -07:00
Thales Lima
93ee8fcb30 Decrease the padding between app icon and label
The app icon size in XMLs are 10% larger because of http://b/235886078, so we need to remove that from the padding between the icon and the label.

Bug: 235886078
Fix: 279142287
Test: DeviceProfileDumpTest
Flag: N/A
Change-Id: I2662c30252dc4e06d4767dbe7125a99a02ce2b64
2023-06-28 16:12:52 +01:00
Federico Baron
827001a1fa Add WidgetPicker screenshot tests
We need screenshot tests for widget picker to prevent unintended UI changes.

Bug: 268219507
Test: n/a
Change-Id: I405401f5c68bb73bcb7bbd097f507abb1d66ff7e
2023-06-27 17:20:11 -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
Vinit Nayak
710b5ba162 Add logs to determine if grid positions incorrect
* Either positions are incorrect, or maybe we
need to clean-up existing shortcuts if they are in
incorrect position in the grid

Bug: 282963545
Change-Id: I5d32d130d0e05bde69eda9d73468eda49a4f2802
2023-06-23 15:42:53 -07:00
Anna Bauza
fbb34d205a Merge "Fix Launcher3 issues due to hardcoded default user" into udc-qpr-dev 2023-06-22 22:42:32 +00:00
Anna Bauza
73a3d95906 Fix Launcher3 issues due to hardcoded default user
Bug: 288407058
Bug: 288406660
Bug: 288406673
Test: atest NexusLauncherOutOfProcTests:com.android.launcher3.ui.TaplTestsLauncher3#testUninstallFromWorkspace
Test: atest NexusLauncherOutOfProcTests:com.android.launcher3.ui.TaplTestsLauncher3#testUninstallFromAllApps
Test: atest NexusLauncherOutOfProcTests:com.android.launcher3.ui.TaplTestsLauncher3#getIconsPosition_afterIconRemoved_notContained
Change-Id: Ibe0c4d8f21721e08b2496bfb5c470903e785c2c5
2023-06-22 14:00:45 +00:00
vadimt
ad6ebab887 View capture analyzer tree walker + Alpha jump detector V1
The analyzer is an utility that can be used from the test, and not only.
If an anomaly (such as a sudden jump of view’s coordinates between frames) is detected, the utility will throw an error.

The CL includes an early version of detectors for one of the anomalies we plan to detect: alpha jump (included), flash, position jump.

The analysis is currently not invoked from tests, we simply are adding the code.

Alpha jump detector:
The included alpha jump detector contains a long (but still incomplete) list of views for which we ignore alpha jumps. This list should go away after view capture data begins supporting fields like “ignore alpha jumps for this view”.

We currently detect only alpha jumps by 100%, i.e. when the view switches from completely opaque state to completely invisible or vice versa.

ScrimView treatment:
Since we don’t know at the moment whether ScrimView is opaque, we currently ignore all activity under it.

Bug: 286251603
Flag: N/A
Test: manually on Launcher hacked to invoke this analyzer
Change-Id: Ic86aff561a0c273afd7714d8287cb724bb2aecaf
2023-06-21 16:16:28 -07:00
Jordan Silva
637f4eb2f3 Update DeviceProfile to calculate responsive grid for folders
It uses the new responsive folder calculations and specs when responsive grid is enabled. The grid has to have folderSpecsId defined to use the new specifications, otherwise it will use the current scalable grid implementation.

Fix: 284155638
Test: DeviceProfileDumpTest
Test: ResponsiveHomeScreenFolderImageTest
Test: HomeScreenFolderImageTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I535cff4bb00e969f782447a898230fe2b2c05cc9
2023-06-21 12:18:58 +01:00
Jordan Silva
03951ba556 Merge "Decrease icon size by steps" into udc-qpr-dev 2023-06-21 10:12:30 +00:00
Thales Lima
2759aa345b Decrease icon size by steps
When the icon can't fit the cell size, decrease it by steps defined by UX until it fits or reach a minimum size.

Fix: 283929701
Test: DeviceProfileAlternativeDisplaysDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Test: IconSizeStepsTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I2875b669c0a24ecd1c4d785a33e2cffb78c9fe76
2023-06-20 20:37:38 +01:00
Hui Kang
6b1354446d Remove IwTest annotation. am: 8e2f266dff am: 4864344d13
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23716002

Change-Id: If98bedf0f8c88e597322a7766c86242bb2dcf2a0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 16:45:57 +00:00
Thales Lima
715c2ae00c Merge "Implement screenshot tests for Folders on the workspace" into udc-qpr-dev 2023-06-16 22:28:21 +00:00
Vadim Tryshev
d285515c12 Merge "Saving view capture data before cleaning it in ViewCaptureRule" into udc-qpr-dev 2023-06-16 17:03:32 +00:00
vadimt
95c1dc70b4 Saving view capture data before cleaning it in ViewCaptureRule
This makes it reliably available to FailureWatcher who saves the
 artifact afterwards.

Test: local, presubmit
Flag: N/A
Bug: 286251603
Change-Id: I11b4854684f6ba5c798096eac223760d76f004b1
2023-06-15 16:20:04 -07:00
Hui Kang
8e2f266dff Remove IwTest annotation.
Bug: 286084672
Test: presubmit
Change-Id: Ib110688344d3ca209c8955de596fc5528f725f6d
2023-06-15 14:21:05 -07:00
Andrew Cole
ae13341187 Merge "Turning back on flaky test" into udc-qpr-dev 2023-06-15 18:23:38 +00:00
Vadim Tryshev
2b23dcb094 Merge "Moving ViewCaptureRule to inside of FailureWatcher" into udc-qpr-dev 2023-06-15 17:05:20 +00:00
Andrew Cole
eddc230d71 Turning back on flaky test
Because of a fix that has been merged here ag/23680187 this test should also be able to be turned on and not become flakey.

Bug: 256615483
Test: testUninstallFromWorkspace
Change-Id: I7096f5e9392ddedf1c4c2ab23b922b352bb5d7b1
2023-06-15 08:12:28 -07:00
Jordan Silva
83d3a0bcb7 Implement screenshot tests for Folders on the workspace
Additional support to add folders in CellLayoutBoard using TestWorkspaceBuilder.

Bug: 274792950
Bug: 284155638
Flag: N/A
Test: HomeScreenFolderImageTest
Change-Id: I8a1be3e772cc2e2336dbe8276d22559239668232
2023-06-15 02:57:38 +01:00
vadimt
62f24f63ad Moving ViewCaptureRule to inside of FailureWatcher
Goal: ViewCaptureRule finishes recording before FailureWatcher starts saving
  artifacts, including view capture.

Also starting recoding without waiting for activity creation if there is
already a Launcher activity.

Test: local, presubmit
Flag: N/A
Bug: 286251603
Change-Id: I191d3cdde76e9f906453b20325862f2bcff9024c
2023-06-14 17:39:48 -07:00
Thales Lima
961e683187 Merge "Create AllApps responsive spec" into udc-qpr-dev 2023-06-14 17:09:20 +00:00
Thales Lima
981bca7355 Merge "Migrate DeviceProfile dump tests to files" into udc-qpr-dev 2023-06-14 17:07:52 +00:00
Andrew Cole
ee1e3b3686 Merge "Test Uninstall Flakiness" into udc-qpr-dev 2023-06-14 16:50:51 +00:00
Thales Lima
196e44baec Create AllApps responsive spec
Copy the parser from WorkspaceSpec and modify to use AllApps attributes.

Bug: 284152932
Test: AllAppsSpecsTest
Test: CalculatedAllAppsSpecTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I9362e126c64cb1a1abdef61894b003f14701b8e3
2023-06-14 15:02:58 +01:00
Thales Lima
9cc14e3610 Migrate DeviceProfile dump tests to files
Using files makes it easier to update the changed properties.

Fix: 286049633
Test: DeviceProfileDumpTest
Flag: N/A
Change-Id: I5f51a99c1bb1688c59466282c836ef30466ae53d
2023-06-14 11:03:27 +01:00
Jordan Silva
296a9f3389 Merge "Update SizeSpec attributes to accept max size threshold" into udc-qpr-dev 2023-06-14 09:37:42 +00:00