Add better onboard testing (#4007)

This commit is contained in:
Paul Frazee 2024-05-13 20:23:31 -07:00 committed by GitHub
parent fd704bfd44
commit 107760d551
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 71 additions and 1 deletions

View file

@ -2,6 +2,7 @@ import React from 'react'
import {LogBox, Pressable, View} from 'react-native'
import {useQueryClient} from '@tanstack/react-query'
import {useDangerousSetGate} from '#/lib/statsig/statsig'
import {useModalControls} from '#/state/modals'
import {useSessionApi} from '#/state/session'
import {useLoggedOutViewControls} from '#/state/shell/logged-out'
@ -24,6 +25,7 @@ export function TestCtrls() {
const {openModal} = useModalControls()
const onboardingDispatch = useOnboardingDispatch()
const {setShowLoggedOut} = useLoggedOutViewControls()
const setGate = useDangerousSetGate()
const onPressSignInAlice = async () => {
await login(
{
@ -108,7 +110,22 @@ export function TestCtrls() {
/>
<Pressable
testID="e2eStartOnboarding"
onPress={() => onboardingDispatch({type: 'start'})}
onPress={() => {
// TODO remove when experiment is over
setGate('reduced_onboarding_and_home_algo', true)
onboardingDispatch({type: 'start'})
}}
accessibilityRole="button"
style={BTN}
/>
{/* TODO remove this entire control when experiment is over */}
<Pressable
testID="e2eStartLongboarding"
onPress={() => {
// TODO remove when experiment is over
setGate('reduced_onboarding_and_home_algo', false)
onboardingDispatch({type: 'start'})
}}
accessibilityRole="button"
style={BTN}
/>