Skip to content

Add tests for Press responder event module#15290

Merged
trueadm merged 2 commits into
react:masterfrom
necolas:react-events/press-tests
Apr 2, 2019
Merged

Add tests for Press responder event module#15290
trueadm merged 2 commits into
react:masterfrom
necolas:react-events/press-tests

Conversation

@necolas

@necolas necolas commented Apr 1, 2019

Copy link
Copy Markdown
Contributor

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
Nicolas Gallagher added 2 commits April 2, 2019 07:40
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 react#15257
@necolas necolas force-pushed the react-events/press-tests branch from 40462ad to 0d4127c Compare April 2, 2019 14:42

@trueadm trueadm left a comment

Copy link
Copy Markdown
Contributor

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 react: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