From aa92a22e8eca62b1f8af4fd8896e8794e3e3995a Mon Sep 17 00:00:00 2001 From: Alpha Date: Tue, 31 Mar 2026 15:46:52 -0400 Subject: [PATCH 1/2] Mocks: fix button content missing This makes it impossible for tests to target a button based on displayed elements. --- packages/react-native-gesture-handler/src/mocks/mocks.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native-gesture-handler/src/mocks/mocks.tsx b/packages/react-native-gesture-handler/src/mocks/mocks.tsx index 1a1b199b66..0a24b175d7 100644 --- a/packages/react-native-gesture-handler/src/mocks/mocks.tsx +++ b/packages/react-native-gesture-handler/src/mocks/mocks.tsx @@ -31,9 +31,9 @@ const LongPressGestureHandler = View; const PinchGestureHandler = View; const RotationGestureHandler = View; const FlingGestureHandler = View; -export const RawButton = ({ enabled, ...rest }: any) => ( +export const RawButton = ({ enabled, children, ...rest }: any) => ( - + {children} ); export const BaseButton = RawButton; From 700a5aefc79f92a8e19d1a191c17524e4098f5f6 Mon Sep 17 00:00:00 2001 From: Alpha Date: Wed, 1 Apr 2026 14:31:55 -0400 Subject: [PATCH 2/2] Mocks: use fallback view for children-less buttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: MichaƂ Bert <63123542+m-bert@users.noreply.github.com> --- packages/react-native-gesture-handler/src/mocks/mocks.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native-gesture-handler/src/mocks/mocks.tsx b/packages/react-native-gesture-handler/src/mocks/mocks.tsx index 0a24b175d7..8aa8d6ec13 100644 --- a/packages/react-native-gesture-handler/src/mocks/mocks.tsx +++ b/packages/react-native-gesture-handler/src/mocks/mocks.tsx @@ -33,7 +33,7 @@ const RotationGestureHandler = View; const FlingGestureHandler = View; export const RawButton = ({ enabled, children, ...rest }: any) => ( - {children} + {children ?? } ); export const BaseButton = RawButton;