Closed
Description
Describe the bug
After updating to v7, calling fireEvent for "responderMove" stopped working. This is due to the new checks to see if a component is "disabled". Since RNTL only checks for onStartShouldSetResponder(), a component that uses onMoveShouldSetResponder() but not onStartShouldSetResponder(), will always be considered to be "disabled" by RNTL.
For testing, I replaced onStartShouldSetResponder with onMoveShouldSetResponder on the following and it solves the issue:
Expected behavior
The following would work:
fireEvent(container, 'responderMove', {
touchHistory: { mostRecentTimeStamp: '2', touchBank: [] },
});
Steps to Reproduce
Screenshots
Versions
npmPackages:
@testing-library/react-native: ^7.0.2 => 7.0.2
react: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz => 0.63.2
react-test-renderer: ^16.11.0 => 16.13.1
Metadata
Metadata
Assignees
Labels
No labels