New onboarding tests (#3996)
* Add onboarding test * Add onboarding avatar-creator test * Update profile screen edit test
This commit is contained in:
parent
f0cd8ab6f4
commit
27bb73c701
6 changed files with 104 additions and 328 deletions
|
@ -3,9 +3,9 @@ import {LogBox, Pressable, View} from 'react-native'
|
|||
import {useQueryClient} from '@tanstack/react-query'
|
||||
|
||||
import {useModalControls} from '#/state/modals'
|
||||
import {useSetFeedViewPreferencesMutation} from '#/state/queries/preferences'
|
||||
import {useSessionApi} from '#/state/session'
|
||||
import {useLoggedOutViewControls} from '#/state/shell/logged-out'
|
||||
import {useOnboardingDispatch} from '#/state/shell/onboarding'
|
||||
import {navigate} from '../../../Navigation'
|
||||
|
||||
LogBox.ignoreAllLogs()
|
||||
|
@ -22,7 +22,7 @@ export function TestCtrls() {
|
|||
const queryClient = useQueryClient()
|
||||
const {logout, login} = useSessionApi()
|
||||
const {openModal} = useModalControls()
|
||||
const {mutate: setFeedViewPref} = useSetFeedViewPreferencesMutation()
|
||||
const onboardingDispatch = useOnboardingDispatch()
|
||||
const {setShowLoggedOut} = useLoggedOutViewControls()
|
||||
const onPressSignInAlice = async () => {
|
||||
await login(
|
||||
|
@ -88,12 +88,6 @@ export function TestCtrls() {
|
|||
accessibilityRole="button"
|
||||
style={BTN}
|
||||
/>
|
||||
<Pressable
|
||||
testID="e2eToggleMergefeed"
|
||||
onPress={() => setFeedViewPref({lab_mergeFeedEnabled: true})}
|
||||
accessibilityRole="button"
|
||||
style={BTN}
|
||||
/>
|
||||
<Pressable
|
||||
testID="e2eRefreshHome"
|
||||
onPress={() => queryClient.invalidateQueries({queryKey: ['post-feed']})}
|
||||
|
@ -112,6 +106,12 @@ export function TestCtrls() {
|
|||
accessibilityRole="button"
|
||||
style={BTN}
|
||||
/>
|
||||
<Pressable
|
||||
testID="e2eStartOnboarding"
|
||||
onPress={() => onboardingDispatch({type: 'start'})}
|
||||
accessibilityRole="button"
|
||||
style={BTN}
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue