Commit Graph

70 Commits

Author SHA1 Message Date
Harri Kirik
e4c726ab89
Fix to Linux_pixel_7pro integration_ui_keyboard_resize test flakiness (#162308)
## `integration_ui_keyboard_resize` flakiness reduction

This PR addresses flakiness in the `integration_ui_keyboard_resize` test
(issue #161300) and slightly improves its performance.

**Issue summary:**

The `integration_ui_keyboard_resize` test occasionally fails because the
device keyboard does not reliably open at the start of the test. This PR
mitigates one cause of this flakiness, though other potential underlying
issues may still exist. See #161300 for a detailed investigation.

**Changes and rationale:**

1.  **Improved keyboard detection logic (flakiness reduction):**
* The core change moves `await driver.tap(defaultTextField);` *inside*
the loop that checks for layout changes. This ensures the test
repeatedly attempts to open the keyboard *while* waiting for the
expected layout shift, significantly improving reliability.
    *   **Local testing results (MacBook Pro M1 + Pixel 8 Pro):**
* **Original implementation:** Consistent failures within the first 15
iterations.
* **This PR:** Ran consistently for at least 300 iterations (out of
2000) before any failure, with some runs exceeding 900 iterations.

2.  **`enableTextEntryEmulation` configuration improvement:**
* The `keyboard_resize.dart` app is *exclusively* used for testing and
requires `enableTextEntryEmulation: false` for proper device keyboard
interaction.
* This PR sets `enableTextEntryEmulation: false` directly within the
app's `enableFlutterDriverExtension` setup. This simplifies the test
setup, avoids cross-thread communication, and prevents the app from
appearing broken when run independently (as manual text input wouldn't
work otherwise).

3.  **UI enhancements for manual testing:**
* Added `SafeArea` and `InputDecoration` to `keyboard_resize.dart`. This
ensures the `TextField` is fully visible and usable during manual
testing (it was previously obscured by the Android status bar). This
improves the developer experience when debugging the app directly.

4.  **Optimized polling for speed:**
* Reduced the polling interval and increased the number of polling
iterations (maintaining the overall timeout). This change resulted in a
~2-second speed improvement per test iteration during local testing.

**Further flakiness improvement discussion and ideas**
See the discussion at https://github.com/flutter/flutter/issues/161300

**Testing and reproduction:**

To reproduce the original flakiness and verify the fix (reproducibility
may vary based on setup; see
https://github.com/flutter/flutter/issues/161300#issuecomment-2618952501):

1. **Disable automatic reboots:** Comment out the `await
checkForRebootRequired();` line in
9e273d5e6e/dev/devicelab/lib/framework/framework.dart (L240-L243)
2. **Disable automatic retries:** Set `static const int retryNumber =
0;` in
9e273d5e6e/dev/devicelab/lib/framework/cocoon.dart (L56-L57)
3. **Install `hyperfine`:** This is a command-line benchmarking tool
(e.g., `brew install hyperfine` on macOS).
4. **Connect a device/emulator:** Connect a physical Android device or
start an emulator.
5. **Run repeated tests:** Use `hyperfine` to run the test multiple
times and capture the output:
    ```bash
hyperfine -r 100 'dart bin/test_runner.dart test -t
integration_ui_keyboard_resize > log.txt'
    ```
2025-03-05 08:36:07 +00:00
Michael Goderbauer
5491c8c146
Auto-format Framework (#160545)
This auto-formats all *.dart files in the repository outside of the
`engine` subdirectory and enforces that these files stay formatted with
a presubmit check.

**Reviewers:** Please carefully review all the commits except for the
one titled "formatted". The "formatted" commit was auto-generated by
running `dev/tools/format.sh -a -f`. The other commits were hand-crafted
to prepare the repo for the formatting change. I recommend reviewing the
commits one-by-one via the "Commits" tab and avoiding Github's "Files
changed" tab as it will likely slow down your browser because of the
size of this PR.

---------

Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
2024-12-19 20:06:21 +00:00
Jonah Williams
1050959d19
[flutter_driver] use mostly public screenshot API. (#157888)
Instead of completely private. This has been broken for Impeller for years, which shows how much this method is getting used.

Fixes https://github.com/flutter/flutter/issues/130461
2024-10-31 21:31:07 +00:00
Zachary Anderson
c4e19962bb
Fix Linux_android_emu tests late initialization errors (#152932)
This does not fix the issue underlying
https://github.com/flutter/flutter/issues/152684, but may prevent `adb
logcat` from ending before we've captured the logs that explain why the
app or emulator are potentially crashing.

Fixes Fixes https://github.com/flutter/flutter/issues/152899
2024-08-06 14:48:50 -07:00
Camille Simon
5931b4f21d
Increase delay for checking integration_ui_keyboard_resize test success (#141301)
Increases delay for checking keyboard resizing to potentially accommodate the occasional longer delay of the Pixel 7 Pro.

Intended to address https://github.com/flutter/flutter/issues/140645.
2024-01-12 04:42:07 +00:00
Christopher Fujino
dfdec8984f
[flutter_tools] Remove package:image (#115848)
* remove ciyaml targets

* remove screenshot_test and package:image

* update-packages

* remove TESTOWNERS entries
2022-11-22 21:49:57 +00:00
Christopher Fujino
0fc4a3efa8
Revert "Remove package:image dependency (#115674)" (#115680)
This reverts commit cf2c9f6ed4.
2022-11-18 18:22:23 -08:00
Christopher Fujino
cf2c9f6ed4
Remove package:image dependency (#115674)
* delete screenshot_test.dart

* remove image dep

* pub get
2022-11-18 23:50:23 +00:00
LongCatIsLooong
06314a073d
Put waitFor back in keyboard_textfield_test integration test (#102315) 2022-04-21 13:14:10 -07:00
LongCatIsLooong
ad612b59e5
Dump app on keyboard_textfield_test timeout (#98305) 2022-02-13 17:20:18 -08:00
LongCatIsLooong
213f766e35
Use ValueKey finder instead of text finder in keyboard_textfield_test (#97996) 2022-02-07 20:00:19 -08:00
Jenn Magder
f085e1a9cd
Add timeout to keyboard finder to diagnose flake (#97258) 2022-01-26 12:00:14 -08:00
LongCatIsLooong
e00d87ffcc
[keyboard_textfield_test] wait until the keyboard becomes visible (#92032) 2021-10-19 15:03:04 -07:00
Kaushik Iska
df3fe587e8
Validate that min frame number is numeric (#86498) 2021-07-15 17:11:09 -07:00
Dan Field
9c0bd18c40
Reland eliminate timeouts from integration tests (#85141) 2021-06-23 13:08:51 -07:00
Dan Field
69f2f8a18b
Revert "Remove per-test timeouts from integration tests (#85098)" (#85133)
This reverts commit b96c3c22ce.
2021-06-23 08:17:27 -07:00
Dan Field
b96c3c22ce
Remove per-test timeouts from integration tests (#85098) 2021-06-23 07:17:28 -07:00
Alexandre Ardhuin
df3662b15e
use throwsA (#82238) 2021-05-11 10:19:01 -07:00
Abhishek Ghaskata
a195bcc0cf
Migrate dev/integration_tests/ui to null safety (#80624) 2021-04-27 18:50:51 -07:00
Phil Quitslund
61c30c41b2
fix sort_directives violations (#80817) 2021-04-21 13:49:03 -07:00
Ian Hickson
29e604e241
Update packages (#74874) 2021-01-28 00:04:03 -08:00
Jenn Magder
51b3edd45f
Revert "Remove package image dependency (#74763)" (#74869)
This reverts commit ca2d7b3d3c.
2021-01-27 19:50:58 -08:00
Ian Hickson
ca2d7b3d3c
Remove package image dependency (#74763) 2021-01-27 17:19:03 -08:00
Jonah Williams
7ee910b0a8
[flutter_tools] ensure --dart-define can parse args with commas (#73798) 2021-01-15 13:51:32 -08:00
Dan Field
36f9af3f55
reland driver vm_service migration (#69126)
* One more reland of "Driver vm service (#68654)" (#69074)" (#69077)" (#69089)"

This reverts commit e5814756a2.

* pub run test
2020-10-27 11:30:24 -07:00
Dan Field
e5814756a2
Revert "Revert "Revert "Driver vm service (#68654)" (#69074)" (#69077)" (#69089)
This reverts commit 05ab0eba19.
2020-10-27 01:47:03 -07:00
Dan Field
05ab0eba19
Revert "Revert "Driver vm service (#68654)" (#69074)" (#69077)
This reverts commit 19ce7a86af.
2020-10-26 19:22:25 -07:00
Jonah Williams
19ce7a86af
Revert "Driver vm service (#68654)" (#69074)
This reverts commit 3ecac303b4.

Co-authored-by: Dan Field <dfield@gmail.com>
2020-10-26 18:56:34 -07:00
Dan Field
3ecac303b4
Driver vm service (#68654)
Migrate flutter_driver to use package:vm_service
2020-10-26 17:09:14 -07:00
Michael R Fairhurst
7f3c9b6bda
Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
gaaclarke
fbd6dd64d3
Added a more generous timeout period for the keyboard animation. (#62628) 2020-08-04 08:14:17 -07:00
Jonah Williams
e092dcfa22
[flutter_tools] Reland: fix multiple dart defines (#54973) 2020-04-16 10:56:49 -07:00
Jonah Williams
11ab2fa35c
Revert "[flutter_tools] fix multiple defines in flutter tooling, web (#54909)" (#54967)
This reverts commit b8bd09db21.
2020-04-16 08:33:16 -07:00
Jonah Williams
b8bd09db21
[flutter_tools] fix multiple defines in flutter tooling, web (#54909) 2020-04-15 22:25:32 -07:00
Greg Spencer
e20080b5d1
Add LICENSE file to packages/flutter, add test to make sure it… (#53799)
This adds a LICENSE file to the packages/flutter directory so that it can be found when building, and a test to make sure it exists in produced binaries.
2020-04-02 10:38:25 -07:00
Jonah Williams
c1112d3f7e
[flutter_tools] Reland: Allow providing dart-defines to Android, iOS, macOS builds (#52044) 2020-03-06 14:53:36 -08:00
Jonah Williams
ee476a7bd1
Revert "[flutter_tools] Allow providing dart-defines to Android, iOS, macOS builds (#51714)" (#52041)
This reverts commit ee60eeea3e.
2020-03-05 12:51:42 -08:00
Jonah Williams
ee60eeea3e
[flutter_tools] Allow providing dart-defines to Android, iOS, macOS builds (#51714) 2020-03-05 12:38:40 -08:00
Ian Hickson
449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
sjindel-google
0564f0a812
Tests for Engine ensuring debug-mode apps are attached on iOS. (#37043)
This PR contains the tests for flutter/engine#10186.
2019-08-06 20:08:09 +02:00
a-deeb
c4f5f42a0a updated tearDownAll function (#28808) 2019-06-03 10:54:44 -07:00
Jason Simmons
311cde98a6
Reland "Clean up some flutter_tools tests and roll dependencies" (#33225)
This relands flutter/flutter#33163 with a fix to the integration_ui test.
2019-05-29 19:04:35 -07:00
Jonah Williams
938dd5a4aa
Revert "Update driver script to execute test through test_core" (#24401)
* Revert "Add dashing config file for generating docset from flutter docs (#24374)"

This reverts commit ec8ca8606c.

* Revert "Update driver script to execute test through test_core (#24168)"

This reverts commit 6c62cf337f.
2018-11-15 11:17:00 -08:00
Jonah Williams
6c62cf337f
Update driver script to execute test through test_core (#24168) 2018-11-15 10:50:25 -08:00
Jonah Williams
23a7535a39
Revert "Remove package:test dependency from flutter_test (#23755)" (#24004)
This reverts commit 71e9bd6f25.
2018-11-06 09:12:48 -08:00
Jonah Williams
71e9bd6f25
Remove package:test dependency from flutter_test (#23755) 2018-11-06 08:39:27 -08:00
Alexandre Ardhuin
d340e2f229
apply lint prefer_void_to_null in dev/ (#22661) 2018-10-04 18:44:23 +02:00
Alexandre Ardhuin
d927c93310
Unnecessary new (#20138)
* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
2018-09-12 08:29:29 +02:00
Ian Hickson
686d8f8a22 Shim package:test to avoid matcher issues (#20602)
* Upgrade everything except matcher.
* Roll matcher (and test)
* Adjust tests that depend on flutter:test directly to depend on a shim
* Require use of package:test shim and remove other references to package:test
2018-08-14 20:33:58 -07:00
Alexandre Ardhuin
eda03e2586
re-re-enable lint unnecessary_const (#20103) 2018-08-02 12:02:32 +02:00