Skip to content

Conversation

@pdblasi-google
Copy link
Contributor

@pdblasi-google pdblasi-google commented Mar 8, 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 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

The changes between this and the previous PR can be found in this commit.

Resolves #117481

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 `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
@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 8, 2023
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

@pdblasi-google pdblasi-google added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 8, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 8, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Mar 8, 2023

auto label is removed for flutter/flutter, pr: 122233, due to - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@pdblasi-google pdblasi-google added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 8, 2023
@auto-submit auto-submit bot merged commit eb3d317 into flutter:master Mar 9, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 9, 2023
@pdblasi-google pdblasi-google deleted the issues/117481 branch March 9, 2023 18:48
CaseyHillers added a commit that referenced this pull request Mar 10, 2023
CaseyHillers pushed a commit to CaseyHillers/flutter that referenced this pull request Mar 10, 2023
CaseyHillers pushed a commit that referenced this pull request Mar 10, 2023
* Revert "Remove references to BindingBase.window (#122119)"

This reverts commit c7681f0.

* Revert "Remove another reference to BindingBase.window (#122341)"

This reverts commit 6ec4445.

* Revert "Reland (2): Removes single window assumptions from `flutter_test` (#122233)"

This reverts commit eb3d317.

* Revert "Remove single view assumption from TestViewConfiguration (#122352)"

This reverts commit 927289f.

* Revert "Updates `flutter/test/cupertino` to no longer use `TestWindow` (#122325)"

This reverts commit 67e17e4.

* Revert "Updates `flutter/test/gestures` to no longer reference `TestWindow` (#122327)"

This reverts commit c2a5111.

* Revert "Updates `flutter/test/rendering` to no longer use `TestWindow` (#122347)"

This reverts commit 28b65e0.

* Revert "Updates `flutter_localizations/test` to stop using `TestWindow` (#122321)"

This reverts commit 01367d5.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 10, 2023
hannah-hyj pushed a commit to hannah-hyj/flutter that referenced this pull request Mar 11, 2023
…utter#122233)

Reland (2): Removes single window assumptions from `flutter_test`
hannah-hyj pushed a commit to hannah-hyj/flutter that referenced this pull request Mar 11, 2023
* Revert "Remove references to BindingBase.window (flutter#122119)"

This reverts commit c7681f0.

* Revert "Remove another reference to BindingBase.window (flutter#122341)"

This reverts commit 6ec4445.

* Revert "Reland (2): Removes single window assumptions from `flutter_test` (flutter#122233)"

This reverts commit eb3d317.

* Revert "Remove single view assumption from TestViewConfiguration (flutter#122352)"

This reverts commit 927289f.

* Revert "Updates `flutter/test/cupertino` to no longer use `TestWindow` (flutter#122325)"

This reverts commit 67e17e4.

* Revert "Updates `flutter/test/gestures` to no longer reference `TestWindow` (flutter#122327)"

This reverts commit c2a5111.

* Revert "Updates `flutter/test/rendering` to no longer use `TestWindow` (flutter#122347)"

This reverts commit 28b65e0.

* Revert "Updates `flutter_localizations/test` to stop using `TestWindow` (flutter#122321)"

This reverts commit 01367d5.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 11, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 12, 2023
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