-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Description
👋
We have a particular use case for integration_test where we use IntegrationTestWidgetsFlutterBinding.setSurfaceSize in order to simplify scrolling and include more content for the purpose of screenshot reviews. It seems that WidgetTester.tap was working before with setSurfaceSize, but now misses.
In Flutter 1.22.6, in combination with flutter/plugins/integration_test - this works well.
In Flutter 2.0.6 up to 2.3.0, using flutter/packages/integration_test - it appears to have regressed.
I have updated the test case Test Integration binding setSurfaceSize works for the two package variants:
- For the now deprecated, Flutter 1.22.6 variant - this test passes.
- For the current, Flutter-mainline variant - this test fails.
The test case is equivalent across both, but separate to highlight the regression at some point post 1.22.6.
I've created a small project to help facilitate git bisect in discovering where this regression occurred. The project can be seen here. The following bisect parameters were used:
git bisect start HEAD 13860a7d23c564ec9ff38a44661d21160c3f7b1e
git bisect run dart ..\integration_test_bisect\tool\integration_test_bisect.dart
HEAD in this case refers to afb98ea
The bisect keyed into a48e143 as the source of this particular test failure. PR #64846.
I hope this isn't frowned upon, but @dkwingsmt & @goderbauer for pings.
The following indicates the breakpoint for Flutter 1.22.6, which shows an appropriate hit test transform in a scaled state:

The following indicates the breakpoint for Flutter 2.3.0-2.0.pre.206, which seems to show a double-transformed hit test result, for the same test case:

Removing the implementation for _LiveTestRenderView.hitTest allows the test to pass on mainline, but given the complexities, and that _LiveTestRenderView.hitTest is utilized for more than just integration_test, I'm not certain this is the correct approach.