diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/composer/labels/LabelsBtn.tsx | 3 | ||||
-rw-r--r-- | src/view/com/home/HomeHeaderLayoutMobile.tsx | 5 | ||||
-rw-r--r-- | src/view/screens/Storybook/Dialogs.tsx | 13 | ||||
-rw-r--r-- | src/view/screens/Storybook/index.tsx | 13 |
4 files changed, 19 insertions, 15 deletions
diff --git a/src/view/com/composer/labels/LabelsBtn.tsx b/src/view/com/composer/labels/LabelsBtn.tsx index fe8816fb4..2147a5af7 100644 --- a/src/view/com/composer/labels/LabelsBtn.tsx +++ b/src/view/com/composer/labels/LabelsBtn.tsx @@ -220,7 +220,8 @@ function DialogInner({ onPress={() => control.close()} color="primary" size={isWeb ? 'small' : 'large'} - variant="solid"> + variant="solid" + testID="confirmBtn"> <ButtonText> <Trans>Done</Trans> </ButtonText> diff --git a/src/view/com/home/HomeHeaderLayoutMobile.tsx b/src/view/com/home/HomeHeaderLayoutMobile.tsx index 3994a3c3c..f5397d717 100644 --- a/src/view/com/home/HomeHeaderLayoutMobile.tsx +++ b/src/view/com/home/HomeHeaderLayoutMobile.tsx @@ -73,7 +73,10 @@ export function HomeHeaderLayoutMobile({ ]}> {IS_DEV && ( <> - <Link label="View storybook" to="/sys/debug"> + <Link + label="View storybook" + to="/sys/debug" + testID="storybookBtn"> <ColorPalette size="md" /> </Link> </> diff --git a/src/view/screens/Storybook/Dialogs.tsx b/src/view/screens/Storybook/Dialogs.tsx index 343d7f07b..4b4d4191f 100644 --- a/src/view/screens/Storybook/Dialogs.tsx +++ b/src/view/screens/Storybook/Dialogs.tsx @@ -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) @@ -156,16 +153,6 @@ export function Dialogs() { 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" - size="small" onPress={() => { const isReducedMotionEnabled = PlatformInfo.getIsReducedMotionEnabled() diff --git a/src/view/screens/Storybook/index.tsx b/src/view/screens/Storybook/index.tsx index f1152fb7e..f7ac11ffc 100644 --- a/src/view/screens/Storybook/index.tsx +++ b/src/view/screens/Storybook/index.tsx @@ -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"> |