callstack / callstack/react-native-pager-view
[iOS] Press event inside Pager View not firing when using E2E Detox tests
- Vorherrschende Sprache
- TypeScript
- Sterne
- 3.4k
- Forks
- 476
- Ø Merge
- 10 T. 21 Std.
- Gemergte PRs (30 T.)
- 2
Beschreibung
## Environment
Environment details
```
Binaries:
Node:
version: 22.14.0
Yarn:
version: 1.22.22
npm:
version: 11.6.2
Managers:
CocoaPods:
version: 1.16.2
SDKs:
iOS SDK:
Platforms:
- DriverKit 25.5
- iOS 26.5
- macOS 26.5
- tvOS 26.5
- visionOS 26.5
- watchOS 26.5
Android SDK: Not Found
IDEs:
Android Studio: 2025.1 AI-251.27812.49.2514.14217341
Xcode:
version: 26.5/17F42
Languages:
Java:
version: 17.0.11
Ruby:
version: 2.6.10
npmPackages:
"@react-native-community/cli":
installed: 20.0.0
wanted: 20.0.0
react:
installed: 19.2.0
wanted: 19.2.0
react-native:
installed: 0.83.5
wanted: 0.83.5
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
```
## Description
When trying to press/trigger a Pressable/TouchableOpacity (nested inside a `PagerView`) using Detox's `tap()`, it doesn't fire the `onPress` handler. Detox finds the element and the "press" visual hint is visible on top of the button but the `onPress` is never fired.
Using either
```
const AnimatedPagerView = Animated.createAnimatedComponent(PagerView);
```
or `PagerView` directly doesn't make a difference.
See attached video:
* First click on 00:03 is from Detox
* The swipe and click after that is manual from me
## Reproducible Demo
I've attached a simple repo for reproducing the issue using the following:
```
"react": "19.2.0",
"react-native": "0.83.5",
"react-native-pager-view": "^8.0.2",
```
To build and run use:
```
npm install
cd ios && pod install # for iOS
npm run e2e:build
npm run e2e:test
```
[RN0835PagerViewDetox.zip](https://github.com/user-attachments/files/28500454/RN0835PagerViewDetox.zip)
Beitragsleitfaden
Rechercherichtung
Beginne mit der angehängten reproduzierbaren Demo und führe npm install, cd ios && pod install, npm run e2e:build und npm run e2e:test aus. Vergleiche den Detox-Tap innerhalb von PagerView mit der manuellen Interaktion und verfolge dann die von der Demo offengelegten Einstiegspunkte für die Ereignisbehandlung von PagerView und iOS. Als erledigt gilt die Aufgabe, wenn der verschachtelte Pressable- oder TouchableOpacity-onPress unter Detox ausgelöst wird, ohne manuelle Taps zu beeinträchtigen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- ios, react-native, typescript
- Bereich
- mobile, testing-qa
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100