get e2e tests working on Android
This commit is contained in:
@@ -15,6 +15,11 @@ appId: xyz.blueskyweb.app
|
|||||||
- tapOn:
|
- tapOn:
|
||||||
id: "customServerTextInput"
|
id: "customServerTextInput"
|
||||||
- inputText: "http://localhost:3000"
|
- inputText: "http://localhost:3000"
|
||||||
|
- runFlow:
|
||||||
|
when:
|
||||||
|
platform: Android
|
||||||
|
commands:
|
||||||
|
- hideKeyboard
|
||||||
- tapOn: "Done"
|
- tapOn: "Done"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "loginUsernameInput"
|
id: "loginUsernameInput"
|
||||||
|
|||||||
+18
-4
@@ -5,13 +5,27 @@ appId: xyz.blueskyweb.app
|
|||||||
clearState: true
|
clearState: true
|
||||||
arguments:
|
arguments:
|
||||||
"-EXDevMenuIsOnboardingFinished": true
|
"-EXDevMenuIsOnboardingFinished": true
|
||||||
- openLink: "exp+bluesky://expo-development-client/?url=http%3A%2F%2Flocalhost%3A8081"
|
|
||||||
- runFlow:
|
- runFlow:
|
||||||
when:
|
when:
|
||||||
visible: 'Open in "Bluesky"'
|
platform: iOS
|
||||||
commands:
|
commands:
|
||||||
- tapOn: Open
|
- openLink: "exp+bluesky://expo-development-client/?url=http%3A%2F%2Flocalhost%3A8081"
|
||||||
- waitForAnimationToEnd
|
- runFlow:
|
||||||
|
when:
|
||||||
|
visible: 'Open in "Bluesky"'
|
||||||
|
commands:
|
||||||
|
- tapOn: Open
|
||||||
|
- runFlow:
|
||||||
|
when:
|
||||||
|
platform: Android
|
||||||
|
commands:
|
||||||
|
- tapOn: 'http://localhost:8081'
|
||||||
|
- runFlow:
|
||||||
|
label: "Dismiss Expo dev menu"
|
||||||
|
when:
|
||||||
|
visible: "Continue"
|
||||||
|
commands:
|
||||||
|
- back
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: e2eProxyHeaderInput
|
id: e2eProxyHeaderInput
|
||||||
- inputText: ${output.result}
|
- inputText: ${output.result}
|
||||||
|
|||||||
@@ -9,6 +9,14 @@ values.
|
|||||||
2. You can write Maestro tests in `/.maestro/flows/` directory by creating a new `.yml` file or by modifying an existing one.
|
2. You can write Maestro tests in `/.maestro/flows/` directory by creating a new `.yml` file or by modifying an existing one.
|
||||||
3. You can also use [Maestro Studio](https://maestro.mobile.dev/getting-started/maestro-studio) which automatically generates commands by recording your actions on the app. Therefore, you can create realistic tests without having to manually write any code. Use the `maestro studio` command to start recording your actions.
|
3. You can also use [Maestro Studio](https://maestro.mobile.dev/getting-started/maestro-studio) which automatically generates commands by recording your actions on the app. Therefore, you can create realistic tests without having to manually write any code. Use the `maestro studio` command to start recording your actions.
|
||||||
|
|
||||||
|
### Running on Android
|
||||||
|
|
||||||
|
You will need to allow your device access to the port that the mock server is running on.
|
||||||
|
|
||||||
|
```
|
||||||
|
adb reverse tcp:3000 tcp:3000
|
||||||
|
```
|
||||||
|
|
||||||
### Running Maestro tests
|
### Running Maestro tests
|
||||||
|
|
||||||
- In one tab, run `yarn e2e:mock-server`
|
- In one tab, run `yarn e2e:mock-server`
|
||||||
|
|||||||
+1
-1
@@ -85,7 +85,7 @@
|
|||||||
"@braintree/sanitize-url": "^6.0.2",
|
"@braintree/sanitize-url": "^6.0.2",
|
||||||
"@bsky.app/alf": "^0.1.7",
|
"@bsky.app/alf": "^0.1.7",
|
||||||
"@bsky.app/expo-image-crop-tool": "^0.5.0",
|
"@bsky.app/expo-image-crop-tool": "^0.5.0",
|
||||||
"@bsky.app/expo-translate-text": "^0.2.4",
|
"@bsky.app/expo-translate-text": "^0.2.7",
|
||||||
"@bsky.app/react-native-mmkv": "2.12.5",
|
"@bsky.app/react-native-mmkv": "2.12.5",
|
||||||
"@discord/bottom-sheet": "bluesky-social/react-native-bottom-sheet",
|
"@discord/bottom-sheet": "bluesky-social/react-native-bottom-sheet",
|
||||||
"@emoji-mart/data": "^1.2.1",
|
"@emoji-mart/data": "^1.2.1",
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ export function LoggedOut({onDismiss}: {onDismiss?: () => void}) {
|
|||||||
const agent = useAgent()
|
const agent = useAgent()
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const actors = accounts.map(acc => acc.did)
|
const actors = accounts.map(acc => acc.did)
|
||||||
|
if (actors.length === 0) return
|
||||||
void queryClient.prefetchQuery({
|
void queryClient.prefetchQuery({
|
||||||
queryKey: profilesQueryKey(actors),
|
queryKey: profilesQueryKey(actors),
|
||||||
staleTime: STALE.MINUTES.FIVE,
|
staleTime: STALE.MINUTES.FIVE,
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ export function TestCtrls() {
|
|||||||
const onboardingDispatch = useOnboardingDispatch()
|
const onboardingDispatch = useOnboardingDispatch()
|
||||||
const {setShowLoggedOut} = useLoggedOutViewControls()
|
const {setShowLoggedOut} = useLoggedOutViewControls()
|
||||||
const onPressSignInAlice = async () => {
|
const onPressSignInAlice = async () => {
|
||||||
|
console.info('[E2E] Signing in as Alice')
|
||||||
await login(
|
await login(
|
||||||
{
|
{
|
||||||
service: 'http://localhost:3000',
|
service: 'http://localhost:3000',
|
||||||
@@ -36,6 +37,7 @@ export function TestCtrls() {
|
|||||||
setShowLoggedOut(false)
|
setShowLoggedOut(false)
|
||||||
}
|
}
|
||||||
const onPressSignInBob = async () => {
|
const onPressSignInBob = async () => {
|
||||||
|
console.info('[E2E] Signing in as Bob')
|
||||||
await login(
|
await login(
|
||||||
{
|
{
|
||||||
service: 'http://localhost:3000',
|
service: 'http://localhost:3000',
|
||||||
@@ -54,6 +56,9 @@ export function TestCtrls() {
|
|||||||
accessibilityHint="Enter proxy header"
|
accessibilityHint="Enter proxy header"
|
||||||
testID="e2eProxyHeaderInput"
|
testID="e2eProxyHeaderInput"
|
||||||
onChangeText={val => setProxyHeader(val as any)}
|
onChangeText={val => setProxyHeader(val as any)}
|
||||||
|
autoComplete="off"
|
||||||
|
autoCorrect={false}
|
||||||
|
autoCapitalize="none"
|
||||||
onSubmitEditing={() => {
|
onSubmitEditing={() => {
|
||||||
const header = `${proxyHeader}#bsky_appview`
|
const header = `${proxyHeader}#bsky_appview`
|
||||||
BLUESKY_PROXY_HEADER.set(header)
|
BLUESKY_PROXY_HEADER.set(header)
|
||||||
@@ -135,15 +140,6 @@ export function TestCtrls() {
|
|||||||
accessibilityRole="button"
|
accessibilityRole="button"
|
||||||
style={BTN}
|
style={BTN}
|
||||||
/>
|
/>
|
||||||
{/* TODO remove this entire control when experiment is over */}
|
|
||||||
<Pressable
|
|
||||||
testID="e2eStartLongboarding"
|
|
||||||
onPress={() => {
|
|
||||||
onboardingDispatch({type: 'start'})
|
|
||||||
}}
|
|
||||||
accessibilityRole="button"
|
|
||||||
style={BTN}
|
|
||||||
/>
|
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3731,10 +3731,10 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@bsky.app/expo-image-crop-tool/-/expo-image-crop-tool-0.5.0.tgz#4308fbde5c15e6be9122601797bc3d9549c95e31"
|
resolved "https://registry.yarnpkg.com/@bsky.app/expo-image-crop-tool/-/expo-image-crop-tool-0.5.0.tgz#4308fbde5c15e6be9122601797bc3d9549c95e31"
|
||||||
integrity sha512-gmhQr2HWTRFyPO00fn5OmtiEVtikXusHMrN5Zoq26pu1VZX3zVE+aoc668etTqrvsQcm2Qu8fo96k5F3Wu+6wg==
|
integrity sha512-gmhQr2HWTRFyPO00fn5OmtiEVtikXusHMrN5Zoq26pu1VZX3zVE+aoc668etTqrvsQcm2Qu8fo96k5F3Wu+6wg==
|
||||||
|
|
||||||
"@bsky.app/expo-translate-text@^0.2.4":
|
"@bsky.app/expo-translate-text@^0.2.7":
|
||||||
version "0.2.4"
|
version "0.2.7"
|
||||||
resolved "https://registry.yarnpkg.com/@bsky.app/expo-translate-text/-/expo-translate-text-0.2.4.tgz#6e7f20f286111ee4d550c0c84f57393fc215a675"
|
resolved "https://registry.yarnpkg.com/@bsky.app/expo-translate-text/-/expo-translate-text-0.2.7.tgz#e34811d0f0300f8808762e5676aa50790ca5d5e8"
|
||||||
integrity sha512-7mvFggNfkJEufI5A3WnjfjdN3H9P6Dpx7CpDkA9npWqA8Cb2icXq3k3nz3MaXGrVKTYiJnytAffYtos7mPoeOg==
|
integrity sha512-J9zctP9hLxX0eustTKk5CBnCkk6cEdlu1s7GzUnpT65qkCSNbYqbbUCpcU2Z2S2dN/1+w6L/iHb+vmCEbZMOaQ==
|
||||||
|
|
||||||
"@bsky.app/react-native-mmkv@2.12.5":
|
"@bsky.app/react-native-mmkv@2.12.5":
|
||||||
version "2.12.5"
|
version "2.12.5"
|
||||||
|
|||||||
Reference in New Issue
Block a user