Skip to content
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

Reland: Removes single window assumptions from flutter_test #122060

Merged
merged 4 commits into from
Mar 7, 2023

Conversation

pdblasi-google
Copy link
Contributor

@pdblasi-google pdblasi-google commented Mar 6, 2023

  • Adds TestFlutterView to wrap FlutterView and allow modification of properties for testing
  • Updates TestPlatformDispatcher to wrap its views in TestFlutterViews when they are changed
  • Adds viewOf to WidgetController for finding a TestFlutterView related to the results of a Finder
  • Exposes platformDispatcher and implicitView 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

Resolves #117481

The difference between this and the original PR can be reviewed with this commit.

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

* 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 `implicitView` 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
@flutter-dashboard flutter-dashboard bot added a: tests "flutter test", flutter_test, or one of our tests f: focus Focus traversal, gaining or losing focus f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Mar 6, 2023
….physicalSize` to allow for the web implementation where `physicalGeometry` and `physicalSize` can be decoupled.
@goderbauer
Copy link
Member

Looks like this is failing some checks.

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

packages/flutter_test/lib/src/window.dart Show resolved Hide resolved
packages/flutter_test/lib/src/window.dart Outdated Show resolved Hide resolved
Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

packages/flutter_test/lib/src/window.dart Outdated Show resolved Hide resolved
packages/flutter_test/lib/src/window.dart Show resolved Hide resolved
@pdblasi-google pdblasi-google added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 7, 2023
@auto-submit auto-submit bot merged commit a626f4d into flutter:master Mar 7, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 8, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 8, 2023
CaseyHillers added a commit that referenced this pull request Mar 8, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 8, 2023
auto-submit bot pushed a commit that referenced this pull request Mar 8, 2023
…#122060)" (#122193)

Revert "Reland: Removes single window assumptions from `flutter_test`"
hangyujin pushed a commit to hangyujin/flutter that referenced this pull request Mar 11, 2023
…r#122060)

Reland: Removes single window assumptions from `flutter_test`
hangyujin pushed a commit to hangyujin/flutter that referenced this pull request Mar 11, 2023
…flutter#122060)" (flutter#122193)

Revert "Reland: Removes single window assumptions from `flutter_test`"
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: tests "flutter test", flutter_test, or one of our tests autosubmit Merge PR when tree becomes green via auto submit App f: focus Focus traversal, gaining or losing focus f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor TestWindow and TestWidgetsFlutterBinding.window for multi-window world
2 participants