fix flaky e2e proxy setup

This commit is contained in:
Samuel Newman
2026-07-28 09:49:34 +03:00
parent 82c505f286
commit b6f3d94b8d
2 changed files with 18 additions and 9 deletions
+2 -1
View File
@@ -33,4 +33,5 @@ appId: xyz.blueskyweb.app
- tapOn:
id: e2eProxyHeaderInput
- inputText: ${output.result}
- pressKey: Enter
- tapOn:
id: e2eConfigureProxy
+16 -8
View File
@@ -1,5 +1,5 @@
import {useState} from 'react'
import {LogBox, Pressable, TextInput, View} from 'react-native'
import {Keyboard, LogBox, Pressable, TextInput, View} from 'react-native'
import {useQueryClient} from '@tanstack/react-query'
import {BLUESKY_PROXY_HEADER} from '#/lib/constants'
@@ -62,6 +62,14 @@ export function TestCtrls() {
setShowLoggedOut(false)
}
const [proxyHeader, setProxyHeader] = useState('')
const configureProxy = () => {
const header = `${proxyHeader}#bsky_appview`
BLUESKY_PROXY_HEADER.set(header)
agent.configureProxy(header as any)
hasConfiguredProxy = true
setIsProxyConfigured(true)
Keyboard.dismiss()
}
return (
<View style={{position: 'absolute', top: 100, right: 0, zIndex: 100}}>
<TextInput
@@ -72,13 +80,13 @@ export function TestCtrls() {
autoComplete="off"
autoCorrect={false}
autoCapitalize="none"
onSubmitEditing={() => {
const header = `${proxyHeader}#bsky_appview`
BLUESKY_PROXY_HEADER.set(header)
agent.configureProxy(header as any)
hasConfiguredProxy = true
setIsProxyConfigured(true)
}}
onSubmitEditing={configureProxy}
style={BTN}
/>
<Pressable
testID="e2eConfigureProxy"
onPress={configureProxy}
accessibilityRole="button"
style={BTN}
/>
{isProxyConfigured && (