Fix E2E tests (#5980)

This commit is contained in:
Hailey
2024-10-28 13:31:24 -07:00
committed by GitHub
parent 0f3fa06c3e
commit 84db1f997b
6 changed files with 25 additions and 22 deletions
+2 -4
View File
@@ -17,12 +17,10 @@ appId: xyz.blueskyweb.app
id: "openGalleryBtn" id: "openGalleryBtn"
- tapOn: - tapOn:
id: "labelsBtn" id: "labelsBtn"
- tapOn: - tapOn: "Porn"
label: "Tap on porn"
point: 78%,67%
- tapOn: - tapOn:
label: "Tap on confirm" label: "Tap on confirm"
point: 51%,92% id: "confirmBtn"
- tapOn: - tapOn:
id: "composerPublishBtn" id: "composerPublishBtn"
- tapOn: - tapOn:
+3 -2
View File
@@ -8,7 +8,8 @@ appId: xyz.blueskyweb.app
file: ../setupApp.yml file: ../setupApp.yml
- tapOn: - tapOn:
id: "e2eSignInAlice" id: "e2eSignInAlice"
- tapOn: "/sys/debug" - tapOn:
id: "storybookBtn"
- tapOn: - tapOn:
id: "sharedPrefsTestOpenBtn" id: "sharedPrefsTestOpenBtn"
- tapOn: - tapOn:
@@ -16,7 +17,7 @@ appId: xyz.blueskyweb.app
- assertVisible: "Hello" - assertVisible: "Hello"
- tapOn: - tapOn:
id: "removeStringBtn" id: "removeStringBtn"
- assertVisible: "null" - assertVisible: "undefined"
- tapOn: - tapOn:
id: "setBoolBtn" id: "setBoolBtn"
- assertVisible: "true" - assertVisible: "true"
+2 -1
View File
@@ -220,7 +220,8 @@ function DialogInner({
onPress={() => control.close()} onPress={() => control.close()}
color="primary" color="primary"
size={isWeb ? 'small' : 'large'} size={isWeb ? 'small' : 'large'}
variant="solid"> variant="solid"
testID="confirmBtn">
<ButtonText> <ButtonText>
<Trans>Done</Trans> <Trans>Done</Trans>
</ButtonText> </ButtonText>
+4 -1
View File
@@ -73,7 +73,10 @@ export function HomeHeaderLayoutMobile({
]}> ]}>
{IS_DEV && ( {IS_DEV && (
<> <>
<Link label="View storybook" to="/sys/debug"> <Link
label="View storybook"
to="/sys/debug"
testID="storybookBtn">
<ColorPalette size="md" /> <ColorPalette size="md" />
</Link> </Link>
</> </>
-13
View File
@@ -1,8 +1,6 @@
import React from 'react' import React from 'react'
import {View} from 'react-native' import {View} from 'react-native'
import {useNavigation} from '@react-navigation/native'
import {NavigationProp} from '#/lib/routes/types'
import {useDialogStateControlContext} from '#/state/dialogs' import {useDialogStateControlContext} from '#/state/dialogs'
import {atoms as a} from '#/alf' import {atoms as a} from '#/alf'
import {Button, ButtonText} from '#/components/Button' import {Button, ButtonText} from '#/components/Button'
@@ -25,7 +23,6 @@ export function Dialogs() {
const [shouldRenderUnmountTest, setShouldRenderUnmountTest] = const [shouldRenderUnmountTest, setShouldRenderUnmountTest] =
React.useState(false) React.useState(false)
const unmountTestInterval = React.useRef<number>() const unmountTestInterval = React.useRef<number>()
const navigation = useNavigation<NavigationProp>()
const onUnmountTestStartPressWithClose = () => { const onUnmountTestStartPressWithClose = () => {
setShouldRenderUnmountTest(true) setShouldRenderUnmountTest(true)
@@ -152,16 +149,6 @@ export function Dialogs() {
<ButtonText>End Unmount Test</ButtonText> <ButtonText>End Unmount Test</ButtonText>
</Button> </Button>
<Button
variant="solid"
color="primary"
size="small"
onPress={() => navigation.navigate('SharedPreferencesTester')}
label="two"
testID="sharedPrefsTestOpenBtn">
<ButtonText>Open Shared Prefs Tester</ButtonText>
</Button>
<Button <Button
variant="solid" variant="solid"
color="primary" color="primary"
+13
View File
@@ -1,6 +1,8 @@
import React from 'react' import React from 'react'
import {ScrollView, View} from 'react-native' import {ScrollView, View} from 'react-native'
import {useNavigation} from '@react-navigation/native'
import {NavigationProp} from '#/lib/routes/types'
import {isWeb} from '#/platform/detection' import {isWeb} from '#/platform/detection'
import {useSetThemePrefs} from '#/state/shell' import {useSetThemePrefs} from '#/state/shell'
import {CenteredView} from '#/view/com/util/Views' import {CenteredView} from '#/view/com/util/Views'
@@ -39,6 +41,7 @@ function StorybookInner() {
const t = useTheme() const t = useTheme()
const {setColorMode, setDarkTheme} = useSetThemePrefs() const {setColorMode, setDarkTheme} = useSetThemePrefs()
const [showContainedList, setShowContainedList] = React.useState(false) const [showContainedList, setShowContainedList] = React.useState(false)
const navigation = useNavigation<NavigationProp>()
return ( return (
<CenteredView style={[t.atoms.bg]}> <CenteredView style={[t.atoms.bg]}>
@@ -86,6 +89,16 @@ function StorybookInner() {
</Button> </Button>
</View> </View>
<Button
variant="solid"
color="primary"
size="small"
onPress={() => navigation.navigate('SharedPreferencesTester')}
label="two"
testID="sharedPrefsTestOpenBtn">
<ButtonText>Open Shared Prefs Tester</ButtonText>
</Button>
<Admonitions /> <Admonitions />
<ThemeProvider theme="light"> <ThemeProvider theme="light">