diff options
-rw-r--r-- | __e2e__/flows/composer-self-label.yml | 8 | ||||
-rw-r--r-- | __e2e__/flows/shared-prefs.yml | 5 | ||||
-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 |
6 files changed, 25 insertions, 22 deletions
diff --git a/__e2e__/flows/composer-self-label.yml b/__e2e__/flows/composer-self-label.yml index cc38b1d99..e41dea64a 100644 --- a/__e2e__/flows/composer-self-label.yml +++ b/__e2e__/flows/composer-self-label.yml @@ -17,14 +17,12 @@ appId: xyz.blueskyweb.app id: "openGalleryBtn" - tapOn: id: "labelsBtn" -- tapOn: - label: "Tap on porn" - point: 78%,67% +- tapOn: "Porn" - tapOn: label: "Tap on confirm" - point: 51%,92% + id: "confirmBtn" - tapOn: id: "composerPublishBtn" - tapOn: id: "e2eRefreshHome" -- assertVisible: "Adult Content" \ No newline at end of file +- assertVisible: "Adult Content" diff --git a/__e2e__/flows/shared-prefs.yml b/__e2e__/flows/shared-prefs.yml index 73a066829..b645fd0d2 100644 --- a/__e2e__/flows/shared-prefs.yml +++ b/__e2e__/flows/shared-prefs.yml @@ -8,7 +8,8 @@ appId: xyz.blueskyweb.app file: ../setupApp.yml - tapOn: id: "e2eSignInAlice" -- tapOn: "/sys/debug" +- tapOn: + id: "storybookBtn" - tapOn: id: "sharedPrefsTestOpenBtn" - tapOn: @@ -16,7 +17,7 @@ appId: xyz.blueskyweb.app - assertVisible: "Hello" - tapOn: id: "removeStringBtn" -- assertVisible: "null" +- assertVisible: "undefined" - tapOn: id: "setBoolBtn" - assertVisible: "true" 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"> |