swipe(direction, duration?)— swipe in a direction (default 400ms)back()— press back buttonhideKeyboard()— dismiss the keyboardlongPress(id)— long press element by testIDraw(yaml)— escape hatch for injecting any raw Maestro YAML
scroll(id, direction)now generatesscrollUntilVisible(was generating invalidscrollwithdirection)- Multi-platform
appIduses${APP_ID}env var — Maestro does not support nested format --platform ios|androidflag onpreflight testto resolve multi-platform appIdpreflight generatedeletes orphaned YAML files with no matchingscenario()in codebasepreflight generatefollows single-level imports to resolve external test functions- Show raw Maestro stderr when tests fail without parsed results (YAML parse errors, etc.)
- Always display output directory path on test failure
- Validate generated YAML commands against known Maestro commands at generate time
- Fixed
scrollstep generating invalid Maestro YAML (scrollwithdirectionproperty) - Fixed multi-platform
appIdgenerating unsupported nested YAML format - Fixed pre-existing lint errors (
no-useless-escape,no-redeclare)
First stable release. Validated with 22/22 scenarios passing on a production React Native app.
scenario(config, Component)— wrap screens for isolated E2E testing<StateInjector>— interceptpreflight://deep links, inject state, navigate<Preflight />— dev catalog to browse and preview all scenarios- Babel plugin strips all preflight code in production (
strip: trueopt-in) isPreflightActive()— exported flag to bypass auth gates, onboarding, modals during E2E
id,route,description— screen identificationinject()— pre-populate stores and query cache before navigation (zero loading states)test()— declarative test steps:see(),tap(),type(),notSee(),wait(),scroll()variants— test multiple states of the same screen (generates subdirectory YAMLs)flow— multi-screen journeys withactions()andskipIfconditional stepsenv— Maestro environment variables for parameterized tests- HOC compatible —
React.ComponentType<any>overload for wrapped components
npx preflight init— scaffold directories, deep link scheme, catalog, Babel pluginnpx preflight generate— AST scan forscenario()calls, generate Maestro YAMLnpx preflight test— interactive multi-select picker with live progressnpx preflight test <id>— run a single scenario (auto-regenerates YAML)npx preflight test --all— run all scenarios + flows in a single Maestro sessionnpx preflight test --retry N— retry failed testsnpx preflight test --snapshot— capture screenshots per passed testnpx preflight snapshot:compare— pixelmatch comparison + HTML report (auto-opens)npx preflight snapshot:update— promote current screenshots to baselinesnpx preflight snapshot:reset— delete all or single scenario snapshots
launchAppwithstopApp: falsewaitForAnimationToEndbefore every screenshot- Multi-platform
appIdsupport ({ ios, android }) via${APP_ID}env var and--platformflag - Flows generated in
.maestro/flows/with conditionalskipIfviarunFlow: when: notVisible
- Auto-detects Expo Router (
app/_layout.tsx) or React Navigation (src/screens/) - Supports
app/,src/app/,src/screens/,src/with configurablesrcDir - Conditional scaffolding:
__dev/preflight.tsx(Expo Router) orPreflightScreen.tsx+ navigator instructions (React Navigation)
- Path traversal protection on all config paths (
screensDir,snapshotsDir,srcDir) - Deep recursive prototype pollution sanitization on deep link state params
- Deep link ID validation against
^[a-zA-Z0-9_\-/]+$pattern - YAML string escaping on all user-provided values
- HTML escaping in snapshot reports
wait()step clamped to 0-60000ms- Config type validation with warnings on mismatch
- Colored terminal output (green PASS, red FAIL, dim hints)
- Parsed Maestro errors with contextual failure messages
- Debug log path shown inline with each failure
- Quiet mode for generate when called from test
- Single Maestro session for multiple tests (temp dir approach)
- Orphan YAML detection (recursive, including variant subdirectories)