Add better onboard testing (#4007)
This commit is contained in:
parent
fd704bfd44
commit
107760d551
3 changed files with 71 additions and 1 deletions
|
@ -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}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue