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

RNGH::Pressable won't work the same as RN::Pressable when using Testing Library #3349

Open
sidferreira opened this issue Jan 21, 2025 · 1 comment
Labels
Missing repro Platform: iOS This issue is specific to iOS

Comments

@sidferreira
Copy link

Description

The initial discussion can be found at #3347, but I decided to start a new one to set things fresh.

There's also an issue with RNTL callstack/react-native-testing-library#1738

The base line is: react-native-gesture-handler/Pressable is missing some features from react-native/Pressable causing the first not to work like the second with react-native-testing-library.

Some of the issues I found:

  • Missing A11yState handling
  • Even with Pressable disabled, fireEvent.press will trigger events
  • Won't work with fireEvent(el, 'click')
  • Won't work with userEvents.press(el)

I found some initial solutions (Draft PR below) but I have limited time for it.

Steps to reproduce

#3347

Snack or a link to a repository

#3347

Gesture Handler version

main

React Native version

0.76

Platforms

iOS

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

@sidferreira sidferreira changed the title RNGH::Pressable won't work the same as RN::Pressable when using RNTL RNGH::Pressable won't work the same as RN::Pressable when using Testing Library Jan 21, 2025
@github-actions github-actions bot added Platform: iOS This issue is specific to iOS Missing repro labels Jan 21, 2025
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro Platform: iOS This issue is specific to iOS
Projects
None yet
Development

No branches or pull requests

1 participant