From f30db0ad069919e8bdfce3f39639c20356ee8cec Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 28 Jul 2026 18:08:02 +0300 Subject: [PATCH] absorb ios e2e tap offset --- src/view/com/testing/TestCtrls.e2e.tsx | 159 +++++++++++++------------ 1 file changed, 82 insertions(+), 77 deletions(-) diff --git a/src/view/com/testing/TestCtrls.e2e.tsx b/src/view/com/testing/TestCtrls.e2e.tsx index 03c8849891..91652395c0 100644 --- a/src/view/com/testing/TestCtrls.e2e.tsx +++ b/src/view/com/testing/TestCtrls.e2e.tsx @@ -16,9 +16,12 @@ LogBox.ignoreAllLogs() * of the tests dramatically. */ -const BTN = Platform.select({ - ios: {height: 8, width: 8, backgroundColor: 'red'}, - default: {height: 1, width: 1, backgroundColor: 'red'}, +const BTN = {height: 1, width: 1, backgroundColor: 'red'} +// The iOS dev client reports these accessibility frames ~16pt right and 34pt +// above their hit-test frames. At 80pt, either frame's center hits the control. +const SIGN_IN_BTN = Platform.select({ + ios: {height: 80, width: 80, backgroundColor: 'red'}, + default: BTN, }) /* @@ -72,91 +75,93 @@ export function TestCtrls() { setShowLoggedOut(false) } return ( - + <> {isProxyConfigured && ( - <> + - + )} - logoutEveryAccount('Settings')} - accessibilityRole="button" - style={BTN} - /> - navigate('Home')} - accessibilityRole="button" - style={BTN} - /> - navigate('Settings')} - accessibilityRole="button" - style={BTN} - /> - navigate('Moderation')} - accessibilityRole="button" - style={BTN} - /> - navigate('Lists')} - accessibilityRole="button" - style={BTN} - /> - navigate('Feeds')} - accessibilityRole="button" - style={BTN} - /> - navigate('Debug')} - accessibilityRole="button" - style={BTN} - /> - queryClient.invalidateQueries({queryKey: ['post-feed']})} - accessibilityRole="button" - style={BTN} - /> - setShowLoggedOut(true)} - accessibilityRole="button" - style={BTN} - /> - { - onboardingDispatch({type: 'start'}) - }} - accessibilityRole="button" - style={BTN} - /> - + + logoutEveryAccount('Settings')} + accessibilityRole="button" + style={BTN} + /> + navigate('Home')} + accessibilityRole="button" + style={BTN} + /> + navigate('Settings')} + accessibilityRole="button" + style={BTN} + /> + navigate('Moderation')} + accessibilityRole="button" + style={BTN} + /> + navigate('Lists')} + accessibilityRole="button" + style={BTN} + /> + navigate('Feeds')} + accessibilityRole="button" + style={BTN} + /> + navigate('Debug')} + accessibilityRole="button" + style={BTN} + /> + + queryClient.invalidateQueries({queryKey: ['post-feed']}) + } + accessibilityRole="button" + style={BTN} + /> + setShowLoggedOut(true)} + accessibilityRole="button" + style={BTN} + /> + { + onboardingDispatch({type: 'start'}) + }} + accessibilityRole="button" + style={BTN} + /> + + ) }