-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Removes single window assumptions from flutter_test
#121549
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
Conversation
613cb7e to
b1746bd
Compare
aafe2ad to
20a5f6d
Compare
goderbauer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking pretty nicely!
|
Oh, one more thing: I seemed to recall that we considered whether we should auto-reset the testvalues on the TestFlutterView (and ideally TestFlutterPlatformDispatcher) between tests. Did you decide against doing that or did I just miss it? |
I plan on doing that work in a separate PR. I want to do a revamp of how the |
1beddef to
18abbb9
Compare
goderbauer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Adds `TestFlutterView` to wrap `FlutterView` and allow modification of properties for testing * Updates `TestPlatformDispatcher` to wrap its views in `TestFlutterView`s when they are changed * Adds `viewOf` to `WidgetController` for finding a `TestFlutterView` related to the results of a `Finder` * Exposes `platformDispatcher` and `view` from `WidgetController` (and `WidgetTester`) * This is so the related `viewOf` method, which uses the `Finder` API, will be in a consistent place with these methods and other `Finder` APIs
983a652 to
10eafc3
Compare
This reverts commit f2dd19d.
| @override | ||
| ui.FrameData get frameData => _platformDispatcher.frameData; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the accidental deletion of this getter caused b/272195069.

TestFlutterViewto wrapFlutterViewand allow modification of properties for testingTestPlatformDispatcherto wrap its views inTestFlutterViews when they are changedviewOftoWidgetControllerfor finding aTestFlutterViewrelated to the results of aFinderplatformDispatcherandimplicitViewfromWidgetController(andWidgetTester)viewOfmethod, which uses theFinderAPI, will be in a consistent place with these methods and otherFinderAPIsResolves #117481
Pre-launch Checklist
///).