maestro-e2e
Run and debug Maestro e2e tests for arena-mobile on Android. Use when asked to run e2e tests, debug a failing Maestro flow, or set up local Maestro testing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run and debug Maestro e2e tests for arena-mobile on Android. Use when asked to run e2e tests, debug a failing Maestro flow, or set up local Maestro testing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | maestro-e2e |
| description | Run and debug Maestro e2e tests for arena-mobile on Android. Use when asked to run e2e tests, debug a failing Maestro flow, or set up local Maestro testing. |
Maestro tests live in e2e/maestro/. The CI pipeline is defined in .github/workflows/e2e-maestro-android.yml. Use this guide to run the same tests locally.
corepack enable)sdk install java 17.0.x-tem)google_atd system image recommended)curl -fsSL "https://get.maestro.mobile.dev" | bashSet environment variables for server-connected tests (flows 002-004):
export ARENA_SERVER_URL=https://your-arena-server
export ARENA_SERVER_USERNAME=your@email.com
export ARENA_SERVER_PASSWORD=yourpassword
yarn install --immutable
# Prebuild native project (only needed after package.json / app.json / app.config.ts changes)
npx expo prebuild --platform android
# Bundle JS
mkdir -p android/app/src/main/assets
npx expo export:embed \
--platform android \
--dev false \
--entry-file node_modules/expo/AppEntry.js \
--bundle-output android/app/src/main/assets/index.android.bundle \
--assets-dest android/app/src/main/res
# Compile APK
cd android && ./gradlew assembleDebug --no-daemon && cd ..
The APK is at android/app/build/outputs/apk/debug/app-debug.apk.
# List available AVDs
emulator -list-avds
# Start one (adjust name)
emulator -avd Pixel_8_API_35 -no-snapshot -gpu swiftshader_indirect -no-boot-anim &
# Wait for boot
adb wait-for-device
adb shell 'while [[ "$(getprop sys.boot_completed | tr -d "\r")" != "1" ]]; do sleep 2; done'
# Suppress crash/ANR dialogs
adb shell settings put global anr_show_background 0
adb shell settings put global hide_error_dialogs 1
adb install -r -t -g android/app/build/outputs/apk/debug/app-debug.apk
sleep 5 # let the OS settle after install
# Full suite
maestro test e2e/maestro/allTests.yaml \
--format junit --output report.xml \
-e APP_ID=org.openforis.arena_mobile \
-e ARENA_SERVER_URL=$ARENA_SERVER_URL \
-e ARENA_SERVER_USERNAME=$ARENA_SERVER_USERNAME \
-e ARENA_SERVER_PASSWORD=$ARENA_SERVER_PASSWORD
# Single flow (no server credentials needed for flow 004 after survey is cached)
maestro test e2e/maestro/004.create-new-record.yaml \
-e APP_ID=org.openforis.arena_mobile
| File | What it tests |
|---|---|
001.startup.yaml | App launches, "Not logged in" visible |
002.login.yaml | Login against Arena server |
003.download-demo-survey.yaml | Import arena_demo survey from cloud |
004.create-new-record.yaml | Create record, toggle boolean/relevant-if/visible-if fields, confirm-swipe dialog |
~/.maestro/tests/<timestamp>/maestro studio (opens browser UI to build flows by tapping)maestro hierarchy while the app is in the foreground#| testID | Component | Notes |
|---|---|---|
confirm-dialog-title | Dialog.Title in AppConfirmDialog | Wait for this to confirm dialog is open |
confirm-swipe-button | Wrapper View around SwipeButton | Not swipeable directly — see below |
SwipeThumb | Animated.View inside rn-swipe-button | Use this as swipe target — it holds the PanResponder |
confirm-dialog-confirm-button | Confirm Button | Becomes enabled after swipe completes |
Why
SwipeThumband notconfirm-swipe-button?
The PanResponder inrn-swipe-buttonis attached toSwipeThumb(the draggable fill element), not the outer container. Maestro'sswipe: from: id:starts from the element's center.confirm-swipe-buttonis the full-width container so its center is over the title text, missing the thumb entirely.SwipeThumbstarts as a ~50px square at the left edge, so swiping from its center correctly hits the PanResponder.