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

Add tests for Press responder event module #15290

Merged
merged 2 commits into from
Apr 2, 2019

Conversation

necolas
Copy link
Contributor

@necolas necolas commented Apr 1, 2019

Add tests for every implemented prop and feature of the Press responder event module.

Patches the Press module to fix two failing tests: default delayLongPress cannot be shorter than 10ms; onPressChange timing should not change if onPress is cancelled by onLongPressShouldCancelPress.

NOTE: The default longPress delay should be 500 to match Android and React Native - https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/view/ViewConfiguration.java#66. This will be fixed once #15288 is merged

Ref #15257

@necolas necolas mentioned this pull request Apr 1, 2019
@necolas necolas force-pushed the react-events/press-tests branch 2 times, most recently from c21ba8d to 40462ad Compare April 1, 2019 23:31
Behavior being tested takes cues from React Native's Pressability.
A couple of these tests fail and require the Press implementation to be patched.

Ref facebook#15257
Copy link
Contributor

@trueadm trueadm left a comment

Choose a reason for hiding this comment

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

These tests are great, they'll help us move faster with the Press implementation too :)

@trueadm trueadm merged commit f243dea into facebook:master Apr 2, 2019
@necolas necolas deleted the react-events/press-tests branch April 3, 2019 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants