[flutter_test/integration_test] added setSurfaceSize test coverage#82712
[flutter_test/integration_test] added setSurfaceSize test coverage#82712dkwingsmt merged 2 commits intoflutter:masterfrom
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
|
@googlebot I signed it! |
There was a problem hiding this comment.
Maybe create a separate hitTesting works when using setSurfaceSize to keep the tests small and focused on one aspect at a time.
There was a problem hiding this comment.
Thanks for the review - I've decoupled the focused hitTesting works when using setSurfaceSize out from the existing setSurfaceSize works, and have applied this to both the integration_test suite and flutter_test suite.
There was a problem hiding this comment.
Removing this seems to break the logic where you can just flutter run a test, tap on the screen and it would tell you potential finders for widgets that are under your finger. (Looks like we don't have a test for that behavior, though 😞.) Maybe the transform logic has to move to a place where it only triggers for real pointer events and not for test-simulated ones?
/cc @dkwingsmt since the PR author bisected that this broke with #64846, which changed how test-simulated and real pointer events are routed in tests.
There was a problem hiding this comment.
I'm adding a unit test for the behavior you described and let's see if we can fix this issue without breaking it.
There was a problem hiding this comment.
I believe the tests where added in #83337. @prefanatic Can you rebase this PR to the latest master and see if this is breaking anything?
There was a problem hiding this comment.
@goderbauer Thanks, I've rebased the PR and pushed, looks green.
|
I've added some unit tests for the features that we were afraid of breaking. Can you sync with master and see if all tests pass? |
4c25b84 to
98d3d9c
Compare
|
@goderbauer Sorry, just getting back around to this -- I'm hoping you can help clear things up for me, trying to study how these pointer events are dispatched. It's clear that removing The tests added in #83337 cover "Some possible finders" but not under a From what I can see, the coordinates from finders determined by Now, for "Some possible finders", the pointer event does not seem to be transformed until I think my direction here should be to ensure that pointer events that drive "Some possible finders" should not rely on |
That sounds like a good direction, yes. Alternatively, we could remove the eager transformation of coordinates from finders, but that would probably mess up running tests under the regular
@dkwingsmt was experimenting with a test for this scenario in #86449 (see "Should show event indicator for pointer events with setSurfaceSize" test) and also discovered that those are failing. Can you add that test case to this PR as well so we can make sure it gets fixed with whatever approach we come up with here? Thanks! |
|
#86449 is almost complete and should fix many problems with live tests and |
Yes, let's keep this tests to ensure we have good test coverage. |
98d3d9c to
70cab82
Compare
|
Thank you both! With #86449, the original issue is resolved and the test cases in this PR pass. I've restructured this PR to represent only the added test coverage. |
|
Gold has detected about 1 new digest(s) on patchset 4. |
goderbauer
left a comment
There was a problem hiding this comment.
LGTM once #86449 is merged and these tests pass
|
Now that #86449 is merged, can you update with master and convert this PR out of draft? |
70cab82 to
3779bf2
Compare
|
Gold has detected about 35 new digest(s) on patchset 4. |
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. Changes reported for pull request #82712 at sha 3779bf2df80552f26253c4f4d73e141ab8348df2 |
|
@prefanatic Can you try rebasing this PR again to get the gold check to pass? Thanks! |
3779bf2 to
67d9206
Compare
67d9206 to
24466a3
Compare
This PR includes an updated test case for
integration_testand a new test case forflutter_testto ensure that hit tests transform properly when usingsetSurfaceSize, for both theIntegrationTestWidgetsFlutterBindingandLiveTestWidgetsFlutterBindingbindings.Aims to resolve #82557
Pre-launch Checklist
///).