Fix E2E tests (#5980)
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import React from 'react'
|
||||
import {View} from 'react-native'
|
||||
import {useNavigation} from '@react-navigation/native'
|
||||
|
||||
import {NavigationProp} from '#/lib/routes/types'
|
||||
import {useDialogStateControlContext} from '#/state/dialogs'
|
||||
import {atoms as a} from '#/alf'
|
||||
import {Button, ButtonText} from '#/components/Button'
|
||||
@@ -25,7 +23,6 @@ export function Dialogs() {
|
||||
const [shouldRenderUnmountTest, setShouldRenderUnmountTest] =
|
||||
React.useState(false)
|
||||
const unmountTestInterval = React.useRef<number>()
|
||||
const navigation = useNavigation<NavigationProp>()
|
||||
|
||||
const onUnmountTestStartPressWithClose = () => {
|
||||
setShouldRenderUnmountTest(true)
|
||||
@@ -152,16 +149,6 @@ export function Dialogs() {
|
||||
<ButtonText>End Unmount Test</ButtonText>
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
variant="solid"
|
||||
color="primary"
|
||||
size="small"
|
||||
onPress={() => navigation.navigate('SharedPreferencesTester')}
|
||||
label="two"
|
||||
testID="sharedPrefsTestOpenBtn">
|
||||
<ButtonText>Open Shared Prefs Tester</ButtonText>
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
variant="solid"
|
||||
color="primary"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import React from 'react'
|
||||
import {ScrollView, View} from 'react-native'
|
||||
import {useNavigation} from '@react-navigation/native'
|
||||
|
||||
import {NavigationProp} from '#/lib/routes/types'
|
||||
import {isWeb} from '#/platform/detection'
|
||||
import {useSetThemePrefs} from '#/state/shell'
|
||||
import {CenteredView} from '#/view/com/util/Views'
|
||||
@@ -39,6 +41,7 @@ function StorybookInner() {
|
||||
const t = useTheme()
|
||||
const {setColorMode, setDarkTheme} = useSetThemePrefs()
|
||||
const [showContainedList, setShowContainedList] = React.useState(false)
|
||||
const navigation = useNavigation<NavigationProp>()
|
||||
|
||||
return (
|
||||
<CenteredView style={[t.atoms.bg]}>
|
||||
@@ -86,6 +89,16 @@ function StorybookInner() {
|
||||
</Button>
|
||||
</View>
|
||||
|
||||
<Button
|
||||
variant="solid"
|
||||
color="primary"
|
||||
size="small"
|
||||
onPress={() => navigation.navigate('SharedPreferencesTester')}
|
||||
label="two"
|
||||
testID="sharedPrefsTestOpenBtn">
|
||||
<ButtonText>Open Shared Prefs Tester</ButtonText>
|
||||
</Button>
|
||||
|
||||
<Admonitions />
|
||||
|
||||
<ThemeProvider theme="light">
|
||||
|
||||
Reference in New Issue
Block a user