Closed
Description
Describe the bug
When fireEvent
is called with wrapped TextInput(i.e with styled-components
) that is disabled the event bubbles up.
For example: We want to check if the TextInput
component is actually disabled we might check whether onFocus
event handler was called or not.
Expected behaviour
onFocus
handler should not be called if the TextInput
is disabled (aka editable
prop set to false
)
Steps to Reproduce
https://github.com/TMaszko/FireEventBug
Install dependencies and run yarn test
Versions
npmPackages:
@testing-library/react-native: ^12.0.1 => 12.0.1
react: 18.2.0 => 18.2.0
react-native: 0.71.6 => 0.71.6
react-test-renderer: ^18.2.0 => 18.2.0
Metadata
Metadata
Assignees
Labels
No labels