stop e2e controls intercepting taps
This commit is contained in:
@@ -3,7 +3,7 @@ import {LogBox, Platform, Pressable, View} from 'react-native'
|
|||||||
import {useQueryClient} from '@tanstack/react-query'
|
import {useQueryClient} from '@tanstack/react-query'
|
||||||
|
|
||||||
import {BLUESKY_PROXY_HEADER, DEV_ENV_APPVIEW_DID} from '#/lib/constants'
|
import {BLUESKY_PROXY_HEADER, DEV_ENV_APPVIEW_DID} from '#/lib/constants'
|
||||||
import {useAgent, useSessionApi} from '#/state/session'
|
import {useAgent, useSession, useSessionApi} from '#/state/session'
|
||||||
import {useLoggedOutViewControls} from '#/state/shell/logged-out'
|
import {useLoggedOutViewControls} from '#/state/shell/logged-out'
|
||||||
import {useOnboardingDispatch} from '#/state/shell/onboarding'
|
import {useOnboardingDispatch} from '#/state/shell/onboarding'
|
||||||
import {navigate} from '../../../Navigation'
|
import {navigate} from '../../../Navigation'
|
||||||
@@ -23,6 +23,10 @@ const SIGN_IN_BTN = Platform.select({
|
|||||||
ios: {height: 80, width: 80, backgroundColor: 'red'},
|
ios: {height: 80, width: 80, backgroundColor: 'red'},
|
||||||
default: BTN,
|
default: BTN,
|
||||||
})
|
})
|
||||||
|
const STORYBOOK_BTN = Platform.select({
|
||||||
|
android: {height: 10, width: 10, backgroundColor: 'red'},
|
||||||
|
default: BTN,
|
||||||
|
})
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This component is mounted inside <Fragment key={currentAccount?.did}> in
|
* This component is mounted inside <Fragment key={currentAccount?.did}> in
|
||||||
@@ -38,6 +42,7 @@ let hasConfiguredProxy = false
|
|||||||
|
|
||||||
export function TestCtrls() {
|
export function TestCtrls() {
|
||||||
const agent = useAgent()
|
const agent = useAgent()
|
||||||
|
const {hasSession} = useSession()
|
||||||
const queryClient = useQueryClient()
|
const queryClient = useQueryClient()
|
||||||
const {logoutEveryAccount, login} = useSessionApi()
|
const {logoutEveryAccount, login} = useSessionApi()
|
||||||
const onboardingDispatch = useOnboardingDispatch()
|
const onboardingDispatch = useOnboardingDispatch()
|
||||||
@@ -76,7 +81,7 @@ export function TestCtrls() {
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{isProxyConfigured && (
|
{isProxyConfigured && !hasSession && (
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
{position: 'absolute', top: 100, zIndex: 100},
|
{position: 'absolute', top: 100, zIndex: 100},
|
||||||
@@ -96,7 +101,14 @@ export function TestCtrls() {
|
|||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
<View style={{position: 'absolute', top: 102, right: 0, zIndex: 100}}>
|
<View
|
||||||
|
style={{
|
||||||
|
position: 'absolute',
|
||||||
|
top: 102,
|
||||||
|
right: 0,
|
||||||
|
zIndex: 100,
|
||||||
|
alignItems: 'flex-end',
|
||||||
|
}}>
|
||||||
<Pressable
|
<Pressable
|
||||||
testID="e2eSignOut"
|
testID="e2eSignOut"
|
||||||
onPress={() => logoutEveryAccount('Settings')}
|
onPress={() => logoutEveryAccount('Settings')}
|
||||||
@@ -137,7 +149,7 @@ export function TestCtrls() {
|
|||||||
testID="storybookBtn"
|
testID="storybookBtn"
|
||||||
onPress={() => navigate('Debug')}
|
onPress={() => navigate('Debug')}
|
||||||
accessibilityRole="button"
|
accessibilityRole="button"
|
||||||
style={BTN}
|
style={STORYBOOK_BTN}
|
||||||
/>
|
/>
|
||||||
<Pressable
|
<Pressable
|
||||||
testID="e2eRefreshHome"
|
testID="e2eRefreshHome"
|
||||||
|
|||||||
Reference in New Issue
Block a user