absorb ios e2e tap offset

This commit is contained in:
Samuel Newman
2026-07-28 18:08:02 +03:00
parent 8f7f90ebc4
commit f30db0ad06
+20 -15
View File
@@ -16,9 +16,12 @@ LogBox.ignoreAllLogs()
* of the tests dramatically. * of the tests dramatically.
*/ */
const BTN = Platform.select({ const BTN = {height: 1, width: 1, backgroundColor: 'red'}
ios: {height: 8, width: 8, backgroundColor: 'red'}, // The iOS dev client reports these accessibility frames ~16pt right and 34pt
default: {height: 1, width: 1, backgroundColor: 'red'}, // 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,29 +75,28 @@ export function TestCtrls() {
setShowLoggedOut(false) setShowLoggedOut(false)
} }
return ( return (
<View
style={{
position: 'absolute',
top: 100,
right: Platform.OS === 'ios' ? 24 : 0,
zIndex: 100,
}}>
{isProxyConfigured && (
<> <>
{isProxyConfigured && (
<View
style={[
{position: 'absolute', top: 100, zIndex: 100},
Platform.OS === 'ios' ? {left: 0} : {right: 0},
]}>
<Pressable <Pressable
testID="e2eSignInAlice" testID="e2eSignInAlice"
onPress={onPressSignInAlice} onPress={onPressSignInAlice}
accessibilityRole="button" accessibilityRole="button"
style={BTN} style={SIGN_IN_BTN}
/> />
<Pressable <Pressable
testID="e2eSignInBob" testID="e2eSignInBob"
onPress={onPressSignInBob} onPress={onPressSignInBob}
accessibilityRole="button" accessibilityRole="button"
style={BTN} style={SIGN_IN_BTN}
/> />
</> </View>
)} )}
<View style={{position: 'absolute', top: 102, right: 0, zIndex: 100}}>
<Pressable <Pressable
testID="e2eSignOut" testID="e2eSignOut"
onPress={() => logoutEveryAccount('Settings')} onPress={() => logoutEveryAccount('Settings')}
@@ -139,7 +141,9 @@ export function TestCtrls() {
/> />
<Pressable <Pressable
testID="e2eRefreshHome" testID="e2eRefreshHome"
onPress={() => queryClient.invalidateQueries({queryKey: ['post-feed']})} onPress={() =>
queryClient.invalidateQueries({queryKey: ['post-feed']})
}
accessibilityRole="button" accessibilityRole="button"
style={BTN} style={BTN}
/> />
@@ -158,5 +162,6 @@ export function TestCtrls() {
style={BTN} style={BTN}
/> />
</View> </View>
</>
) )
} }