-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WidgetTester.dragUntilVisible() to show helpful errors #89336
Labels
a: debugging
Debugging, breakpoints, expression evaluation
c: new feature
Nothing broken; request for a new capability
c: proposal
A detailed proposal for a change to Flutter
f: integration_test
The flutter/packages/integration_test plugin
framework
flutter/packages/flutter repository. See also f: labels.
P3
Issues that are less important to the Flutter project
team-framework
Owned by Framework team
triaged-framework
Triaged by Framework team
Comments
Thanks for the detailed report and code samples. Used the first example and ran it on latest master and stable and get the same exception as below:
stable, master flutter doctor -v
Labeling it as a proposal / feature request to show meaningful / helpful errors to properly debug the failing tests. |
darshankawar
added
a: tests
"flutter test", flutter_test, or one of our tests
framework
flutter/packages/flutter repository. See also f: labels.
f: integration_test
The flutter/packages/integration_test plugin
c: proposal
A detailed proposal for a change to Flutter
c: new feature
Nothing broken; request for a new capability
passed first triage
a: debugging
Debugging, breakpoints, expression evaluation
and removed
a: tests
"flutter test", flutter_test, or one of our tests
in triage
Presently being triaged by the triage team
labels
Sep 2, 2021
Same issue. Solution yet? |
2 tasks
flutter-triage-bot
bot
added
team-framework
Owned by Framework team
triaged-framework
Triaged by Framework team
labels
Jul 8, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
a: debugging
Debugging, breakpoints, expression evaluation
c: new feature
Nothing broken; request for a new capability
c: proposal
A detailed proposal for a change to Flutter
f: integration_test
The flutter/packages/integration_test plugin
framework
flutter/packages/flutter repository. See also f: labels.
P3
Issues that are less important to the Flutter project
team-framework
Owned by Framework team
triaged-framework
Triaged by Framework team
Use case
I am developing integration tests for a mobile app. The tests use
WidgetTester.dragUntilVisible()
(inherited fromWidgetController.dragUntilVisible
to scroll aListView
until a widget is visible. The method failed in my tests in several ways:When it cannot find the target widget, it logs a useless exception. It does the same thing when the widget is scrolled up out of view.
integration_test/example_test.dart
When the target widget is not visible and it fails to find the view widget, it throws a good exception:
integration_test/example_test.dart
When the target widget is already visible, it silently ignores a bad view finder. Layout changes can make the test fail later.
integration_test/example_test.dart
When the view finder matches two widgets, the error message is useful:
integration_test/example_test.dart
Steps to reproduce:
flutter create example4
Write
integration_test/example_test.dart
with one of the examples above.Update these files:
pubspec.yaml
test_driver/integration_test.dart
Execute the test:
flutter drive --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d test-sim
flutter doctor -v
Proposal
The text was updated successfully, but these errors were encountered: