Skip to content

content test: Aim taps on links more precisely at the text #476

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

Merged
merged 2 commits into from
Jan 4, 2024

Conversation

gnprice
Copy link
Member

@gnprice gnprice commented Jan 4, 2024

By saying tester.tapAt(find.text('hello')), we had been aiming at the center of the Text widgets, and expecting that to hit the recognizer we've put on the span, even though the widget is much wider than the span and the latter doesn't reach the former's center. Effectively we were relying on the presence of issue #214.

But with an upstream change yesterday:

such a tap no longer hits the span. That broke these tests.

To fix them, aim the taps near the start of the widget instead.


Also bump the Flutter version to require that upstream change, fixing #214.

Fixes: #475
Fixes: #214

By saying `tester.tapAt(find.text('hello'))`, we had been aiming
at the center of the Text widgets, and expecting that to hit the
recognizer we've put on the span, even though the widget is much
wider than the span and the latter doesn't reach the former's center.
Effectively we were relying on the presence of issue zulip#214.

But with an upstream change yesterday:
  flutter/flutter#140621
such a tap no longer hits the span.  That broke these tests.

To fix them, aim the taps near the start of the widget instead.

Fixes: zulip#475
And update Flutter's supporting libraries to match.

In particular this pulls in the following upstream change:
  flutter/flutter#140621
which fixes zulip#214.

Fixes: zulip#214
@chrisbobbe chrisbobbe merged commit 8c4b1ed into zulip:main Jan 4, 2024
@chrisbobbe
Copy link
Collaborator

Great, thanks! Merged.

@gnprice gnprice deleted the pr-link-tests branch January 4, 2024 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flutter update breaks link interaction tests Tappable links' touch target can extend through whitespace
2 participants